IMAP
Internet Message Access Protocol
An email retrieval protocol that keeps messages on the mail server and synchronizes read, deleted, and folder state across all your devices — the standard for multi-device email access.
IMAP treats the mail server as the authoritative store. When you read, move, or delete an email on one device, IMAP syncs that change to the server, which then pushes the updated state to all other connected devices. This makes IMAP essential for anyone checking email on a phone, laptop, and web browser simultaneously.
IMAP vs POP3
The fundamental difference between IMAP and POP3 is where email lives. IMAP leaves messages on the server and synchronizes state — read flags, folder moves, deletions — across every connected client. Reading a message on your phone marks it read on your laptop too, because both devices are reflecting the same server-side state. POP3 takes the opposite approach: it downloads messages to a single device and typically deletes them from the server. There is no concept of synchronization in POP3 — messages fetched on one device are gone from the server and invisible to any other client. For anyone using more than one device to read email, IMAP is the only practical choice.
| Protocol | Storage | Multi-device sync | Ports |
|---|---|---|---|
| IMAP | Server (with local cache) | Yes | 993 (TLS) / 143 |
| POP3 | Downloads to device | No | 995 (TLS) / 110 |
| Exchange / MAPI | Server | Yes + calendar/contacts | 443 (HTTPS/EWS) |
| ActiveSync | Server | Yes, optimized for mobile | 443 (HTTPS) |
IMAP protocol mechanics
On connection, an IMAP client synchronizes the folder (mailbox) list and message headers — subject, sender, date, size, and flags — without downloading message bodies. Bodies are fetched on demand when you open a specific message. The server maintains per-message flags: Seen, Answered, Deleted, Flagged, and Draft. These flags are stored on the server and reflected to every connected client.
The IMAP IDLE command enables push email: instead of polling every few minutes, the client holds an open connection and the server pushes a notification the moment a new message arrives. This is how modern mobile email clients achieve near-instant delivery without excessive battery drain from constant polling.
IMAP uses UID-based message tracking — each message receives a unique identifier within its mailbox that persists across sessions. Clients use UIDs to fetch only messages they have not yet seen, rather than re-downloading the entire folder on reconnect.
IMAP ports and encryption
IMAP uses two ports:
- Port 993 — IMAPS (IMAP over TLS). This is the correct port. The TLS session is established before any credentials are transmitted.
- Port 143 — Plain IMAP, with optional STARTTLS upgrade. Without STARTTLS, usernames and passwords are transmitted in plaintext and can be intercepted. Always use port 993.
Common IMAP clients
IMAP is supported by every major email client. Mozilla Thunderbird is the most widely used open-source desktop client. Apple Mail on macOS and iOS uses IMAP (or Exchange/EAS) depending on the account type. Microsoft Outlook supports IMAP but defaults to Exchange or Microsoft 365 accounts using MAPI, which provides deeper integration including calendar and contacts sync. On Android, both Gmail and Outlook apps support IMAP for third-party accounts.
IMAP vs Exchange and ActiveSync
IMAP handles email only. Microsoft Exchange and its mobile protocol ActiveSync synchronize email, calendar, contacts, and tasks in a single connection. For corporate environments, Exchange provides richer functionality. For personal accounts and most hosted email services (Gmail, Fastmail, ProtonMail), IMAP is the standard protocol. Google and Microsoft both offer IMAP access to their hosted services for clients that do not support their proprietary protocols.
SMTP for sending, IMAP for receiving
IMAP is a receive-only protocol. Sending email requires SMTP (Simple Mail Transfer Protocol) regardless of whether your account uses IMAP or POP3. When you compose and send a message, your client connects to the SMTP server (port 587 with STARTTLS, or port 465 with TLS). IMAP then synchronizes the sent message to the server's Sent folder so it appears across all your devices.
Performance on large mailboxes
IMAP performance degrades with mailbox size. A mailbox with 100,000 messages across 50 folders requires significant header synchronization on every connection. Each folder open command causes the server to transmit all message UIDs and flags for that folder. Practical mitigations include: limiting the local sync window to 30 or 90 days, subscribing only to actively used folders, archiving old messages to reduce active folder size, and using clients that support lazy folder sync (only syncing a folder when you navigate to it).
Frequently Asked Questions
What is the difference between IMAP and POP3?
IMAP keeps messages on the server and syncs state across all devices. POP3 downloads messages to one device and removes them from the server — no cross-device sync. Use IMAP unless you have a specific reason to use POP3.
What port does IMAP use?
Port 993 for IMAP over TLS (IMAPS) — always use this. Port 143 is unencrypted IMAP and transmits credentials in plaintext.
Why is my IMAP email slow to sync?
Large mailboxes with many folders create heavy sync overhead. Archiving old messages, reducing the number of synced folders, and limiting the local sync window (e.g., 30 days) all improve sync speed.