SMTP TLS

SMTP TLS is the use of Transport Layer Security to encrypt an SMTP session. It arrives two ways: implicitly, where the connection is encrypted from the moment it opens, and explicitly, where a cleartext connection upgrades through the STARTTLS command.

VerifiedBy Kam Low, Co-founder·Updated

Implicit TLS

Implicit TLS negotiates the TLS handshake before any SMTP command is exchanged, so no part of the session is ever in the clear. Port 465 carries this mode, and it is commonly called SMTPS.

RFC 8314 recommends implicit TLS for message submission and registers 465 for submission over TLS. That recommendation reversed an earlier position that had deprecated the port, which is why older documentation calls 465 obsolete.

Nothing about the SMTP conversation itself changes. The commands, responses and authentication mechanisms are identical to a cleartext session, with the entire exchange wrapped in the TLS layer.

I prefer implicit TLS wherever a client can be made to speak it, because it removes a decision from the connection. There is no window in which the session is unencrypted and no capability line for anything on the path to tamper with, so the failure mode is a refused connection rather than a quietly downgraded one. A refused connection gets noticed. A downgraded one does not.

Explicit TLS with STARTTLS

Explicit TLS starts as a cleartext connection and upgrades in place. The client issues STARTTLS, the server accepts, and both sides renegotiate the connection as an encrypted one before any credential is sent.

STARTTLS is defined in RFC 3207 as an SMTP service extension. It runs on the submission port 587 for clients and on port 25 for server-to-server relay.

Once the upgrade completes, both sides discard anything negotiated before it. RFC 3207 requires the client to reissue EHLO after the handshake, because the server's advertised capabilities before encryption cannot be trusted.

The word doing the work in that requirement is trusted. Everything the server said before the handshake was said in the clear, which means it was said by whoever happened to be on the path. Reissuing EHLO is not tidiness, it is the client throwing away a set of claims it has no reason to believe, and a client that skips it is authenticating against capabilities an attacker was free to write.

On our own relay we did not leave this to negotiation. TLS and exact SMTP authentication are mandatory on the inbound forwarding path, TCP 2525 is firewall-restricted to our API host, and unsigned or replayed requests are rejected outright alongside arbitrary destinations, extra recipients and multiple forwarding hops. Mandatory is a different posture from opportunistic: there is no cleartext path to fall back to, so there is nothing to strip.

Port 25 and relay traffic

Port 25 is the port for server-to-server mail transfer rather than client submission. Its traffic may be unencrypted or may upgrade through STARTTLS, depending on what both servers support.

Encryption on relay is opportunistic by default. A sending server that offers STARTTLS and finds a receiver that does not support it will generally deliver in the clear rather than fail, which is a deliberate design decision favouring delivery over confidentiality.

Client submission does not belong on port 25. Networks and hosting providers block it widely to limit compromised machines sending directly, so an application configured to submit there frequently sees a timeout with no error.

Downgrade attacks and the protocols that prevent them

Opportunistic STARTTLS is vulnerable to stripping. An attacker positioned on the path can remove the STARTTLS capability from the server's response, and a client that treats encryption as optional will continue in cleartext without warning.

TLS session start · byte by byte
Port 465 · implicit TLS
Encrypted from the first byte
TCP connect
TLS handshake
EHLO
AUTH
MAIL FROM
Port 587 · STARTTLS
Strippable window · in the clear
Encrypted only after the handshake
TCP connect
EHLO (cleartext)
STARTTLS
TLS handshake
EHLO · AUTH · MAIL
Port 465 is inside TLS from the first byte. Port 587 negotiates in the clear first. The strippable window is the entire difference.

MTA-STS addresses this for receiving domains. Defined in RFC 8461, it lets a domain publish a policy stating that its mail servers support TLS and that senders should refuse to deliver if a valid encrypted connection cannot be established.

DANE provides the same guarantee through DNSSEC. Defined in RFC 7672, it publishes the expected certificate association in DNS, so a sending server can detect a substituted or stripped connection.

TLS reporting closes the loop. RFC 8460 defines a mechanism for receiving domains to collect reports of connection failures from senders, which is how a stripping attack becomes visible rather than silent.

A TLS problem usually presents as a system reporting success, and that is the pattern worth internalising. We hit our own version of this on branded tracking domains, on the link side rather than the mail side. Our health check treated a resolving CNAME as proof the domain was ready, so a hostname could be marked verified while TLS was not actually usable, and the links we shipped inside emails then failed the handshake at the recipient. Every indicator we had was green, and the reader still got an error.

Underneath it was a category error in what we were measuring: DNS correctness is not the same claim as live TLS readiness, and we had been treating one as evidence of the other. The fix was to probe the endpoint over verified HTTPS rather than infer it, and to require both conditions before marking a domain ready.

That checker now feeds the same trends layer that watches the rest of our sending health. It tracks spam-rate and per-provider placement trends, monitors DNSBL blocklists through Spamhaus DQS, and gates degradation alerts behind hysteresis thresholds so one bad day does not page anyone or read as a crisis.

I bring up a tracking-link bug on a page about SMTP because the failure is structurally identical, and it is the one I would warn a team about. Nothing in either case reported an error, DNS resolved, the check passed, and the encrypted connection that was supposed to happen did not. Opportunistic STARTTLS fails the same quiet way, which is exactly why MTA-STS and TLS reporting exist: they convert a silent absence into a signal somebody receives.

Protocol versions and ciphers

TLS 1.2 and TLS 1.3 are the versions in current use. RFC 8996 deprecates TLS 1.0 and TLS 1.1, so a server still offering them is running protocol versions the IETF has formally retired.

TLS 1.3 removes the older key exchange and cipher options that made downgrade and weak-cipher attacks practical. Forward secrecy is mandatory in it, so a later compromise of the server key does not expose previously captured sessions.

Certificate validation is a separate question from encryption. A session can be encrypted against an unvalidated or self-signed certificate, which protects against passive capture but not against an active attacker presenting their own certificate.

Disabling certificate validation to make a connection work is the most common bad fix in this area, and it is worth naming as such. It converts a loud failure into a silent vulnerability, and because mail keeps flowing afterwards nobody revisits it. The certificate error was information about the connection. Turning it off deletes the information and leaves the condition.

George's position on the surrounding authentication is the same kind of hard line, and it is worth reading alongside the transport question. He documents the requirement as SPF, DKIM and DMARC aligned at a policy of quarantine or stronger, which Outlook requires for senders above 5,000 messages a day. Transport encryption and domain authentication answer different questions, but neither is a setting you get to treat as optional once volume is involved.

Go deeper

First send in thirty seconds.

Simple pricing. Unlimited contacts.

Every plan includes full stack emailing: Flows, Newsletter Campaigns and Transactional Email, plus our NitroWheel LLM and all agent integrations (Claude, ChatGPT, Codex, Cursor and others). Pay for what you send, not who you store.

Free
$0
forever
  • Emails 8,000then 500/mo
  • Email types Transactional & Marketing
  • AI actions 20/mo
  • Contacts Free & Unlimited
  • Brands 3 · Custom domain 1
  • Seats 1
  • Recipients / rolling 24h 100–5,000
  • Email validation Prepaid only
Start free
Ultra
$100
per month
  • Emails 125,000/month
  • AI actions 5,000/mo
  • Brands 10 · Domains 10
  • Seats 10
  • Frontier AI Included
  • Dedicated IP Available
  • Recipients / rolling 24h 1,000–625,000
  • Email validation Prepaid only
Get started
Enterprise
$300
per month
  • AI actions Unlimited
  • Unlimited brands & domains Included
  • SSO / SAML Included
  • 99.9% SLA Included
  • Recipients / rolling 24h Contracted
  • Email validation Prepaid only
Get started

Daily allowances depend on your plan and sender standing. Strong list, domain and delivery evidence can raise standing, including on day one. Trusted receives the full plan allowance; available email credits, safety checks and delivery pacing still apply.

Free forever. No credit card required. See full comparison →