Skip to content
  • There are no suggestions because the search field is empty.

MTA-STS, TLS-RPT, and SMTP TLS

MTA-STS and TLS-RPT protect mail on its way to your domain. MTA-STS lets you tell sending servers that your MX hosts support verified TLS, and that they shouldn't deliver to you over an unencrypted or unverified connection. TLS-RPT lets those senders send you a daily report when TLS to your servers fails. Neither one has anything to do with who may put your domain in the From address. That's DMARC's job, and these don't replace it.

They exist because plain SMTP TLS is opportunistic. A server offers STARTTLS, and the sender uses it if it can. An attacker who can delete parts of the SMTP session (such as the 250 STARTTLS response) or who can redirect the entire SMTP session (perhaps by overwriting the resolved MX record of the delivery domain) can perform downgrade or interception attacks. This article covers how to publish both and roll them out without bouncing your own inbound mail.

How MTA-STS differs from SPF, DKIM, and DMARC

SPF, DKIM, DMARC MTA-STS and TLS-RPT
Protects Use of your domain in mail you send Transport of mail sent to you
Who acts on it Receivers checking your outbound mail Senders delivering to your MX
Report format DMARC aggregate XML to rua in _dmarc TLS-RPT JSON to rua in _smtp._tls

Both families are requests. A sender that doesn't support MTA-STS ignores it. Microsoft puts it plainly: "If you're receiving an email from a sender who doesn't support MTA-STS, the email will still be delivered without the extra protection". For how SPF, DKIM, and DMARC fit together, see What is email authentication?.

The MTA-STS policy and record

MTA-STS has two parts, and senders need both.

The mta-sts record (DNS)

A TXT record at _mta-sts.<your domain>:

_mta-sts.example.com.  IN TXT  "v=STSv1; id=20261115090000Z;"

v=STSv1 is the only version. id is a short string that changes every time the policy changes, so senders know to fetch it again. Microsoft suggests a UTC timestamp as a repeatable pattern, as above.

The mta-sts policy (HTTPS)

A plain-text file at exactly https://mta-sts.<your domain>/.well-known/mta-sts.txt, served over HTTPS with a valid certificate for the mta-sts subdomain:

version: STSv1
mode: testing
mx: mx1.example.com
mx: mx2.example.com
max_age: 604800
  • mode is enforce, testing, or none (see below).
  • mx lists every host that receives mail for the domain, one per line. Include backups and any inbound gateway.
  • max_age is how long senders cache the policy, in seconds, up to 31557600 (about a year). In production, values in the range of weeks or greater are expected. 604800 is one week.

Wildcard patterns in mx are allowed by the MTA-STS standard, but Microsoft 365 says wildcards or * must not be used as the MX prefix in all MTA-STS scenarios, with Exchange Online's own *.mail.protection.outlook.com as the one exception. Exact hostnames are the safe default.

The three modes

The policy has three modes:

  • enforce: sending servers "MUST NOT deliver the message to hosts that fail MX matching or certificate validation or that do not support STARTTLS." Even then, a compliant sender treats the failure as temporary and re-checks for an updated policy before giving up.
  • testing: senders that also support TLS-RPT report failures, but "messages may be delivered as though there were no MTA-STS validation failure." This is mta-sts testing mode, and it's where every rollout should start.
  • none: treat the domain as having no policy. It's how you switch MTA-STS off cleanly: publish mode: none with a short max_age, change the id, and only remove the records once the old cached policies have expired.

TLS-RPT: SMTP TLS reporting

TLS-RPT is a separate TXT record at _smtp._tls.<your domain>:

_smtp._tls.example.com.  IN TXT  "v=TLSRPTv1; rua=mailto:tls-reports@example.com"

rua can be a mailto: address or an https:// endpoint. Reports are JSON and should cover a full UTC day. They cover STARTTLS, MTA-STS, and DANE failures, so you can detect potential attacks and diagnose unintentional misconfigurations.

Two things to get straight:

  • This isn't your DMARC rua. Different record, different format, different data. Pointing TLS-RPT at a mailbox or tool that only parses DMARC XML won't get you anything readable. BIMI Certifications' reporting product accepts TLS-RPT reports, so you can point rua there.
  • Expect few reports at first. You might not receive many reports until TLS reporting is more widely used by mail providers. Silence doesn't mean the record is broken. Check the syntax, then wait.

A rollout that doesn't bounce your inbound mail

Google and Microsoft both say to start in testing and switch to enforce only after the reports look clean.

  1. List every MX. Primary, backup, and any filtering gateway in front of your mailbox provider.
  2. Publish TLS-RPT so you can see failures from day one.
  3. Publish the policy in testing, then the _mta-sts TXT record.
  4. Read the daily reports until they show no failures you can't explain. Look for hosts missing from mx, certificate name mismatches, and expired certificates.
  5. Switch to enforce: update the policy file first, then change the id in DNS.
  6. Whenever MX changes, update the policy before the DNS cutover.

Order matters on every update. Update the HTTPS policy before the TXT record, so senders that see the new id don't cache the old file. Senders may keep using the cached policy until both are updated and the TXT record's TTL has passed. If you change the policy and forget the id, senders will keep using cached policies for your domain until the max_age of the cached policy expires.

If enforce starts causing failures during an incident, Microsoft's advice is to switch mode back to testing, which keeps reports flowing while pausing enforcement.

Provider notes

Gmail and Google Workspace. Gmail mail from your domain complies with MTA-STS when the receiving server has a policy in enforced mode. Workspace admins can also turn on MTA-STS and TLS reporting for their own domain, which asks senders to deliver only over connections "authenticated with a valid public certificate" and "encrypted with TLS 1.2 or higher". Separately, Gmail requires every sender to personal Gmail to use TLS. That's a TLS requirement, not an MTA-STS one.

Exchange Online, outbound. Exchange Online validates recipients' MTA-STS policies automatically, and "it's therefore always turned on." Under enforce, failures return NDRs such as 5.4.8 ("MX hosts of '{domain}' failed MTA-STS validation") or 5.7.5 ("Remote certificate failed MTA-STS validation").

Exchange Online, inbound. Supported if your MX points to Exchange Online. But "MTA-STS policy files aren't something that Exchange Online can host on behalf of customers," so you host the file yourself (Microsoft documents Azure options). If your MX points to a third-party service first, check that service's requirements. Microsoft 365 DMARC setup is in DMARC for Microsoft 365, Google Workspace in DMARC for Google Workspace, and other platform issues in Microsoft 365 or Google Workspace setup issues.

TLS versions. Servers that support MTA-STS must support TLS 1.2 or 1.3 or higher.

DANE is the DNSSEC-based alternative, and TLS-RPT reports cover it too. Platform support wasn't surveyed for this article.

Limits worth knowing

  • First contact is the weak point. An attacker who can block the very first policy lookup can make your domain look like it has no policy. Prefer max_age values as long as is practical for that reason.
  • It only covers mail to you. Your outbound mail is protected only where the recipient publishes its own policy.
  • It doesn't stop spoofing. Someone can still forge your From domain. That's SPF, DKIM, and DMARC territory.

Common mistakes

  • A missing backup or gateway in mx. Under enforce, mail via that host gets refused.
  • Policy changed, id not changed, or the DNS record changed before the file.
  • Certificate problems on mta-sts.<domain> or on the MX host itself.
  • Wildcard MX entries outside Exchange Online's documented case.
  • Short max_age in production, which reopens the first-contact gap.
  • Going straight to enforce. Run testing with reports first.

Free DMARC account

Not sure which sender is failing?

Connect your domain's DMARC reports and see every service that sends as your domain, and whether each one passes SPF, DKIM and DMARC.

  • Every sending source in one dashboard
  • SPF, DKIM and alignment results per sender
  • No XML files to read

Create a free DMARC accountTalk to an expert

FAQ

Is MTA-STS the same as DMARC?

No. MTA-STS protects the connection when mail is delivered to your MX. DMARC governs use of your domain in the From address of mail you send.

Why aren't we getting any TLS-RPT reports?

Few senders send them yet. Check that the _smtp._tls record starts with v=TLSRPTv1; and that rua is a valid mailto: or https:// URI.

Can BIMI Certifications receive our TLS-RPT reports?

Yes. The reporting product accepts TLS-RPT reports. They're separate from your DMARC reports and use a separate rua in the _smtp._tls record.

Does Microsoft 365 host our MTA-STS policy file?

No. Exchange Online can't host it for you.