Security Auditor — checks that the domain of the audited URL advertises SMTP MTA Strict Transport Security (MTA-STS) with a
_mta-sts TXT record and serves a policy file in enforce mode, so email sent to the domain cannot be downgraded to plaintext or delivered to an impostor mail server.Protection
Stops attackers on the network path from stripping TLS or redirecting email sent to your domain.
Standards
Follows RFC 8461 (SMTP MTA Strict Transport Security), September 2018.
_mta-sts.<domain> and served over HTTPS at https://mta-sts.<domain>/.well-known/mta-sts.txt. This auditor checks both, for the domain of the audited URL (one leading www. is removed).
How it works
- Domain — takes the hostname of the audited URL and removes one leading
www.. A URL with no hostname ends the audit with501. The audited page itself is never fetched. - TXT record — looks up the TXT records at
_mta-sts.<domain>. A resolver failure (SERVFAIL, timeout) ends the audit with500; no record warns (300). Only the first record is read: it must start withv=STSv1and carry anid=tag, otherwise it warns (301) and the policy is not fetched. - Policy fetch — requests
https://mta-sts.<domain>/.well-known/mta-sts.txtthe way a sending server does (RFC 8461 section 3.3): a valid certificate is required, no TLS fallback, and redirects are not followed. A connection, TLS or timeout error warns (305); any status other than 2xx, including a redirect, warns (304). - Mode — reads the
mode:line of the policy.nonefails (400),testingwarns (302), a missing or unrecognised mode warns (303),enforcepasses (200). - Aggregate — FAIL wins over WARNING; the first rule that stops the audit (no record, malformed record, fetch problem) is the one reported.
- Specification pin — every run emits
37A-DnsMailMtaStsAuditor-100(INFORMATION), naming RFC 8461 SMTP MTA Strict Transport Security (September 2018). It does not change the overall status.
What it audits
Every row maps to onecheckRule* method and one CheckCode, in the order the auditor runs them. CheckCode suffixes use status ranges: 100 information, 200 success, 300–399 warning, 400–499 fail, 500–599 error.
Output documentation
Every check carries the audited URL as its resource and, in
data, the fields relevant to that step: domain, mtaStsFqdn, txtRecords, mtaStsRecord, policyId, policyUrl, policyHttpStatus, policyMode, policyBody (capped at 2 KB) and policyFetchError.
Risks and considerations
Why MTA-STS matters
- Without it, an attacker on the network path can tell a sending server that your mail servers do not support TLS, or present any certificate, and the message is delivered in the clear.
- MTA-STS works with DANE and TLS-RPT: TLS-RPT (
_smtp._tls.<domain>) is how you learn about delivery failures before switching fromtestingtoenforce.
Modes
enforceis the only mode that protects email;testingonly reports problems, andnonetells senders to forget the policy (used to retire it).- Every change to the policy file needs a new
idin the TXT record, otherwise sending servers keep the cached version untilmax_ageexpires.
Policy hosting
- The policy must be served at
https://mta-sts.<domain>/.well-known/mta-sts.txtwith a certificate valid formta-sts.<domain>; RFC 8461 forbids following redirects and falling back to HTTP, and this auditor does neither. - The auditor reads only the
modeline.mxentries andmax_ageare not validated against the domain’s MX records.
Behavior changes from the previous version
- A URL with no hostname used to
FAIL; it is nowERROR(501), because the problem is with the monitored URL, not the domain. - A DNS resolver failure used to be reported as “MTA-STS not advertised” (
WARNING); it is nowERROR(500), because the record may exist. - A TXT record that starts with
v=STSv1but has noid=tag used to be accepted; it is now malformed (301). - The policy body stored in check data is capped at 2 KB.
- All other verdicts are unchanged:
mode: nonestaysFAIL;testing, an unknown mode, a non-2xx policy answer and a policy fetch error stayWARNING.
What this auditor does not check
- Only the first
_mta-stsTXT record is read; RFC 8461 says there must be exactly one. - The policy’s
mxpatterns,max_ageand the actual TLS configuration of the mail servers are out of scope (see the DNS Mail MX and TLS-RPT auditors).