By Ahmet Karaca · Updated · Checked against RFC 8461 (MTA-STS) and RFC 8460 (SMTP TLS Reporting) on
What the checker verifies
MTA-STS (SMTP MTA Strict Transport Security) has two parts that a sender needs together: a TXT record that announces a policy and a policy file served over HTTPS. TLS-RPT is its companion record for reports. The checker reads all three for the domain you enter, the way a sending server would, and compares the policy with your MX records.
- The TXT record at
_mta-sts.yourdomain.com: that exactly one record starts withv=STSv1and that it carries anid=of 1 to 32 letters and digits. - The policy file at
https://mta-sts.yourdomain.com/.well-known/mta-sts.txt: that the host exists, its certificate is valid for that name, the server answers200without a redirect, the file is served astext/plainand stays under the 64 KB that RFC 8461 suggests. - The policy fields:
version: STSv1, amodeofenforce,testingornone, amax_agefrom 0 to 31557600 seconds (365.25 days), and at least onemxline unless the mode isnone. - That every MX host of your domain matches an
mxpattern, with wildcards matching exactly one label as RFC 8461 §4.1 defines. - The TLS-RPT record at
_smtp._tls.yourdomain.com: one record starting withv=TLSRPTv1and anrua=list ofmailto:orhttps:addresses.
Testing vs enforce
The mode line decides what a sender does when TLS to one of your MX hosts fails, or when the host isn't in the policy. In testing, senders that support TLS-RPT report the failure and may deliver anyway. In enforce, they must not deliver to that host: they try another MX host that passes, or keep the message and retry later. none tells senders to treat the domain as if it had no policy, and is meant for removing MTA-STS cleanly.
That is why the checker grades the same problem differently by mode. An MX host outside the policy is a warning in testing, because mail still flows, and a problem in enforce, because senders that apply the policy stop delivering to it. The green "enforced" summary appears only when the policy is in enforce mode, parses without errors and covers every MX host.
A rollout checklist
- List the hosts that receive your mail with the MX lookup, and make sure each one offers STARTTLS with a valid certificate for its own hostname.
- Publish the
_smtp._tlsrecord so reports start arriving. - Serve the policy file with
mode: testingand anmxline for every MX host, then publish the_mta-stsrecord. - Run this checker until it reports no problems, then read the TLS-RPT reports for a while.
- When the failure counts are zero or explained, change the file to
mode: enforce, then change theidin the TXT record. Update the file first, so a sender that sees the new id never caches the old file.
What it doesn't check
- STARTTLS and certificates on the MX hosts themselves. We don't open connections to port 25.
- Whether senders still hold an older policy in their cache. They keep it until its max_age runs out or they see a new id.
- DNSSEC and DANE (RFC 7672), a different way to secure SMTP TLS.
For the reasoning behind each rule, sample records and how to read a TLS-RPT report, see MTA-STS and TLS-RPT explained.