Everything You Need to Know About IMAP

This protocol helps you retrieve messages from an email server

Network Cables

jerry john / CC BY-ND 2.0

Internet Messaging Access Protocol (IMAP) is an internet standard that describes a protocol for retrieving messages from an email server. When you use IMAP, you can synchronize applications on multiple computers accessing the same email account, to show the same state and messages.

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. With IMAP, you can move messages between folders seamlessly and always have the same view of your account, whether you're accessing it directly online or through a client.

IMAP and Other Email Protocols

IMAP is a more recent and advanced standard for mail storage and retrieval than Post Office Protocol (POP). With POP, you can only store and manage messages locally on one computer or device. Therefore, POP is easier to deploy, and more stable and reliable than IMAP.

However, POP includes more limited functionality. It only allows an email program to download messages to the computer or device, allowing you to keep a copy on the server for future download. POP allows your client to track which messages have been fetched already, but there is a chance this process could fail, resulting in multiple downloads of the same message. Additionally, with POP, you can't access the same email account from multiple devices and have actions synchronize between them.

The IMAP standard doesn't include operations that send emails. To send emails, you must set up your client to also use Simple Mail Transfer Protocol (SMTP).

Disadvantages of IMAP

The advanced features of IMAP make it more complex. After you send a message through SMTP, for example, it must be transmitted again through IMAP to be stored in the Sent folder of the IMAP account.

IMAP is difficult to implement, and IMAP email clients and servers may differ in how they interpret the standard. Programmers may find difficulties with partial implementations and private extensions, as well as bugs and errors; and users may find email functionality slow and sometimes unreliable.

IMAP Extensions

The basic IMAP standard allows for extensions to the protocol and individual commands in it. Many IMAP extensions have been defined or implemented. Some of the most popular are listed below.

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

A 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.