Port 587: SMTP submission

Port 587 (TCP) is used by SMTP submission. Mail clients send outgoing mail here with STARTTLS and authentication.

587Port
TCPProtocol
submissionIANA service name
EmailCategory

Port range

587 is a well-known (system) port (range 0–1023). On Linux and macOS, binding to it traditionally needs root or the CAP_NET_BIND_SERVICE capability.

Security

Only open port 587 to the hosts that need it. Prefer the encrypted variant of the protocol where one exists.

Open port 587 in a firewall

ufw         sudo ufw allow 587/tcp
iptables    sudo iptables -A INPUT -p tcp --dport 587 -j ACCEPT
firewalld   sudo firewall-cmd --permanent --add-port=587/tcp
Windows     New-NetFirewallRule -DisplayName "SMTP submission 587" -Direction Inbound -Protocol TCP -LocalPort 587 -Action Allow

Check if port 587 is open

nc -vz example.com 587
Test-NetConnection example.com -Port 587   # PowerShell
sudo ss -tulpn | grep ':587 '   # what is listening locally (Linux)

Other email ports

Frequently asked questions

What is port 587 used for?
SMTP submission. Mail clients send outgoing mail here with STARTTLS and authentication.
Is port 587 TCP or UDP?
TCP.