Use this when upgrading mail connections to TLS.
STARTTLS
1. STARTTLS upgrades SMTP to TLS opportunistically — downgradable.
2. MTA-STS/DANE enforce TLS.
3. TLS-RPT reports failures.
4. Valid certificates on MX.
5. Disable old TLS versions.
SMTP → STARTTLS → TLS session (enforced by MTA-STS)
Context & applicabilityCommon mistakes · platform/version boundaries
- Treating opportunistic STARTTLS as protection against active attackers.
- MTA-STS policy file on a host without a valid certificate.
- Forgetting to update the policy
idafter changing the policy. - Listing MX hosts in the policy that do not match the certificate names.
Operational reference
Fast context before you go deeper.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
- Opportunistic between servers.
- Can be stripped by attackers.
- Enforce with MTA-STS or DANE.
openssl s_client -starttls smtp -connect <mx>:25 -servername <mx>— STARTTLS and certificatedig TXT _mta-sts.<domain> +short; curl https://mta-sts.<domain>/.well-known/mta-sts.txt— MTA-STSdig TXT _smtp._tls.<domain> +short— TLS-RPT
ReferenceWhy it matters1 section · depth on demand
Weakness and fixes
Opportunistic STARTTLS between servers can be stripped by an attacker who removes the STARTTLS offer, so mail falls back to plain text. Fix with:
- MTA-STS: policy at
https://mta-sts.example.com/.well-known/mta-sts.txtrequiring TLS with valid certificates. - DANE (with DNSSEC): TLSA records pin the certificate.
- TLS-RPT: reports of TLS failures.
Test: openssl s_client -starttls smtp -connect mx.example.com:25.
ReferenceHow it works1 section · depth on demand
In depth
STARTTLS upgrades a plain-text SMTP (or IMAP/POP3) connection to TLS. Between mail servers it is opportunistic by default: if TLS is not offered or fails, mail may be delivered in plain text, and an attacker can strip the STARTTLS offer.
Making server-to-server TLS reliable:
| Mechanism | Effect |
|---|---|
| MTA-STS | Policy published via HTTPS: require TLS with valid certificates for your MX hosts |
| DANE (with DNSSEC) | TLSA records pin certificates |
| TLS-RPT | Receive reports on failures |
_mta-sts.example.com. TXT "v=STSv1; id=20261105"
https://mta-sts.example.com/.well-known/mta-sts.txt:
version: STSv1
mode: enforce
mx: mx1.example.com
max_age: 604800
Documented example, not captured output.
ReferenceImportant terms & boundaries1 section · depth on demand
MTA-STS example
_mta-sts.example.com. TXT "v=STSv1; id=20261101"
https://mta-sts.example.com/.well-known/mta-sts.txt:
version: STSv1
mode: enforce
mx: mail.example.com
max_age: 604800
Documented example, not captured output. Senders that support MTA-STS will refuse to deliver without valid TLS to the listed MX. Start with mode: testing and TLS-RPT reports.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Email Security → STARTTLS. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://www.rfc-editor.org/rfc/rfc7489 · confidence 94%