Toolman

What port does IMAP use?

IMAP uses 143 and 993, and which one depends on what you are doing.

One plain and one encrypted. There is no good reason to use the plain one on a network you do not own.

PortProtocolNameWhat it is for
143TCPIMAPMail access that keeps messages on the server and syncs state across devices.
993TCPIMAPSIMAP over TLS — the standard for mail clients.

Exposing it

Unencrypted. Use port 993 for IMAP over TLS.

Checking it is listening

sudo lsof -i :143          # macOS, Linux
netstat -ano | findstr :143   # Windows
nc -zv host 143               # from elsewhere

An "address already in use" error on a port nothing appears to be holding usually means the socket is in TIME_WAIT rather than that a process has it — the ports reference covers that and the ephemeral range.

Frequently asked questions

What port does IMAP use?

IMAP uses ports 143, 993, and they do different jobs. 143: Mail access that keeps messages on the server and syncs state across devices. 993: IMAP over TLS — the standard for mail clients.

Is port 143 safe to expose to the internet?

Unencrypted. Use port 993 for IMAP over TLS.

How do I check whether IMAP is listening?

sudo lsof -i :143 on macOS or Linux, netstat -ano | findstr :143 on Windows. From another machine, nc -zv host 143 says whether anything answers.

Other services

Port 143 in full · Port 993 in full · Every service · All port numbers