Summary
- RFC 3501, March 2003, defines IMAP4rev1, which "allows a client to access and manipulate electronic mail messages on a server" and permits "manipulation of mailboxes (remote message folders) in a way that is functionally equivalent to local folders".
- The mailbox becomes shared state, described by flags: "a list of zero or more named tokens associated with the message", with system flags including
\Seen,\Answered,\Flagged,\Deleted,\Draftand\Recent, the last of which "can not be altered by the client". - The structural change is conversational: "At any time, a server can send data that the client did not request", because other agents "MAY add messages to the mailbox ... change the flags ... or even remove messages", and a server "SHOULD send message flag updates automatically".
From download to a shared object
POP3 was a heist: open the maildrop, take everything, leave nothing behind. IMAP left the mail on the server and handed the client a session instead — a selected mailbox, a set of flags, and a synchronisation problem that has never quite gone away.
One decision, and the rest of the protocol falls out of it: many mailboxes instead of one, state attached to every message, search running on the server, and a session that has to survive being unplugged mid-sentence.
Flags are the state
The specification names the state in its smallest unit. A flag is a name added to a message's list and removed again, and the system flags are the ones the protocol itself acts on.
\Deleted is the tell. It deletes nothing. It marks a message for a later expunge, so deletion becomes a two-step with an undo — and so the server gets a moment in which to tell the other sessions what just happened. Even throwing something away became a conversation.
The server may interrupt
The sentence that changes everything sits in the update section: "At any time, a server can send data that the client did not request." A mailbox size change observed in the middle of a command must be reported in the middle of that command.
That is what makes IMAP a notification protocol rather than a vending machine. The client cannot be a request-and-wait loop. It has to take EXISTS, FETCH and EXPUNGE while it is busy with something else, and reconcile them with what it already believes — while the user is dragging a message into a folder and expecting the screen to agree.
NOOP is a heartbeat
Because the server may speak, silence becomes information. The spec notes that NOOP can be used as a periodic poll for new messages and status updates, and that servers supporting multiple simultaneous access should push unilateral updates when another agent changes flags or expunges.
So the do-nothing command is the heartbeat. In a protocol where the server may speak out of turn, the empty request is the polling mechanism: the polite cough that asks whether anything has happened without asking for anything in particular.
Why it is harder than it looks
The bill lands on the client. It has to hold a local model that can be corrected at any instant, serve a mailbox that mutates underneath it, and survive a connection that dies halfway through a transfer and comes back later expecting to continue.
That is the opposite trade from POP3, and neither is wrong. POP3 optimises for a client that owns the only copy. IMAP optimises for a mailbox that three phones, a laptop, a webmail tab and a delivery agent are all touching at once.
The core stayed small on purpose
RFC 3501 does not try to specify everything a mail client will ever need. It specifies a core, plus a way to ask what else is on offer: CAPABILITY, which "requests a listing of capabilities that the server supports". Everything after that — idle notification, conditional store, partial fetch — arrived as extensions that a client and a server may adopt, ignore or refuse without either of them leaving the protocol.
That is the quiet second lesson. A specification that keeps its mandatory core small, and lets the rest be adopted rather than decreed, survives contact with two decades of clients it never imagined.
The lesson about who may speak
Let one side speak out of turn and you owe the other side three answers: how to recognise what it did not ask for, how the two views reconcile, and when silence means nothing happened rather than something was lost.
IMAP answers with tagged commands, untagged responses and a short list of unilateral updates. Every system that has since added push notifications has had to answer the same three questions, and most of the difficulty is exactly the same difficulty. The protocol is the answer to who may speak and how the other side knows. Everything else is framing.
Member Briefing
Read the full trend briefing
Members read the full briefing with the source notes behind every finding.
Strategic Circle
A daily briefing in your language, built from changes we have verified.
Join for USD 20/monthCancel anytime.
Members also get the full research library, a daily briefing on the networks they follow and the private forum.






