How IMAP works
IMAP reads mail that stays on the server, so every device sees the same folders and read/unread state.
Layer: Application (OSI layer 7) · Port: 143 / 993 · Transport: TCP (TLS) · Format: Tagged text commands · Standard: RFC 9051
IMAP packet flow
- IMAP Client → Mail Server: a1 LOGIN you ********
- IMAP Client → Mail Server: a2 SELECT INBOX
- IMAP Mail Server → Client: * 12 EXISTS a2 OK
- IMAP Client → Mail Server: a3 FETCH 12 BODY[]
- IMAP Mail Server → Client: * 12 FETCH (BODY {3400} …)
Other protocols: HTTP · WebSocket · QUIC · SMTP · POP3 · FTP · SMB · WebRTC · SIP · RTSP · RTMP · MQTT · Modbus · PPPoE