HTTPfy

Port 587 (SMTP submission)

Mail submission from email clients and applications to their outgoing mail server, with STARTTLS and SMTP AUTH (RFC 6409).

Well-known (system) port, 0-1023 TCP Email Meant to face the internet

What port 587 is used for

Mail submission from email clients and applications to their outgoing mail server, with STARTTLS and SMTP AUTH (RFC 6409).

Security: should port 587 be open?

Meant to face the internet. Expose it on servers that accept mail from your users. Require authentication and TLS before AUTH, and rate-limit logins: stolen mailbox passwords are used to send spam through port 587.

IANA assignment

Service nameProtoDescriptionAssigneeReference
submission TCP Message Submission - RFC 6409
submission UDP Message Submission - RFC 6409

Registry dates for this port: last modified 2011-11-17.

Check what is listening on port 587

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

Test it from outside

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

Open port 587 in the firewall

ufw
sudo ufw allow 587/tcp
iptables
sudo iptables -A INPUT -p tcp --dport 587 -j ACCEPT
nftables
sudo nft add rule inet filter input tcp dport 587 accept
Windows Firewall
New-NetFirewallRule -DisplayName 'Allow TCP 587' -Direction Inbound -Protocol TCP -LocalPort 587 -Action Allow

Related ports

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