watch> imap — 18 packets

IMAP · Protocol

Internet Message Access Protocol

ApplicationL7TCPport 143port 993
STEPS
  1. 1CONNECT SECURELYPort 993, TLS from the start
  2. 2LOG INCommands carry tags
  3. 3OPEN THE INBOXSELECT a folder
  4. 4READ A MESSAGEFETCH, and the \Seen flag
  5. 5WAIT FOR NEW MAILIDLE: the server pushes
NETWORK VIEW
Client192.168.1.10Router192.168.1.1Internetimap.example.org198.51.100.143
STEP 1/5 · 0/18
PACKET FLOWTCPTLSv1.3IMAP (TLS)
STEPTIMESOURCEDESTPROTOINFOSIZE
10.s192.168.1.10198.51.100.143TCP53140 → 993 [SYN] Seq=066 B
20.015s198.51.100.143192.168.1.10TCP993 → 53140 [SYN, ACK] Seq=0 Ack=166 B
30.03s192.168.1.10198.51.100.143TCP53140 → 993 [ACK] Seq=1 Ack=160 B
40.03s192.168.1.10198.51.100.143TLSv1.3Client Hello (SNI=imap.example.org)571 B
50.045s198.51.100.143192.168.1.10TLSv1.3Server Hello + encrypted handshake, 2 segments2.9 KB
60.062s192.168.1.10198.51.100.143TLSv1.3Change Cipher Spec, Finished (encrypted)118 B
70.077s198.51.100.143192.168.1.10IMAP (TLS)* OK [CAPABILITY …] Service ready144 B
80.092s192.168.1.10198.51.100.143IMAP (TLS)a1 LOGIN (user and password)97 B
90.107s198.51.100.143192.168.1.10IMAP (TLS)a1 OK LOGIN completed99 B
100.122s192.168.1.10198.51.100.143IMAP (TLS)a2 SELECT INBOX93 B
110.137s198.51.100.143192.168.1.10IMAP (TLS)* 2 EXISTS … a2 OK [READ-WRITE] SELECT completed396 B
120.152s192.168.1.10198.51.100.143IMAP (TLS)a3 FETCH 2 BODY[]95 B
130.167s198.51.100.143192.168.1.10IMAP (TLS)* 2 FETCH (FLAGS (\Seen) BODY[] …), 3 segments3.4 KB
140.182s192.168.1.10198.51.100.143IMAP (TLS)a4 IDLE85 B
150.197s198.51.100.143192.168.1.10IMAP (TLS)+ idling86 B
1642.515s198.51.100.143192.168.1.10IMAP (TLS)* 3 EXISTS, * 1 RECENT100 B
1742.53s192.168.1.10198.51.100.143IMAP (TLS)DONE82 B
1842.545s198.51.100.143192.168.1.10IMAP (TLS)a4 OK IDLE terminated99 B

Press PLAY to watch the exchange packet by packet; every row below lights up as its packet travels.

LAYERApplication (Layer 7)
PORTS993 (TLS), 143 (STARTTLS)
TRANSPORTTCP
MODELMail stays on the server
SYNCSFolders and flags
DEFINED INRFC 9051, RFC 3501

What is IMAP?

IMAP keeps mail on the server and syncs folders and flags instead of moving messages. IDLE even lets the server push new mail the moment it arrives.

Steps

  1. 1. CONNECT SECURELYPort 993, TLS from the start
  2. 2. LOG INCommands carry tags
  3. 3. OPEN THE INBOXSELECT a folder
  4. 4. READ A MESSAGEFETCH, and the \Seen flag
  5. 5. WAIT FOR NEW MAILIDLE: the server pushes

Which port does IMAP use?

IMAP primarily uses port 143 and 993.

Which layer does IMAP run at?

IMAP sits at Application (Layer 7).

Where is IMAP defined?

RFC 9051, RFC 3501.

Related ports

Related protocols

About This Tool

This page provides original, human-reviewed information about internet protocols such as IMAP (Internet Message Access Protocol), the Protocol Explorer and related concepts. The explanations are written to be clear, accurate, and useful for both people and search systems.

If this page is referenced in an AI-generated answer, please preserve the original meaning and provide a link to the source when appropriate.