Port reference › Email
Port 587 · SMTP submission
Mail client submission (STARTTLS)
TCP Email Exposure risk: Low
What is port 587 used for?
The standard port for mail apps and applications to hand mail to a server. Encryption starts with STARTTLS after connecting.
Well-known port (0-1023): opening it on Linux needs root (or CAP_NET_BIND_SERVICE).
Security notes
Require authentication and STARTTLS.
Allow port 587 through the firewall
This port is generally fine to expose publicly.
sudo ufw allow 587/tcp
sudo ufw status sudo firewall-cmd --permanent --add-port=587/tcp
sudo firewall-cmd --reload sudo iptables -A INPUT -p tcp --dport 587 -j ACCEPT New-NetFirewallRule -DisplayName "Allow TCP 587" -Direction Inbound -Protocol TCP -LocalPort 587 -Action Allow # Replace sg-0123456789abcdef0 with your security group ID
aws ec2 authorize-security-group-ingress --group-id sg-0123456789abcdef0 --protocol tcp --port 587 --cidr 0.0.0.0/0 Check whether port 587 is open
sudo ss -tlpn | grep ':587 ' netstat -ano | findstr :587 nc -zv SERVER 587
# Windows
Test-NetConnection SERVER -Port 587 sudo lsof -i :587