Port 465 (SMTPS)

Port 465 is used to send mail from an email client or a website to the mail server, over TCP, on a connection encrypted with TLS from the very start.

Key facts

Port
465
Protocols
TCP
Range
System port (Well-Known), 0-1023
IANA service name
submissions, urd, igmpv3lite

IANA assigns ports in this range to well-known services, under RFC 6335.

About port 465

Port 465 is used to send mail from an email client or a website to the mail server, over TCP, on a connection encrypted with TLS from the very start. The method is called Implicit TLS, and the official IANA service name is submissions, but most email clients show it as SSL/TLS or SMTPS.

Port 465 for sending mail over an encrypted connection is defined in RFC 8314, which prefers it over STARTTLS on port 587. The IANA registry also lists an old service called urd on port 465, unrelated to email.

What port 465 is used for

  • Email clients and phones: in the outgoing mail server settings, choose port 465 and SSL/TLS security, and enter the mailbox username and password.
  • Websites and systems: contact forms, online stores, and sending systems connect to the mail server on port 465 with authentication, so messages leave from an authenticated mail server.
  • Mail server: a server that accepts outgoing mail from its users listens on port 465, alongside port 587.

Port 465 is for sending only. Email clients receive mail over IMAP, usually on port 993.

Port 465 in the firewall

On a mail server that serves users, open port 465 to incoming traffic. Users send mail from anywhere, the office, home, and their phones, so it's usually not possible to limit the port to specific IP addresses.

  • UFW: ufw allow 465/tcp
  • firewalld: firewall-cmd --permanent --add-port=465/tcp

A web server that isn't a mail server doesn't need port 465 open to incoming traffic. A website that sends mail through another mail server needs only an outgoing connection to port 465 or 587.

Risks and security

On port 465, encryption starts before any data is sent, so the username and password always travel encrypted. The main protection on this port is for the mail accounts themselves:

  • Use a strong, unique password for each mailbox, because an exposed password lets anyone send mail in the domain's name.
  • Run a tool such as fail2ban, which temporarily blocks addresses that make repeated failed authentication attempts.
  • Set a sending limit for each account, to protect the mail server's reputation.
  • Set up a valid SSL certificate for the server name clients connect to, so email clients don't show a warning.

Commands to check and configure

  • ss -tlnp | grep ':465 '

    Checks whether the mail server is listening on port 465.

  • nc -zv mail.example.com 465

    Checks whether port 465 on the mail server is open and reachable from your computer.

  • openssl s_client -connect mail.example.com:465 -crlf

    Connects over an encrypted connection and shows the certificate and the mail server's greeting line (220).

  • ufw allow 465/tcp

    Opens port 465 to incoming traffic (UFW).

  • firewall-cmd --permanent --add-port=465/tcp

    Opens port 465 to incoming traffic in firewalld. Then run firewall-cmd --reload.

Port 465 in the IANA registry

Port Protocol Service IANA registry description
465 TCP submissions Message Submission over TLS protocol
465 TCP urd URL Rendezvous Directory for SSM
465 UDP igmpv3lite IGMP over UDP for SSM

Data source: IANA Service Name and Transport Protocol Port Number Registry (opens in a new tab)

Port 465 FAQ

Which is better for sending mail, port 465 or port 587?

Both ports are secure when configured correctly, and both require a username and password. RFC 8314 recommends port 465, where the connection is encrypted from the start, and port 587 with STARTTLS is supported almost everywhere. When your email client allows it, choose port 465 with SSL/TLS.

Which security setting do I choose in my email client for port 465?

Choose SSL/TLS (in some clients the setting is called just SSL). The STARTTLS setting is for port 587, not port 465, and choosing the wrong one makes the connection fail.

Is port 465 also used to receive mail?

No. Port 465 is used only to send mail from an email client or a website. Email clients receive mail over IMAP on port 993, or over POP3 on port 995.

Can I send mail from a WordPress site through port 465?

Yes. SMTP plugins for WordPress let you set the mail server, port 465, SSL/TLS encryption, and the mailbox details. This way, messages from the site leave from an authenticated mail server, and they're more likely to reach the inbox.

Shopping cart

Your cart is emptyYou can start with one of our popular plans.

Site search

Accessibility

Text size
100%
Accessibility statement