Errors people run into
What goes wrong most often when MTA-STS is set up, and how to fix it.
The policy file cannot be fetched
Why. The host mta-sts.yourdomain does not exist, answers with a redirect, or presents a certificate that is expired or does not cover that exact name. Senders do not follow redirects and do not accept an invalid certificate here.
Fix. Create the mta-sts host, serve the file directly over HTTPS at /.well-known/mta-sts.txt with a certificate valid for mta-sts.yourdomain, and answer 200 without redirect.
An MX host is not in the policy
Why. A mail server was added or the mail provider changed, and the policy still lists the old hosts. Under “enforce”, mail to the unlisted host is refused by the senders that apply MTA-STS.
Fix. Add an “mx” line for each host (or a wildcard such as *.mail.protection.outlook.com), then change the id of the _mta-sts record so that senders fetch the new policy.
Changes to the policy are not taken into account
Why. Senders keep the policy for max_age seconds and look at the file again only when the id of the TXT record changes.
Fix. Change the id (a date and time is the usual choice) every time the file changes. Before a move of mail provider, publish both sets of hosts first.