IMAP
In short: Internet Message Access Protocol — retrieves emails from the mail server, with the messages remaining centrally on the server (unlike POP3).
In more detail: Because emails stay on the server, they’re visible in sync on all devices — folder structure, read status and deletions are reconciled between client and server. Complements SMTP, which is only responsible for sending.
In Depth
IMAP vs. POP3: where does the truth live?
The central difference from the older POP3 protocol lies in where the emails are kept: POP3 (Post Office Protocol) typically downloads messages to a single device and then deletes them from the server (or only leaves them there as a copy) — the “truth” lives locally with the client. IMAP turns this around: the server remains the single source of truth, and every client (smartphone, laptop, webmail) only shows a synchronised view of it:
POP3: server -> [download] -> local inbox (server possibly emptied)
IMAP: server <-> [sync] <-> several clients at once, the server stays the source
Synchronisation in detail
In practice this means: folder structure, read status, flags (e.g. “important” or “answered”) and even deleting a message are reconciled via IMAP between all connected devices — if you delete an email on your smartphone, it also disappears in webmail and on the laptop, because all of them reflect the same server state instead of each managing its own independent copy. Newly created folders (e.g. a self-made “Invoices” folder) also appear automatically on all devices, because they’re stored on the server.
Trade-offs
This makes IMAP practically the only sensible protocol for users with several devices, but it costs storage space on the server side (all emails stay there permanently, which is why email providers set storage limits per mailbox) and works less well offline (without a connection to the server, only content that has already been synchronised/cached is available — older messages never opened locally stay invisible without a connection). POP3 has exactly the opposite properties: once downloaded, emails are completely available offline and don’t take up permanent server storage, but in return cross-device synchronisation is missing entirely.
IMAP commands and ports
IMAP runs by default on port 143 (unencrypted) or 993 (with TLS encryption, “IMAPS”). Central commands are SELECT (open a folder), FETCH (retrieve messages or parts of them), STORE (set flags, e.g. as read) and SEARCH (server-side search, which stays fast even with huge mailboxes, because the search runs directly on the server instead of all messages having to be downloaded first).
How it differs from SMTP
IMAP is purely responsible for RETRIEVING and managing emails — SENDING runs over a completely separate protocol, SMTP. A complete email client therefore uses both at the same time: SMTP for sending, IMAP for receiving/managing — a client that only supported IMAP could theoretically search mailboxes, but never send an email itself.
See also: SMTP, Mail server, Standard port, TLS