MTA-STS Policy Generator
Generate the MTA-STS DNS record and .well-known policy file to enforce TLS on inbound email. Free MTA-STS generator with enforce, testing and none modes.
Configure MTA-STS
Set your mode and MX hosts. You'll publish one DNS record and one policy file.
1. DNS TXT record
Host
_mta-sts.yourdomain.comValue
v=STSv1; id=000000000000002. Policy file
Host at this exact URL:
https://mta-sts.yourdomain.com/.well-known/mta-sts.txtFile contents
version: STSv1
mode: enforce
mx: mail.yourdomain.com
max_age: 604800What this MTA-STS generator does
Common use cases
- 1Enforcing TLS on inbound mail to stop downgrade attacks
- 2Rolling out MTA-STS safely in testing mode first
- 3Updating your policy after changing MX records
- 4Meeting security requirements for email in transit
- 5Publishing MTA-STS alongside TLS-RPT reporting
- 6Rotating the policy id after a policy change
Related tools
About MTA-STS
MTA-STS (SMTP MTA Strict Transport Security) tells sending servers to require TLS when delivering to your domain, preventing downgrade and man-in-the-middle attacks. It needs two parts: a DNS TXT record at _mta-sts.yourdomain.com and a policy file served over HTTPS at mta-sts.yourdomain.com/.well-known/mta-sts.txt.
Deploy in testing mode first and pair it with TLS-RPT so you receive reports. Once reports confirm every mail server negotiates TLS correctly, switch to enforce. Bump the policy id whenever you change the file.
More Free Tools Where This Came From
This utility is one of dozens of free, no-login tools for DNS, email, SEO and developers — all instant and private.
HostCloud.in · Pune, India · Serving 34,987+ Websites Since 2020
Got Questions? We Have Answers.
What is MTA-STS?
MTA-STS (SMTP MTA Strict Transport Security) tells sending servers to require TLS when delivering to your domain, blocking downgrade and man-in-the-middle attacks.
What do I need to publish?
Two things: a DNS TXT record at _mta-sts.yourdomain.com, and a policy file served over HTTPS at mta-sts.yourdomain.com/.well-known/mta-sts.txt.
What is the difference between the modes?
enforce requires TLS (mail is rejected if it fails), testing reports failures without blocking, and none disables the policy. Start with testing.
What is the policy id for?
The id is a version string in the DNS record. Change it whenever you update the policy file so senders know to re-fetch it.
Why start in testing mode?
enforce can block delivery if any of your mail servers lack proper TLS. Testing plus TLS-RPT lets you confirm everything works before enforcing.
How does this relate to TLS-RPT?
TLS-RPT gives you reports on TLS successes and failures. Publish it alongside MTA-STS so you can monitor the rollout before enforcing.
