MTA-STS rollout checklist
A step-by-step checklist for MTA-STS and TLS reporting: the policy file, the DNS records, testing mode and switching to enforce.
Published
On this page
The short answer: MTA-STS tells other mail servers that yours always support encrypted connections with a valid certificate, so they should refuse to deliver over an insecure connection. To roll it out, you publish a policy file on https://mta-sts.yourdomain/.well-known/mta-sts.txt, add a TXT record at _mta-sts, and turn on TLS reporting. Start in testing mode with a short max_age, read the reports, then switch to enforce.
This checklist goes through each part in order and covers the mistakes that most often break it.
What MTA-STS protects against
Email between servers is usually encrypted with STARTTLS, but by default the encryption is optional. An attacker who can interfere with the connection can strip the STARTTLS offer, and the sending server will fall back to sending in plain text. Most servers also don't check the receiving server's certificate, so a fake server can accept the mail.
RFC 8461 fixes this. A domain publishes a policy over HTTPS that lists its mail servers. Sending servers that support MTA-STS fetch the policy, cache it, and from then on deliver only over TLS to a server named in the policy with a valid certificate.

Before you start
- Your MX servers must already support TLS with valid certificates. If you use Microsoft 365 or Google Workspace, they do.
- You need somewhere to host one small text file over HTTPS on the
mta-stssubdomain, with a valid certificate for that name. - You need to be able to add TXT records to your domain's DNS.
Step 1: turn on TLS reporting first
TLS reporting (TLS-RPT, RFC 8460) asks sending servers to send you a daily summary of failed encrypted connections. It's how you'll find out whether MTA-STS would block anything, so set it up first. Add a TXT record:
Name: _smtp._tls
Type: TXT
Value: v=TLSRPTv1; rua=mailto:tls-reports@yourdomain.com
Reports are JSON files. Like DMARC reports, they're easier to read with a reporting service.
Try it now
TLS-RPT Checker
Check a domain's TLS-RPT record (RFC 8460): whether it is valid and where mail servers send reports about failed secure connections.
Step 2: publish the policy file in testing mode
Create a plain-text file, served at exactly this address:
https://mta-sts.yourdomain.com/.well-known/mta-sts.txt
with content like this:
version: STSv1
mode: testing
mx: yourdomain-com.mail.protection.outlook.com
max_age: 86400
versionis alwaysSTSv1.modeistesting,enforceornone. In testing mode, senders report problems but still deliver.mxlists every mail server in your MX records, one per line. A wildcard such as*.mail.protection.outlook.commatches one level of subdomain.max_ageis how long senders cache the policy, in seconds. The NCSC recommends 86400 (one day) while testing.
Step 3: add the _mta-sts TXT record
This record tells senders that a policy exists and which version it is:
Name: _mta-sts
Type: TXT
Value: v=STSv1; id=20261104T0900
The id can be any short string of letters and numbers. A date and time works well. Change it every time you change the policy file; that's how senders know to fetch the new version. If you forget, senders keep using their cached copy until it expires.
Try it now
MTA-STS Checker
Check a domain's MTA-STS setup: the DNS record, the policy file, its mode and max_age, and whether every MX server matches the policy.
Step 4: check everything matches
- Look up your MX records and compare them with the
mxlines in the policy. Every MX host must match a line. - Run the MTA-STS Checker. It fetches the policy the way a sending server would, checks the TXT record, and compares the
mxlines with your MX records. - Run the TLS-RPT Checker to confirm the reporting record is valid.
Step 5: watch the reports, then enforce
Leave the policy in testing mode for at least two weeks. Check the TLS reports for failures. Typical causes are an MX server missing from the policy, an expired certificate on one of your mail servers, or a backup MX that doesn't support TLS.
When the reports are clean:
- Change
mode: testingtomode: enforce. - Raise
max_age. The NCSC recommends at least 1209600 (two weeks) when enforcing; the maximum the standard allows is 31557600 (about a year). - Change the
idin the_mta-stsTXT record.
Changing mail provider later
MTA-STS policies are cached, which is the point, but it means a change of mail provider needs planning. Senders that have cached an enforce policy won't deliver to a new server that isn't listed, until their copy expires.
- Several days before the move, add the new provider's MX hosts to the policy alongside the old ones, and change the
id. - Wait at least as long as the old
max_age, so senders have fetched the new policy. - Switch your MX records.
- Remove the old provider's hosts from the policy and change the
idagain.
The mistakes we see most often
- A redirect on the policy address. Many hosts redirect every subdomain to the main website. Senders won't follow it, so the policy is never read.
- A certificate that doesn't cover
mta-sts. A certificate forwwwand the bare domain isn't enough; the policy host needs its own name on a valid certificate. - A forgotten backup MX. Older set-ups sometimes have a second, lower-priority MX record at another provider. It must be in the policy and must support TLS, or be removed.
- The
idnever changes. Senders keep using the old policy, so a fix seems to make no difference. - Extra text in the file. Keep the file to the four kinds of line shown above, each on its own line, with no HTML around it.
Common questions
Does MTA-STS protect the mail I send?
No. Your MTA-STS policy protects mail that other people send to you. Whether your outgoing mail is protected depends on your mail provider honouring other domains' policies when it delivers.
Do I need DNSSEC for MTA-STS?
No. MTA-STS was designed to work without DNSSEC: it relies on the HTTPS certificate on the mta-sts name instead. DANE is an alternative that does need DNSSEC. Some domains use both.
What happens if the policy file goes offline?
Senders that already have a cached policy keep using it until max_age runs out, so mail keeps flowing. New senders that can't fetch the policy simply deliver as they would without MTA-STS. That's why a longer max_age matters once you're enforcing.
Can I host the policy on my normal website?
Yes, as long as the mta-sts subdomain points to it, the server has a valid certificate for mta-sts.yourdomain, and the file is served directly at the /.well-known/mta-sts.txt address without redirects. Many hosts let you add the subdomain in their control panel.
The full checklist
- TLS-RPT record at
_smtp._tlswith a working report address. - Policy file at
https://mta-sts.yourdomain/.well-known/mta-sts.txt, served with200, no redirects, valid certificate. - Every MX host matched by an
mxline. _mta-stsTXT record withv=STSv1and anid.- Testing mode for two weeks or more, with clean reports.
- Enforce mode with a longer
max_age, and a newidafter every change.
Related tools
-
MTA-STS Checker
Check a domain's MTA-STS setup: the DNS record, the policy file, its mode and max_age, and whether every MX server matches the policy.
-
TLS-RPT Checker
Check a domain's TLS-RPT record (RFC 8460): whether it is valid and where mail servers send reports about failed secure connections.
-
MX Lookup
Find which mail servers receive email for a domain: MX records in priority order, each host's IPv4 and IPv6 addresses, null MX and common mistakes.
More email guides
-
Email
Moving DMARC from p=none to reject, safely
How to read DMARC reports, fix every real sender and move from monitoring to quarantine and reject in stages, without blocking your own email.
-
Email
How to write an SPF record, with examples for common providers
What each part of an SPF record means, the includes for Google Workspace, Microsoft 365 and other providers, where to publish it and how to stay within 10 lookups.
-
Email
Email health checklist: what to check before you send
The DNS records and other checks that decide whether your email is trusted, from MX, SPF, DKIM and DMARC to reverse DNS, BIMI, MTA-STS and DNSSEC.