MTA-STS Policy
MTA-STS (Mail Transfer Agent Strict Transport Security) enforces TLS encryption for emails sent to your domain, preventing SMTP downgrade attacks.
Results in 1–3 minutes · Free · No signup required
Want the result for your own site? Free DNS Security Checker — paste your domain, get the report.
Why It Matters
Without MTA-STS, email in transit can be intercepted through SMTP downgrade attacks where an attacker strips TLS from mail server connections. MTA-STS ensures encryption is mandatory.
How We Check
We verify the _mta-sts DNS TXT record exists with proper v=STSv1 format, then fetch and validate the policy file at https://mta-sts.{domain}/.well-known/mta-sts.txt.
Good vs Bad Values
| Value | Verdict | Why |
|---|---|---|
mode: enforce, mx: mail.example.com, max_age: 604800 | Good | Sending servers must deliver over verified TLS to the listed MX hosts and must not fall back to plain text. A week is a sensible lifetime. |
mode: testing, mx: mail.example.com, max_age: 86400 | Good | The correct first step. Failures are reported (with TLS-RPT) but mail is still delivered. The check accepts it. |
TXT _mta-sts.example.com "v=STSv1; id=20261031T120000" | Good | The id changes whenever the policy file changes; a timestamp is a convenient scheme. |
TXT record present but no policy file (404 or unreachable) | Bad | Senders cannot load the policy, so nothing is enforced. The check fails with the HTTP status or a fetch error. |
mode: none | Bad | A valid way to switch MTA-STS off, but it gives no protection. The check fails it. |
max_age: 3600 | Bad | Below one day. Senders cache the policy for only an hour, so the downgrade protection barely exists. |
TXT "v=STSv1" with no id | Bad | The id tag is how senders learn the policy changed. Without it the record is invalid. |
Policy missing the mx: line | Bad | Without mx entries, senders have no host to verify against, so the policy is unusable. |
How to Fix
Add a TXT record at _mta-sts.{domain}: 'v=STSv1; id=<unique_id>'. Host the policy file at mta-sts.{domain}/.well-known/mta-sts.txt with version, mode, mx entries, and max_age.
Policy file served at https://mta-sts.example.com/.well-known/mta-sts.txt (RFC 8461). Start in testing mode:
version: STSv1
mode: testing
mx: mail.example.com
mx: mail2.example.com
max_age: 86400
DNS — the pointer record, plus TLS-RPT (RFC 8460) so receivers email you failure reports:
_mta-sts.example.com. 3600 IN TXT "v=STSv1; id=20261031T120000"
_smtp._tls.example.com. 3600 IN TXT "v=TLSRPTv1; rua=mailto:tls-reports@example.com"
mta-sts.example.com. 3600 IN A 203.0.113.20
Web server — a small dedicated virtual host with its own certificate for mta-sts.example.com:
server {
listen 443 ssl;
server_name mta-sts.example.com;
ssl_certificate /etc/letsencrypt/live/mta-sts.example.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/mta-sts.example.com/privkey.pem;
location = /.well-known/mta-sts.txt {
root /var/www/mta-sts;
default_type text/plain;
}
}
Cloudflare / Route 53: add the TXT records and an A or CNAME record for the mta-sts host; static hosting or a small worker can serve the file. Verify with curl -s https://mta-sts.example.com/.well-known/mta-sts.txt and dig +short TXT _mta-sts.example.com. After a clean month of reports, change mode to enforce, raise max_age to 604800 or more, and update the id in DNS.
Common Mistakes
- Hosting the policy on the wrong name. It must be at `https://mta-sts.<domain>/.well-known/mta-sts.txt`; senders do not follow redirects for it.
- Using a certificate that does not cover `mta-sts.<domain>` or comes from a private CA. Senders fetch the file over normal public HTTPS validation.
- Listing MX names that do not match what is actually in DNS. Enforce mode then rejects delivery, because the policy and the MX hosts disagree. Wildcard patterns such as `*.mail.example.com` are allowed.
- Changing the policy file but not the `id`. Senders keep the cached copy until the id differs from what they stored.
- Jumping to `enforce` without a trial. Run `testing` for weeks and read the TLS-RPT reports before switching.
- Treating it as a replacement for DANE. They solve the same problem differently; MTA-STS needs no DNSSEC but trusts the web PKI.
Frequently Asked Questions
What is MTA-STS Policy?
MTA-STS (Mail Transfer Agent Strict Transport Security) enforces TLS encryption for emails sent to your domain, preventing SMTP downgrade attacks.
Why does MTA-STS Policy matter for website security?
Without MTA-STS, email in transit can be intercepted through SMTP downgrade attacks where an attacker strips TLS from mail server connections. MTA-STS ensures encryption is mandatory.
How do I fix MTA-STS Policy issues?
Add a TXT record at _mta-sts.{domain}: 'v=STSv1; id=<unique_id>'. Host the policy file at mta-sts.{domain}/.well-known/mta-sts.txt with version, mode, mx entries, and max_age.
Related Security Checks
Related Tool
DNS Security Checker
Run all 6 related checks with our free dns security checker
Check Your Website Now
Run a free security scan to check for MTA-STS Policy issues and 61 other security checks.
Scan Your Website Free