Key points
- Defined in RFC 8461, it combines a DNS TXT record with a policy file served over HTTPS.
- The policy lives at https://mta-sts.domain/.well-known/mta-sts.txt.
- The modes are none, testing and enforce.
- TLS-RPT, defined in RFC 8460, sends daily reports about failed secure deliveries.
- Senders cache the policy for the period set in max_age.
Why is STARTTLS not enough?
Between mail servers, TLS is usually opportunistic: the receiver offers STARTTLS and, if the offer is missing or the certificate is wrong, delivery continues in plain text. An attacker in the path can remove the STARTTLS offer and read everything.
MTA-STS changes that behavior. A sender that knows the policy refuses to deliver unless TLS is negotiated with a valid certificate for one of the listed MX hosts.
How is MTA-STS set up?
Publish a TXT record at _mta-sts.domain with an id value that changes whenever the policy changes. Serve the policy file over HTTPS on the mta-sts subdomain with a valid certificate. The file lists the mode, the allowed MX hosts and max_age.
Start in testing mode with TLS-RPT enabled, read the reports and switch to enforce once no legitimate delivery fails.
What can go wrong?
The most common failure is an MX host missing from the policy after a change of mail server or filter. In enforce mode, senders that cached the old policy will refuse to deliver to the new host until the cache expires, so the policy must be updated before the MX changes.
Example MTA-STS policy file
version: STSv1
mode: enforce
mx: mx1.example.com
mx: mx2.example.com
max_age: 604800How AHSU 360 handles this
AHSU 360 does not publish MTA-STS policies for customers. It sits in front of the mail server through the MX record and filters spam, viruses and dangerous attachments before delivery; to go back, the original MX is simply restored.
