Port reference › Email
Port 465 · SMTPS
TLS-encrypted mail submission
TCP Email Exposure risk: Low
What is port 465 used for?
Mail submission wrapped in TLS from the start. Common in Gmail and other SMTP settings.
Well-known port (0-1023): opening it on Linux needs root (or CAP_NET_BIND_SERVICE).
Security notes
Use app passwords instead of your account password.
Allow port 465 through the firewall
This port is generally fine to expose publicly.
sudo ufw allow 465/tcp
sudo ufw status sudo firewall-cmd --permanent --add-port=465/tcp
sudo firewall-cmd --reload sudo iptables -A INPUT -p tcp --dport 465 -j ACCEPT New-NetFirewallRule -DisplayName "Allow TCP 465" -Direction Inbound -Protocol TCP -LocalPort 465 -Action Allow # Replace sg-0123456789abcdef0 with your security group ID
aws ec2 authorize-security-group-ingress --group-id sg-0123456789abcdef0 --protocol tcp --port 465 --cidr 0.0.0.0/0 Check whether port 465 is open
sudo ss -tlpn | grep ':465 ' netstat -ano | findstr :465 nc -zv SERVER 465
# Windows
Test-NetConnection SERVER -Port 465 sudo lsof -i :465 Ports used together
- 587 SMTP submission · Mail client submission (STARTTLS)
- 25 SMTP · Mail transfer between servers