An SMTP TLS report (RFC 8460) for a partner domain whose MTA-STS policy is in testing shows certificate-host-mismatch on one MX; what happened to that mail, and what must change before enforce?
answer
- testing delivers anyway
- encrypted is not authenticated
- compare receiving-ip with published addresses
- the certificate must name the MX host
- watch a clean report before switching
basics
~20 sSenders found that MX's certificate lacked its MX host name, but testing mode let them deliver anyway, most likely over unauthenticated TLS. Before enforce, the MX needs a certificate naming its host, or senders will refuse it and queue the mail.
solid answer
~50 sA TLS report is a daily JSON summary that sending MTAs send to the address in the domain's `_smtp._tls` record (`v=TLSRPTv1; rua=...`). The failing row names `policy-type` `sts`, the `receiving-mx-hostname`, the `receiving-ip`, a `failed-session-count` and `result-type` `certificate-host-mismatch`: the certificate did not match the identity the policy required, under MTA-STS the MX host name. In `testing` mode senders may deliver as though there had been no validation failure, so the mail was almost certainly delivered, encrypted but not authenticated. First rule out interception: if the `receiving-ip` belongs to the partner, it is a configuration fault, such as a certificate still carrying an old host name or a server presenting its default certificate; an address the partner does not operate needs escalation. The fix is a certificate whose subject alternative names include the MX host name, or an MX record renamed to match, with `mx` patterns updated. Switch to `enforce` only after reports show that MX clean.
go deeper
Know that TLS reports are daily summaries sending servers send to the address in a domain's _smtp._tls record.
Read a report row: policy type, MX host, receiving IP, result type and counts, and say what testing mode let senders do.
Separate a misconfiguration from a redirection using the receiving IP and the pattern over time, and lay out the certificate and policy fix before enforce.
Set the evidence bar for moving a partner or your own domain to enforce, and decide who watches the reports and how quickly a failure must be fixed.
## What a TLS report is and who receives it **SMTP TLS Reporting (TLSRPT)**, RFC 8460 (September 2018), lets a receiving domain learn how sending MTAs fared when they tried to reach its MX hosts over TLS. Downgrades and validation failures are invisible to the receiver, which is why the reports come from the senders. - The domain publishes a TXT record at `_smtp._tls.<domain>` beginning `v=TLSRPTv1` with a `rua=` list of `mailto:` or `https:` destinations. - Sending MTAs that support it aggregate their sessions per policy domain and normally send one JSON report per day, covering 00:00 to 24:00 UTC, a few hours after it ends. - A report sent by mail MUST carry a valid DKIM signature from the reporting domain and is ignored without one; it MUST be delivered even when the TLS problem prevents encryption. - The successful-session count doubles as a heartbeat: it shows reporting works even on days with no failures. Between partners, the receiving domain owns the policy and gets the reports; a sending organisation sees the same failure in its own MTA logs, or the partner shares the row. ## Reading the failing row | Field | What it tells you | |---|---| | `policy-type`, `policy-string` | Which policy was applied: `sts` with the policy text, `tlsa` with the records, or `no-policy-found` | | `policy-domain`, `mx-host` | The partner domain and the `mx` patterns from its policy | | `result-type` | `certificate-host-mismatch`: the certificate did not meet the policy's name constraint | | `receiving-mx-hostname` | The MX name the sender was trying to reach | | `receiving-ip`, `receiving-mx-helo` | Which address answered and the name it announced | | `failed-session-count` | How many sessions hit this result | RFC 8460 defines neighbouring results that a reader must not confuse with this one: `certificate-expired`, `certificate-not-trusted` (an unknown issuer or a broken chain), `starttls-not-supported`, and `sts-webpki-invalid`, which concerns the certificate of the HTTPS policy host rather than the MX. ## What happened to the mail in testing mode In `testing` mode RFC 8461 lets senders deliver "as though there were no MTA-STS validation failure", reporting the failure if both sides implement TLSRPT. So the messages were **delivered**, almost certainly over TLS but **without authentication**: the sender could not confirm it was talking to the partner's real MX. That is exactly the gap a required-TLS policy is meant to close, and it also shows that under `enforce` those senders would have refused that MX and rerouted or **queued** the mail. ## Misconfiguration or interception? 1. Compare `receiving-ip` with the addresses the partner publishes for that MX host. A match points to the partner's own server. 2. Read `receiving-mx-helo` and, if the reporter supplied it, the linked certificate details: a provider's default host name or the MX's former name is the usual pattern. 3. Check whether the failures cover every sending IP and every day or a single burst. A steady pattern is configuration; a brief one from one network deserves a closer look. 4. Treat an address the partner does not operate as a possible redirection and escalate it. ## Fixing it before enforce 1. Issue the MX a certificate whose subject alternative names include the exact MX host name, or point the MX record at a name the certificate already carries, and make the `mx` patterns match. 2. If the server hosts several names, make sure it presents the right certificate when the sender's TLS client names the MX host, which RFC 8461 requires senders to do. 3. Change the policy file first, then publish a new `id` in the `_mta-sts` record. 4. Wait for reports that show zero failures for that MX across all reporting senders, including any backup MX, which senders may reach only when a preferred MX is unavailable. 5. Switch `mode` to `enforce`, change the `id` again, and keep reading the reports. ## Why the result name alone is not the whole story - Under **DANE** with a DANE-EE(3) record, a name mismatch would not fail at all, because RFC 7672 forbids name checks for that usage; the same result name can appear for DANE-TA(2), where names are checked. - The report confirms only what senders that implement TLSRPT saw; silence from a sender proves nothing. - `enforce` turns this same finding into delayed mail, so the report is the cheapest place to catch it.
- If the partner had already been in enforce mode, what would senders have done with that mail?They would have refused to deliver to the mismatching MX, treated it as unreachable and moved to the next MX in preference order. If every candidate failed, the message would stay queued as a temporary failure, and before giving up the sender must check whether the partner had published a new policy. The mail is delayed, not bounced at once, but delay matters for a bank.
- Who sends TLS reports, and could the bank receive reports about its own MX hosts?Sending MTAs send them, to whatever the policy domain lists in its `_smtp._tls` record. If the bank publishes `v=TLSRPTv1` with a `rua=` address for its own domain, senders that support RFC 8460 will report their sessions to the bank's MX hosts, giving it the same evidence about inbound mail.
- A TLS report row means mail to that MX was bounced
- The receiving MX writes TLS reports about its own sessions
- Testing mode authenticates the MX, it just skips the reports
- Any certificate-host-mismatch row proves an attack in progress
- Switching to enforce is the fix for a host-name mismatch