MTA-STS Checker

Check that senders can find and trust your MTA-STS policy, that it covers every MX server, and where TLS failures are reported.

wordpress.org

MTA-STS is not set up

  • Warning: wordpress.org does not use MTA-STS. Mail sent to it is encrypted only when both servers agree to, and an attacker on the network can force it back to plain text (STARTTLS downgrade). MTA-STS tells senders to require TLS with a valid certificate.

We check the published policy. The STARTTLS certificates of the MX servers themselves (port 25) are not tested.

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

PieceWhereExample
TXT record_mta-sts.example.comv=STSv1; id=20261118T000000
Policy filehttps://mta-sts.example.com/.well-known/mta-sts.txtversion: STSv1, mode, mx, max_age
TLS-RPT (optional)_smtp._tls.example.comv=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-sts record and its id is valid.
  • That the policy downloads with HTTP 200, without redirects, as text/plain and 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_age and mx lines.
  • 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

  1. Publish TLS-RPT first, so you start receiving reports.
  2. Publish the policy in mode: testing with a short max_age (one day).
  3. Read the reports for two or three weeks. Fix any MX server with an invalid certificate.
  4. Switch to mode: enforce, raise max_age to one or two weeks, and change the id.

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.

Frequently asked questions

What is MTA-STS?

SMTP MTA Strict Transport Security (RFC 8461) lets a domain tell sending mail servers: "only deliver to my MX servers over TLS, with a valid certificate". Without it, encryption between mail servers is optional, and an attacker on the network can strip it (a STARTTLS downgrade) or redirect mail to a fake server.

What do I need to set up MTA-STS?

Three things: a TXT record at _mta-sts.example.com like v=STSv1; id=20261118T000000; a policy file at https://mta-sts.example.com/.well-known/mta-sts.txt served with a valid HTTPS certificate; and, recommended, a TLS-RPT record at _smtp._tls.example.com to receive failure reports.

What should the policy file contain?

For example:
version: STSv1
mode: testing
mx: mail.example.com
mx: *.mail.example.net
max_age: 604800

One mx: line per MX server (a *. wildcard covers one label). Start in testing, read the TLS reports for a couple of weeks and then switch to enforce.

What is the difference between testing and enforce?

In testing, senders check TLS and send you reports, but still deliver when something fails. In enforce, they refuse to deliver to a server without valid TLS. Enforce is the real protection; testing is the safe way to get there.

Why must the id change when I edit the policy?

Senders cache the policy for max_age seconds and only download it again when the id in the TXT record changes. If you add an MX server and forget to change the id, senders in enforce mode can refuse to deliver to the new server until their copy expires.

Does this tool test STARTTLS on my mail servers?

Not yet: that needs a connection to port 25, which most cloud providers block. MTA-STS also requires each MX server to present a certificate valid for its name; check the HTTPS side with the SSL Checker and your MX servers with the MX Lookup.

Related tools

Last updated: