Skip to main content
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.
SMTP delivers email over TLS only opportunistically: when a sending server is told that TLS is unavailable, or is handed a certificate for the wrong name, it delivers anyway. MTA-STS lets a domain publish a policy saying “my mail servers always support TLS with a valid certificate; refuse to deliver otherwise”. The policy is advertised with a TXT record at _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

  1. Domain — takes the hostname of the audited URL and removes one leading www.. A URL with no hostname ends the audit with 501. The audited page itself is never fetched.
  2. TXT record — looks up the TXT records at _mta-sts.<domain>. A resolver failure (SERVFAIL, timeout) ends the audit with 500; no record warns (300). Only the first record is read: it must start with v=STSv1 and carry an id= tag, otherwise it warns (301) and the policy is not fetched.
  3. Policy fetch — requests https://mta-sts.<domain>/.well-known/mta-sts.txt the 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).
  4. Mode — reads the mode: line of the policy. none fails (400), testing warns (302), a missing or unrecognised mode warns (303), enforce passes (200).
  5. Aggregate — FAIL wins over WARNING; the first rule that stops the audit (no record, malformed record, fetch problem) is the one reported.
  6. 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 one checkRule* 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 from testing to enforce.

Modes

  • enforce is the only mode that protects email; testing only reports problems, and none tells senders to forget the policy (used to retire it).
  • Every change to the policy file needs a new id in the TXT record, otherwise sending servers keep the cached version until max_age expires.

Policy hosting

  • The policy must be served at https://mta-sts.<domain>/.well-known/mta-sts.txt with a certificate valid for mta-sts.<domain>; RFC 8461 forbids following redirects and falling back to HTTP, and this auditor does neither.
  • The auditor reads only the mode line. mx entries and max_age are not validated against the domain’s MX records.

Behavior changes from the previous version

  • A URL with no hostname used to FAIL; it is now ERROR (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 now ERROR (500), because the record may exist.
  • A TXT record that starts with v=STSv1 but has no id= 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: none stays FAIL; testing, an unknown mode, a non-2xx policy answer and a policy fetch error stay WARNING.

What this auditor does not check

  • Only the first _mta-sts TXT record is read; RFC 8461 says there must be exactly one.
  • The policy’s mx patterns, max_age and the actual TLS configuration of the mail servers are out of scope (see the DNS Mail MX and TLS-RPT auditors).