← Home

MTA-STS checker

Check whether a domain asks senders to deliver its mail only over verified TLS, and see what a complete MTA-STS setup needs beyond the DNS record.

What MTA-STS is

Mail between servers is encrypted with STARTTLS, but by default that encryption is opportunistic: if an attacker in the network path strips the STARTTLS offer, or answers with a fake certificate, most sending servers quietly fall back to plain text. MTA-STS (SMTP MTA Strict Transport Security, RFC 8461) lets a domain publish a policy that says: deliver mail to me only over TLS, only to these MX hosts, and only with a valid certificate.

It protects mail coming in to your domain. Senders that support it, including Gmail and Microsoft 365, fetch and cache your policy and refuse to deliver insecurely while the policy is in enforce mode.

The two parts of MTA-STS

First, a TXT record at _mta-sts. in front of your domain announces that a policy exists:

_mta-sts.example.com  TXT  "v=STSv1; id=20260926T090000"

The id is any string of up to 32 letters and digits; change it whenever the policy changes so senders fetch the new version. Second, the policy itself is a plain-text file served over HTTPS at a fixed address:

https://mta-sts.example.com/.well-known/mta-sts.txt

version: STSv1
mode: enforce
mx: mail.example.com
mx: *.mail.protection.outlook.com
max_age: 604800
  • mode is testing (report problems but deliver anyway), enforce, or none (withdraw the policy).
  • Each mx line must match your real MX hosts; a leading *. matches one label.
  • max_age is how long senders cache the policy, in seconds. One week or more is typical once you are confident.

A companion TXT record, TLS-RPT (RFC 8460) at _smtp._tls.example.com with v=TLSRPTv1; rua=mailto:…, asks senders to report TLS failures to you daily. Set it up at the same time; it is what makes testing mode useful.

What this checker looks at

MailPosture reads the _mta-sts TXT record and prints it verbatim. It does not fetch the policy file or test your MX certificates, so a “published” result means the announcement exists, not that the whole setup works. MTA-STS is optional and many small domains do not publish it, so its absence is shown as information, not as a failure.

Common mistakes

  • TXT record without a policy file. The record promises a policy that returns a 404, so senders ignore it and you get no protection.
  • An invalid certificate on the mta-sts host. The policy host needs its own valid HTTPS certificate for mta-sts.yourdomain.
  • mx lines that do not match. After an email migration the MX changes but the policy still lists the old host. In enforce mode, senders then refuse to deliver.
  • Forgetting to change the id. Senders keep the cached policy until max_age runs out.
  • Starting in enforce mode. Run in testing with TLS-RPT for a few weeks first.
  • A tiny max_age in production. A policy cached for minutes gives an attacker a window after every expiry.

How to set it up

  1. Publish TLS-RPT at _smtp._tls so you receive reports.
  2. Host the policy file at https://mta-sts.yourdomain/.well-known/mta-sts.txt with mode: testing and your current MX hosts.
  3. Publish the _mta-sts TXT record with a fresh id.
  4. Read the TLS reports for two to four weeks and fix any MX host that fails.
  5. Switch to mode: enforce, raise max_age, and change the id.

What cyber-insurance questionnaires ask

MTA-STS is asked about far less often than SPF, DKIM and DMARC. Where it does come up, it is usually as part of a broader question about encrypting email in transit or enforcing TLS. If a questionnaire asks, answer precisely: a published _mta-sts record plus a policy in enforce mode is enforcement; testing mode is monitoring. MailPosture shows the record as it was read, with the resolver and UTC time, so the claim can be checked.

Check a domain now

Free, anonymous, and reads public DNS only.