rfc-8460

SMTP TLS Reporting

D. Margolis, A. Brotman, B. Ramakrishnan, J. Jones, M. Risher
date2018-09 streamIETF areasec wguta statusPROPOSED STANDARD pages34 canonicalhttps://www.rfc-editor.org/rfc/rfc8460 doi10.17487/RFC8460 errataview
A number of protocols exist for establishing encrypted channels between SMTP Mail Transfer Agents (MTAs), including STARTTLS, DNS- Based Authentication of Named Entities (DANE) TLSA, and MTA Strict Transport Security (MTA-STS). These protocols can fail due to misconfiguration or active attack, leading to undelivered messages or delivery over unencrypted or unauthenticated channels. This document describes a reporting mechanism and format by which sending systems can share statistics and specific information about potential failures with recipient domains. Recipient domains can then use this information to both detect potential attacks and diagnose unintentional misconfigurations.

Extracted elements (28)

design-rationale §7

Certificate validation is intentionally allowed to be skipped when submitting reports via HTTPS POST because a misconfigured SMTP server likely also has a misconfigured HTTPS server, and failing to deliver reports on benign misconfigurations outweighs the risk of an attacker intercepting reports (who could already obtain the metadata passively).

security, tls, email

normative-requirement §5.4 MUST

For HTTPS transport, the receiving system MUST return a successful HTTP response (typically 200 or 201); other codes may indicate failure and can trigger retry per local sender policy.

email, http

normative-requirement §5.6 MUST

If metadata declared via email subject or filename disagrees with the report body, the report body MUST be considered the authoritative source.

email

normative-requirement §3 MUST

If multiple TXT records for '_smtp._tls' are returned and the number of records beginning with 'v=TLSRPTv1;' is not exactly one, senders MUST assume the recipient domain does not implement TLSRPT.

email, dns

normative-requirement §5.5 SHOULD

In the event of delivery failure, a sender SHOULD attempt redelivery for up to 24 hours after the initial attempt, ideally with exponential backoff for multiple retries.

email

normative-requirement §4.4 MUST

Internationalized domain names in the 'domain' and 'mx-host-pattern' fields MUST consist of Punycode-encoded A-labels (RFC 3492) and not U-labels.

email, dns

normative-requirement §3 MUST

Reports sent via SMTP MUST contain a valid DKIM signature by the reporting domain, and reports lacking such a signature MUST be ignored by the recipient. DKIM signatures MUST NOT use the 'l=' attribute to limit body length.

email, security

normative-requirement §4 MUST

The 'policies' field of the report body MUST be a JSON array (not a singular value) even when only a single policy was applied, because reporters may report multiple applied policies.

email, json

normative-requirement §5.2 SHOULD

The report SHOULD be gzip-compressed for both email and HTTPS transport; a commonly observed receiver limit is 10 megabytes, making compression critical for acceptance.

email

normative-requirement §5.3 MUST

The 'TLS-Report-Submitter' header value MUST match the domain of the 'contact-info' in the report body. Both 'TLS-Report-Domain' and 'TLS-Report-Submitter' MUST be included and SHOULD be covered by the DKIM signature.

email, security

normative-requirement §3 MUST

When sending failure reports via SMTP (mailto), Sending MTAs MUST deliver reports despite any TLS-related failures and SHOULD NOT include that SMTP session in the next report, meaning reports may be delivered unencrypted.

email, tls

normative-requirement §5.3.1 MUST NOT

When sending failure reports via SMTP, Sending MTAs MUST NOT honor MTA-STS or DANE TLSA failures for the report delivery session itself, ensuring reports reach their destination even when the normal policy would block the connection.

email, tls

privacy-consideration §8

Sending TLS failure reports may reveal information about the sender's TLS implementation, operating system, or geographic region to the receiving site, since the inability to negotiate a session may indicate a known incompatibility between two specific implementations.

privacy, email, tls

protocol-element §4.3

Defined failure result types include negotiation failures (starttls-not-supported, certificate-host-mismatch, certificate-expired, certificate-not-trusted, validation-failure), DANE-specific failures (tlsa-invalid, dnssec-invalid, dane-required), and MTA-STS failures (sts-policy-fetch-error, sts-policy-invalid, sts-webpki-invalid).

email, tls, security

protocol-element §5.3

Email-transported reports use Content-Type 'multipart/report; report-type="tlsrpt"' with a human-readable first part (text/plain) and a machine-readable second part (application/tlsrpt+json or application/tlsrpt+gzip). Two new header fields 'TLS-Report-Domain' and 'TLS-Report-Submitter' MUST be included.

email

protocol-element §4.4

The JSON report schema includes: organization-name, date-range (start-datetime/end-datetime in RFC 3339 format), contact-info (email), report-id, and a 'policies' array each containing policy metadata, a summary with success/failure counts, and a 'failure-details' array.

email, json

protocol-element §3

The TLSRPT reporting policy is published as a DNS TXT record under '_smtp._tls.<policy-domain>'. It contains a version field ('v=TLSRPTv1') and one or more aggregate report URIs ('rua=') supporting 'mailto' and 'https' schemes.

email, dns, tls, security

protocol-element §4.2

The 'total-successful-session-count' field serves as a heartbeat confirming that reporting is functional and TLS is being successfully negotiated; 'total-failure-session-count' aggregates all failed connection attempts.

email, tls

registry §6.2

Creates the 'Report Type Registry' for the 'report-type' parameter of the 'multipart/report' Content-Type header, with 'Specification Required' update procedure. Initial entry: 'tlsrpt' mapped to application/tlsrpt+json and application/tlsrpt+gzip.

registry, email

registry §6.6

Creates the 'STARTTLS Validation Result Types' registry with 11 initial entries (starttls-not-supported, certificate-host-mismatch, certificate-expired, tlsa-invalid, dnssec-invalid, dane-required, certificate-not-trusted, sts-policy-invalid, sts-webpki-invalid, validation-failure, sts-policy-fetch-error). New entries require Expert Review.

registry, email, tls

registry §6.4

Registers media types 'application/tlsrpt+json' (.json extension) and 'application/tlsrpt+gzip' (.gz extension, magic bytes 0x1f 0x8b) for use with SMTP TLS Reporting.

registry, email

registry §6.3

Registers the '+gzip' structured syntax suffix for media types whose representation follows the application/gzip format (RFC 1952/RFC 6713).

registry

security-consideration §7

Administrators are encouraged to deploy TLSRPT TXT records with a large TTL or use DNSSEC on the zone to prevent attackers who can perform downgrade attacks from also suppressing TLSRPT TXT record discovery and hiding the attack.

security, dns, email

security-consideration §7

An attacker can flood the rua endpoint to prevent the receiving domain from accepting reports (DoS), leaving the domain blind to ongoing attacks. Attackers can also inject malicious content into reports to exploit vulnerabilities in report-handling systems.

security, email

security-consideration §7

TLSRPT allows report destinations outside the Policy Domain's authority, enabling an attacker controlling the Policy Domain DNS to direct reports to an unwitting victim as a DDoS amplifier. The risk is lower than DMARC because the attacker must induce the third party to send mail to the attacker first.

security, email

wire-format §4.4

The 'date-range' fields use RFC 3339 Internet Date/Time Format strings. IP addresses use dot-decimal (IPv4, defined via ABNF dec-octet) or colon-hexadecimal (IPv6, per RFC 5952) string encoding.

email, json

wire-format §5.1

The report filename ABNF is 'sender!policy-domain!begin-timestamp!end-timestamp[!unique-id].extension', where extension MUST be 'json' for plain JSON or 'json.gz' for gzip-compressed JSON.

email

wire-format §3

The TLSRPT TXT record ABNF defines 'tlsrpt-record' as a version field followed by one or more semicolon-delimited fields; URIs within 'rua=' values must have commas (0x2C), exclamation points (0x21), and semicolons (0x3B) percent-encoded.

email, dns