Port 587 · SMTP submission

All network ports
Mail · Well-known587/tcp

Port / TCP

587SMTP submission

The standard authenticated submission port that mail clients and applications use to hand outbound mail to their provider.

If it is internet-facing: Port 587 is routine where it is expected. Its risk lives in the service configuration behind it, not the port itself.

Exposure

Internet-facing

Transport

Encryption optional

Risk if public

Low

Exposure verdict

ReachInternet-facing

Port 587 normally answers from the internet, but the transport is not confidential by default. Enforce the encrypted variant before the traffic leaves your network.

TransportEncryption optional

Encryption is available but negotiated or configured rather than guaranteed. A client that does not insist on it will silently fall back to plaintext.

RangeWell-known (0–1023)

Assigned by IANA through a review process. On Unix systems a process needs root or the CAP_NET_BIND_SERVICE capability to bind here, which is why containers so often remap these to a higher port.

FamilyMail

Grouped with the other mail ports so a rule written for one can be checked against its neighbours.

What actually goes wrong

2 notes
  • Servers should require both STARTTLS and authentication here, and refuse to relay for unauthenticated senders.
  • Use this rather than 25 for anything that is a client sending mail, not a server relaying it.

Recommended firewall rule

Allow it, and harden the service

This port is expected to answer from anywhere, so the firewall is not where its security comes from.

ufw

sudo ufw allow 587/tcp

iptables

sudo iptables -A INPUT -p tcp --dport 587 -j ACCEPT

Check what is really there

Listening locally

sudo ss -tlpn 'sport = :587'

The bind address is the answer that matters: 127.0.0.1 is local-only, 0.0.0.0 and :: mean every interface.

Listening (macOS)

sudo lsof -nP -iTCP:587 -sTCP:LISTEN

macOS ships lsof rather than ss; this names the owning process and user.

From outside

nmap -sV -Pn -p 587 <host>

A version probe confirms whether SMTP submission is actually what answers, rather than trusting the number. Only scan hosts you are authorised to test.

Reachability

nc -vz <host> 587

The quick yes/no when you only need to know whether a path exists through the firewall.

Nearby and related ports

8
ProtocolTCP
Rangewell-known
Transportopportunistic
Exposurepublic