SMTP TLS ReportingGoogle, Incdmargolis (at) google.comComcast, Incalexander_brotman (at) cable.comcast (dot com)Yahoo!, Incrbinu (at) yahoo-inc (dot com)Microsoft, Incjanet.jones (at) microsoft (dot com)Google, Incrisher (at) google (dot com)
Applications
Using TLS in ApplicationsA number of protocols exist for establishing encrypted channels between SMTP
Mail Transfer Agents, including STARTTLS , DANE , and SMTP
MTA STS (TODO: Add ref). 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 attackers and diagnose unintentional
misconfigurations.
The STARTTLS extension to SMTP allows SMTP clients and hosts to
establish secure SMTP sessions over TLS. The protocol design is based on
"Opportunistic Security" (OS) , which provides interoperability for
clients that do not support STARTTLS but means that any attacker who can delete
parts of the SMTP session (such as the "250 STARTTLS" response) or redirect the
entire SMTP session (perhaps by overwriting the resolved MX record of the
delivery domain) can perform a downgrade or interception attack.
Because such "downgrade attacks" are not necessarily apparent to the receiving
MTA, this document defines a mechanism for sending domains to report on failures
at multiple parts of the MTA-to-MTA conversation.
Recipient domains may also use the mechanisms defined by MTA-STS (TODO: Add ref)
or DANE to publish additional encryption and authentication
requirements; this document defines a mechanism for sending domains that are
compatible with MTA-STS or DANE to share success and failure statistics with
recipient domains.
Specifically, this document defines a reporting schema that covers failures in
routing, STARTTLS negotiation, and both DANE and MTA-STS (TODO: Add
ref) policy validation errors, and standard TXT record that recipient domains
can use to indicate where reports in this format should be sent.
This document is intended as a companion to the specification for SMTP MTA
Strict Transport Security (MTA-STS, TODO: Add ref).
The keywords MUST, MUST NOT, REQUIRED, SHALL, SHALL NOT,
SHOULD, SHOULD NOT, RECOMMENDED, MAY, and OPTIONAL, when
they appear in this document, are to be interpreted as described in .
We also define the following terms for further use in this document:
STS Policy: A definition of the expected TLS availability and behavior, as
well as the desired actions for a given domain when a sending MTA encounters
different results.TLSRPT Policy: A policy detailing the endpoint to which sending MTAs should
deliver reports.Policy Domain: The domain against which an STS Policy is defined.Sending MTA: The MTA initiating the delivery of an email message.This document is intended as a companion to the specification for SMTP MTA
Strict Transport Security (MTA-STS, TODO: Add ref).The Public Key Pinning Extension for HTTP contains a JSON-based
definition for reporting individual pin validation failures.The Domain-based Message Authentication, Reporting, and Conformance (DMARC)
contains an XML-based reporting format for aggregate and
detailed email delivery errors.SMTP TLSRPT policies are distributed via DNS from the Policy Domain's zone, as
TXT records (similar to DMARC policies) under the name _smtp_tlsrpt. For
example, for the Policy Domain example.com, the recipient's SMTP STS policy
can be retrieved from _smtp_tlsrpt.example.com.
(Future implementations may move to alternate methods of policy discovery or
distribution. See the section FutureWork for more discussion.)
Policies consist of the following directives:
v: This value MUST be equal to TLSRPTv1.rua: A URI specifying the endpoint to which aggregate information about
policy failures should be sent (see the section ReportingSchema for
more information). Two URI schemes are supported: mailto and https.
ruf: Future use. (There may also be a need for enabling more detailed
"forensic" reporting during initial stages of a deployment. To address
this, the authors consider the possibility of an optional additional
"forensic reporting mode" in which more details--such as certificate chains
and MTA banners--may be reported. See the section FutureWork for more
details.)The formal definition of the _mta_sts TXT record, defined using ,
is as follows:
Aggregate reports contain the following fields:
Report metadata:
The organization responsible for the report
Contact information for one or more responsible parties for the
contents of the reportA unique identifier for the reportThe reporting date range for the reportPolicy, consisting of:
One of the following policy types:
The SMTP MTA STS policy applied (as a string)The DANE TLSA record applied (as a string)
* The literal string no-policy-found, if neither a TLSA nor
The domain for which the policy is appliedThe MX hostAn identifier for the policy (where applicable)Aggregate counts, comprising result type, sending MTA IP, receiving MTA
hostname, message count, and an optional additional information field
containing a URI for recipients to review further information on a failure
type.Note that the failure types are non-exclusive; an aggregate report MAY contain
overlapping counts of failure types where a single send attempt encountered
multiple errors.
The list of result types will start with the minimal set below, and is expected
to grow over time based on real-world experience. The initial set is:
success: This indicates that the sending MTA was able to successfully
negotiate a policy-compliant TLS connection, and serves to provide a
"heartbeat" to receiving domains that reporting is functional and tabulating
correctly.
mx-mismatch: This indicates that the MX resolved for the recipient domain
did not match the MX constraint specified in the policy.certificate-host-mismatch: This indicates that the certificate presented
by the receiving MX did not match the MX hostname.starttls-not-supported: This indicates that the recipient MX did not
support STARTTLS.invalid-certificate: This indicates that the certificate presented by the
receiving MX did not validate.certificate-host-mismatch: This indicates that the certificate presented
did not adhere to the constraints specified in the STS or DANE policy, e.g.
if the CN field did not match the hostname of the MX.certificate-name-constraints-not-permitted: The certificate request
contains a name that is not listed as permitted in the name constraints
extension of the cert issuer.certificate-name-constraints-excluded: The certificate request contains a
name that is listed as excluded in the name constraints extension of the
issuer.expired-certificate: This indicates that the certificate has expired.tlsa-invalid: This indicates a validation error in the TLSA record
associated with a DANE policy.dnssec-invalid: This indicates a failure to authenticate DNS records for a
Policy Domain with a published TLSA record.sts-invalid: This indicates a validation error for the overall MTA-STS
policy.webpki-invalid: This indicates that the MTA-STS policy could not be
authenticated using PKIX validation.Note that, when sending failure reports via SMTP, sending MTAs MUST NOT honor
SMTP STS or DANE TLSA failures.
There are no IANA considerations at this time.
SMTP TLS Reporting provides transparency into misconfigurations or attempts to
intercept or tamper with mail between hosts who support STARTTLS. There are
several security risks presented by the existence of this reporting channel:
Flooding of the Aggregate report URI (rua) endpoint: An attacker could
flood the endpoint and prevent the receiving domain from accepting
additional reports. This type of Denial-of-Service attack would limit
visibility into STARTTLS failures, leaving the receiving domain blind to an
ongoing attack.Untrusted content: An attacker could inject malicious code into the
report, opening a vulnerability in the receiving domain. Implementers are
advised to take precautions against evaluating the contents of the report.Report snooping: An attacker could create a bogus TLSRPT record to receive
statistics about a domain the attacker does not own. Since an attacker able
to poison DNS is already able to receive counts of SMTP connections (and,
absent DANE or MTA-STS policies, actual SMTP message payloads) today, this
does not present a significant new vulnerability.The JSON schema is derived from the HPKP JSON schema (cf. Section 3)
organization-name: The name of the organization responsible for the
report. It is provided as a string.date-time: The date-time indicates the start- and end-times for the report
range. It is provided as a string formatted according to Section 5.6,
"Internet Date/Time Format", of .email-address: The contact information for a responsible party of the
report. It is provided as a string formatted according to Section 3.4.1,
"Addr-Spec", of .report-id: A unique identifier for the report. Report authors may use
whatever scheme they prefer to generate a unique identifier. It is provided
as a string.policy-type: The type of policy that was applied by the sending domain.
Presently, the only two valid choices are tlsa and sts. It is provided
as a string.policy-string: The string serialization of the policy, whether TLSA record
or STS policy. Any linefeeds from the original policy MUST be replaced with
[SP]. TODO: Help with specifics.domain: The Policy Domain upon which the policy was applied. For messages
sent to user@example.com this field would contain example.com. It is
provided as a string.mx-host-pattern: The pattern of MX hostnames from the applied policy. It
is provided as a string, and is interpreted in the same manner as the
"Checking of Wildcard Certificates" rules in Section 6.4.3 of .result-type: A value from the Result Types section above.ip-address: The IP address of the sending MTA that attempted the STARTTLS
connection. It is provided as a string representation of an IPv4 or IPv6
address in dot-decimal or colon-hexadecimal notation.receiving-mx-hostname: The hostname of the receiving MTA MX record with
which the sending MTA attempted to negotiate a STARTTLS connection.message-count: The number of (attempted) messages that match the relevant
result-type for this section.additional-info-uri: An optional URI pointing to additional information
around the relevant result-type. For example, this URI might host the
complete certificate chain presented during an attempted STARTTLS session.