Everything You Need to Know About IMAP

What it does and how it compares to other protocols

Network Cables

jerry john/CC BY-ND 2.0 license

IMAP, which stands for Internet Messaging Access Protocol, is an internet standard that describes a protocol for retrieving messages from an email server. The principal document that defines IMAP isĀ RFC (Request for Comments) 3501.

IMAP Helps Synchronize Email Messages

Typically, email messages are stored and organized in folders on an email server. Email clients on computers and mobile devices replicate that structure, and synchronize actions (such as deleting or moving messages) with the server.

So, multiple programs on multiple computers can access the same email account and show the same state and messages, all synchronized. IMAP allows you to move messages between email accounts seamlessly, and have third-party services (such as for backups) connect to your account to add functionality.

IMAP and Other Email Protocols

IMAP is a more recent and more advanced standard for mail storage and retrieval than Post Office Protocol (POP). It allows you to keep messages in multiple folders and supports folder sharing. It also supports online mail handling, as with a web-based email applications in which email messages need not be stored on the user's computer.

The IMAP standard doesn't include operations for sending email. For sending email, Simple Mail Transfer Protocol (SMTP) is used.

Disadvantages of IMAP

IMAP's advanced functions do include some complexities and ambiguities. After a message has been sent (through SMTP), for example, it must be transmitted again (through IMAP) to be stored in the IMAP account's Sent folder.

IMAP is difficult to implement, and IMAP email clients and servers may differ in how they interpret the standard. Partial implementations and private extensions, as well as inevitable bugs and quirks, can be difficult for programmers, and slow and not always reliable for users.

IMAP Extensions

The basic IMAP standard allows for extensions not only to the protocol but also to individual commands in it. Many IMAP extensions have been defined or implemented. Some of the most popular include:

  • IDLE enables real-time notifications of received email
  • SORT sorts messages at the server so the email program can fetch certain ones without having to download all of them
  • THREAD allows email clients to retrieve related messages without downloading all mail in a folder
  • CHILDREN implements a hierarchy of folders
  • ACL (Access Control List) specifies rights for individual users per IMAP folder

A more complete list of IMAP extensions can be found at the Internet Message Access Protocol (IMAP) Capabilities Registry. Additionally, Gmail includes a few specific extension to IMAP.