Why mail between servers needs MTA-STS
When a server sends you an email, it looks up your MX records and connects to port 25. It then asks to switch to an encrypted connection with STARTTLS. The problem: that step is optional. If someone on the network removes the STARTTLS offer, or presents a fake certificate, most senders simply deliver the message in plain text, or to the wrong server.
MTA-STS (RFC 8461) closes that gap. You publish a policy that says which servers receive your mail and that they must be reached over TLS with a valid certificate. Senders that support it (Gmail, Microsoft, Yahoo, Proton and others) download the policy over HTTPS, cache it, and refuse to deliver in an insecure way.
The three pieces
| Piece | Where | Example |
|---|---|---|
| TXT record | _mta-sts.example.com | v=STSv1; id=20261118T000000 |
| Policy file | https://mta-sts.example.com/.well-known/mta-sts.txt | version: STSv1, mode, mx, max_age |
| TLS-RPT (optional) | _smtp._tls.example.com | v=TLSRPTv1; rua=mailto:[email protected] |
The policy file must be served over HTTPS with a certificate valid for mta-sts.example.com, without
redirects. If you do not run a web server for that name, you can host the file on a static hosting service, a CDN
worker, or with your email provider (several offer hosted MTA-STS).
What this tool checks
- That there is exactly one
_mta-stsrecord and itsidis valid. - That the policy downloads with HTTP 200, without redirects, as
text/plainand under 64 KB. - That the HTTPS certificate is trusted, in date and valid for the policy host.
- The syntax of the policy: version, mode,
max_ageandmxlines. - That every MX server of the domain matches an
mx:line. A missing one in enforce mode means lost mail. - Whether TLS reports (TLS-RPT) are set up, and where they go.
Rolling it out safely
- Publish TLS-RPT first, so you start receiving reports.
- Publish the policy in
mode: testingwith a shortmax_age(one day). - Read the reports for two or three weeks. Fix any MX server with an invalid certificate.
- Switch to
mode: enforce, raisemax_ageto one or two weeks, and change theid.
Remember to update the policy (and the id) whenever you change mail provider or add an MX server. To see
your current MX servers, use the MX lookup; to check the certificate of
the policy host, the SSL checker.