PortScan › Port guide › Port 143

Port 143 (IMAP): Plaintext IMAP vs Port 993 (IMAPS)

TCP 143IMAPMailExposure risk: Medium

Port 143 is IMAP mail access. Unless STARTTLS is enforced, mail account passwords can travel in plaintext. How to switch to 993 (IMAPS) and configure Dovecot.

What is port 143?

IMAP is a protocol that keeps mail on the server so you can view the same mailbox from several devices. Port 143 starts in plaintext and upgrades to encryption with STARTTLS; port 993 is IMAPS, which uses TLS from the very first byte.

What matters is not so much that port 143 is open as whether you can log in over it without encryption.

When it is normally open

Risks if it is open

Plaintext login allowed

If the server does not enforce STARTTLS, depending on client settings the LOGIN command goes out in plaintext. There is also a downgrade attack in which a man-in-the-middle strips the STARTTLS offer.

Credential guessing

IMAP is a regular target of brute-force attacks, and since it often is not covered by multi-factor authentication, accounts are easy to crack.

Security checklist

How to check whether port 143 is open

From outside (is it exposed to the internet?)

Whether your server or home router accepts port 143 from the internet can only be confirmed by connecting from outside. A check from inside the same network bypasses the router's firewall and gives a different answer.

PortScan opens a real TCP connection from the Cloudflare edge and reports Open, Closed or Filtered. Members can scan every port on their own IP for free and other targets free once a day.

Check port 143

On the server (what is listening?)

Windows (PowerShell):

netstat -ano | findstr ":143 "
Get-NetTCPConnection -LocalPort 143 -State Listen | Select LocalAddress,OwningProcess

Linux:

sudo ss -tlnp | grep ':143 '

If it listens on 0.0.0.0 or [::] it is open on every network; 127.0.0.1 means only that machine can connect. To test port 143 on a server from another computer, use Test-NetConnection server-address -Port 143 on Windows or nc -vz server-address 143 on Linux and macOS.

How to close or restrict port 143

The best fix is to turn the service off or make it listen only on 127.0.0.1 (see the checklist above). If you need the service but must keep it off the internet, use a firewall.

Windows Firewall

# Administrator PowerShell
New-NetFirewallRule -DisplayName "Block TCP 143" -Direction Inbound -Protocol TCP -LocalPort 143 -Action Block
# To allow a single IP instead (block rules take precedence, so use this instead of the rule above)
New-NetFirewallRule -DisplayName "Allow TCP 143 from office" -Direction Inbound -Protocol TCP -LocalPort 143 -RemoteAddress 203.0.113.10 -Action Allow

Linux (ufw)

sudo ufw deny 143/tcp
# Allow a single IP only
sudo ufw allow from 203.0.113.10 to any port 143 proto tcp

On a cloud server, also check port 143 in the security group (inbound rules), which is separate from the OS firewall. For services running in Docker, the rules Docker creates can bypass ufw, so binding the port to localhost with -p 127.0.0.1:143:143 is the reliable option.

Router

At home or in a small office, open the router's admin page and check whether port 143 is in the port forwarding list, whether DMZ is enabled, and whether any program opened ports by itself through UPnP. If any of the three applies, port 143 on your PC is directly visible from the internet.

How to read the scan result

The verdict can depend on where you connect from. Many ISPs (including most Korean ISPs) block some ports such as 135, 139 and 445 on their network, so the same server can look Filtered from inside that network and Closed from abroad.

FAQ

If I open only 993, will existing mail clients stop working?
Most current mail clients support SSL/TLS on port 993. In the account settings, change the incoming server port to 993 and security to SSL/TLS.
993 IMAPS110 POP325 SMTP

Last updated 2026-11-04 · Use this guide to check systems you manage. Scanning systems without permission may carry legal liability.