Skip to main content
143

Port 143IMAP

TCP

Port 143 is the IMAP port for accessing email. Unlike POP3, IMAP keeps messages on the server and synchronizes state (read/unread, folders, flags) across all devices. Port 993 (IMAPS) is the TLS version. Port 143 supports STARTTLS to upgrade the connection. IMAP is the standard protocol for modern email clients.

Port Number

143

Protocol

TCP

Service

Internet Message Access Protocol

Range

IANA Well-Known (0–1023)

Description

IMAP on port 143 maintains a persistent connection to the mail server and synchronizes state bi-directionally. Messages stay on the server, enabling consistent inbox across phone, desktop, and webmail. IMAP supports server-side search, multiple folders, and message flags. STARTTLS on port 143 and implicit TLS on port 993 are both widely used.

Security risks

  • 1Cleartext authentication: IMAP LOGIN on port 143 sends credentials in plaintext without STARTTLS. Configure Dovecot/Courier to require TLS before authentication (disable_plaintext_auth=yes in Dovecot).
  • 2STARTTLS stripping: a network attacker can prevent the STARTTLS upgrade, causing the client to fall back to plaintext login. Use port 993 (implicit TLS) to eliminate this attack vector entirely.
  • 3Mailbox enumeration: IMAP servers that return different errors for 'user does not exist' vs 'wrong password' enable username enumeration. Configure identical error responses regardless of whether the account exists.

Firewall guidance

Prefer port 993 (IMAPS) over 143 with STARTTLS for all client connections. If port 143 must remain open for legacy clients, enforce STARTTLS before authentication. Block inbound 143 from the internet if your mail server only serves internal users – expose only 993 externally.

Diagnosis commands

Test STARTTLS on IMAP port 143

shell
openssl s_client -connect host:143 -starttls imap

Test IMAPS connectivity and mailbox access

shell
curl -v imaps://host:993/INBOX -u user:pass

Enumerate IMAP server capabilities (STARTTLS, AUTH mechanisms)

shell
nmap -p 143 --script imap-capabilities target

Usage examples

Port 143 – IMAP
shell
openssl s_client -connect mail.example.com:993
A001 LOGIN [email protected] password
A002 SELECT INBOX
A003 FETCH 1:* FLAGS

Common services on this port

DovecotCyrus IMAPMicrosoft ExchangeCourierZimbraGmail IMAPFastMail

Related ports

History

IMAP was designed by Mark Crispin at Stanford in 1986 (RFC 1064). IMAP4rev1 (RFC 3501, 2003) became the standard. IMAP4rev2 (RFC 9051, 2021) modernized the protocol. IMAP replaced POP3 as the dominant mail access protocol as multi-device usage grew in the 2000s.

FAQ

IMAP vs Exchange ActiveSync vs JMAP?

IMAP is the universal standard (works with every mail client). ActiveSync is Microsoft-proprietary (push email, calendar, contacts). JMAP (RFC 8620) is the modern IETF replacement for IMAP – JSON-based, stateless, efficient – but adoption is still limited to Fastmail and a few providers.

Specification

RFC 9051 – Port 143 specification →