CheckSumTech Insights Ideas for the Digital Enterprise
🔍 Search All Articles Generative AI Cloud Digital Transformation Compliance Data & Analytics
MTA-STS and TLS-RPT: requiring encrypted email delivery
🔒 Security · ·

MTA-STS and TLS-RPT: Require Encrypted Email Delivery Without Breaking Mail

MTA-STS and TLS-RPT: requiring encrypted email delivery

Email between servers is encrypted only when both sides feel like it. MTA-STS (RFC 8461) lets your domain publish a policy that says other servers must deliver to you over TLS with a valid certificate, or not at all. It comes with a reporting companion, TLS-RPT, and a safe way to adopt it: start in testing mode, read the reports, and only then enforce.

3Pieces to publish: TXT record, policy file, TLS-RPT
2Modes you'll use: testing, then enforce

What problem it solves

Email travels between servers over SMTP, and encryption between servers (STARTTLS) is normally opportunistic: if the other side offers it, it is used, and if it doesn't, the message goes in plain text. An attacker sitting on the network path can strip the offer, or present a bad certificate, and the sending server will usually carry on anyway.

MTA-STS lets you publish a policy that says, in effect, “deliver to my domain only over TLS, with a valid certificate, and only to these mail servers.” A sender that supports it checks the policy and refuses to deliver if the connection doesn't meet it. Microsoft documents that Exchange Online applies MTA-STS automatically to outbound mail, so enforcing a policy has real effect for mail arriving from Microsoft 365 senders.

The three pieces you publish

1. A DNS TXT record that announces the policy exists. The id must change every time you change the policy, because senders cache the policy until it expires and use a new id as the signal to re-fetch it:

_mta-sts.example.com. 3600 TXT "v=STSv1; id=20261112T080000Z;"

2. A policy file served over HTTPS at a fixed address. The host mta-sts.example.com needs a valid certificate, and the path is always /.well-known/mta-sts.txt:

https://mta-sts.example.com/.well-known/mta-sts.txt version: STSv1 mode: testing mx: mail.example.com max_age: 86400

3. A TLS-RPT record (RFC 8460) that tells sending servers where to email their daily reports about TLS problems they hit with your domain. Without it, testing mode tells you nothing:

_smtp._tls.example.com. TXT "v=TLSRPTv1; rua=mailto:tls-reports@example.com"
List your real MX hostnames in the mx: lines of the policy file. If your MX records point to Exchange Online, Microsoft documents *.mail.protection.outlook.com for that line. A host that is missing from the policy will fail once you enforce it.

The three modes

testing lets senders fetch and check the policy but not act on it, and reports are still sent. enforce makes supporting senders refuse delivery when TLS or the certificate doesn't match. none is defined by RFC 8461 as the mode that switches the policy off. Always begin in testing.

"Run in testing mode until the reports are quiet. A policy you enforce on day one is the one that bounces your own customers' mail."

A rollout that doesn't break mail

One commonly recommended schedule, which is also close to Microsoft's own steps, looks like this:

  • Publish in testing with a short max_age (86400 seconds is one day), the TXT record, and the HTTPS policy file. Add the TLS-RPT record at the same time.
  • Watch the reports for one to two weeks. Fix whatever keeps recurring: expired certificates, an MX host missing from the policy, a server that doesn't offer STARTTLS, or a policy file that times out.
  • Switch to enforce once there have been no recurring failures for a week, set max_age to something like 604800 (seven days), and change the id in the TXT record so senders pick up the new policy.

If enforcement starts causing failures, roll back the same way: set the mode back to testing, upload the file, and change the id again. Keep in mind that senders may keep the old enforce policy until its max_age runs out, which is why a long max_age should come last, not first.

The mistakes that cause real outages

  • An expired or mismatched certificate on the mta-sts host. The policy file has to load over valid HTTPS, so a forgotten renewal will quietly turn a safe policy into a delivery problem.
  • Forgetting to change the id after editing the file, so senders keep using their cached copy.
  • An MX change you didn't mirror in the policy. Moving mail providers means updating the mx: lines first, then the MX records.
  • Enforcing with no TLS-RPT. You lose the only signal that tells you mail is being refused.

Is it worth it for a small domain?

It protects the delivery path for mail sent to you, so it matters most for domains that receive sensitive documents, such as contracts, invoices or client data. It is optional, it takes a small static web host, and it is easy to get wrong if nobody owns the certificate renewals. Treat it as a later step, after SPF, DKIM and DMARC are solid. Start with DMARC if you haven't.

DeliveryRadar checks that your _mta-sts and TLS-RPT DNS records are present. It checks the DNS records only, so it doesn't fetch or validate the policy file itself. Test that file separately after every change.

Sources: RFC 8461, SMTP MTA Strict Transport Security (MTA-STS). RFC 8460, SMTP TLS Reporting. Microsoft Learn, Enhancing mail flow with MTA-STS. CaptainDNS, From testing to enforce: a progressive MTA-STS deployment strategy.

Share:

Check your email authentication

Free, no-signup scan of your SPF, DKIM, and DMARC setup, with a plain-English fix for each issue.

Scan My Domain