Skip to content

MTA-STS checker:
does your policy match your MX?

Enter a domain — the checker follows the _mta-sts TXT record to your policy file, fetches it over verified TLS, and matches every mx: line against the mail servers your domain really uses. Under mode: enforce, one stale line there blocks your own mail.

TXT + HTTPS policy, both verified mode graded, not just found mx: list vs live MX
What a "record found" MTA-STS check misses

Policy published. Nothing enforced.

Each one fails when a sender enforces it. MTA-STS breaks in quieter ways than most DNS records, because half of it isn't DNS at all — it's a text file on a web server, with a certificate, behind a cache.

mode: testing since launch

Senders evaluate, report, and deliver anyway — a STARTTLS-stripping attacker today gets exactly what he'd get with no policy at all.

testing · delivers anyway

The 404 policy

The TXT pointer is live; the policy file died in a website migration — /.well-known/ didn't survive the new CMS. New senders find nothing; the lock never engages.

TXT ✓ · file ✗

Yesterday's mx list

Migrated from Google to Microsoft 365; nobody updated the policy file. Under enforce, policy-honoring senders now refuse your new servers — for as long as max_age says.

enforce · blocks your own MX

max_age set to a year

max_age: 31536000 on a policy with a mistake in it. Senders who cached it keep enforcing the mistake for months after you fix the file — the cache outlives the correction.

cache: 365 days
The verdicts

Every mode, and what breaks it

The mode decides whether senders enforce TLS, only report on it, or ignore your policy. The three states after it take that decision out of your hands.

mode: enforce

The destination: senders must negotiate verified TLS with a host on the mx list — or not deliver at all. STARTTLS stripping stops working against you.

→ verify the mx list matches live MX — below
mode: testing

Evaluate and report, deliver anyway. The correct first month of a rollout — paired with TLS-RPT so the reports reach someone. A terrible permanent address.

→ a rollout stage — set a date to switch to enforce
mode: none

The formal off-switch. Publishing none with a fresh id retires a policy cleanly — better than deleting files and leaving caches to guess.

→ deliberate — just confirm it's meant
policy file unreachable

404, wrong host, or a certificate that doesn't match mta-sts.domain. First-time senders get no policy; cached senders keep the old one. Both are wrong.

→ fix the file and the cert — then bump id
mx: list ≠ live MX

An MX host no pattern covers is, to an enforcing sender, a forbidden door. Mail queues, defers, bounces — at exactly the senders careful enough to honor your policy.

→ update the file, then bump the id
id never changes

You edited the policy file but not the TXT id=. Senders compare ids to decide whether to refetch — no change, no refetch, until max_age runs out.

→ every policy edit = a new id, same commit
How the two halves work

Why the policy lives on HTTPS

MTA-STS exists because plain DNS can't be trusted on the same network path an attacker uses to strip STARTTLS. So RFC 8461 splits the trust:

  • The TXT record is just a versioned pointer: "a policy exists, and its id is X." It carries no policy at all.
  • The policy itself rides HTTPS: an attacker who can rewrite your port-25 traffic can't also forge a publicly-trusted certificate for mta-sts.yourdomain.
  • Which means the certificate on that little host is load-bearing — it expires, the policy silently dies. We check it.
  • And the two halves must agree with a third thing: your live MX set. That three-way agreement is this tool's whole job.
Check all three

The policy file, line by line

/.well-known/mta-sts.txt
version: STSv1Must be first. The only version there is.
mode: enforceOr testing (report, deliver anyway) or none (formal retirement). The one word that decides whether this protects anything.
mx: aspmx.l.google.comOne line per allowed host. Wildcards cover one label only: *.aspmx.l.google.com matches alt1… but never aspmx.l.google.com itself.
max_age: 604800Seconds senders may cache the policy. Weeks are the sweet spot — long enough to protect, short enough to recover from a mistake.
Served as text/plain, at exactly that path, on host mta-sts.<domain>, behind a valid certificate. Each of those four requirements is a separate way the policy fails.
For terminal people

Do it yourself in the terminal

The pointer and the policy file are one command each. The cross-check is the part worth scripting: every mx: pattern against every live MX host, wildcards included.

Read the TXT pointerdig +short TXT _mta-sts.google.com
Fetch the policy filecurl -s https://mta-sts.google.com/.well-known/mta-sts.txt
Check the policy host's certificateopenssl s_client -connect mta-sts.google.com:443 -brief
List the live MX to comparedig +short MX google.com | sort -n
Match every mx: pattern against every MX host# wildcards, one label, both directions — ↑ that's this tool
FAQ

Common MTA-STS questions

Type your domain above. We fetch the TXT record at _mta-sts.yourdomain, confirm exactly one v=STSv1 with an id, fetch https://mta-sts.yourdomain/.well-known/mta-sts.txt over verified TLS, parse version, mode, every mx line and max_age — then cross-check each mx pattern against your live MX records in both directions. Free, no signup.

STARTTLS is opportunistic: the sender asks "can we encrypt?", and an attacker on the path can strip the offer. The session drops to cleartext and neither side notices. MTA-STS lets your domain publish a standing instruction: TLS with a verified certificate, or don't deliver at all. It protects mail coming to you — the sending side of your reputation lives with SPF, DKIM and DMARC, which our sibling tools grade.

testing tells senders to evaluate the policy, report failures (via TLS-RPT), and deliver anyway. Nothing is blocked, exactly like DMARC's p=none, and the family resemblance is intentional. It's the correct first month of a rollout: you learn whether your own MX would fail the policy before it can hurt you. enforce is the real thing. The classic failure is retiring at testing. Once your TLS-RPT reports come back clean, the move to enforce is overdue.

Under enforce, a policy-honoring sender matches the MX host it's about to connect to against your mx patterns. No match → that host is treated as forbidden, and the mail is not delivered — it defers and eventually bounces. This is the self-inflicted-outage scenario: it happens after migrations (the MX changed, the file didn't), and it selectively hits the most careful senders — Gmail among them. Wildcard subtlety makes it worse: *.example.com covers one label only, so mail.eu.example.com slips through a wildcard that looks right.

It's a dial between protection and recoverability. Long max_age means senders keep enforcing your policy even if your DNS is briefly hijacked — that's the point. But it also means a mistake in the policy outlives the fix by the same duration. Sane practice mirrors a DMARC rollout: start at a day while testing, then raise to 604800–2419200 (1 to 4 weeks) at enforce. RFC 8461 caps it at 31557600 seconds, a year. Publish that on day one and a policy mistake keeps bouncing mail long after you fix the file.

DANE (TLSA records) is the stronger design: it binds certificates directly in DNS. But it requires DNSSEC end to end, which most domains and some large senders still don't have. MTA-STS was explicitly designed as the no-DNSSEC alternative: it borrows trust from the web PKI instead. They coexist fine; senders that support both prefer DANE. Practical answer for most domains: MTA-STS today (Gmail enforces it when sending to you), DANE when your DNS stack is ready.

Gmail has enforced MTA-STS on outbound mail since 2019. Microsoft 365 honors it outbound as well. Those two carry the bulk of the legitimate mail most domains receive, so your policy is read before delivery, not after an incident. Every policy-honoring sender can also report what it saw — publish TLS-RPT alongside, or you'll never hear it.

Free tools are just the start.
Uptimia keeps your sites healthy.

Uptime, SSL, domain expiry, page speed, transactions — monitored from 171+ locations worldwide. Free for 30 days.

30 days free no credit card cancel anytime free plan after trial
100,000+ websites monitored · GDPR-compliant