Microsoft 365 5.4.8: “MX hosts of the domain failed MTA-STS validation”

Short answer: Microsoft 365 refused to deliver because the recipient domain's MTA-STS policy (mode: enforce) doesn't list the MX host the domain actually uses. The fix is on the recipient's side: add the MX host to the policy's mx: lines (or switch it to testing), then change the policy id.

The bounce looks like this
5.4.8 MX hosts of 'contoso.com' failed MTA-STS validation

What it means

Exchange Online checks the MTA-STS policy of every domain it sends to. When the policy is in enforce mode and the recipient's live MX host isn't covered by any mx: line, Microsoft returns this NDR instead of delivering. Typical causes: the domain moved its MX (for example to Microsoft's new *.mx.microsoft hosts, or to a new mail filter) without updating the policy, or the policy uses a wildcard that covers the wrong number of labels (*.mx.microsoft doesn't match contoso-com.o-v1.mx.microsoft).

How to fix it

  1. If it's your domain that people can't reach: open https://mta-sts.yourdomain/.well-known/mta-sts.txt and compare its mx: lines with your MX records – run the checker below, it does this the way senders do.
  2. Add every MX host you use (exact name, or a wildcard that covers exactly one label), or set mode: testing while you fix it.
  3. Change the id= in your _mta-sts TXT record so senders fetch the new policy; until then they keep the cached one for up to max_age.
  4. If you're the sender: forward the bounce to the recipient's IT – only they can fix their policy. More: the mx.microsoft trap.

Check your domain now

After the fix, send a test email to see SPF, DKIM and DMARC pass on a real message, then keep an eye on it: free DMARC monitoring shows every service that sends mail as your domain and which ones fail, in plain English.

Rather not touch DNS? I set up SPF, DKIM and DMARC without breaking your other senders, with a before/after report.

Get it fixed on Fiverr

Prefer to do it yourself? Get the step-by-step Fix Kit ($15) – 28-page guide, checklist, 20+ providers.

Did this fix it?

What's still not working?

Paste the bounce message or describe what happens. We read every report and add fixes for new errors.

Other bounce errors