webzod
account

Fix the MTA-STS policy file on Cloudflare

email.mta_sts.policy_invalid · effort: minutes

Why it matters

Senders ignore a policy file they cannot parse or that sits behind a redirect, so MTA-STS has no effect. The file is a short list of key and value lines.

The fix

  1. Fix the file text as described and make sure no Cloudflare Redirect Rule, Page Rule or Bulk Redirect applies to the mta-sts hostname (Rules > Overview).
  2. Replace the mx lines in the snippet with your own MX host names, written exactly as they appear in your MX records.
  3. If a Worker serves the file, check it returns the text unchanged with content-type text/plain, not an HTML page.
  4. Change the id in the _mta-sts TXT record afterwards (DNS > Records).
mta-sts.txt
version: STSv1
mode: testing
mx: YOUR-MX-HOST.example
mx: *.YOUR-MX-DOMAIN.example
max_age: 86400

Read the documentation (opens in a new tab)

Scan your domain to see whether this applies to you.