IMAP protocol summary
IMAP - internet message access protocol.
Versions:
- IMAP1 (Interim Mail Access Protocol) - 1986.
- IMAP2 (Interactive Mail Access Protocol) - 1988.
- IMAP3 - 1991.
- IMAP4 - 1994, last updates - 2003.
IMAP is used to read emails that came to the user's mailbox.
Emails are stored on server:
- Clients connect to the server and download emails only after a user request.
- The server can perform complex operations with emails.
Advantages:
- Several clients can work at the same time.
- All clients see the same mailbox status.
Disadvantages:
- Protocol is more complex in comparison to POP3.
- Server space for the mailbox is usually limited.
IMAP is an application layer protocol and uses the TCP transport layer protocol. Port 143.
IMAP allows you to use multiple mailboxes or folders:
- Folders are stored on server.
- Folders can form a hierarchy.
- Emails can be moved from one folder to another.
Flag:
- It's an email "label".
- Emails can have one or multiple flags.
System flags:
- \Seen
- \Answered
- \Flagged
- \Draft
- \Deleted
- \Recent
Custom flags can also be created.
IMAP session states:
- Client is not authenticated - the client has just connected to the server and must authenticate.
- Client is authenticated - the client was successfully authenticated.
- Folder is selected - the folder on the server to work with is selected.
- Logout - connection is closed.
IMAP protocol works in text format through request - response interaction. It allows you to execute several commands at the same time.
Command identifiers (tags):
- Alphanumeric string.
- Each commands uses a different tag.
- Server response includes command tag.
IMAP responses:
- Status.
- Message with description.
Response statuses:
- OK - successful execution.
- NO - error.
- BAD - incorrect command or argument.
Comments
Post a Comment