RFC 7601
Message Header Field for Indicating Message Authentication Status
RFC 7601: Message Header Field for Indicating Message Authentication Status ๐
Okay bestie, let's get into RFC 7601. ๐ It's a Standards Track doc by M. Kucherawy, published in August 2015, and it's part of the IETF's official stream. It lives under ISSN 2070-1721. The big deal is that it obsoletes RFC 7001 and RFC 7410, so those older versions are replaced by this one. It doesn't list any RFCs it updates. ๐ โจ
This is part 1 of 11, so there's more to come! ๐ง
Abstract ๐ฆ
Okay so this doc defines a message header field called Authentication-Results, for email. Its whole purpose is to show the results of message authentication checks, like a little report card for the email. Receiver-side software, like mail filters or Mail User Agents (MUAs), can read it and show the info to users in a clean way, or use it to decide what to sort or filter. It's giving organization. ๐๏ธ๐
Status of This Memo ๐ธ
Lowkey the most official part: this is an Internet Standards Track document. The IETF made it, so it reflects what the IETF community agreed on. It got public review and was approved by the Internet Engineering Steering Group (IESG). If you want more on Internet Standards, check Section 2 of RFC 5741. ๐
You can find the current status, any errata, and how to send feedback at http://www.rfc-editor.org/info/rfc7601. ๐
Copyright Notice ๐
Copyright (c) 2015 IETF Trust and the people listed as document authors. All rights reserved. ๐
This doc is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info), as they stood when this was published. Read those carefully because they spell out your rights and restrictions for this doc, no cap. ๐งพ
If you pull Code Components out of this doc, they must include Simplified BSD License text, as described in Section 4.e of the Trust Legal Provisions. They also come with no warranty, as the Simplified BSD License describes. Be safe, bestie. ๐ซถ
Table of Contents ๐
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3
1.1. Purpose . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.2. Trust Boundary . . . . . . . . . . . . . . . . . . . . . 5
1.3. Processing Scope . . . . . . . . . . . . . . . . . . . . 6
1.4. Requirements . . . . . . . . . . . . . . . . . . . . . . 6
1.5. Definitions . . . . . . . . . . . . . . . . . . . . . . . 6
1.5.1. Key Words . . . . . . . . . . . . . . . . . . . . . . 6
1.5.2. Security . . . . . . . . . . . . . . . . . . . . . . 7
1.5.3. Email Architecture . . . . . . . . . . . . . . . . . 7
1.5.4. Other Terms . . . . . . . . . . . . . . . . . . . . . 8
1.6. Trust Environment . . . . . . . . . . . . . . . . . . . . 8
2. Definition and Format of the Header Field . . . . . . . . . . 9
2.1. General Description . . . . . . . . . . . . . . . . . . . 9
2.2. Formal Definition . . . . . . . . . . . . . . . . . . . . 10
2.3. Property Types (ptypes) and Properties . . . . . . . . . 12
2.4. The "policy" ptype . . . . . . . . . . . . . . . . . . . 13
2.5. Authentication Identifier Field . . . . . . . . . . . . . 14
2.6. Version Tokens . . . . . . . . . . . . . . . . . . . . . 15
2.7. Defined Methods and Result Values . . . . . . . . . . . . 15
2.7.1. DKIM and DomainKeys . . . . . . . . . . . . . . . . . 16
2.7.2. SPF and Sender ID . . . . . . . . . . . . . . . . . . 18
2.7.3. "iprev" . . . . . . . . . . . . . . . . . . . . . . . 19
2.7.4. SMTP AUTH . . . . . . . . . . . . . . . . . . . . . . 20
2.7.5. Other Registered Codes . . . . . . . . . . . . . . . 21
2.7.6. Extension Methods . . . . . . . . . . . . . . . . . . 21
2.7.7. Extension Result Codes . . . . . . . . . . . . . . . 22
3. The "iprev" Authentication Method . . . . . . . . . . . . . . 22
4. Adding the Header Field to a Message . . . . . . . . . . . . 23
4.1. Header Field Position and Interpretation . . . . . . . . 25
4.2. Local Policy Enforcement . . . . . . . . . . . . . . . . 26
5. Removing Existing Header Fields . . . . . . . . . . . . . . . 26
6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 27
6.1. The Authentication-Results Header Field . . . . . . . . . 27
6.2. "Email Authentication Methods" Registry Description . . . 28
6.3. "Email Authentication Methods" Registry Update . . . . . 29
6.4. "Email Authentication Property Types" Registry . . . . . 30
6.5. "Email Authentication Result Names" Description . . . . . 31
6.6. "Email Authentication Result Names" Update . . . . . . . 32
6.7. SMTP Enhanced Status Codes . . . . . . . . . . . . . . . 33
7. Security Considerations . . . . . . . . . . . . . . . . . . . 33
7.1. Forged Header Fields . . . . . . . . . . . . . . . . . . 33
7.2. Misleading Results . . . . . . . . . . . . . . . . . . . 35
7.3. Header Field Position . . . . . . . . . . . . . . . . . . 35
7.4. Reverse IP Query Denial-of-Service Attacks . . . . . . . 35
7.5. Mitigation of Backscatter . . . . . . . . . . . . . . . . 36
7.6. Internal MTA Lists . . . . . . . . . . . . . . . . . . . 36
7.7. Attacks against Authentication Methods . . . . . . . . . 36
7.8. Intentionally Malformed Header Fields . . . . . . . . . . 36
7.9. Compromised Internal Hosts . . . . . . . . . . . . . . . 36
7.10. Encapsulated Instances . . . . . . . . . . . . . . . . . 37
7.11. Reverse Mapping . . . . . . . . . . . . . . . . . . . . . 37
8. References . . . . . . . . . . . . . . . . . . . . . . . . . 37
8.1. Normative References . . . . . . . . . . . . . . . . . . 37
8.2. Informative References . . . . . . . . . . . . . . . . . 38
Appendix A. Legacy MUAs . . . . . . . . . . . . . . . . . . . . 42
Appendix B. Authentication-Results Examples . . . . . . . . . . 42
B.1. Trivial Case; Header Field Not Present . . . . . . . . . 42
B.2. Nearly Trivial Case; Service Provided, but No
Authentication Done . . . . . . . . . . . . . . . . . . . 43
B.3. Service Provided, Authentication Done . . . . . . . . . . 44
B.4. Service Provided, Several Authentications Done, Single
MTA . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
B.5. Service Provided, Several Authentications Done, Different
MTAs . . . . . . . . . . . . . . . . . . . . . . . . . . 46
B.6. Service Provided, Multi-tiered Authentication Done . . . 48
B.7. Comment-Heavy Example . . . . . . . . . . . . . . . . . . 49
Appendix C. Operational Considerations about Message
Authentication . . . . . . . . . . . . . . . . . . . 50
Appendix D. Changes since RFC 7001 . . . . . . . . . . . . . . . 51
Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . 53
Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 53
1. Introduction ๐
Okay so this section sets the vibe. It describes Authentication-Results, a header field for email that presents the results of a message authentication effort in a machine-readable format. The point is to have one place to collect that data whenever message authentication mechanisms are running. That way a Mail User Agent (MUA) and downstream filters can make filtering decisions, and/or give the user a recommendation about whether the message's origin is valid and maybe whether its content is safe and intact. ๐๐
This doc revises the original definition in [RFC5451]. It's based on the authentication protocols in current use, and it also picks up errata logged since the original spec came out. ๐ ๏ธ
End users aren't really supposed to be the direct consumers of this header field. It's meant for programs, which will use the data or turn it into something humans can read. ๐ค
This doc specifies the format of the header field and talks about what it means when the field is present or absent. It does NOT get into how the data should be used, like which filtering decisions are right or how an MUA should display the results. Those are local policy and user interface design questions, and they don't belong in this doc. Not my business, bestie. ๐ โโ๏ธ
At the time this was published, these are the published email authentication methods:
- Author Domain Signing Practices ([ADSP]) (Historic)
- SMTP Service Extension for Authentication ([AUTH])
- DomainKeys Identified Mail Signatures ([DKIM])
- Domain-based Message Authentication, Reporting and Conformance ([DMARC])
- Sender Policy Framework ([SPF])
- reverse IP address name validation ("iprev", defined in Section 3)
- Require-Recipient-Valid-Since Header Field and SMTP Service Extension ([RRVS])
- S/MIME Signature Verification ([SMIME-REG])
- Vouch By Reference ([VBR])
- DomainKeys ([DOMAINKEYS]) (Historic)
- Sender ID ([SENDERID]) (Experimental)
There are registries for the tokens used in this header field, and they point back to the specs listed above. Section 6 describes those registries, what's in them, and how entries get added or updated. It also updates the existing contents so they match the current state of those specs. ๐โจ
This spec isn't meant to be limited to domain-based authentication schemes. The existing schemes in that family turned out to be a good starting point for implementations, though. The goal is to give current and future authentication schemes one shared framework for delivering their results to downstream agents, and to discourage making a brand new header field for each one. ๐ง
Now the tea โ: SPF defined a header field called "Received-SPF", and the historic DomainKeys defined one called DomainKey-Status. Those fields are only meant for conveying their own results, so they aren't enough to meet the requirements listed below. Plus, lots of SPF implementations have adopted the header field specified here, at least as an option. And DomainKeys has been obsoleted by DKIM. Glow-up era ๐
1.1. Purpose ๐ฏ
The header field defined in this doc is expected to serve a few purposes:
- Convey the results of various message authentication checks. Upstream filters and Mail Transfer Agents (MTAs) apply those checks, then pass the results to MUAs and downstream filters within the same "trust domain". Those agents might want to show the results to end users, or use the data to apply stricter or looser content checks based on authentication results;
- Provide a common location within a message for this data;
- Create an extensible framework for reporting new authentication methods as they come out.
Here's the important bit ๐จ: the mere presence of this header field does NOT mean its contents are valid. The field is just reporting assertions made by one or more authentication schemes that were (supposedly) applied somewhere upstream. For an MUA or downstream filter to actually treat those assertions as valid, there must be an assessment of the trust relationship among those agents, the validating MTA, and the mechanism used to convey the information. Trust, but verify, periodt. ๐๐
1.2. Trust Boundary ๐ฆ
Okay so this doc keeps talking about the "trust boundary" of an ADMD (administrative management domain), and bestie, the mail world is SO diverse that a precise definition just isn't possible ๐ญ.
Simply put, a transfer from the producer of the header field to the consumer has to happen inside a context that lets the consumer treat the producer's assertions as reliable and accurate (trustworthy). How that trust gets obtained is outside the scope of this doc. It's entirely a local matter ๐ .
So this doc defines a "trust boundary" as the line between "external" and "internal" entities โจ. Services that are internal (inside the trust boundary) are provided by the ADMD's infrastructure for its users. Anything external is outside the authority of the ADMD. By this definition, hosts inside a trust boundary are subject to the ADMD's authority and policies, no matter where they physically sit or how they're physically run. For example, a host inside a trust boundary might actually be operated by a remote service provider and live physically in that provider's data center. Wild but valid ๐.
A message can also be evaluated inside a trust boundary, then leave and re-enter it ๐. One example is a forwarded message such as a message/rfc822 attachment (see Multipurpose Internet Mail Extensions [MIME]), or one that's part of a multipart/digest. The details reported by this field cannot be trusted in that case, so this field found inside one of those media types is typically ignored ๐.
1.3. Processing Scope ๐
The whole point of this header field is to tell message consumers that authentication work was already done on the message inside its trust boundary, and to show them those results ๐ฃ. It is NOT meant to hand consumers message parameters so they can run authentication protocols on their own. Not the vibe ๐ โโ๏ธ.
1.4. Requirements ๐
This document establishes no new requirements on existing protocols or servers ๐ซถ.
Also, this document establishes no requirement on MTAs to reject or filter arriving messages that fail authentication checks. The data carried in the specified header field's contents is for the information of MUAs and filters, and they get to use it at their discretion ๐.
1.5. Definitions ๐
This section defines the terms used throughout the doc, so everyone is on the same page ๐ง .
1.5.1. Key Words ๐
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [KEYWORDS] โจ.
1.5.2. Security ๐
"Guidelines for Writing RFC Text on Security Considerations" ([SECURITY]) talks about authentication and authorization, and how people keep mashing the two concepts together ๐ฉ. Those terms have picked up slightly different meanings in recent message security work, and this doc follows those current usages, like so:
- "Authorization" is the establishment of permission to use a resource or represent an identity. In this context, authorization means that a message from a particular ADMD arrived via a route the ADMD has explicitly approved ๐ช.
- "Authentication" is the assertion of validity of a piece of data about a message (like the sender's identity) or of the message in its entirety ๐ชช.
For examples: SPF and Sender ID are authorization mechanisms, because they express a result showing whether the ADMD that apparently sent the message has explicitly authorized the connecting Simple Mail Transfer Protocol ([SMTP]) client to relay messages on its behalf. They do NOT actually validate any other property of the message itself ๐คทโโ๏ธ. DKIM, by contrast, doesn't care how a message was routed. It uses cryptographic signatures to authenticate agents, assign (some) responsibility for the message (which implies authorization), and ensure that the listed portions of the message weren't modified in transit ๐. Because the signatures aren't tied to SMTP connections, they can be added by the ADMD of origin, by intermediate ADMDs (like a mailing list server), by other handling agents, or by any combination of those ๐ง.
Rather than create a separate header field for each class of solution, this proposal groups them both into a single header field ๐.
1.5.3. Email Architecture ๐ฌ
- A "border MTA" is an MTA that acts as a gateway between the general Internet and the users within an organizational boundary. (See also Section 1.2.) ๐ง
- A "delivery MTA" (or Mail Delivery Agent or MDA) is an MTA that actually enacts delivery of a message to a user's inbox or other final delivery ๐ฅ.
- An "intermediate MTA" is any MTA that is not a delivery MTA and is also not the first MTA to handle the message ๐.
Here's how mail flows between these components. For more on general email system architecture, including detailed descriptions of these components, check Internet Mail Architecture [EMAIL-ARCH]. Appendix C of this document talks about the common aspects of email authentication in current environments ๐ธ.
+-----+ +-----+ +------------+
| MUA |-->| MSA |-->| Border MTA |
+-----+ +-----+ +------------+
|
|
V
+----------+
| Internet |
+----------+
|
|
V
+-----+ +-----+ +------------------+ +------------+
| MUA |<--| MDA |<--| Intermediate MTA |<--| Border MTA |
+-----+ +-----+ +------------------+ +------------+
Generally, it's assumed that applying message authentication schemes happens at a border MTA or a delivery MTA, and this spec is written with that assumption in mind ๐ซง. BUT some sites run their entire mail infrastructure on a single host. At those sites, "border MTA" and "delivery MTA" might well apply to the same machine, or even the very same agent ๐คฏ. It's also possible that some message authentication tests take place on an intermediate MTA. This doc doesn't specifically describe those cases, but they aren't meant to be excluded ๐.
1.5.4. Other Terms ๐ญ
In this document, "producer" refers to any component that adds this header field to messages it's handling. "Consumer" refers to any component that identifies, extracts, and parses the header field to use as part of a handling decision ๐ง.
1.6. Trust Environment ๐ฐ
This header field lets one or more message validation mechanisms pass their output along to one or more separate assessment mechanisms ๐จ. All of these mechanisms operate within a unified trust boundary that defines an Administrative Management Domain (ADMD). An ADMD contains one or more entities that perform validation and generate the header field, and one or more that consume it for some type of assessment ๐ค.
Here's the tea: the field often has no integrity or validation mechanism of its own, so its presence must be trusted implicitly ๐ฌ. That's why valid use of the header field requires removing any occurrences of it that are present when the message enters the ADMD. This makes sure any later occurrences were added within the ADMD's trust boundary ๐ก๏ธ.
The authserv-id token defined in Section 2.2 can be used to reference an entire ADMD or a specific validation engine within an ADMD ๐ท๏ธ. The labeling scheme is left as an operational choice, but some guidance for picking a token is provided in later sections of this document โจ.
2. Definition and Format of the Header Field ๐
This section gives a general overview of the format of the header field being defined, and then provides a more formal specification ๐ง.
2.1. General Description ๐งฉ
The header field specified here is called Authentication-Results. It's a Structured Header Field as defined in Internet Message Format ([MAIL]), so all of the related definitions in that document apply ๐
.
This header field gets added at the top of the message as it transits MTAs that do authentication checks, so you can infer some idea of how far away the checks were done ๐ญ. That makes it a trace field as defined in [MAIL], and all of the related definitions in that document apply to it too ๐ฆ.
The value of the header field (after removing comments) is made up of an authentication identifier, an optional version, and then a series of statements and supporting data ๐. The statements take the form "method=result" and show which authentication method(s) were applied and what their results were. For each statement, the supporting data can include a "reason" string and one or more "property=value" statements showing which message properties were evaluated to reach that conclusion ๐.
The header field can appear more than once in a single message. More than one result can also be packed into a single header field. Or you can combine both of those things ๐โจ.
2.2. Formal Definition โจ
okay so the header field gets the full ABNF treatment ([ABNF]) ๐ค here's the whole grammar, bestie:
authres-header = "Authentication-Results:" [CFWS] authserv-id
[ CFWS authres-version ]
( no-result / 1*resinfo ) [CFWS] CRLF
authserv-id = value
; see below for a description of this element
authres-version = 1*DIGIT [CFWS]
; indicates which version of this specification is in use;
; this specification is version "1", and the absence of a
; version implies this version of the specification
no-result = [CFWS] ";" [CFWS] "none"
; the special case of "none" is used to indicate that no
; message authentication was performed
resinfo = [CFWS] ";" methodspec [ CFWS reasonspec ]
*( CFWS propspec )
methodspec = [CFWS] method [CFWS] "=" [CFWS] result
; indicates which authentication method was evaluated
; and what its output was
reasonspec = "reason" [CFWS] "=" [CFWS] value
; a free-form comment on the reason the given result
; was returned
propspec = ptype [CFWS] "." [CFWS] property [CFWS] "=" pvalue
; an indication of which properties of the message
; were evaluated by the authentication scheme being
; applied to yield the reported result
method = Keyword [ [CFWS] "/" [CFWS] method-version ]
; a method indicates which method's result is
; represented by "result", and is one of the methods
; explicitly defined as valid in this document
; or is an extension method as defined below
method-version = 1*DIGIT [CFWS]
; indicates which version of the method specification is
; in use, corresponding to the matching entry in the IANA
; "Email Authentication Methods" registry; a value of "1"
; is assumed if this version string is absent
result = Keyword
; indicates the results of the attempt to authenticate
; the message; see below for details
ptype = Keyword
; indicates whether the property being evaluated was
; a parameter to an [SMTP] command, was a value taken
; from a message header field, was some property of
; the message body, or was some other property evaluated by
; the receiving MTA; expected to be one of the "property
; types" explicitly defined as valid, or an extension
; ptype, as defined below
property = special-smtp-verb / Keyword
; indicates more specifically than "ptype" what the
; source of the evaluated property is; the exact meaning
; is specific to the method whose result is being reported
; and is defined more clearly below
special-smtp-verb = "mailfrom" / "rcptto"
; special cases of [SMTP] commands that are made up
; of multiple words
pvalue = [CFWS] ( value / [ [ local-part ] "@" ] domain-name )
[CFWS]
; the value extracted from the message property defined
; by the "ptype.property" construction
"local-part" is defined in Section 3.4.1 of [MAIL], and "CFWS" is defined in Section 3.2.2 of [MAIL] ๐ฌ
"Keyword" is defined in Section 4.1.2 of [SMTP] ๐
The "value" is as defined in Section 5.1 of [MIME] ๐
The "domain-name" is as defined in Section 3.5 of [DKIM] ๐ธ
The "Keyword" used in "result" above is further constrained by the necessity of being enumerated in Section 2.7 ๐
See Section 2.5 for a description of the authserv-id element ๐
If the value portion of a "pvalue" construction identifies something intended to be an email identity, then it MUST use the right hand portion of that ABNF definition ๐
The list of commands eligible for use with the "smtp" ptype can be found in Section 4.1 of [SMTP] ๐ฆ
The "propspec" may be omitted if, for example, the method was unable to extract any properties to do its evaluation yet has a result to report ๐
Where an SMTP command name is being reported as a "property", the agent generating the header field represents that command by converting it to lowercase and dropping any spaces (e.g., "MAIL FROM" becomes "mailfrom", "RCPT TO" becomes "rcptto", etc.) ๐ง
A "ptype" value of "policy" indicates a policy decision about the message not specific to a property of the message that could be extracted. See Section 2.4 for details ๐ฅ
Examples of complete messages using this header field can be found in Appendix B ๐
2.3. Property Types (ptypes) and Properties ๐
the "ptype" in the ABNF above is basically the general category of property the result is based on ๐ paired with the "property" (which is more specific), they tell you exactly which part of the message the data came from. iconic ๐
Combinations of ptypes and properties are registered and described in the "Email Authentication Methods" registry, coupled with the authentication methods they're used with. More on this in Section 6 โจ
Legal values of "ptype" are as defined in the IANA "Email Authentication Property Types" registry, created by [RFC7410]. The initial values and what they typically indicate are as follows, based on [RFC7001] ๐
body: Information that was extracted from the body of the message. This might be an arbitrary string of bytes, a hash of a string of bytes, a Uniform Resource Identifier, or some other content of interest. The "property" is an indication of where within the message body the extracted content was found, and can indicate an offset, identify a MIME part, etc. ๐ท
header: Indicates information that was extracted from the header of the message. This might be the value of a header field or some portion of a header field. The "property" gives a more precise indication of the place in the header from which the extraction took place. ๐ฎ
policy: A local policy mechanism was applied that augments or overrides the result returned by the authentication mechanism. (See Section 2.4.) ๐ก๏ธ
smtp: Indicates information that was extracted from an SMTP command that was used to relay the message. The "property" indicates which SMTP command included the extracted content as a parameter. ๐
Results reported using unknown ptypes MUST NOT be used in making handling decisions. They can be safely ignored by consumers. ๐ โโ๏ธ
Entries in the "Email Authentication Methods" registry can define properties that deviate from these definitions when appropriate. Such deviations need to be clear in the registry and/or in the defining document. See Section 2.7.1 for an example ๐ฆ
2.4. The "policy" ptype ๐
a special ptype value of "policy" exists too ๐โโ๏ธ it's there to show that some local policy mechanism was applied that augments or even replaces (aka overrides) the result from the authentication mechanism. The property and value in this case identify the local policy that was applied and the result it returned ๐ซถ
For example, a DKIM signature is not required to include the Subject header field in the set of fields that are signed ๐ so an ADMD receiving such a message might decide that the signature is unacceptable, even if it passes, because the Subject content could be altered post-signing without invalidating the signature. Such an ADMD could replace the DKIM "pass" result with a "policy" result and then also include the following in the corresponding Authentication-Results field:
... dkim=fail policy.dkim-rules=unsigned-subject ...
In this case, the property is "dkim-rules", indicating some local check by that name took place and that check returned a result of "unsigned-subject". These are arbitrary names selected by (and presumably used within) the ADMD making use of them, so they are not normally registered with IANA or otherwise specified apart from setting syntax restrictions that allow for easy parsing within the rest of the header field ๐ง
This ptype existed in the original specification for this header field, but without a complete description or example of intended use ๐ฅบ
As a result, it has not seen any practical use to date that matches its intended purpose. These added details are provided to guide implementers toward proper use ๐
2.5. Authentication Identifier Field ๐
every Authentication-Results header field has an authentication service identifier field (authserv-id above) โจ basically it's any string meant to identify the authentication service within the ADMD that ran the authentication checks on the message. It's intended to be machine-readable and not necessarily meaningful to users ๐ค
Since agents consuming this field use this identifier to decide whether its contents are of interest (and safe to use), the uniqueness of the identifier MUST be guaranteed by the ADMD that generates it, and it MUST pertain to that ADMD ๐ MUAs or downstream filters SHOULD use this identifier to determine whether or not the data in an Authentication-Results header field ought to be used or ignored ๐ซง
For simplicity and scalability, the authentication service identifier SHOULD be a common token used throughout the ADMD ๐ Common practice is to use the DNS domain name used by or within that ADMD, sometimes called the "organizational domain", but this is not strictly necessary ๐ธ
For tracing and debugging purposes, the authentication identifier can instead be the specific hostname of the MTA performing the authentication check whose result is being reported ๐ Moreover, some implementations define a substructure to the identifier; these are outside of the scope of this specification ๐งฉ
Note, however, that using a local, relative identifier like a flat hostname, rather than a hierarchical and globally unique ADMD identifier like a DNS domain name, makes configuration more difficult for large sites ๐ญ The hierarchical identifier permits aggregating related, trusted systems together under a single, parent identifier, which in turn permits assessing the trust relationship with a single reference. The alternative is a flat namespace requiring individually listing each trusted system. Since consumers use the identifier to determine whether to use the contents of the header field:
- Changes to the identifier impose a large, centralized administrative burden. ๐
- Ongoing administrative changes require constantly updating this centralized table, making it difficult to ensure that an MUA or downstream filter will have access to accurate information for assessing the usability of the header field's content. In particular, consumers of the header field will need to know not only the current identifier(s) in use but previous ones as well to account for delivery latency or later re-assessment of the header field's contents. ๐ซ
Examples of valid authentication identifiers are "example.com", "mail.example.org", "ms1.newyork.example.com", and "example-auth" ๐
2.6. Version Tokens ๐
okay so the grammar up above lets you optionally add versions in two spots ๐: on the header field itself (attached to the authserv-id token) and on each method being reported. The method version refers to the method itself, which is specified in whatever docs describe that method, while the authserv-id version refers to this document and therefore the syntax of this header field โจ.
Why bother? To stop people from misreading the results ๐. If a parser finds a version after an authserv-id that it doesn't explicitly know, it can immediately stop parsing, because what comes next might not be in the format it expects ๐. For a method version, the parser SHOULD ignore a method result if that version isn't supported, in case the result means something different than expected. Say a hypothetical DKIM version 2 gave a pass for different reasons than version 1 does. A consumer might not want those altered semantics ๐
. Letting versions live in the syntax is how you flag that and let the consumer of the header field decide ๐ซถ.
2.7. Defined Methods and Result Values ๐ฆ
Each individual authentication method hands back one result from a set of specific result values ๐. The subsections below point you to the documents defining the authentication methods this document specifically supports, plus their result values. Verifiers SHOULD use these values as described below. New methods that aren't specified in this document, but are meant to be supported by the header field defined here, MUST include a similar result table, either in their defining documents or in supplementary ones ๐.
2.7.1. DKIM and DomainKeys ๐
DKIM is the dkim method and is defined in [DKIM]. DomainKeys is defined in [DOMAINKEYS] and is represented by the domainkeys method.
Section 3.8 of [DOMAINKEYS] lists some possible results of a DomainKeys evaluation. Those results aren't used when generating this header field, though. The results that do get returned are listed below instead ๐ .
A signature is "acceptable to the ADMD" if it passes local policy checks (or there are no specific local policy checks) ๐. For example, an ADMD policy might require that the signature(s) on the message be added using the DNS domain present in the From header field of the message, which makes third-party signatures unacceptable even if they verify ๐.
Both DKIM and DomainKeys use the same result set, so here's the tea โ:
none: the message wasn't signed.pass: the message was signed, the signature or signatures were acceptable to the ADMD, and they passed verification tests โ .fail: the message was signed and the signature or signatures were acceptable to the ADMD, but they failed the verification test(s) ๐.policy: the message was signed, but some aspect of the signature or signatures wasn't acceptable to the ADMD ๐ซ.neutral: the message was signed, but the signature or signatures had syntax errors or otherwise couldn't be processed. This result is also used for other failures that aren't covered elsewhere in this list ๐คทโโ๏ธ.temperror: the message couldn't be verified because of an error that's likely transient, like a temporary inability to retrieve a public key. A later attempt may produce a final result โณ.permerror: the message couldn't be verified because of an error that's unrecoverable, like a required header field being absent. A later attempt is unlikely to produce a final result ๐ญ.
DKIM results are reported using a ptype of header. The property, though, represents one of the tags found in the DKIM-Signature header field rather than a distinct header field. For example, the ptype-property combination header.d refers to the content of the d (signing domain) tag from within the signature header field, and not a separate header field called d ๐ง.
The ability to report different DKIM results for a message with multiple signatures is described in [RFC6008] ๐ธ.
[DKIM] advises that if a message fails verification, it's to be treated as an unsigned message. A report of fail here lets the receiver of the report decide how to handle the failure. A report of neutral or none preempts that choice, making sure the message gets treated as if it had never been signed ๐ซข.
Section 3.1 of [DOMAINKEYS] describes how the sending address of the message is determined. DomainKeys results are therefore reported along with the signing domain name, the sending address of the message, and the name of the header field that the latter was extracted from. So a DomainKeys result includes the ptype-property combination header.d, plus one of header.from and header.sender. The sending address extracted from the header is included with any [MAIL]-style comments removed. Moreover, the local-part of the address and the @ character are removed if it hasn't been authenticated in some way ๐.
2.7.2. SPF and Sender ID ๐
spf and sender-id are the method names for SPF and Sender ID, respectively. The result values for SPF are defined in Section 2.6 of [SPF], and those definitions are included here by reference ๐:
+-----------+--------------------------------+
| Code | Meaning |
+-----------+--------------------------------+
| none | [RFC7208], Section 2.6.1 |
+-----------+--------------------------------+
| pass | [RFC7208], Section 2.6.3 |
+-----------+--------------------------------+
| fail | [RFC7208], Section 2.6.4 |
+-----------+--------------------------------+
| softfail | [RFC7208], Section 2.6.5 |
+-----------+--------------------------------+
| policy | RFC 7601, Section 2.4 |
+-----------+--------------------------------+
| neutral | [RFC7208], Section 2.6.2 |
+-----------+--------------------------------+
| temperror | [RFC7208], Section 2.6.6 |
+-----------+--------------------------------+
| permerror | [RFC7208], Section 2.6.7 |
+-----------+--------------------------------+
These result codes are used in the context of this specification to reflect the result returned by whichever component is doing the SPF evaluation ๐ฏ.
For SPF, the ptype used is smtp, and the property is either mailfrom or helo, since those are the values SPF can evaluate. (If the SMTP client issued the EHLO command instead of HELO, the property used is helo.) ๐ฌ
The sender-id method is described in [SENDERID]. For this method, the ptype used is header, and the property is the name of the header field the Purported Responsible Address (see [PRA]) was extracted from. That's one of Resent-Sender, Resent-From, Sender, or From โจ.
The results for Sender ID are listed and described in Section 4.2 of [SENDERID], but for this specification, the SPF definitions enumerated above are used instead. Also, [SENDERID] specifies result codes in mixed case, but they're typically used all lowercase in this context ๐ค.
For both methods, there's an additional result of policy, which means the client was authorized to inject or relay mail on behalf of the sender's DNS domain according to the authentication method's algorithm, but local policy says the result is unacceptable ๐
โโ๏ธ. For example, policy might be used if SPF returns a pass result, but a local policy check matches the sending DNS domain to one found in an explicit list of unacceptable DNS domains (e.g., spammers) ๐จ.
If the retrieved sender policies used to evaluate SPF and Sender ID don't contain explicit provisions for authenticating the local-part (see Section 3.4.1 of [MAIL]) of an address, the pvalue reported along with results for these mechanisms SHOULD NOT include the local-part or the following @ character ๐.
2.7.3. "iprev" ๐ฆ
The result values used by the iprev method, which is defined in Section 3, are as follows ๐ซ:
pass: the DNS evaluation succeeded. Thereverseandforwardlookup results were both returned and agreed with each other โ .fail: the DNS evaluation failed. Either thereverseandforwardlookups each produced results but didn't agree, or theforwardquery completed without producing a result. For example, a DNS RCODE of 3, commonly known as NXDOMAIN, or an RCODE of 0 (NOERROR) in a reply containing no answers, was returned ๐.temperror: the DNS evaluation couldn't be completed due to an error that's likely transient, like a temporary DNS error. For example, a DNS RCODE of 2, commonly known as SERVFAIL, or some other error condition resulted. A later attempt may produce a final result โณ.permerror: the DNS evaluation couldn't be completed because no PTR data is published for the connecting IP address. For example, a DNS RCODE of 3, commonly known as NXDOMAIN, or an RCODE of 0 (NOERROR) in a reply containing no answers, was returned. This prevented the evaluation from finishing. A later attempt is unlikely to produce a final result ๐ญ.
There's no none for this method, since any TCP connection delivering email has an IP address associated with it, so some kind of evaluation will always be possible ๐.
The result is reported using a ptype of policy (since this isn't part of any established protocol) and a property of iprev ๐.
For discussion of the format of DNS replies, see "Domain Names - Implementation and Specification" ([DNS]) ๐.
2.7.4. SMTP AUTH โจ
okay so SMTP AUTH (defined in [AUTH]) gets its own method name, "auth" ๐
Its result values are:
none: SMTP authentication was not attempted. ๐ซฅpass: The SMTP client authenticated to the server reporting the result using the protocol described in [AUTH]. ๐fail: The SMTP client tried to authenticate to the server using the protocol described in [AUTH] but was not successful (like, it gave a valid identity but the password was wrong ๐).temperror: The SMTP client tried to authenticate using the protocol described in [AUTH] but couldn't finish because of some error that's likely temporary, like a directory service lookup that glitched for a sec. A later attempt may produce a final result. ๐ธpermerror: The SMTP client tried to authenticate using the protocol described in [AUTH] but couldn't finish because of some error that's likely not temporary, like a directory service lookup that's permanently broken. A later attempt is not likely to produce a final result. ๐ญ
The result of AUTH gets reported using a ptype of smtp and a property of either:
auth, in which case the value is the authorization identity generated by the exchange started by the AUTH command; ormailfrom, in which case the value is the mailbox identified by the AUTH parameter used with the MAIL FROM command. ๐
If both identities are available, both can be reported. For example, imagine this command coming from a client that finished session authentication with the AUTH command, and it ended up with an authorized identity of "client@c.example" ๐ง
MAIL FROM:<alice@a.example> AUTH=<bob@b.example>
This could turn into a "resinfo" construction like so:
; auth=pass smtp.auth=client@c.example smtp.mailfrom=bob@b.example
Note that in every case except pass, the message was sent by an unauthenticated client. So all the non-"pass" cases SHOULD be treated as equivalent for this method. ๐
2.7.5. Other Registered Codes ๐ฆ
Some result codes were also registered in other RFCs, like this:
- Vouch By Reference (in [AR-VBR], represented by
vbr); - Authorized Third-Party Signatures (in [ATPS], represented by
dkim-atps); - Author Domain Signing Practices (in [ADSP], represented by
dkim-adsp); - Require-Recipient-Valid-Since (in [RRVS], represented by
rrvs); - S/MIME (in [SMIME-REG], represented by
smime).
2.7.6. Extension Methods ๐ง
New authentication method identifiers (extension methods) might get defined later on, by future revisions or extensions to this spec. These identifiers are registered with the Internet Assigned Numbers Authority (IANA) and, preferably, published in an RFC. See Section 6 for all the details. ๐
Extension methods can be defined for these reasons:
- To let additional info from new authentication systems get communicated to MUAs or downstream filters. The names of these identifiers ought to reflect the name of the method being defined, but they ought not be needlessly long. โจ
- To allow the creation of "sub-identifiers" that show different levels of authentication and tell apart how strong they are, e.g., "auth1-weak" and "auth1-strong". ๐ช
Authentication method implementers are encouraged to provide enough information, using message header field comments if needed, so an MUA developer can understand or pass along the extra details of the authentication results. For example, if it might be interesting to share what data got used to do an evaluation, that could be relayed as a comment in the header field, like this:
Authentication-Results: example.com;
foo=pass bar.baz=blob (2 of 3 tests OK)
Experimental method identifiers MUST only be used within ADMDs that have explicitly consented to use them. These identifiers and their parameters aren't documented in RFCs, so they can change at any time and are not suitable for production use. ๐ โโ๏ธ Any MTA, MUA, or downstream filter meant for production use SHOULD ignore or delete any Authentication-Results header field that includes an experimental (unknown) method identifier. ๐๏ธ
Experimental stuff is a no-go for production, bestie. Ignore it or delete it. ๐
2.7.7. Extension Result Codes ๐
More result codes (extension results) might get defined later on, by future revisions or extensions to this spec. Result codes MUST be registered with the Internet Assigned Numbers Authority (IANA) and preferably published in an RFC. See Section 6 for further details. ๐
Experimental results MUST only be used within ADMDs that have explicitly consented to use them. These results and their parameters aren't formally documented, so they can change at any time and are not suitable for production use. Any MTA, MUA, or downstream filter meant for production use SHOULD ignore or delete any Authentication-Results header field that includes an extension result. ๐ซถ
3. The "iprev" Authentication Method ๐
This section defines an extra authentication method called "iprev". ๐
"iprev" is an attempt to check that a client looks legit based on some DNS queries. Basically, it checks that the IP address is explicitly tied to a domain name. ๐ง When a session initiation of some kind comes in from a client, the IP address of the client peer gets queried for matching names. That's a number-to-name translation, also called a "reverse lookup" or a "PTR" record query. Once that result comes back, each of the names gets looked up (that's a name-to-number translation, or an "A" or "AAAA" record query). The response to this second check will typically map back to at least one of the client's IP addresses. ๐
Expressed as an algorithm: If the client peer's IP address is I, the list of names I maps to (after a "PTR" query) is the set N, and the union of IP addresses each member of N maps to (after the corresponding "A" and "AAAA" queries) is L, then the test succeeds if I is an element of L. โ
Often an MTA that gets a connection failing this test will just reject the connection, using the enhanced status code defined in [AUTH-ESC]. If an operator instead wants to make this info available to downstream agents as a factor in handling decisions, it records a result in line with Section 2.7.3. ๐
A response to a PTR query could contain multiple names. To prevent heavy DNS loads, agents doing these queries MUST be implemented so that the number of names evaluated by generating corresponding A or AAAA queries is limited, so it isn't unduly taxing on the DNS infrastructure. That limit MAY be configurable by an administrator. For example, Section 4.6.4 of [SPF] picked a limit of 10 for its implementation of this algorithm. ๐งฎ
"DNS Extensions to Support IP Version 6" ([DNS-IP6]) covers the query formats for the IPv6 case. ๐
There's some contention about how wise and reliable this test is. For example, in some regions it can be hard for this test to ever pass, because matching forward and reverse DNS is rarely done. So the precise implementation details of how a verifier performs an "iprev" test aren't specified here. The verifier MAY report a successful or failed "iprev" test at its discretion, after doing some kind of check of the validity of the connection's identity using DNS. ๐คทโโ๏ธ It's up to an agent using the reported "iprev" result to understand exactly what that particular verifier is trying to report. ๐ง
There's a lot of discussion about reverse DNS mapping and what it implies, in "Considerations for the use of DNS Reverse Mapping" ([DNSOP-REVERSE]). In particular, it recommends that applications avoid using this test as a means of authentication or security. Its presence in this document isn't an endorsement. It's just an acknowledgment that the method is still common and gives a way to relay the results of that test. ๐ซถ
4. Adding the Header Field to a Message ๐จ
This spec doesn't try to rank how strong the various message authentication methods are, including ones that might show up later. The methods listed are an order-independent set, so their sequence doesn't say anything about one method being stronger or more important than another. Instead, the MUA or downstream filter consuming this header field is supposed to interpret each method's result based on its own knowledge of what that method evaluates. ๐ง โจ
Each "method" MUST refer to an authentication method declared in the IANA registry or to an extension method as described in Section 2.7.6, and each "result" MUST refer to a result code declared in the IANA registry or to an extension result code as defined in Section 2.7.7. See Section 6 for more info about the registered methods and result codes. ๐
An MTA that follows this spec adds this header field (after running one or more message authentication tests) to show which MTA or ADMD ran the test, which test got applied, and what the result was. If an MTA applies more than one of these tests, it adds this header field either once per test or once with all the results together. An MTA MUST NOT add a result to an existing header field. ๐ซ
An MTA MAY add this header field containing only the authentication identifier portion and the "none" token (see Section 2.2) to clearly show that no message authentication schemes were applied before this message was delivered. ๐ซฅ
An MTA adding this header field has to take steps to prove it's legit to the MUAs or downstream filters that will eventually read its content. One process for doing that is described in Section 5. Some environments may need extra measures, and some possible solutions are listed in Section 7.1. This document doesn't mandate any specific solution, since every environment has its own facilities and limitations. ๐ฐ
Most known message authentication methods focus on one particular identifier to evaluate. SPF and Sender ID are different, because they can yield a result based on more than one identifier. Specifically, SPF can evaluate the RFC5321.HELO parameter or the RFC5321.MailFrom parameter, and Sender ID can evaluate the RFC5321.MailFrom parameter or the Purported Responsible Address (PRA) identity. When generating this field to report those results, only the parameter that yielded the result gets included. ๐ฏ
For MTAs that add this header field, adding header fields in order (at the top), per Section 3.6 of [MAIL], is super important. Also, this header field SHOULD be inserted above any other trace header fields those MTAs might prepend. That placement makes it easy to spot which header fields can be trusted. ๐
Real talk: end users who use this header field directly might accidentally trust info that never got properly vetted. For example, if a basic SPF result gets relayed that claims an authenticated addr-spec, the local-part of that addr-spec has actually NOT been authenticated. So an MTA adding this header field SHOULD NOT include any data that hasn't been authenticated by the method(s) being applied. And MUAs SHOULD NOT render that kind of info to users if it's presented by a method known not to authenticate it. ๐๐
4.1. Header Field Position and Interpretation ๐
okay so, to keep results unambiguous and dodge fake header fields, MUAs and downstream filters SHOULD NOT interpret this header field unless the user or admin specifically configures them to. It is NOT meant to be "on by default" ๐ โโ๏ธ Users or admins ought not switch this on unless (1) they are certain the header field will be validly added by an agent inside the ADMD that accepts the mail the MUA eventually reads, AND (2) copies that look like they came from inside the ADMD but were actually added by foreign MTAs get removed before delivery. Lowkey a must-do ๐
Furthermore, MUAs and downstream filters SHOULD NOT interpret this header field unless the authentication service identifier it carries looks like one used within their own ADMD, as configured by the user or administrator. ๐ก
MUAs and downstream filters MUST ignore any result reported using a "result" that isn't in the IANA "Result Code" registry, or a "ptype" that isn't listed in the "Email Authentication Property Types" registry, for such values as defined in Section 6. Moreover, such agents MUST ignore a result indicated for any "method" they don't specifically support. ๐๏ธ
An MUA SHOULD NOT reveal these results to end users, absent careful human factors design considerations and testing, when presenting trust-related materials. Real talk, this is super important ๐ญ For example, an attacker could register examp1e.com (note the digit "1" (one)) and send signed mail to intended victims. A verifier would detect that the signature was valid and report a "pass", even though it's clear the DNS domain name was intended to mislead. See Section 7.2 for further discussion. ๐ต๏ธโโ๏ธ
As stated in Section 2.1, this header field MUST be treated as though it were a trace header field as defined in Section 3.6.7 of [MAIL]. It therefore MUST NOT be reordered and MUST be prepended to the message, so that there is generally some indication upon delivery of where in the chain of handling MTAs the message authentication was done. It's giving paper trail energy ๐งพโจ
Note that there are a few message handlers that can only append new header fields to a message. Strictly speaking, these handlers are not compliant with this specification. They can still add the header field to carry authentication details, but any signal about where in the handling chain the work was done may be lost. Consumers SHOULD be designed such that this can be tolerated, especially from a producer known to have this limitation. ๐ซถ
MUAs SHOULD ignore instances of this header field discovered within message/rfc822 MIME attachments. ๐
Further discussion of these topics can be found in Section 7 below. ๐
4.2. Local Policy Enforcement ๐ง
Some sites have a local policy that treats any particular authentication policy's non-recoverable failure results (typically "fail" or something similar) as justification for rejecting the message. In those cases, the border MTA SHOULD issue an SMTP rejection response to the message, rather than adding this header field and letting the message keep going toward delivery. This is more desirable than letting the message reach an internal host's MTA or spam filter, which could generate a local rejection such as a Delivery Status Notification (DSN) [DSN] to a forged originator. Those generated rejections are colloquially known as "backscatter" ๐ ick
The same MAY also be done for local policy decisions that override the results of the authentication methods (e.g., the "policy" result codes described in Section 2.7). ๐ธ
Rejections at the SMTP protocol level are not possible if local policy is enforced at the MUA and not the MTA. ๐
5. Removing Existing Header Fields ๐งน
For security reasons, any MTA conforming to this specification MUST delete any discovered instance of this header field that claims, through its authentication service identifier, to have been added within its trust boundary but did not come directly from another trusted MTA. For example, an MTA for example.com receiving a message MUST delete or otherwise obscure any instance of this header field bearing an authentication service identifier that says the header field was added within example.com before adding its own header fields. This could mean each MTA will have to be equipped with a list of internal MTAs known to be compliant (and therefore trustworthy). ๐๐
For simplicity and maximum security, a border MTA could remove all instances of this header field on mail crossing into its trust boundary. However, this may conflict with the desire to access authentication results performed by trusted external service providers. It may also invalidate signed messages whose signatures cover external instances of this header field. A more robust border MTA could allow a specific list of authenticating MTAs whose information is to be admitted, removing the header field originating from all others. ๐ก๏ธ
As stated in Section 1.2, a formal definition of "trust boundary" is deliberately not made here. It is entirely possible that a border MTA for example.com will explicitly trust authentication results asserted by the upstream host example.net, even though they exist in completely disjoint administrative boundaries. In that case, the border MTA MAY elect not to delete those results. Moreover, the upstream host doing some authentication work could apply a signing technology such as [DKIM] to its own results to assure downstream hosts of their authenticity. An example of this is provided in Appendix B. ๐ฆ
Similarly, in the case of messages signed using [DKIM] or other message-signing methods that sign header fields, this removal action could invalidate one or more signatures on the message if they covered the header field to be removed. This behavior can be desirable, since there's little value in validating the signature on a message with forged header fields. However, signing agents MAY therefore elect to omit these header fields from signing to avoid this situation. ๐
An MTA SHOULD remove any instance of this header field bearing a version (express or implied) that it does not support. However, an MTA MUST remove such a header field if the [SMTP] connection relaying the message is not from a trusted internal MTA. This means the MTA needs to be able to understand versions of this header field at least as late as the ones understood by the MUAs or other consumers within its ADMD. ๐ขโจ
6. IANA Considerations ๐๏ธ
IANA has registered the defined header field and created tables as described below. These registry actions were originally defined by [RFC5451] and updated by [RFC6577] and [RFC7001]. The created registries are being further updated here to increase their completeness. ๐
6.1. The Authentication-Results Header Field ๐ฎ
[RFC5451] added the Authentication-Results header field to the IANA "Permanent Message Header Field Names" registry, per the procedure found in [IANA-HEADERS]. That entry has been updated to reference this document. The following is the registration template:
Header field name: Authentication-Results
Applicable protocol: mail ([MAIL])
Status: Standard
Author/Change controller: IETF
Specification document(s): RFC 7601
Related information: none
6.2. "Email Authentication Methods" Registry Description ๐
Names of message authentication methods supported by this specification have been registered with IANA, with the exception of experimental names as described in Section 2.7.6. Along with each method, the properties that accompany the method's result are recorded. ๐งพ
The "Email Authentication Parameters" group, and within it the "Email Authentication Methods" registry, were created by [RFC5451] for this purpose. [RFC6577] added a "status" field for each entry. [RFC7001] amended the rules governing that registry and also added a "version" field to the registry. ๐ฐ๏ธ
The reference for that registry has been updated to reference this document. ๐
New entries are assigned only for values that have received Expert Review, per [IANA-CONSIDERATIONS]. The designated expert shall be appointed by the IESG. The designated expert has discretion to request that a publication be referenced if a clear, concise definition of the authentication method cannot be provided such that interoperability is assured. Registrations should otherwise be permitted. The designated expert can also handle requests to mark any current registration as "deprecated". ๐งโโ๏ธ
No two entries can have the same combination of method, ptype, and property. ๐ซ๐ฏ
An entry in this registry contains the following:
Method: the name of the method.Definition: a reference to the document that created this entry, if any (see below).ptype: a "ptype" value appropriate for use with that method.property: a "property" value matching that "ptype", also appropriate for use with that method.Value: a brief description of the value to be supplied with that method/ptype/property tuple.Status: the status of this entry, which is either:active: The entry is in current use.deprecated: The entry is no longer in current use.
Version: a version number associated with the method (preferably starting at "1"). ๐ข
The Definition field will typically refer to a permanent document, or at least some descriptive text, where additional information about the entry being added can be found. This might in turn reference the document where the method is defined, so that all of the semantics around creating or interpreting an Authentication-Results header field using this method, ptype, and property can be understood. ๐๐
6.3. "Email Authentication Methods" Registry Update โจ
okay so here's everything that changed in the "Email Authentication Methods" registry ๐ it's a lot, bestie, but it's all super organized ๐
- The
Definedfield got renamed toDefinitionso it matches the other registries in this group ๐ง - The
dkimmethod entry withheaderptype andbproperty now uses [RFC6008] as its defining document, and the reference got removed from the description ๐ - All the other
dkim,domainkeys,iprev,sender-id, andspfmethod entries had theirDefinitionfields changed to point at this document. That's because this document has a complete description of the registry and these matching values ๐ฆ - All
smimeentries had theirDefinitionfields changed to [SMIME-REG] ๐ธ - The
valuefield of thesmimeentry with propertysmime-partnow reads:"The MIME body part reference that contains the S/MIME signature. See Section 3.2.1 of RFC 7281 for full syntax."๐ซถ - The single
authmethod entry was supposed to show the identity from theAUTHparameter to the SMTPMAIL FROMcommand verb. But there's also anAUTHcommand verb, so it was a bit of a mix-up ๐ญ To fix that, itspropertyis nowmailfromand itsDefinitionnow points to this document ๐ - A new entry was added, and it's giving main character energy โญ
Method: auth
Definition: this document (RFC 7601)
ptype: smtp
property: auth
Value: identity confirmed by the AUTH command
Status: active
Version: 1
- The values for the
domainkeysentries with ptypeheadergot updated ๐from: contents of the [MAIL]From:header field, after removing comments, and removing the local-part and following "@" if not authenticatedsender: contents of the [MAIL]Sender:header field, after removing comments, and removing the local-part and following "@" if not authenticated
- All
dkim-adspanddomainkeysentries now have theirStatusset todeprecated๐ That's because those specs are now Historic. TheirDefinitionfields also reference this document now ๐
6.4. "Email Authentication Property Types" Registry
[RFC7410] created the "Email Authentication Property Types" registry ๐ง
Entries in this registry are subject to the Expert Review rules described in [IANA-CONSIDERATIONS]. Each entry needs the following values:
ptype: The name of the ptype being registered. It must fit within the ABNF described in Section 2.2.Definition: An optional reference to a defining specification.Description: A brief description of what sort of information thisptypeis meant to cover.
For new entries, the Designated Expert needs to make sure the description adequately explains the intended use โจ An example would be super helpful in the entry's defining document, if there is one. Entries in the "Email Authentication Methods" registry or the "Email Authentication Result Names" registry might also work as examples of intended use ๐
Since this is a complete restatement of the definition and rules for this registry, IANA updated it to show Section 2.3 of this document as the current definitions for the body, header, policy, and smtp entries. References to [RFC7001] and [RFC7410] have been removed ๐ฆ
6.5. "Email Authentication Result Names" Description
Names of message authentication result codes supported by this specification must be registered with IANA. The only exception is experimental codes, as described in Section 2.7.7. A registry was created by [RFC5451] for this purpose. [RFC6577] added the status column, and [RFC7001] updated the rules for that registry ๐
New entries are only assigned for values that have received Expert Review, per [IANA-CONSIDERATIONS]. The IESG shall appoint the designated expert. The designated expert has discretion to request that a publication be referenced if a clear, concise definition of the authentication result can't be provided in a way that makes interoperability assured. Otherwise, registrations should be permitted ๐ The designated expert can also handle requests to mark any current registration as deprecated ๐ซถ
No two entries can have the same combination of method and code ๐ โโ๏ธ
An entry in this registry contains the following:
- Auth Method: an authentication method for which results are returned using the header field defined in this document.
- Code: a result code that can be returned for this authentication method.
- Specification: either free-form text explaining what this method-code combination means, or a reference to such a definition.
- Status: the status of this entry, which is either:
active: The entry is in current use.deprecated: The entry is no longer in current use.
6.6. "Email Authentication Result Names" Update
This document includes a complete description of the registry and obsoletes [RFC7001]. So the following changes were made to this registry per this document ๐
- The
Definedfield has been removed. - The
Meaningfield has been renamedSpecification, as described above. - The
Auth Methodfield now comes before theCodefield. - For easier searching, the table is sorted first by Auth Method, then by Code within each Auth Method grouping ๐
- All entries for the
dkim,domainkeys,spf,sender-id,auth, andiprevmethods had theirSpecificationfields replaced like this:dkim: Section 2.7.1 of this document (RFC 7601)domainkeys: Section 2.7.1 of this document (RFC 7601)spf: for "hardfail", Section 2.4.2 of [RFC5451]; for all others, Section 2.7.2 of this document (RFC 7601)sender-id: for "hardfail", Section 2.4.2 of [RFC5451]; for all others, Section 2.7.2 of this document (RFC 7601)auth: Section 2.7.4 of this document (RFC 7601)iprev: Section 2.7.3 of this document (RFC 7601)
- All entries for
dkim-adspthat were missing an explicit reference to a defining document now reference [ADSP] in theirSpecificationfields ๐ - All entries for
dmarchad theirSpecificationfields changed to reference Section 11.2 of [DMARC] ๐ธ - All entries for
dkim-adspanddomainkeyshad theirStatusvalues changed todeprecated, since those specifications are now Historic. TheirSpecificationfields also got a reference to this document ๐ฆ
6.7. SMTP Enhanced Status Codes
The entry for X.7.25 in the "Enumerated Status Codes" sub-registry of the "Simple Mail Transfer Protocol (SMTP) Enhanced Status Codes Registry" now refers to this document instead of [RFC7001] ๐ง
7. Security Considerations โจ
Okay bestie, this part is serious ๐ญ Please read it carefully before you touch the Authentication-Results header field ๐
The following security considerations apply when adding or processing the Authentication-Results header field:
7.1. Forged Header Fields ๐
okay bestie, so an MUA or filter that reads a mailbox handled by a non-conformant MTA, and that understands Authentication-Results header fields, could make totally false conclusions based on forged ones ๐ญ. A malicious user or agent could forge a header field using the DNS domain of a receiving ADMD as the authserv-id token in the value and, with the rest of the value, claim the message was properly authenticated. The non-conformant MTA would fail to strip the forged header field, and the MUA could wrongly trust it ๐.
For this reason, it is best not to have processing of the Authentication-Results header field enabled by default. Instead, it should be ignored, at least for the purposes of enacting filtering decisions, unless a user or administrator specifically enables it after verifying that the border MTA is compliant ๐. It is acceptable to have an MUA aware of this specification but have an explicit list of hostnames whose Authentication-Results header fields are trustworthy. However, this list should initially be empty ๐ธ.
Some alternative solutions to this problem were proposed a while ago and are listed below. To date, they have not been developed due to lack of demand, but they are documented here in case the information is useful at some point in the future โจ:
- Possibly the simplest is a digital signature protecting the header field, such as using [DKIM], that can be verified by an MUA by using a posted public key. Although one of the main purposes of this document is to relieve the burden of doing message authentication work at the MUA, this only requires that the MUA learn a single authentication scheme, even if a number of them are in use at the border MTA. Note that [DKIM] requires that the
Fromheader field be signed. In this application, though, the signing agent (a trusted MTA) likely cannot authenticate that value, so the fact that it is signed should be ignored. Where the authserv-id is the ADMD's domain name, the authserv-id matching this valid internal signature's "d=" DKIM value is sufficient ๐ฆ. - Another would be a means to interrogate the MTA that added the header field to see if it is actually providing any message authentication services and saw the message in question. This isn't especially palatable, though, given the work required to craft and implement such a scheme ๐.
- Yet another might be a method to interrogate the internal MTAs that apparently handled the message (based on
Receivedheader fields) to determine whether any of them conform to Section 5 of this memo. This, too, has potentially high barriers to entry ๐ง. - Extensions to [IMAP], [SMTP], and [POP3] could be defined to allow an MUA or filtering agent to acquire the authserv-id in use within an ADMD, thus allowing it to identify which
Authentication-Resultsheader fields it can trust ๐ง. - On the presumption that internal MTAs are fully compliant with Section 3.6 of [MAIL], and the compliant internal MTAs are using their own hostnames or the ADMD's DNS domain name as the authserv-id token, the header field proposed here should always appear above a
Receivedheader added by a trusted MTA. This can be used as a test for header field validity ๐.
Support for some of these is being considered for future work ๐.
In any case, a mechanism needs to exist for an MUA or filter to verify that the host that appears to have added the header field (a) actually did so and (b) is legitimately adding that header field for this delivery. Given the variety of messaging environments deployed today, consensus appears to be that specifying a particular mechanism for doing so is not appropriate for this document ๐คทโโ๏ธ.
Mitigation of the forged header field attack can also be accomplished by moving the authentication results data into metadata associated with the message. In particular, an [SMTP] extension could be established to communicate authentication results from the border MTA to intermediate and delivery MTAs. The latter could arrange to store the authentication results as metadata, retrieved and rendered along with the message by an [IMAP] client aware of a similar extension in that protocol. The delivery MTA would be told to trust data via this extension only from MTAs it trusts, and border MTAs would not accept data via this extension from any source. There is no vector in such an arrangement for forgery of authentication data by an outside agent ๐ก๏ธโจ.
7.2. Misleading Results ๐ฅบ
Until some form of service for querying the reputation of a sending agent is widely deployed, the existence of this header field indicating a "pass" does not make the message trustworthy. It is possible for an arriving piece of spam or other undesirable mail to pass checks by several of the methods enumerated above. For example, a piece of spam signed using [DKIM] by the originator of the spam, which might be a spammer or a compromised system, could do this ๐. In particular, this issue is not resolved by the forged header field removal discussed above ๐ฌ.
So, MUAs and downstream filters must take some care with use of this header, even after possibly malicious headers are scrubbed ๐ซถ.
7.3. Header Field Position ๐
Despite the requirements of [MAIL], header fields can sometimes be reordered en route by intermediate MTAs. The goal of requiring header field addition only at the top of a message is an acknowledgment that some MTAs do reorder header fields, but most do not. Thus, in the general case, there will be some indication of which MTAs (if any) handled the message after the addition of the header field defined here ๐ง.
7.4. Reverse IP Query Denial-of-Service Attacks ๐ช๏ธ
Section 4.6.4 of [SPF] describes a DNS-based denial-of-service attack for verifiers that attempt DNS-based identity verification of arriving client connections. A verifier wishing to do this check and report this information needs to take care not to go to unbounded lengths to resolve "A" and "PTR" queries. MUAs or other filters making use of an "iprev" result specified by this document need to be aware of the algorithm used by the verifier reporting the result and, especially, its limitations ๐.
7.5. Mitigation of Backscatter ๐
Failing to follow the instructions of Section 4.2 can result in a denial-of-service attack caused by the generation of [DSN] messages (or equivalent) to addresses that did not send the messages being rejected. Yikes, that's a whole mess ๐ฑ.
7.6. Internal MTA Lists ๐
Section 5 describes a procedure for scrubbing header fields that may contain forged authentication results about a message. A compliant installation will have to include, at each MTA, a list of other MTAs known to be compliant and trustworthy. Failing to keep this list current as internal infrastructure changes may expose an ADMD to attack ๐.
7.7. Attacks against Authentication Methods ๐ฅ
If an attack becomes known against an authentication method, then the agent verifying that method can be fooled into thinking an inauthentic message is authentic, and thus the value of this header field can be misleading. It follows that any attack against the authentication methods supported by this document is also a security consideration here ๐จ.
7.8. Intentionally Malformed Header Fields ๐งจ
It is possible for an attacker to add an Authentication-Results header field that is extraordinarily large or otherwise malformed, in an attempt to discover or exploit weaknesses in header field parsing code. Implementers must thoroughly verify all such header fields received from MTAs and be robust against intentionally as well as unintentionally malformed header fields ๐งฑ๐.
7.9. Compromised Internal Hosts ๐ต๏ธโโ๏ธ
An internal MUA or MTA that has been compromised could generate mail with a forged From header field and a forged Authentication-Results header field that endorses it. It is clearly a larger concern to have compromised internal machines than it is to prove the value of this header field. However, this risk can be mitigated by arranging that internal MTAs will remove this header field if it claims to have been added by a trusted border MTA (as described above), yet the [SMTP] connection is not coming from an internal machine known to be running an authorized MTA. Still, in such a configuration, legitimate MTAs will have to add this header field when legitimate internal-only messages are generated. This is also covered in Section 5 ๐ .
7.10. Encapsulated Instances ๐ฆ
MIME messages can contain attachments of type "message/rfc822", which contain other messages. Such an encapsulated message can also contain an Authentication-Results header field. Although the processing of these is outside of the intended scope of this document (see Section 1.3), some early guidance to MUA developers is appropriate here ๐.
Since MTAs are unlikely to strip Authentication-Results header fields after mailbox delivery, MUAs are advised in Section 4.1 to ignore such instances within MIME attachments. Moreover, when extracting a message digest to separate mail store messages or other media, such header fields should be removed so that they will never be interpreted improperly by MUAs that might later consume them ๐๏ธ.
7.11. Reverse Mapping ๐
Although Section 3 of this memo includes explicit support for the "iprev" method, its value as an authentication mechanism is limited. Implementers of both this proposal and agents that use the data it relays are encouraged to become familiar with the issues raised by [DNSOP-REVERSE] when deciding whether or not to include support for "iprev" ๐๐.
8. References ๐
8.1. Normative References ๐ฆ
[ABNF] Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax Specifications: ABNF", STD 68, RFC 5234, DOI 10.17487/RFC5234, January 2008, <http://www.rfc-editor.org/info/rfc5234>.
[IANA-HEADERS] Klyne, G., Nottingham, M., and J. Mogul, "Registration Procedures for Message Header Fields", BCP 90, RFC 3864, DOI 10.17487/RFC3864, September 2004, <http://www.rfc-editor.org/info/rfc3864>.
[KEYWORDS] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997, <http://www.rfc-editor.org/info/rfc2119>.
[MAIL] Resnick, P., Ed., "Internet Message Format", RFC 5322, DOI 10.17487/RFC5322, October 2008, <http://www.rfc-editor.org/info/rfc5322>.
[MIME] Freed, N. and N. Borenstein, "Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies", RFC 2045, DOI 10.17487/RFC2045, November 1996, <http://www.rfc-editor.org/info/rfc2045>.
[SMTP] Klensin, J., "Simple Mail Transfer Protocol", RFC 5321, DOI 10.17487/RFC5321, October 2008, <http://www.rfc-editor.org/info/rfc5321>.
8.2. Informative References โจ
Okay bestie, these are the extra reads that help you understand the whole picture, even though they aren't strictly required ๐๐
[ADSP] Allman, E., Fenton, J., Delany, M., and J. Levine, "DomainKeys Identified Mail (DKIM) Author Domain Signing Practices (ADSP)", RFC 5617, DOI 10.17487/RFC5617, August 2009, <http://www.rfc-editor.org/info/rfc5617>.
[AR-VBR] Kucherawy, M., "Authentication-Results Registration for Vouch by Reference Results", RFC 6212, DOI 10.17487/RFC6212, April 2011, <http://www.rfc-editor.org/info/rfc6212>.
[ATPS] Kucherawy, M., "DomainKeys Identified Mail (DKIM) Authorized Third-Party Signatures", RFC 6541, DOI 10.17487/RFC6541, February 2012, <http://www.rfc-editor.org/info/rfc6541>.
[AUTH] Siemborski, R., Ed. and A. Melnikov, Ed., "SMTP Service Extension for Authentication", RFC 4954, DOI 10.17487/RFC4954, July 2007, <http://www.rfc-editor.org/info/rfc4954>.
[AUTH-ESC] Kucherawy, M., "Email Authentication Status Codes", RFC 7372, DOI 10.17487/RFC7372, September 2014, <http://www.rfc-editor.org/info/rfc7372>.
[DKIM] Crocker, D., Ed., Hansen, T., Ed., and M. Kucherawy, Ed., "DomainKeys Identified Mail (DKIM) Signatures", STD 76, RFC 6376, DOI 10.17487/RFC6376, September 2011, <http://www.rfc-editor.org/info/rfc6376>.
[DMARC] Kucherawy, M., Ed. and E. Zwicky, Ed., "Domain-based Message Authentication, Reporting, and Conformance (DMARC)", RFC 7489, DOI 10.17487/RFC7489, March 2015, <http://www.rfc-editor.org/info/rfc7489>.
[DNS] Mockapetris, P., "Domain names - implementation and specification", STD 13, RFC 1035, DOI 10.17487/RFC1035, November 1987, <http://www.rfc-editor.org/info/rfc1035>.
[DNS-IP6] Thomson, S., Huitema, C., Ksinant, V., and M. Souissi, "DNS Extensions to Support IP Version 6", RFC 3596, DOI 10.17487/RFC3596, October 2003, <http://www.rfc-editor.org/info/rfc3596>.
[DNSOP-REVERSE] Senie, D. and A. Sullivan, "Considerations for the use of DNS Reverse Mapping", Work in Progress, draft-ietf-dnsop-reverse-mapping-considerations-06, March 2008.
[DOMAINKEYS] Delany, M., "Domain-Based Email Authentication Using Public Keys Advertised in the DNS (DomainKeys)", RFC 4870, DOI 10.17487/RFC4870, May 2007, <http://www.rfc-editor.org/info/rfc4870>.
[DSN] Moore, K. and G. Vaudreuil, "An Extensible Message Format for Delivery Status Notifications", RFC 3464, DOI 10.17487/RFC3464, January 2003, <http://www.rfc-editor.org/info/rfc3464>.
[EMAIL-ARCH] Crocker, D., "Internet Mail Architecture", RFC 5598, DOI 10.17487/RFC5598, July 2009, <http://www.rfc-editor.org/info/rfc5598>.
[IANA-CONSIDERATIONS] Narten, T. and H. Alvestrand, "Guidelines for Writing an IANA Considerations Section in RFCs", BCP 26, RFC 5226, DOI 10.17487/RFC5226, May 2008, <http://www.rfc-editor.org/info/rfc5226>.
[IMAP] Crispin, M., "INTERNET MESSAGE ACCESS PROTOCOL - VERSION 4rev1", RFC 3501, DOI 10.17487/RFC3501, March 2003, <http://www.rfc-editor.org/info/rfc3501>.
[POP3] Myers, J. and M. Rose, "Post Office Protocol - Version 3", STD 53, RFC 1939, DOI 10.17487/RFC1939, May 1996, <http://www.rfc-editor.org/info/rfc1939>.
[PRA] Lyon, J., "Purported Responsible Address in E-Mail Messages", RFC 4407, DOI 10.17487/RFC4407, April 2006, <http://www.rfc-editor.org/info/rfc4407>.
[RFC5451] Kucherawy, M., "Message Header Field for Indicating Message Authentication Status", RFC 5451, DOI 10.17487/RFC5451, April 2009, <http://www.rfc-editor.org/info/rfc5451>.
[RFC6008] Kucherawy, M., "Authentication-Results Registration for Differentiating among Cryptographic Results", RFC 6008, DOI 10.17487/RFC6008, September 2010, <http://www.rfc-editor.org/info/rfc6008>.
[RFC6577] Kucherawy, M., "Authentication-Results Registration Update for Sender Policy Framework (SPF) Results", RFC 6577, DOI 10.17487/RFC6577, March 2012, <http://www.rfc-editor.org/info/rfc6577>.
[RFC7001] Kucherawy, M., "Message Header Field for Indicating Message Authentication Status", RFC 7001, DOI 10.17487/RFC7001, September 2013, <http://www.rfc-editor.org/info/rfc7001>.
[RFC7410] Kucherawy, M., "A Property Types Registry for the Authentication-Results Header Field", RFC 7410, DOI 10.17487/RFC7410, December 2014, <http://www.rfc-editor.org/info/rfc7410>.
[RRVS] Mills, W. and M. Kucherawy, "The Require-Recipient-Valid-Since Header Field and SMTP Service Extension", RFC 7293, DOI 10.17487/RFC7293, July 2014, <http://www.rfc-editor.org/info/rfc7293>.
[SECURITY] Rescorla, E. and B. Korver, "Guidelines for Writing RFC Text on Security Considerations", BCP 72, RFC 3552, DOI 10.17487/RFC3552, July 2003, <http://www.rfc-editor.org/info/rfc3552>.
[SENDERID] Lyon, J. and M. Wong, "Sender ID: Authenticating E-Mail", RFC 4406, DOI 10.17487/RFC4406, April 2006, <http://www.rfc-editor.org/info/rfc4406>.
[SMIME-REG] Melnikov, A., "Authentication-Results Registration for S/MIME Signature Verification", RFC 7281, DOI 10.17487/RFC7281, June 2014, <http://www.rfc-editor.org/info/rfc7281>.
[SPF] Kitterman, S., "Sender Policy Framework (SPF) for Authorizing Use of Domains in Email, Version 1", RFC 7208, DOI 10.17487/RFC7208, April 2014, <http://www.rfc-editor.org/info/rfc7208>.
[VBR] Hoffman, P., Levine, J., and A. Hathcock, "Vouch By Reference", RFC 5518, DOI 10.17487/RFC5518, April 2009, <http://www.rfc-editor.org/info/rfc5518>.
Appendix A. Legacy MUAs ๐
Heads up, implementers: lots of MUAs are unlikely to get retrofitted for the new header field and its semantics ๐ So to get adoption moving faster, a delivery MTA might want to add things that existing MUAs already process, alongside the Authentication-Results header field. One idea is a Priority header field on messages that don't already have one, with a value that reflects how strong the authentication was: "low" for weak or no authentication, "normal" or "high" for good or strong authentication ๐
Some modern MUAs can already filter based on the content of this header field, and people are obsessed with the idea of MUAs showing some kind of graphic for its meaning to end users ๐ญ Until that exists (aka while this proposal and its successors are being adopted), other interim ways of conveying authentication results may be necessary โจ
Appendix B. Authentication-Results Examples ๐ฆ
This section shows some examples of using this header field to indicate authentication results ๐
B.1. Trivial Case; Header Field Not Present
The trivial case:
Received: from mail-router.example.com
(mail-router.example.com [192.0.2.1])
by server.example.org (8.11.6/8.11.6)
with ESMTP id g1G0r1kA003489;
Fri, Feb 15 2002 17:19:07 -0800
From: sender@example.com
Date: Fri, Feb 15 2002 16:54:30 -0800
To: receiver@example.org
Message-Id: <12345.abc@example.com>
Subject: here's a sample
Hello! Goodbye!
Example 1: Trivial Case
The Authentication-Results header field is completely absent ๐ซฅ So the MUA can't draw any conclusion about whether the message is valid. That could happen because the message authentication services weren't available at delivery time, no service is provided, or the MTA isn't following this specification.
B.2. Nearly Trivial Case; Service Provided, but No Authentication Done
A message delivered by an MTA that conforms to this specification but provides no actual message authentication service:
Authentication-Results: example.org 1; none
Received: from mail-router.example.com
(mail-router.example.com [192.0.2.1])
by server.example.org (8.11.6/8.11.6)
with ESMTP id g1G0r1kA003489;
Fri, Feb 15 2002 17:19:07 -0800
From: sender@example.com
Date: Fri, Feb 15 2002 16:54:30 -0800
To: receiver@example.org
Message-Id: <12345.abc@example.com>
Subject: here's a sample
Hello! Goodbye!
Example 2: Header Present but No Authentication Done
The Authentication-Results header field is there, showing that the delivering MTA conforms to this specification ๐ It used its DNS domain name as the authserv-id. The presence of "none" (and no method or result tokens) shows that no message authentication was done. The version number of the specification the field's content follows is explicitly given too.
B.3. Service Provided, Authentication Done
A message delivered by an MTA that conforms to this specification and applied some message authentication ๐ฅ
Authentication-Results: example.com;
spf=pass smtp.mailfrom=example.net
Received: from dialup-1-2-3-4.example.net
(dialup-1-2-3-4.example.net [192.0.2.200])
by mail-router.example.com (8.11.6/8.11.6)
with ESMTP id g1G0r1kA003489;
Fri, Feb 15 2002 17:19:07 -0800
From: sender@example.net
Date: Fri, Feb 15 2002 16:54:30 -0800
To: receiver@example.com
Message-Id: <12345.abc@example.net>
Subject: here's a sample
Hello! Goodbye!
Example 3: Header Reporting Results
The Authentication-Results header field is present, indicating that the border MTA conforms to this specification ๐ The authserv-id is once again the DNS domain name. The message was also authenticated by that MTA via the method specified in [SPF]. Since that method can't authenticate the local-part, it's been left out of the result's value. An MUA could pull out and pass along this extra info if it wanted to โจ
B.4. Service Provided, Several Authentications Done, Single MTA โจ
okay so picture this: a message gets relayed inbound through a single MTA that follows this spec, and that MTA runs three different message authentication checks ๐ซถ
Authentication-Results: example.com;
auth=pass (cram-md5) smtp.auth=sender@example.net;
spf=pass smtp.mailfrom=example.net
Authentication-Results: example.com;
sender-id=pass header.from=example.net
Received: from dialup-1-2-3-4.example.net (8.11.6/8.11.6)
(dialup-1-2-3-4.example.net [192.0.2.200])
by mail-router.example.com (8.11.6/8.11.6)
with ESMTPA id g1G0r1kA003489;
Fri, Feb 15 2002 17:19:07 -0800
Date: Fri, Feb 15 2002 16:54:30 -0800
To: receiver@example.com
From: sender@example.net
Message-Id: <12345.abc@example.net>
Subject: here's a sample
Hello! Goodbye!
Example 4: Headers Reporting Results from One MTA
the Authentication-Results header field is right there, which tells us the delivering MTA conforms to this specification ๐ the receiving DNS domain name is used as the authserv-id again, periodt. the sender authenticated herself/himself to the MTA through a method specified in [AUTH], and both the SPF and Sender ID checks ran and passed ๐ the MUA could pull out and relay that extra info if it wants to โจ
two Authentication-Results header fields aren't required here, since the same host did all the checking. the authenticating agent could've consolidated everything into one header field ๐ง
this one is giving remote user on a dial-up connection (example.net) sending mail to a border MTA (example.com) and using SMTP authentication to prove who they are ๐ธ the dial-up provider was explicitly authorized to relay mail as example.com, which is why the SPF and Sender ID checks both produced "pass" results ๐
B.5. Service Provided, Several Authentications Done, Different MTAs ๐ฆ
so this message got relayed inbound by two different MTAs that both conform to this specification, and they applied multiple message authentication checks between them ๐
Authentication-Results: example.com;
sender-id=fail header.from=example.com;
dkim=pass (good signature) header.d=example.com
Received: from mail-router.example.com
(mail-router.example.com [192.0.2.1])
by auth-checker.example.com (8.11.6/8.11.6)
with ESMTP id i7PK0sH7021929;
Fri, Feb 15 2002 17:19:22 -0800
DKIM-Signature: v=1; a=rsa-sha256; s=gatsby; d=example.com;
t=1188964191; c=simple/simple; h=From:Date:To:Subject:
Message-Id:Authentication-Results;
bh=sEuZGD/pSr7ANysbY3jtdaQ3Xv9xPQtS0m70;
b=EToRSuvUfQVP3Bkz ... rTB0t0gYnBVCM=
Authentication-Results: example.com;
auth=pass (cram-md5) smtp.auth=sender@example.com;
spf=fail smtp.mailfrom=example.com
Received: from dialup-1-2-3-4.example.net
(dialup-1-2-3-4.example.net [192.0.2.200])
by mail-router.example.com (8.11.6/8.11.6)
with ESMTPA id g1G0r1kA003489;
Fri, Feb 15 2002 17:19:07 -0800
From: sender@example.com
Date: Fri, Feb 15 2002 16:54:30 -0800
To: receiver@example.com
Message-Id: <12345.abc@example.com>
Subject: here's a sample
Hello! Goodbye!
Example 5: Headers Reporting Results from Multiple MTAs
the Authentication-Results header field is present, indicating conformance to this specification ๐ the authserv-id is the recipient's DNS domain name, same energy as before โจ the header field shows up twice because two different MTAs in the chain of delivery ran authentication tests ๐ซถ
the first MTA, mail-router.example.com, reports that SMTP AUTH and SPF were both used. the SMTP AUTH check passed while the SPF check failed ๐ญ for the SMTP AUTH case, extra info sits in the comment field, which the MUA can choose to render if it wants ๐
the second MTA, auth-checker.example.com, reports that it ran a Sender ID test (which failed) and a DKIM test (which passed) ๐ฅ again, extra data about one of the tests shows up as a comment, which the MUA may choose to render. also lowkey important: there's a DKIM signature added by example.com that assured the integrity of the lower Authentication-Results field ๐
since different hosts did the two sets of checks, the header fields cannot be consolidated in this example ๐
this one is a more typical transmission of mail into example.com from a user on the dial-up connection example.net ๐ง the user appears legit, since they had a valid password that let them authenticate at the border MTA using SMTP AUTH ๐ธ the SPF and Sender ID tests failed because example.com never granted example.net authority to relay mail on its behalf. the DKIM test passed, though, because the sending user had a private key matching one of example.com's published public keys and used it to sign the message ๐
B.6. Service Provided, Multi-tiered Authentication Done ๐
this message had authentication done at various stages, and one of those stages happened outside the receiving ADMD ๐
Authentication-Results: example.com;
dkim=pass reason="good signature"
header.i=@mail-router.example.net;
dkim=fail reason="bad signature"
header.i=@newyork.example.com
Received: from mail-router.example.net
(mail-router.example.net [192.0.2.250])
by chicago.example.com (8.11.6/8.11.6)
for <recipient@chicago.example.com>
with ESMTP id i7PK0sH7021929;
Fri, Feb 15 2002 17:19:22 -0800
DKIM-Signature: v=1; a=rsa-sha256; s=furble;
d=mail-router.example.net; t=1188964198; c=relaxed/simple;
h=From:Date:To:Message-Id:Subject:Authentication-Results;
bh=ftA9J6GtX8OpwUECzHnCkRzKw1uk6FNiLfJl5Nmv49E=;
b=oINEO8hgn/gnunsg ... 9n9ODSNFSDij3=
Authentication-Results: example.net;
dkim=pass (good signature) header.i=@newyork.example.com
Received: from smtp.newyork.example.com
(smtp.newyork.example.com [192.0.2.220])
by mail-router.example.net (8.11.6/8.11.6)
with ESMTP id g1G0r1kA003489;
Fri, Feb 15 2002 17:19:07 -0800
DKIM-Signature: v=1; a=rsa-sha256; s=gatsby;
d=newyork.example.com;
t=1188964191; c=simple/simple;
h=From:Date:To:Message-Id:Subject;
bh=sEu28nfs9fuZGD/pSr7ANysbY3jtdaQ3Xv9xPQtS0m7=;
b=EToRSuvUfQVP3Bkz ... rTB0t0gYnBVCM=
From: sender@newyork.example.com
Date: Fri, Feb 15 2002 16:54:30 -0800
To: meetings@example.net
Message-Id: <12345.abc@newyork.example.com>
Subject: here's a sample
Example 6: Headers Reporting Results from Multiple MTAs in
Different ADMDs
this is multi-tiered authentication with an extended trust boundary, and it's honestly so iconic ๐
the message got sent from someone in example.com's New York office (newyork.example.com) to a mailing list managed at an intermediary ๐ it was signed at the origin using DKIM โ๏ธ
the message went to a mailing list service provider called example.net, which example.com uses. over there, meetings@example.net gets expanded to a long list of recipients, one of whom is at the Chicago office ๐ฆ for this example, we'll assume that the trust boundary for chicago.example.com includes the mailing list server at example.net ๐ซถ
the mailing list server authenticated the message first and attached an Authentication-Results header field saying so, using its DNS domain name as the authserv-id ๐ then it altered the message by adding some footer text to the body, including administrivia like unsubscription instructions ๐ finally, the mailing list server adds a second DKIM signature and starts distributing the message ๐
the border MTA for chicago.example.com explicitly trusts results from mail-router.example.net, so that header field isn't removed ๐ it evaluated both signatures and found that the first (most recent) one is a "pass", but because of the modifications mentioned above, the second is a "fail" ๐ญ still, the first signature covered the Authentication-Results header added at mail-router.example.net, and that header recorded the validation of the second signature. so, indirectly, you can tell that the authentications claimed by both signatures are indeed valid ๐
quick note: two styles of presenting result metadata are in use here ๐ง in one case the "reason=" clause is present, which is meant for easy extraction by parsers. in the other case, the CFWS production of the ABNF is used to include that data as a header field comment. the latter can be harder for parsers to extract, given the varied supported syntaxes of mail header fields ๐
B.7. Comment-Heavy Example ๐
the formal syntax lets comments show up in a bunch of places ๐ธ just to illustrate, this example is also legal, no cap:
Authentication-Results: foo.example.net (foobar) 1 (baz);
dkim (Because I like it) / 1 (One yay) = (wait for it) fail
policy (A dot can go here) . (like that) expired
(this surprised me) = (as I wasn't expecting it) 1362471462
Example 7: A Very Comment-Heavy but Perfectly Legal Example
the comments are literally everywhere and it's still valid, which is giving chaotic main character energy ๐ iykyk ๐
Appendix C. Operational Considerations about Message Authentication โจ
okay bestie, so this whole protocol is built on one big vibe ๐ง: authentication (and, someday, reputation ๐) gets done by the border MTAs, not by the MUAs or the middle-of-the-road MTAs. Those just take the results the border MTA already figured out and run with them ๐ . Nobody's forcing you to do it this way for email or message auth, but this protocol and how people have actually deployed it so far both follow that model ๐. Here's why it slaps, because it hits several common ADMD needs ๐ฅ:
- Service operators want to deal with problem messages as close to the edge of the ADMD as they can ๐ช. For example, that lets you reject a message right at the SMTP level instead of generating a DSN inside your own system ๐ โโ๏ธ. If you do the authentication or reputation work only at the MUA or an intermediate MTA, that goal is just not happening ๐.
- Border MTAs are way more likely to have direct access to outside sources of authentication or reputation info ๐, because modern MUAs are usually locked down behind heavy firewalls ๐งฑ. Some MUAs might not even be able to finish authentication or reputation checks without complicated proxy setups or similar hassle ๐ฉ.
- MUAs trust the upstream MTAs inside their trust boundaries to make correct evaluations (as correct as is possible ๐ค) about the envelope, header, and content of a message ๐ซถ. So MUAs don't need to know how to do the upstream work at all. They just need the results ๐.
- Judging a message's quality costs something โณ, whether that's simple token matching (like a list of preferred DNS domains) or heavy cryptanalysis (like public/private key work) ๐งฎ. So you want to keep that cost as low as possible ๐. Doing those tests at the border MTA is way better than doing them again at every single MUA that handles the message ๐ โโ๏ธ. If the ADMD sticks to common messaging protocols, a reputation query or authentication check run by a border MTA gives the same result as one run by an MUA ๐. But if the MUA does the work, a message going to multiple recipients would get evaluated more than once, once per MUA ๐ญ. That's needless resource amplification and a possible denial-of-service attack vector ๐จ.
- Minimizing change is iconic โจ. As new authentication and reputation methods show up, this header field's list of supported methods would probably grow ๐ฑ. If MUAs simply read what's in this header field instead of actually doing authentication or reputation work themselves ๐ง , they only have to learn how to parse the field once ๐. Adding a new method then only needs a config change at the MUAs and software changes at the MTAs (which there are probably fewer of ๐ค). When you're deciding whether to put these functions in MTAs or MUAs, you've got to think about individual flexibility, infrastructure inertia, and how big the effort is ๐ง. Changing a single MUA is usually easier than changing an MTA, since it affects fewer users and can be done with less care ๐ฆ. Still, changing lots of MUAs takes more effort than changing a smaller number of MTAs ๐ฎโ๐จ.
- For decisions about whether a message gets delivered and how it's displayed, authentication and reputation checks work best close to the time the message is in transit, while it's on its way to a user's inbox ๐ฌ, not afterwards โฐ. DKIM keys and IP address reputations can change over time or even go invalid ๐ฅ, and people can take ages to read a message once it's been delivered ๐. So the value of this work drops, maybe fast ๐, once delivery is done. Doing it anywhere other than the MTAs seriously lowers that value ๐ญ.
Lots of operational choices are possible inside an ADMD ๐, including where authentication and/or reputation assessment happens ๐ . The current spec doesn't dictate any of those choices ๐ โโ๏ธ. What it does do is make it easier when info from one stage of analysis has to ride along with the message to the next stage ๐.
Appendix D. Changes since RFC 7001 ๐
- Applied RFC 7410 ๐.
- Updated all references to RFC 4408 with RFC 7208 ๐.
- Added a section explaining "property" values. (Addressed Erratum #4201.) ๐งพ
- Did some minor text reorganization ๐๏ธ.
- Gave registry history, enough that this is now the authoritative registry definition ๐.
- Added text explaining each of the method-ptype-property tuples registered by this document ๐งฉ.
- Changed the meaning of the "Defined" column of the methods registry so it's the place where each entry was created and described. It's expected this will then refer to the method's defining document. Provided IANA with corresponding update instructions ๐๏ธ.
- Cleaned up the registry structure and content, and replaced all references to RFC 7001 with pointers to this document ๐งน.
- Added references: [DMARC], [PRA], [RFC6008], [RFC6577], [RRVS], [SMIME-REG] ๐.
- Added a description of values that can be extracted from SMTP AUTH sessions, plus an example ๐.
- Provided much more complete descriptions of reporting DomainKeys results ๐.
- Added more detail about Sender ID ๐ชช.
- Marked all ADSP and DomainKeys entries as deprecated, since their defining documents are as well ๐ฅ.
- Reworked some text around ignoring unknown ptypes ๐.
- Completely described the ptypes registry ๐.
- Mentioned that EHLO is mapped to HELO for SPF ๐บ๏ธ.
- RFC 7208 uses all-lowercase result strings now, so the prose got adjusted to match ๐ก.
- Updated the list of supported methods, and mentioned the registries immediately below ๐.
- Mentioned that when a local-part is removed, the "@" goes with it โ๏ธ.
- Referred to RFC 7328 in the "iprev" definition ๐.
- Corrected the "smime-part" prose ๐ ๏ธ.
- Updated examples that use SMTP AUTH to claim "with ESMTPA" in the Received fields ๐จ.
- Made minor editorial adjustments ๐ .
Acknowledgments ๐ซถ
The author would like to thank these lovely people for reviewing this document and giving constructive criticism: Stephane Bortzmeyer, Scott Kitterman, John Levine, Tom Petch, and Pete Resnick. Y'all are the real MVPs ๐๐ธ.
Author's Address ๐
Murray S. Kucherawy 270 Upland Drive San Francisco, CA 94127 United States
Email: superuser@gmail.com ๐ง
๐ฆ where this page comes from
- ietf: rfc7601 2015-08
- ๐ girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms