What is MTA-STS
MTA-STS (SMTP MTA Strict Transport Security, RFC 8461) lets a domain require that mail sent to it is delivered over encrypted TLS to a verified mail server.
Why it matters
Encryption between mail servers is optional by default. Anyone on the network path can remove it and read or change mail in transit. With a policy in enforce mode, sending servers refuse to deliver over an unencrypted or unverified connection.
What a correct record looks like
MTA-STS has two parts: a DNS TXT record that announces the policy, and a policy file served over HTTPS.
DNS record
_mta-sts.example.com. TXT "v=STSv1; id=20261028T120000"
Policy file at https://mta-sts.example.com/.well-known/mta-sts.txt
version: STSv1 mode: enforce mx: mx1.example.com mx: mx2.example.com max_age: 604800
Every MX host must match an mx line. Change the id whenever the policy file changes. Start in testing mode, then switch to enforce.
Common problems
- Mode testing
- Failures are reported, but mail is still delivered without encryption. Switch to enforce once TLS-RPT reports are clean.
- Policy host missing
- mta-sts.example.com must resolve and serve the policy over HTTPS with a valid certificate.
- MX host not in the policy
- In enforce mode, senders refuse to deliver to an MX host that no mx line matches. Update the policy when MX hosts change.
- id not changed
- Senders cache the policy. Change the id every time the policy file changes.