DMARC & domain protection

MTA-STS · TLS reporting · Email encryption

MTA-STS + TLS-RPT setup: stop your mail being downgraded to unencrypted delivery

First published 27 October 2026 · Updated on 12 November 2026 · Verified against Google Workspace Help and RFC 8461 (MTA-STS) / RFC 8460 (TLS reporting) (sources listed below)

Merroway Editorial · Verified against governing standards and vendor documentation.

The fast answer

Do not jump to enforce. Publish TLS reporting first, then an MTA-STS policy in testing mode, watch the reports, and only then switch to enforce. The order is: find your real MX hosts → host the policy file over HTTPS → publish both TXT records → test → enforce. A policy that lists the wrong MX host will bounce your mail once enforced, so testing is not optional.

Advertisements

What you are looking at, in plain words

Normal SMTP delivery tries encryption opportunistically: the sender asks “do you support STARTTLS?” and, if the answer is no or the negotiation fails, it usually delivers anyway in plain text. That fallback is what downgrade attacks exploit. MTA-STS (RFC 8461) replaces the guess with a published rule: a small policy file, fetched over HTTPS from mta-sts.yourdomain, that names your mail hosts and says whether TLS is merely preferred or mandatory. TLS reporting (RFC 8460) is the feedback loop: senders email you daily JSON summaries of what failed, so you can see a bad MX entry or an expired certificate before it costs you mail.

PieceWhere it livesWhat it does
TLS-RPT recordTXT at _smtp._tlsTells senders where to send failure reports
MTA-STS recordTXT at _mta-stsAnnounces a policy exists, with an id you change on every edit
Policy filehttps://mta-sts.yourdomain/.well-known/mta-sts.txtLists MX hosts, mode and cache lifetime

MTA-STS only protects mail to your domain. It does nothing for mail you send out — that depends on the recipient’s own policy.

Step 0 — Prove which part is failing

  1. Look up your MX records (dig MX yourdomain or your DNS host’s record list) and write down every host that genuinely receives your mail, including any gateway or filtering service in front of your mailbox provider. The policy file must list all of them; a missing host becomes undeliverable in enforce mode.
  2. Check that you can serve HTTPS from mta-sts.yourdomain with a valid certificate from a public certificate authority. A self-signed or expired certificate means senders cannot trust the policy at all.
  3. Decide where TLS reports will go: a dedicated mailbox such as tls-report@yourdomain that you actually monitor. Reports arrive as JSON attachments, so a mailbox nobody reads is no feedback loop.
Do not fix the wrong thing first. If your mail is currently bouncing or landing in spam, that is an authentication problem (SPF, DKIM, DMARC), not an encryption problem — MTA-STS will not fix it and enforce mode can make it worse. Fix authentication first, then add this layer.

Fix 1 — Turn on TLS reporting first

Google’s documented order is TLS reporting first, then MTA-STS. Add this TXT record at _smtp._tls:

v=TLSRPTv1; rua=mailto:tls-report@yourdomain

Replace the address with your own reporting mailbox. Multiple addresses are separated by commas, each with its own mailto: prefix — for example rua=mailto:tls-report@yourdomain,mailto:reports@yourdomain. This record alone changes nothing about delivery — it only asks senders to report failures to you.

Fix 2 — Write the policy file with your real MX hosts

Host this exact-shaped file at https://mta-sts.yourdomain/.well-known/mta-sts.txt. Start in testing mode with a short cache lifetime:

version: STSv1
mode: testing
mx: your-real-mx-host.example
max_age: 86400

One mx: line per host, exactly as it appears in your MX records. Wildcards cover one label only (for example *.mail.protection.outlook.com for Microsoft 365 tenants whose MX hosts sit under that pattern — some newer Microsoft 365 domains instead use an mx.microsoft hostname — check your own MX records rather than copying a pattern from a blog). The max_age is in seconds: 86400 is one day, 604800 is one week. A short value while testing means a mistake stops hurting you quickly; raise it later.

Your website or DNS host → the mta-sts subdomain
Host1mta-sts — an A record (or CNAME) pointing at a server you control that serves HTTPS
File2/.well-known/mta-sts.txt — plain text, served over HTTPS with a valid public certificate
Check3Open the URL in a browser: you should see the policy text, with no certificate warning
Save
Do this: if your website host cannot serve a file from a subdomain over HTTPS, a static host or a Cloudflare-style front end for that subdomain is the usual answer — the requirement is HTTPS plus a valid certificate, not any particular host.

Fix 3 — Announce the policy in DNS

Add this TXT record at _mta-sts:

v=STSv1; id=20261027000000

The id must be 1–32 alphanumeric characters, and you must change it to a new unique value every time you change the policy file — senders use it to know the policy changed. Using the current date and time, as Google recommends, makes that easy to remember. Until this record exists, no sender will look for your policy file.

Fix 4 — Run in testing, read the reports, then enforce

  1. Wait for TLS reports to arrive at your reporting mailbox and read them: look for policy-fetch failures, certificate failures and MX mismatches, and fix each one at its source (usually a missing MX line or a certificate problem on the policy host).
  2. Only when reports are clean, change mode: testing to mode: enforce in the policy file, raise max_age (a week or more is the usual enforce value), and change the _mta-sts TXT id to a new value so senders pick up the change.
  3. Keep monitoring reports after the switch. In enforce mode a sender that cannot match an MX host or validate TLS will not deliver to you, so a later MX change that you forget to mirror in the policy file will bounce mail.
Advertisements

Prove it worked

  1. Open https://mta-sts.yourdomain/.well-known/mta-sts.txt in a browser and confirm the file loads with no certificate warning and shows your current mode and MX lines.
  2. Query both TXT records from outside your network (dig TXT _mta-sts.yourdomain +short and dig TXT _smtp._tls.yourdomain +short) and confirm the values match what you published.
  3. Send test mail from an outside account and, after a day, check the TLS report mailbox: reports arriving at all proves the reporting record works; a report with no failures for your hosts proves the policy is sound.

Still not working? Work this ladder in order

  1. Policy file not found or certificate warning. The subdomain does not point at your server, the file path is wrong (it must be exactly /.well-known/mta-sts.txt), or the certificate is self-signed or expired. Fix hosting before touching DNS.
  2. Reports show an MX mismatch. Compare the report’s host against your MX records line by line. A gateway host, a legacy MX host or a wildcard that does not cover the real host is the usual culprit — add the missing host and bump the id.
  3. Mail bounces after switching to enforce. Drop back to testing immediately (and bump the id), then read the reports: enforce mode is doing exactly what you asked, so the policy — not the sender — is wrong.
  4. No reports arrive at all. Check the _smtp._tls record spelling, check the reporting mailbox and its spam folder, and remember reports are daily aggregates from senders that support TLS reporting — silence from one sender is not proof of a broken record.

Mistakes that make it worse

  • Switching to enforce on day one, before any report has been read.
  • Listing only the mailbox provider’s MX and forgetting a gateway or filtering service that actually receives your mail.
  • Changing the policy file without changing the _mta-sts TXT id, so senders keep using the cached old policy.
  • Publishing the policy on a subdomain with a self-signed certificate and wondering why nobody honours it.

FAQ

Does MTA-STS encrypt my outgoing mail?

No. Your MTA-STS policy protects mail sent to your domain by other senders. Your outgoing mail is protected by the recipient domain’s policy, if it has one, and otherwise by opportunistic TLS.

How long should I stay in testing mode?

Until your TLS reports are clean for your real sending population — for most small businesses, at least a few weeks of reports. There is no fixed number in the standard; the reports, not the calendar, are the signal.

What happens if I stop publishing the policy?

Set mode to none, publish that file, bump the _mta-sts id so senders fetch the new policy, and keep it up until the old max_age expires — only then remove the records and the policy host. Deleting the file and records at once leaves senders with a cached enforce policy that can no longer be fetched.

Sources

Google Workspace Help — Turn on MTA-STS and TLS reporting (TXT records at _smtp._tls and _mta-sts, TLS reporting first, id rules) · RFC 8461 (SMTP MTA Strict Transport Security) and RFC 8460 (SMTP TLS Reporting) — policy format, modes testing / enforce / none, max_age.

Verification note: record values, limits and procedure order on this page were checked against the official sources listed above on 12 November 2026.