HTTPfy

Port 143 (IMAP)

Internet Message Access Protocol for reading mail on the server, upgraded with STARTTLS.

Well-known (system) port, 0-1023 TCP Email Expose only to trusted sources

What port 143 is used for

Internet Message Access Protocol for reading mail on the server, upgraded with STARTTLS.

Security: should port 143 be open?

Expose only to trusted sources. Prefer 993. If 143 stays open, require STARTTLS before LOGIN so passwords never travel in clear text.

IANA assignment

Service nameProtoDescriptionAssigneeReference
imap TCP Internet Message Access Protocol IESG RFC 3501, RFC 9051

Registry dates for this port: last modified 2021-02-22.

Check what is listening on port 143

Linux: is anything listening on TCP 143?
sudo ss -tlnp 'sport = :143'
Linux / macOS: which process owns the port
sudo lsof -nP -i :143
Older Linux / BSD (net-tools)
sudo netstat -tlnp | grep ':143 '
Windows (Command Prompt)
netstat -ano | findstr :143
Windows (PowerShell)
Get-NetTCPConnection -LocalPort 143 -State Listen | Select LocalAddress,OwningProcess

Test it from outside

From another machine
nc -vz -w 5 HOST 143
From Windows
Test-NetConnection HOST -Port 143

Allow only trusted sources on port 143 in the firewall

Replace 203.0.113.10 with the address or network you trust. With ufw, make sure the default incoming policy is deny.

ufw (one trusted source)
sudo ufw allow from 203.0.113.10 to any port 143 proto tcp
iptables
sudo iptables -A INPUT -p tcp --dport 143 -s 203.0.113.10 -j ACCEPT
sudo iptables -A INPUT -p tcp --dport 143 -j DROP
nftables
sudo nft add rule inet filter input ip saddr 203.0.113.10 tcp dport 143 accept
sudo nft add rule inet filter input tcp dport 143 drop
Windows Firewall
New-NetFirewallRule -DisplayName 'TCP 143 trusted' -Direction Inbound -Protocol TCP -LocalPort 143 -RemoteAddress 203.0.113.10 -Action Allow

Related ports

All port numbers · Open port checker
Assignment data: IANA port number registry (public domain), retrieved 2026-11-10.