Every email conversation that upgrades to encryption says hello twice. The first hello is shouted across an open room. The second is murmured through a locked door. In between, the protocol deliberately forgets everything it was told.

That act of forgetting is the real invention of STARTTLS, the 1999 upgrade that let SMTP — the Internet’s stubbornly durable mail-delivery protocol — negotiate TLS on a connection it had already opened, on the same port, without asking a single operator to rebuild a single mail server. The cipher gets the credit. The amnesia does the work.

And it was one man’s homework twice over. Paul Hoffman wrote RFC 2487 in June 1999, then came back in January 2002 with RFC 3207 to tighten the bolts. Between the two documents sits one of the most quietly influential design decisions in Internet plumbing: the moment a protocol decided that a security upgrade must invalidate the conversation that led to it.

A switchblade folded into a greeting

Ordinary SMTP opens like a formal introduction. The server announces 220 and its name. The client offers EHLO and its own. The server replies with the list of extensions it can perform — the party-trick menu. In 1999, STARTTLS joined that menu as a single word with no parameters attached: I can be persuaded to encrypt, if you ask nicely.

The client asks. The server answers 220 a second time — the same three digits, an entirely different meaning — and from that byte onward the wire carries raw TLS handshake instead of mail.

The economics were irresistible. No second port, no parallel routing system, no new MX vocabulary, no flag day. Ancient clients kept mumbling the old dialect; modern peers discovered encryption on a connection they had already paid for.

The trouble with a promise made in the open

But discovery happened before protection. An on-path adversary could rewrite the client’s first identity, add or delete extensions, or simply erase the STARTTLS line and let an opportunistic sender shrug and deliver in the clear.

Which raised the awkward question every security retrofit eventually faces: once the handshake completes, what exactly may the server still believe about the client’s first introduction? The answer, in SMTP’s case, was refreshingly ruthless — nothing worth keeping.

Amnesia, written into the standard

RFC 2487 imposed the discipline, and RFC 3207 kept it sharp. Once TLS completed, the session returned to the state immediately after the server’s original service-ready greeting. The server discarded what it had learned from the client before TLS, including the first EHLO argument. The client discarded the first extension list. Then it said hello again.

This was never ceremony. The second greeting belongs to a different evidentiary world. A server might advertise an authentication mechanism only after inspecting a suitable client certificate. A client might accept a capability only after validating the server against its own policy. Pre-TLS claims could not be grandfathered across the boundary as though the handshake had personally vouched for them.

The 220 is a one-way door

STARTTLS also became a hard framing point. After the server replied 220, the client had to begin TLS before sending another SMTP command — no exceptions, no last-minute pleasantries. When PIPELINING grouped commands together, STARTTLS had to be last in its group. Otherwise a cleartext command could be mistaken for handshake bytes, or a command chosen from the old menu could arrive in the new room and expect to be honoured.

A padlock is not a verdict

TLS delivered confidentiality, integrity and peer authentication. It did not decree that every negotiated result was good enough. Certificate identity, trust anchors, algorithms and client credentials belonged to local policy, and either side could stop when the achieved privacy or authentication fell short.

That distinction stopped a successful handshake from becoming an all-purpose seal. Encryption against a passive observer was not authenticated delivery to the intended MX. A verified relay was not proof of the human author. One protected SMTP hop said nothing certain about the submission hop before it or the next relay after it.

The 454 response made the trade-off explicit. When TLS was temporarily unavailable, a sender could transmit in cleartext, queue and retry, or fail outright. The extension supplied a mechanism; the sender still owned the consequence of falling back.

Why the first version could not insist

Public Internet mail carried a demanding failure rule: a recipient’s MX had to accept messages from senders who had never upgraded. RFC 3207 therefore prohibited a publicly referenced port-25 server from requiring STARTTLS merely to deliver mail locally. Private servers and relay services could demand it, and authentication established inside TLS could govern relaying, but the open receiving edge stayed compatible.

That choice accelerated incremental deployment and preserved reachability. It also left a permanent hole: the policy requiring TLS travelled inside the unprotected conversation it was supposed to constrain. Strip the advertisement, and an opportunistic sender sees a plain, friendly server and hands over the mail.

Moving the promise out of the room

DANE for SMTP, standardised in 2015, coupled the destination’s TLS commitment and authentication material to DNSSEC-validated TLSA records. When a secure applicable record existed, a missing STARTTLS advertisement stopped being permission to continue. Failure to negotiate the required channel delayed delivery instead of exposing the message.

MTA-STS, standardised in 2018, chose another trust path. A recipient published a discoverable policy and served its contents over HTTPS; a sender cached acceptable MX patterns, PKIX expectations and an enforcement lifetime. During that lifetime, a stripped STARTTLS line or an invalid certificate produced queueing rather than silent downgrade. Initial policy discovery retained a different exposure, because ordinary DNS could still be interfered with, while caching narrowed later opportunities.

Both designs changed where authority lived. STARTTLS remained the in-band transition. External policy answered the separate question: was the sender ever permitted to proceed without it?

The second hello was the durable invention

It is tempting to remember STARTTLS as a switch from plaintext to ciphertext. Its more general contribution was a clean state boundary inside a long-lived protocol. Claims learned before protection were not upgraded retroactively. They expired. Capabilities were rediscovered, identity was evaluated under explicit policy, and failure stayed distinguishable from permission to fall back.

That pattern matters wherever security is bolted onto an established conversation. A new cryptographic layer cannot cleanse decisions already made from attacker-controlled input. The system must name which state survives, which state is erased, and who may authorise weaker operation. Encryption was the product. Forgetting was the method — and every protocol that has since retrofitted security onto something old is still living in the shadow of that second EHLO.

Sources and limits

The original transition, reset requirement and downgrade warning appear in RFC 2487; the revised SMTP rules, sharpened reset and interoperability boundary are in RFC 3207. RFC 7672 defines opportunistic DANE TLS for SMTP, and RFC 8461 defines MTA-STS. These specifications do not measure present deployment, global downgrade attacks or provider defaults.