webzod
account

Make the MTA-STS policy cover every MX host on Cloudflare

email.mta_sts.mx_mismatch · effort: about an hour

Why it matters

Some of your mail servers are not named in the policy, so in enforce mode senders refuse to deliver to them and in testing mode they only report it. The mx lines must match the MX records.

Staged change. Do this in stages and check each one before the next, so a mistake does not break your site or your mail.

The fix

  1. In the Cloudflare dashboard open DNS > Records and list the MX records. Update the policy file (Worker code or web host) so every host is covered by an mx: line, using your own MX host names exactly as published.
  2. Then edit the _mta-sts TXT record in DNS > Records and change its id so senders re-fetch the policy.
  3. If you switch an enforce policy to mode: testing as an emergency step, change the id as well.
text
Type:     TXT
Name:     _mta-sts.example.com
Content:  v=STSv1; id=2026100503

The examples use example.com. Replace it with your own domain.

Read the documentation (opens in a new tab)

Scan your domain to see whether this applies to you.