How to Set Up MTA-STS for an Email Domain
Short answer
Publish an MTA-STS discovery TXT record at _mta-sts and serve the matching policy over HTTPS at https://mta-sts.your-domain/.well-known/mta-sts.txt. Start in testing mode and verify all real MX targets and their TLS certificates before enforcing.
By Xpoudy ·
Inventory every MX that can receive mail
Record exact MX hostnames and confirm their SMTP TLS configuration with the provider. Include any approved secondary route. An enforcing policy can prevent delivery when a route no longer matches or its certificate is invalid. Coordinate changes with whoever manages inbound mail.
Publish discovery and the policy file
The discovery TXT announces the policy version and a change identifier. The HTTPS policy identifies its version, mode, allowed MX patterns and cache duration. Use the Xpoudy builder to construct the values and test the exact HTTPS path and certificate. Update the discovery identifier when publishing policy changes.
Test before enforcing
Start with valid SMTP TLS and policy fetches. Inspect TLS reports if you configured them and test external senders. Move to enforce only after confirming that legitimate MX destinations match. Plan for cached policy during a provider switch or rollback.