DevToolsmith

Port 465: SMTPS

Port 465 (TCP) is used for email submission over implicit TLS (SMTPS). It is a well-known port (0–1023). On Linux and macOS, binding to it needs root or the CAP_NET_BIND_SERVICE capability.

Service
SMTPS
Protocol
TCP
Range
Well-known (0–1023)
Official
IANA-registered
Exposure
Meant to be public
Category
Email

What uses port 465

Port 465 was briefly assigned to SMTP over SSL, withdrawn, and then re-standardized in 2018 (RFC 8314) for message submission with TLS from the first byte. Mail clients and apps authenticate here to send mail, as on 587. Both are fine; 465 avoids the STARTTLS upgrade step, which some consider safer.

Should port 465 be open to the internet?

Meant to be public. This port is meant to be reachable by clients on the internet when you run this service publicly.

Check what is listening on port 465

Linux
sudo ss -ltnp 'sport = :465'
macOS
sudo lsof -nP -iTCP:465 -sTCP:LISTEN
Windows (PowerShell)
Get-NetTCPConnection -LocalPort 465 -State Listen
netstat -ano | findstr :465

No output means nothing is listening. If a service should be, check that it is running and which address it binds to: 127.0.0.1 only accepts local connections, 0.0.0.0 or :: accepts them on every interface.

Fix “address already in use” on port 465

Another process already holds the port. Find it with the commands above, then stop that service properly, or end the process:

macOS / Linux
sudo kill $(sudo lsof -t -iTCP:465 -sTCP:LISTEN)
Windows (PowerShell)
Stop-Process -Id (Get-NetTCPConnection -LocalPort 465 -State Listen).OwningProcess

Open port 465 in the firewall

Ubuntu / Debian (ufw)
sudo ufw allow 465/tcp
# Close it again:
sudo ufw delete allow 465/tcp
RHEL / Fedora / Rocky (firewalld)
sudo firewall-cmd --permanent --add-port=465/tcp
sudo firewall-cmd --reload
Windows (PowerShell, as administrator)
New-NetFirewallRule -DisplayName "SMTPS 465/TCP" -Direction Inbound -Protocol TCP -LocalPort 465 -Action Allow

On AWS, Google Cloud and Azure, also allow the port in the security group or network firewall rules; host firewalls and cloud firewalls are separate.

Test port 465 from another machine

macOS / Linux
nc -zv example.com 465
Windows (PowerShell)
Test-NetConnection example.com -Port 465

Related ports

  • Port 587 (SMTP submission): the standard port for sending email from apps and mail clients.
  • Port 25 (SMTP): used by SMTP for delivering email between mail servers.
  • Port 993 (IMAPS): used by IMAP over TLS for securely reading email.

More email ports

110 (POP3) , 143 (IMAP) , 995 (POP3S) . See all ports in the port lookup.

Sources

Spotted a mistake? Email hello@devtoolsmith.com and we’ll fix it.

Frequently asked questions

What is port 465 used for?

Port 465 is used for email submission over implicit TLS (SMTPS). Port 465 was briefly assigned to SMTP over SSL, withdrawn, and then re-standardized in 2018 (RFC 8314) for message submission with TLS from the first byte. Mail clients and apps authenticate here to send mail, as on 587. Both are fine; 465 avoids the STARTTLS upgrade step, which some consider safer.

Is it safe to open port 465?

This port is meant to be reachable by clients on the internet when you run this service publicly. Keep the service behind it up to date and require authentication where it applies.

How do I check if port 465 is open?

On the server, list listening sockets with "sudo ss -ltnp 'sport = :465'" on Linux or "sudo lsof -nP -i :465" on macOS. From another machine, run "nc -zv host 465" or, on Windows, "Test-NetConnection host -Port 465". Connection refused means nothing is listening; a timeout means a firewall is dropping the traffic.