webzod
account

Fix the MTA-STS policy file

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. The file must be plain text, one key: value pair per line, with version: STSv1, mode (enforce, testing or none), max_age in whole seconds (at most 31557600) and at least one mx: line for each MX hostname.
  2. Replace the mx lines in the snippet with your own MX host names, written exactly as they appear in your MX records. Keep your current mode: line unless it is the thing that is wrong.
  3. Serve the file directly. Senders do not follow redirects, so no http-to-https redirect, no www redirect and no redirect to another path may apply to this URL.
  4. After changing the file, change the id in the _mta-sts TXT record so senders fetch the new policy.
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.