IMAP

Internet Message Access ProtocolApplication layer · OSI 7

Syncing folders, flags, and new mail on the server

Step 1 of 5: Open TLS session on port 993. Bob's mail app dials imap.example.net on port 993 with TLS active from the start. Inside, the server sends an untagged * OK greeting listing features such as IDLE .
0.0 s / 25.0 s
Bob's laptop192.168.1.10
EncryptedResponseRequestData

Overview

keeps your folders, read marks, and messages on the server so your phone, laptop, and webmail always match. The server can also push alerts the instant new mail lands.

Internet Message Access Protocol (RFC 9051 / RFC 3501) uses tagged request-response commands over TCP port 993 with implicit TLS (or port 143 upgraded with ).

Key facts

Layer
Application (over TCP)
Ports
993 (TLS), 143 (STARTTLS)
Sync model
Folders and flags stay on server
Live updates
IDLE notifies on arrival
Defined in
RFC 9051, RFC 3501, RFC 2177

All devices see the same mailbox

Bob's laptop checked his inbox, read a message while marking it read on the server, and waited with IDLE until a new arrival triggered an instant push. Everything remains stored centrally.

Completed IMAPS port 993 session: LOGIN, SELECT INBOX, FETCH BODY[] updating \Seen, and RFC 2177 IDLE notification.

Message count
2, then 3 pushed via IDLE
Read state
\Seen synced on server
Transport
Port 993 (TLS)
Suited for
Multiple synced devices

Try it yourself

Inspect an IMAPS TLS handshake

Connect to port 993 with OpenSSL to observe the TLS certificate and server greeting banner.

openssl s_client -connect imap.example.com:993 -quiet