IMAP Explained: How It Works and What to Look For
IMAP provides remote access to mailboxes, messages and flags.
Published by Protocol Explorer · Reviewed
How IMAP works
A client authenticates, selects a mailbox and issues tagged commands to inspect or change messages. Servers can also send untagged updates.
What to look for in an exchange
Message sequence numbers can change as a mailbox changes; unique identifiers have different persistence properties. TLS protects the connection when configured.
Follow an example step by step
- Identify the authenticated session and the selected mailbox.
- Match each tagged command to its tagged completion response, while observing untagged server updates.
- Compare message identifiers, flags and selected mailbox context when following a FETCH or STORE operation.
Common interpretation mistake
Message sequence numbers can change as messages are expunged; they are not interchangeable with UIDs.
Key point to remember
Mailbox synchronization is an application-level process; TLS protects the connection when configured.
Explore the protocol
The IMAP overview is free without an account. Its full interactive lesson is included in Protocol Explorer Pro, a one-time $4.99 purchase; an account is required to buy Pro and restore the licence across devices.
Open Protocol Explorer · Compare Free and Pro
Specification
Read the primary specification for IMAP for the authoritative protocol details. The interactive scenario is a simplified teaching model, not a capture of your network.
Continue learning
How to read a packet · TCP · UDP · HTTPS