RFC 8601
Message Header Field for Indicating Message Authentication Status
RFC 8601: Message Header Field for Indicating Message Authentication Status โจ
Okay bestie, this one is from May 2019 and it's a Standards Track doc from the IETF (ISSN 2070-1721) ๐. M. Kucherawy wrote it, and it obsoletes RFC 7601, so 7601 is retired and this is the new source of truth ๐. The header lists no updates. Let's go! ๐ง
Abstract
okay so this doc specifies a header field called "Authentication-Results" for email messages ๐ง. Its whole job is to show the results of message authentication checks. Any receiver-side software, like mail filters or Mail User Agents (MUAs), can read it and either show the info to users in a clean, meaningful way or use it to make sorting and filtering calls ๐ .
This document obsoletes RFC 7601. ๐ซถ
Status of This Memo
this is an Internet Standards Track document ๐ฅ.
It's a product of the Internet Engineering Task Force (IETF), it represents the consensus of the IETF community, and it got public review and was approved for publication by the Internet Engineering Steering Group (IESG) โจ. If you want more on Internet Standards, check Section 2 of RFC 7841 ๐.
For the current status, any errata, and how to send feedback, go to https://www.rfc-editor.org/info/rfc8601 ๐ธ.
Copyright Notice
Copyright (c) 2019 IETF Trust and the persons identified as the document authors. All rights reserved. ๐
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, because they describe your rights and restrictions with respect to this document ๐. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions, and they are provided without warranty as described in the Simplified BSD License ๐.
Table of Contents
1. Introduction ....................................................4
1.1. Purpose ....................................................5
1.2. Trust Boundary .............................................6
1.3. Processing Scope ...........................................7
1.4. Requirements ...............................................7
1.5. Definitions ................................................7
1.5.1. Key Words ...........................................7
1.5.2. Internationalized Email .............................7
1.5.3. Security ............................................8
1.5.4. Email Architecture ..................................8
1.5.5. Other Terms .........................................9
1.6. Trust Environment .........................................10
2. Definition and Format of the Header Field ......................10
2.1. General Description .......................................10
2.2. Formal Definition .........................................11
2.3. Property Types (ptypes) and Properties ....................13
2.4. The "policy" ptype ........................................15
2.5. Authentication Service Identifier Field ...................15
2.6. Version Tokens ............................................17
2.7. Defined Methods and Result Values .........................17
2.7.1. DKIM ...............................................17
2.7.2. SPF ................................................19
2.7.3. "iprev" ............................................20
2.7.4. SMTP AUTH ..........................................21
2.7.5. Other Registered Codes .............................22
2.7.6. Extension Methods ..................................22
2.7.7. Extension Result Codes .............................23
3. The "iprev" Authentication Method ..............................23
4. Adding the Header Field to a Message ...........................25
4.1. Header Field Position and Interpretation ..................26
4.2. Local Policy Enforcement ..................................27
5. Removing Existing Header Fields ................................28
6. IANA Considerations ............................................29
6.1. The Authentication-Results Header Field ...................29
6.2. "Email Authentication Methods" Registry Description .......30
6.3. "Email Authentication Methods" Registry Update ............31
6.3.1. "header.a" for DKIM ................................32
6.3.2. "header.s" for DKIM ................................32
6.4. "Email Authentication Property Types" Registry
Description ...............................................32
6.5. "Email Authentication Property Types" Registry Update .....33
6.6. "Email Authentication Result Names" Registry Description ..33
6.7. "Email Authentication Result Names" Registry Update .......34
6.8. SMTP Enhanced Status Codes ................................34
7. Security Considerations ........................................35
7.1. Forged Header Fields ......................................35
7.2. Misleading Results ........................................36
7.3. Header Field Position .....................................37
7.4. Reverse IP Query Denial-of-Service Attacks ................37
7.5. Mitigation of Backscatter .................................37
7.6. Internal MTA Lists ........................................37
7.7. Attacks against Authentication Methods ....................38
7.8. Intentionally Malformed Header Fields .....................38
7.9. Compromised Internal Hosts ................................38
7.10. Encapsulated Instances ...................................38
7.11. Reverse Mapping ..........................................39
8. References .....................................................39
8.1. Normative References ......................................39
8.2. Informative References ....................................40
Appendix A. Legacy MUAs ...........................................44
Appendix B. Authentication-Results Examples .......................44
B.1. Trivial Case: Header Field Not Present .....................44
B.2. Nearly Trivial Case: Service Provided, but No
Authentication Done ........................................45
B.3. Service Provided, Authentication Done ......................46
B.4. Service Provided, Several Authentications Done, Single
MTA ........................................................47
B.5. Service Provided, Several Authentications Done, Different
MTAs .......................................................48
B.6. Service Provided, Multi-tiered Authentication Done .........50
B.7. Comment-Heavy Example ......................................51
Appendix C. Operational Considerations about Message
Authentication ........................................52
Appendix D. Changes since RFC 7601 ................................53
Acknowledgments ...................................................54
Author's Address ..................................................54
1. Introduction ๐
okay so this doc describes a header field called "Authentication-Results" for email messages ๐. It presents the results of a message authentication effort in a machine-readable format. The whole point is to have one place to collect that data whenever authentication mechanisms are in use, so a Mail User Agent (MUA) and downstream filters can make filtering decisions and/or recommend to the user how valid the message's origin looks, and maybe how safe and intact its content is ๐ฆ.
End users are not really supposed to read this header directly ๐. It's for programs, which then use the data or turn it into something humans can actually read โจ.
This document specifies the format of the header field and talks about what it means when it's there or missing ๐ . It does NOT get into how the data should be used, like which filtering decisions are right or how an MUA should display results. Those are local policy and user interface questions, so they don't belong in this doc ๐.
At the time of publication, these are the published email authentication methods:
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]
The following Historic specifications used to be supported by this framework, but they're obsolete now ๐ฅ:
Author Domain Signing Practices [ADSP] (Historic)DomainKeys [DOMAINKEYS] (Historic)
Heads up: at publication time, the Sender ID specification [SENDERID] (Experimental) is no longer supported by this framework ๐ญ. People are talking about moving it to Historic status.
There are registries for the tokens used in this header field, and they point back to the specs listed above ๐. Section 6 explains the registries, what's in them, and how entries get added or updated. It also updates the existing contents so they match where these specs stand today ๐.
The goal here is to give current and future authentication schemes one shared framework for delivering their results to downstream agents, so nobody has to invent a brand new header field for each one ๐.
Sure, SPF defined a header field called "Received-SPF" and the historic DomainKeys defined one called "DomainKey-Status" for this purpose. But those only carry their own results, so they can't meet the requirements listed below ๐ . Also, lots of SPF implementations already adopted the header field specified here, at least as an option, and DomainKeys has been obsoleted by DKIM ๐ซถ.
1.1. Purpose ๐ฆ
The header field defined here is expected to serve a few purposes:
- Convey the results of various message authentication checks. Upstream filters and Mail Transfer Agents (MTAs) apply these checks, then pass the results to MUAs and downstream filters inside the same "trust domain". Those agents might want to show results to end users, or use the data to apply more or less strict content checks based on authentication results โจ.
- Provide a common location within a message for such data ๐.
- Create an extensible framework for reporting new authentication methods as they show up ๐ธ.
Here's the big caveat ๐จ: the mere presence of this header field does NOT mean its contents are valid. It's really just reporting assertions made by one or more authentication schemes applied somewhere upstream. For an MUA or downstream filter to treat those assertions as actually valid, there must be an assessment of the trust relationship among those agents, the validating MTA, the paths between them, and the mechanism used to convey the information ๐ฅ.
1.2. Trust Boundary ๐ฆ
Okay so this doc keeps mentioning the "trust boundary" of an Administrative Management Domain (ADMD), and bestie, the mail world is sooo diverse that there's no single precise definition that fits everything ๐ . So we're not gonna pretend there is โจ.
Simply put, a transfer from the producer of the header field to the consumer has to happen inside a setup that lets the consumer treat the producer's assertions as reliable and accurate (trustworthy) ๐ฅ. How that trust gets built 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 ๐ธ. Internal services (inside the boundary) are provided by the ADMD's infrastructure for its users. External ones are outside the ADMD's authority. By this definition, hosts inside a trust boundary are subject to the ADMD's authority and policies, no matter where they're physically placed or how they're physically operated ๐ซถ. For example, a host inside a trust boundary might actually be run by a remote service provider while physically sitting in that provider's data center. Iykyk, the location doesn't decide, the authority does ๐.
A message can get evaluated inside a trust boundary and then leave and re-enter it ๐ญ. An example is a forwarded message like 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 can't be trusted in that case ๐. So if it's found within one of those media types, this field is typically ignored ๐.
Note that an MUA could be configured to retrieve messages from a receiver yet not be within the receiver's ADMD. In this case, for the purposes of this work, that MUA is considered to be within the receiver's ADMD if it's configured to identify and ascribe value to authentication results recorded by that ADMD ๐.
1.3. Processing Scope ๐ง
The content of this header field is meant to tell message consumers that authentication work on the message was already done within its trust boundary, and that those results are being presented ๐. It is not intended to hand consumers message parameters so they can run authentication protocols on their own.
1.4. Requirements ๐
This document establishes no new requirements on existing protocols, insofar as a non-participating service will keep interoperating with the deployed messaging infrastructure โจ.
In particular, this document establishes no requirement on MTAs to reject or filter arriving messages that don't pass authentication checks ๐ . The data conveyed by the specified header field's contents is for the information of MUAs and filters, and it's to be used at their discretion ๐ .
A participating ADMD does take on some filtering and message modification obligations, as described in Section 5 ๐.
1.5. Definitions ๐
This section defines various terms used throughout this document ๐.
1.5.1. Key Words ๐
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here ๐ซถ.
1.5.2. Internationalized Email ๐
In this document, there are references to messages formatted to support Email Address Internationalization (EAI). Reference material for this can be found in [RFC6530], [RFC6531], and [RFC6532]. Generally speaking, these documents allow UTF-8 in most places where free-form text can show up, and U-labels where domain names can be used, and this document extends Authentication-Results accordingly ๐ฆ.
1.5.3. Security ๐
"Guidelines for Writing RFC Text on Security Considerations" [SECURITY] discusses authentication and authorization and the conflation of the two concepts. The use of those terms within the context of recent message security work has given rise to slightly different definitions, and this document reflects those current usages, as follows:
- "Authorization" is the establishment of permission to use a resource or represent an identity. In this context, authorization indicates 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 (such as the sender's identity) or the message in its entirety.
As examples, SPF is an authorization mechanism ๐ง, in that it expresses a result that shows whether the ADMD that apparently sent the message has explicitly authorized the connecting Simple Mail Transfer Protocol (SMTP) client [SMTP] to relay messages on its behalf, but it does not actually validate any other property of the message itself. By contrast, DKIM is agnostic as to the routing of a message but uses cryptographic signatures to authenticate agents, assign (some) responsibility for the message (which implies authorization), and ensure that the listed portions of the message were not modified in transit. Since the signatures are not tied to SMTP connections, they can be added by the ADMD of origin, intermediate ADMDs (such as a mailing list server), other handling agents, or any combination of these ๐.
Rather than create a separate header field for each class of solution, this specification groups them both into a single header field ๐.
1.5.4. 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.
- A Message Submission Agent (MSA) is an agent that accepts a message from an MUA, introducing it to the mail-handling stream.
The following diagram illustrates the flow of mail among these defined components ๐บ๏ธ. See "Internet Mail Architecture" [EMAIL-ARCH] for further discussion on general email system architecture, which includes detailed descriptions of these components, and Appendix C of this document for discussion 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 is assumed that the work of applying message authentication schemes takes place at a border MTA or a delivery MTA, and this specification is written with that assumption in mind ๐ฐ. However, there are some sites at which the entire mail infrastructure consists of a single host. In such cases, terms such as "border MTA" and "delivery MTA" might well apply to the same machine or even the very same agent. It is also possible that some message authentication tests could take place on an intermediate MTA. Although this document doesn't specifically describe such cases, they are not meant to be excluded ๐ธ.
1.5.5. Other Terms ๐
In this document, the term "producer" refers to any component that adds this header field to messages it is handling, and "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 permits one or more message validation mechanisms to communicate output to one or more separate assessment mechanisms โจ. These mechanisms operate within a unified trust boundary that defines an 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. The field often contains no integrity or validation mechanism of its own, so its presence must be trusted implicitly. Hence, valid use of the header field requires removing any occurrences of it that claim to be associated with the ADMD when the message enters the ADMD. This ensures that later occurrences have been added within the trust boundary of the ADMD ๐ฅ.
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 ๐ซถ. Although the labeling scheme is left as an operational choice, some guidance for selecting 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 formal specification ๐ซ.
2.1. General Description โจ
The header field specified here is called Authentication-Results. It is a structured header field as defined in "Internet Message Format" [MAIL], and thus all of the related definitions in that document apply ๐.
This header field is added at the top of the message as it transits MTAs that do authentication checks, so some idea of how far away the checks were done can be inferred. It is therefore considered to be a trace field as defined in [MAIL], and thus all of the related definitions in that document apply ๐ฆ.
The value of the header field (after removing comments) consists of an authentication service identifier, an optional version, and then a series of statements and supporting data ๐. The statements are of the form method=result and indicate which authentication method or methods were applied and their respective results. For each such statement, the supporting data can include a reason string and one or more property=value statements indicating 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 be represented in a single header field, or a combination of these can be applied ๐ธ.
2.2. Formal Definition ๐ โจ
Okay so bestie, the header field is formally written out using Augmented Backus-Naur Form [ABNF] ๐. Examples of valid header fields, with explanations of what they mean, live in Appendix B ๐ฆ. Let's go!
authres-header-field = "Authentication-Results:" authres-payload
authres-payload = [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 1*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"; it 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 [SMTP], 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 [SMTP] 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
Now the fun bits ๐ง "local-part" is defined in Section 3.4.1 of [MAIL], as modified by [RFC6531]. "CFWS" is defined in Section 3.2.2 of [MAIL]. ๐ธ
"Keyword" is defined in Section 4.1.2 of [SMTP]. It also has to be registered with IANA in whatever registry matches the context where it's used, so see Sections 2.3, 2.7, and 6 ๐ "value" is as defined in Section 5.1 of [MIME], with "quoted-string" updated as specified in [RFC6532] ๐ "domain-name" is as defined in Section 3.5 of [DKIM] โจ See Section 2.5 for the authserv-id element, it's giving main character ๐
If the value part of a "pvalue" construction is meant to be an email identity, then it MUST use the right-hand portion of that ABNF definition ๐ซถ The list of commands that can be used with the "smtp" ptype is in Section 4.1 of [SMTP] ๐ฆ
The "propspec" can be left out if, say, the method couldn't pull out any properties to evaluate but still has a result to report ๐ It can also be left out if the agent making this result doesn't want to reveal those properties to downstream agents ๐
When an SMTP command name is being reported as a "property", the agent making the header field turns it into lowercase and drops any spaces. So "MAIL FROM" becomes "mailfrom", "RCPT TO" becomes "rcptto", and so on ๐
A "ptype" value of "policy" means a policy decision was made about the message, and it's not tied to any specific property that could be pulled out of the message. See Section 2.4 for details ๐
Examples of complete messages using this header field are in Appendix B ๐
2.3. Property Types (ptypes) and Properties ๐ฆ
The "ptype" in the ABNF above tells you the general kind of property that the result is about, and that's what the reported result was based on ๐ Paired with the "property", which is more specific, it tells you where the reported "pvalue" came from ๐ธ That could be a certain part of the message header or body, some part of the SMTP session, a secondary output from an authentication method (other than its plain result), or some other part of how the message was handled โจ
Combinations of ptypes and properties are registered and described in the "Email Authentication Methods" registry, paired with the authentication methods they're used with. Section 6 goes into more detail on this ๐
Legal values of "ptype" are defined in the IANA "Email Authentication Property Types" registry, which was created by [RFC7410] ๐ง The initial values, and what they usually mean, are below, based on [RFC7001] ๐
body: Information that was pulled out of the body of the message. This could 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" says where in the message body the content was found, and it can point to an offset, identify a MIME part, and so on. (At the time of this revision, no properties matching this ptype have been registered. So this ptype may be deprecated in the future ๐ฅบ)
header: Information that was pulled out of the header of the message. This could be the value of a header field or some portion of one. The "property" gives a more precise idea of where in the header the extraction happened ๐
policy: A local policy mechanism was applied that adds to or overrides the result the authentication mechanism returned. (See Section 2.4.) ๐
smtp: Information that was pulled out of an SMTP command that was used to relay the message. The "property" says 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 that makes sense. Those deviations need to be clear in the registry and/or in the document that defines them. See Section 2.7.1 for an example ๐
2.4. The "policy" ptype ๐
There's a special ptype value called "policy" ๐ It exists to show that some local policy mechanism was applied that adds to, or even replaces (i.e., overrides), the result the authentication mechanism returned. In this case, the property and value identify the local policy that was applied and the result it gave back โจ
Here's an example. A DKIM signature doesn't have to include the Subject header field in the set of fields it signs. An ADMD that receives such a message might decide that the signature isn't acceptable, even though it passes, because the Subject header field could be changed after signing without breaking the signature ๐ญ That ADMD could swap the DKIM "pass" result for a "policy" result, and then also include the following in the matching Authentication-Results field:
... dkim=policy policy.dkim-rules=unsigned-subject ...
Here, the property is "dkim-rules", which means some local check with that name happened and returned a result of "unsigned-subject". These are arbitrary names picked by (and probably only used inside) the ADMD using them, so they're not normally registered with IANA or specified anywhere else. The only thing specified is syntax restrictions that keep the rest of the header field easy to parse ๐ง
This ptype was in the original specification for this header field [RFC5451], but it didn't come with a complete description or example of how it was meant to be used. So it hasn't really been used in a practical way that matches its purpose. These added details are here to help implementers use it properly ๐ซถ
2.5. Authentication Service Identifier Field ๐
Every Authentication-Results header field has an authentication service identifier field, aka the authserv-id we saw above ๐
. It's any string that identifies the authentication service inside the ADMD that ran the checks on the message. It's meant for machines, not necessarily for humans to read ๐คโจ.
Note that in an EAI-formatted message, this identifier may be expressed in UTF-8 ๐ธ.
Here's the lowkey important part ๐ฅ: agents reading this field use the identifier to decide whether its contents are worth caring about (and safe to use). So 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 decide whether 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. The usual move is to use the DNS domain name used by or within that ADMD (the "organizational domain"), but that's not strictly necessary ๐ง.
For tracing and debugging, the identifier can instead be the specific hostname of the MTA doing the check whose result is being reported. Some implementations also define a substructure inside the identifier, but those structures are outside the scope of this specification ๐.
Note, though, that a local, relative identifier like a flat hostname makes configuration harder for big sites, compared with a hierarchical, globally unique ADMD identifier like a DNS domain name ๐ญ. The hierarchical one lets you group related, trusted systems under a single parent identifier, which means you only have to assess the trust relationship with one reference ๐ฆ. The alternative is a flat namespace where every trusted system has to be listed individually. Since consumers use the identifier to decide whether to use the header field's contents:
- Changes to the identifier impose a large, centralized administrative burden ๐.
- Ongoing administrative changes mean constantly updating that centralized table. That makes it hard to ensure an MUA or downstream filter has accurate information for judging whether the header field's content is usable. In particular, consumers need to know not only the current identifier(s) in use but the previous ones too, to account for delivery latency or later reassessment of the header field's content ๐ซถ.
Examples of valid authentication service identifiers are example.com, mail.example.org, ms1.newyork.example.com, and example-auth ๐.
2.6. Version Tokens โจ
The grammar above provides for optional versions on both the header field itself (attached to the authserv-id token) and on each of the methods being reported. The method version refers to the method itself, which is specified in the documents describing those methods. The authserv-id version refers to this document and thus the syntax of this header field ๐.
The whole point is to avoid misinterpreting the results ๐ฏ. If a parser finds a version after an authserv-id that it doesn't explicitly know, it can immediately stop trying to parse, since what follows might not be in an expected format ๐. For a method version, the parser SHOULD ignore a method result if the version isn't supported, in case the semantics of the result mean something different from what's expected. For example, if a hypothetical DKIM version 2 yielded a "pass" result for different reasons than version 1 does, a consumer might not want to use those altered semantics. Allowing versions in the syntax is how you signal this and let the consumer of the header field decide ๐ .
2.7. Defined Methods and Result Values ๐
Each individual authentication method returns one of a set of specific result values. The subsections below provide references to the documents defining the authentication methods specifically supported by this document, along with their corresponding result values. Verifiers SHOULD use these values as described below. New methods not specified in this document, but intended 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 ๐ฆ
DKIM is represented by the "dkim" method and is defined in [DKIM].
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, thus making third-party signatures unacceptable even if they verify ๐ โโ๏ธ.
The DKIM result set is as follows:
none: The message was not signed.pass: The message was signed, the signature or signatures were acceptable to the ADMD, and the signature(s) 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 was not acceptable to the ADMD.neutral: The message was signed, but the signature or signatures contained syntax errors or were not otherwise able to be processed. This result is also used for other failures not covered elsewhere in this list.temperror: The message could not be verified due to some error that is likely transient in nature, such as a temporary inability to retrieve a public key. A later attempt may produce a final result.permerror: The message could not be verified due to some error that is unrecoverable, such as 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, however, 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 distinct header field called "d" ๐ค.
Note that in an EAI-formatted message, the values of the "d" and "i" properties can be expressed in UTF-8 ๐ธ.
In addition to previous registrations, this document registers the DKIM tags "a" (cryptographic algorithm used to sign the message) and "s" (selector) as reportable properties. These can be used to aid receivers during post-verification processing. In particular, [RFC8301] obsoleted use of the "rsa-sha1" algorithm in DKIM, so it is important to be able to distinguish such signatures from those using preferred algorithms ๐.
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 is to be treated as an unsigned message. A report of "fail" here permits the receiver of the report to decide how to handle the failure. A report of "neutral" or "none" preempts that choice, ensuring that the message will be treated as if it had not been signed ๐.
2.7.2. SPF ๐ฎ
SPF uses the "spf" method name. The result values for SPF are defined in Section 2.6 of [SPF], and those definitions are included here by reference:
+-----------+------------------------------+
| Code | Meaning |
+-----------+------------------------------+
| none | [SPF], Section 2.6.1 |
+-----------+------------------------------+
| pass | [SPF], Section 2.6.3 |
+-----------+------------------------------+
| fail | [SPF], Section 2.6.4 |
+-----------+------------------------------+
| softfail | [SPF], Section 2.6.5 |
+-----------+------------------------------+
| policy | RFC 8601, Section 2.4 |
+-----------+------------------------------+
| neutral | [SPF], Section 2.6.2 |
+-----------+------------------------------+
| temperror | [SPF], Section 2.6.6 |
+-----------+------------------------------+
| permerror | [SPF], Section 2.6.7 |
+-----------+------------------------------+
These result codes are used in the context of this specification to reflect the result returned by the component conducting SPF evaluation ๐ง.
For SPF, the ptype used is "smtp", and the property is either "mailfrom" or "helo", since those values are the ones SPF can evaluate. (If the SMTP client issued the EHLO command instead of HELO, the property used is "helo".)
Note that in an EAI-formatted message, the local-part of the "mailfrom" can be expressed in UTF-8 and the domain part can be expressed as a U-label ๐.
For this method, an additional result of "policy" is defined. It 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 dictates that 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 do not 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 this mechanism SHOULD NOT include the local-part or the following "@" character ๐.
2.7.3. "iprev" ๐ธ
The result values used by the "iprev" method, defined in Section 3, are as follows:
pass: The DNS evaluation succeeded, i.e., the "reverse" and "forward" lookup results were returned and were in agreement.fail: The DNS evaluation failed. In particular, the "reverse" and "forward" lookups each produced results, but they were not in agreement, or the "forward" query completed but produced no result, e.g., a DNS RCODE of 3, commonly known asNXDOMAIN, or an RCODE of 0 (NOERROR) in a reply containing no answers, was returned.temperror: The DNS evaluation could not be completed due to some error that is likely transient in nature, such as a temporary DNS error, e.g., a DNS RCODE of 2, commonly known asSERVFAIL, or other error condition resulted. A later attempt may produce a final result.permerror: The DNS evaluation could not be completed because no PTR data are published for the connecting IP address, e.g., a DNS RCODE of 3, commonly known asNXDOMAIN, or an RCODE of 0 (NOERROR) in a reply containing no answers, was returned. This prevented completion of the evaluation. A later attempt is unlikely to produce a final result.
There is 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" (as this is not 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 represented by the "auth" method ๐ 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 it didn't work (like giving a valid identity with the wrong password ๐).temperror: The SMTP client tried to authenticate using the protocol described in [AUTH] but couldn't finish because of an error that's probably temporary, like a brief directory service lookup error. 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 an error that's probably not temporary, like a permanent directory service lookup error. 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 initiated by the AUTH command; or"mailfrom", in which case the value is the mailbox identified by the AUTH parameter used with the MAIL FROM command ๐ฆ
Note that in an EAI-formatted message, the local-part can be expressed in UTF-8 and the domain can be expressed as a U-label ๐
If both identities are available, both can be reported โจ For example, picture this command issued by a client that finished session authentication with the AUTH command, resulting in an authorized identity of "client@c.example":
MAIL FROM:<alice@a.example> AUTH=<bob@b.example>
This could result in a resinfo construction like so:
; auth=pass smtp.auth=client@c.example smtp.mailfrom=bob@b.example
Note that in all cases other than "pass", the message was sent by an unauthenticated client. So all non-"pass" cases SHOULD thus be treated as equivalent with respect to this method ๐ that's the vibe.
2.7.5. Other Registered Codes ๐
Result codes were also registered in other RFCs, as follows:
- 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").
Note that in an EAI-formatted message, "vbr.mv" and "vbr.md", which are already registered, can be expressed as U-labels ๐ง
2.7.6. Extension Methods ๐
Additional authentication method identifiers (extension methods) may be defined in the future by later revisions or extensions to this specification. These method identifiers are registered with IANA and, preferably, published in an RFC. See Section 6 for further details ๐
Extension methods can be defined for the following reasons:
- To allow additional information from new authentication systems to be communicated to MUAs or downstream filters. The names of such 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 indicate different levels of authentication and differentiate between their relative strengths, e.g.,
"auth1-weak"and"auth1-strong"๐
Authentication method implementers are encouraged to provide adequate information, via message header field comments if necessary, so an MUA developer can understand or relay the ancillary details of authentication results ๐ซถ For example, if it might be interesting to relay what data were used to perform an evaluation, that information 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 method identifiers and the parameters associated with them are not documented formally. Therefore, they are subject to change at any time and are not suitable for production use. Any MTA, MUA, or downstream filter intended for production use SHOULD ignore or delete any Authentication-Results header field that includes an experimental (unknown) method identifier ๐ซ
2.7.7. Extension Result Codes ๐ฅ
Additional result codes (extension results) might be defined in the future by later revisions or extensions to this specification. Non-experimental result codes MUST be registered with 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 the parameters associated with them are not formally documented. Therefore, they are subject to change at any time and are not suitable for production use. Any MTA, MUA, or downstream filter intended 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 additional authentication method called "iprev" ๐
"iprev" is an attempt to verify that a client appears to be valid based on some DNS queries, which is to say that the IP address is explicitly associated with a domain name ๐ธ Upon receiving a session initiation of some kind from a client, the IP address of the client peer gets queried for matching names (i.e., a number-to-name translation, also known as a "reverse lookup" or a "PTR" record query). Once that result comes back, a lookup of each of the names thus retrieved is done (i.e., a name-to-number translation, or an "A" or "AAAA" record query). The response to this second check will typically result in at least one mapping back to the client's IP address ๐ง
Expressed as an algorithm: If the client peer's IP address is I, the list of names to which I maps (after a "PTR" query) is the set N, and the union of IP addresses to which each member of N maps (after corresponding "A" and "AAAA" queries) is L, then this test is successful if I is an element of L ๐ค
Often an MTA receiving a connection that fails this test will simply reject the connection using the enhanced status code defined in [AUTH-ESC]. If an operator instead wishes to make this information available to downstream agents as a factor in handling decisions, it records a result in accordance with Section 2.7.3 ๐
The response to a "PTR" query could contain multiple names. To prevent heavy DNS loads, agents performing these queries MUST be implemented such that the number of names evaluated by generating corresponding "A" or "AAAA" queries is limited, so as not to be unduly taxing to the DNS infrastructure, though it MAY be configurable by an administrator. As an example, Section 4.6.4 of [SPF] chose a limit of 10 for its implementation of this algorithm ๐ข
"DNS Extensions to Support IP Version 6" [DNS-IP6] discusses the query formats for the IPv6 case ๐
There is some contention regarding the wisdom and reliability of this test ๐ For example, in some regions it can be difficult for this test ever to pass, because the practice of arranging to match the forward and reverse DNS is infrequently observed. Therefore, the precise implementation details of how a verifier performs an "iprev" test are not specified here. The verifier MAY report a successful or failed "iprev" test at its discretion, having done some kind of check of the validity of the connection's identity using DNS. It is incumbent upon an agent making use of the reported "iprev" result to understand what exactly that particular verifier is attempting to report ๐ซ
Extensive discussion of reverse DNS mapping and its implications can be found 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 is not an endorsement, but is merely acknowledgment that the method remains common and provides the means to relay the results of that test ๐
4. Adding the Header Field to a Message โจ
Okay bestie, so this spec is NOT trying to rank how strong each message authentication method is ๐ The methods listed are an order-independent set, which means their order doesn't tell you which one matters more. Instead, the MUA or downstream filter reading this header field is supposed to interpret each result using its own knowledge of what that method actually checks ๐ง
Every "method" MUST refer to an authentication method declared in the IANA registry (or an extension method, see Section 2.7.6), and every "result" MUST refer to a result code declared in the IANA registry (or an extension result code, see Section 2.7.7) ๐ Check out Section 6 for more on the registered methods and result codes ๐ฆ
An MTA that's compliant with this specification adds this header field (after running one or more message authentication tests) to spill which MTA or ADMD ran the test, which test it was, and what the result was ๐ If an MTA runs more than one test, 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 with only the authentication service identifier and the "none" token (see Section 2.2) ๐ธ This is a clear way to say that no message authentication schemes were applied before the message got delivered.
An MTA adding this header field needs to prove it's legit ๐ชช to the MUAs or downstream filters that will end up reading it. One way to do that is in Section 5. Some environments may need extra measures, and Section 7.1 lists some possible solutions. This document doesn't force any single solution, since every environment has its own tools and limits ๐ซถ
Most known message authentication methods focus on one particular identifier. SPF is the plot twist ๐ญ It can give a result based on more than one identifier: specifically, it can evaluate the RFC5321.HELO parameter or the RFC5321.MailFrom parameter. When it reports those results in this field, only the parameter that produced 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 ๐ On top of that, this header field SHOULD be inserted above any other trace header fields such MTAs might prepend. That placement makes it easy to spot the header fields you can trust ๐
End users who use this header field directly might accidentally trust info that hasn't been properly vetted ๐ญ For example, if a basic SPF result got relayed with a claimed 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. Also, MUAs SHOULD NOT render to users any such info if it's presented by a method that's known not to authenticate it ๐
4.1. Header Field Position and Interpretation ๐
To get non-ambiguous results and avoid the damage from fake header fields, MUAs and downstream filters SHOULD NOT interpret this header field unless the user or administrator specifically configures them to. In other words, this should NOT be "on by default" ๐ โโ๏ธ So users or administrators ought not turn this on unless (1) they're certain the header field will be validly added by an agent inside the ADMD that accepts the mail the MUA eventually reads, and (2) any copies of the header field that look like they came from inside the ADMD but were really added by foreign MTAs get removed before delivery.
Furthermore, MUAs and downstream filters SHOULD NOT interpret this header field unless the authentication service identifier of the header field is used within the ADMD as configured by the user or administrator ๐ง
MUAs and downstream filters MUST ignore any result reported with 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. Also, those agents MUST ignore a result for any "method" they don't specifically support. The exception is experimental methods, as discussed in Section 2.7.6 ๐งช
An MUA SHOULD NOT reveal these results to end users for trust-related stuff unless it has careful "human factors" design and testing behind it ๐ 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 obvious the DNS domain name was meant to trick people. See Section 7.2 for more on this ๐ต๏ธโโ๏ธ
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]. That means it MUST NOT be reordered and MUST be prepended to the message, so there's generally some sign upon delivery of where in the chain of handling MTAs the message authentication happened ๐บ๏ธ
Note that a few message handlers can only append new header fields to a message. Strictly speaking, those 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 happened might get lost. Consumers SHOULD be designed so they can tolerate this, especially with a producer known to have this limitation ๐ซ
MUAs SHOULD ignore instances of this header field found inside message/rfc822 MIME attachments. Those are likely to hold authentication results from way back in the past, possibly long ago, so they have no contemporary value ๐ฐ๏ธ Due caution is therefore needed when you choose to consume them.
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 similar) as a reason to reject the message. In those cases, the border MTA SHOULD issue an SMTP rejection response to the message, instead of adding this header field and letting the message keep heading toward delivery. This is better than letting the message reach an internal host's MTA or spam filter, where it could generate a local rejection such as a Delivery Status Notification (DSN) [DSN] going back to a forged originator. These generated rejections are colloquially known as "backscatter" ๐ช๏ธ
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 aren't possible if local policy is enforced at the MUA and not the MTA ๐
5. Removing Existing Header Fields ๐งน
To cut down on the damage from forged header fields, 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 inside its trust boundary, but that 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 with an authentication service identifier showing it was added within example.com before the MTA added its own header fields. This could mean each internal MTA needs a list of other known, trusted MTAs that are expected to use that same identifier ๐
For EAI-formatted messages, this test happens after converting A-labels into U-labels ๐
For simplicity and maximum security, a border MTA could remove all instances of this header field on mail crossing into its trust boundary ๐ But that might clash with wanting to access authentication results from trusted external service providers. It could 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 info gets admitted, and remove the header field from everyone else ๐
As stated in Section 1.2, a formal definition of "trust boundary" is deliberately NOT made here. It's totally possible that a border MTA for example.com will explicitly trust authentication results asserted by upstream host example.net, even though they live in completely separate administrative boundaries. In that case, the border MTA MAY elect not to delete those results. Also, the upstream host doing the authentication work could apply a signing technology such as [DKIM] to its own results, to assure downstream hosts they're authentic ๐ An example of this is provided in Appendix B.
Similarly, for 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 being removed. This can actually 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 leave these header fields out of signing to avoid this situation.
An MTA SHOULD remove any instance of this header field bearing a version (express or implied) that it doesn't support. However, an MTA MUST remove such a header field if the SMTP connection [SMTP] relaying the message isn't from a trusted internal MTA. (As discussed above, this too can result in invalidated signatures ๐ญ) This means the MTA needs 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 registries as described below. These registry actions were originally defined by [RFC5451] and updated by [RFC6577] and [RFC7001]. The created registries were further updated in [RFC7601] to make them more complete โจ
Each registry has two related sections below. The first describes the registry and its update procedures, which are unchanged from [RFC7601]. The second lists changes to entries that are relevant to this document ๐ฆ
6.1. The Authentication-Results Header Field ๐
The Authentication-Results header field was added to the IANA "Permanent Message Header Field Names" registry, following the procedure found in [IANA-HEADERS]. That entry has been updated to reference this document. Here's the registration template:
Header field name: Authentication-Results
Applicable protocol: mail [MAIL]
Status: standard
Author/Change controller: IETF
Specification document(s): RFC 8601
Related information: none
6.2. "Email Authentication Methods" Registry Description
okay bestie, so the names of the message authentication methods this spec supports have been registered with IANA ๐, except for experimental names (see Section 2.7.6 ๐ ). Each method also comes with the properties that go along with its result โจ.
The "Email Authentication Parameters" group, and inside it the "Email Authentication Methods" registry, were created by [RFC5451] for exactly this ๐ง. [RFC6577] added a "Status" field to each entry, and [RFC7001] changed the rules for that registry AND added a "Version" field ๐.
The reference for that registry has been updated to point at this doc ๐ฆ.
New entries only get assigned for values that got 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. no duplicates, bestie ๐ โโ๏ธ
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 one of the following: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
The following entries in this registry have been updated to replace [RFC7601] with this document ๐:
+------------+--------+----------------------------------+
| Method | ptype | Property |
+------------+--------+----------------------------------+
| auth | smtp | auth |
+------------+--------+----------------------------------+
| auth | smtp | mailfrom |
+------------+--------+----------------------------------+
| dkim | header | d |
+------------+--------+----------------------------------+
| dkim | header | i |
+------------+--------+----------------------------------+
| iprev | policy | iprev |
+------------+--------+----------------------------------+
| spf | smtp | mailfrom |
+------------+--------+----------------------------------+
| spf | smtp | helo |
+------------+--------+----------------------------------+
Notably, the DomainKeys and Sender ID entries are not updated to refer to this revised specification, as they are considered obsolete ๐ชฆ. Accordingly, IANA has changed the Status field of the "sender-id" entry in this table to "deprecated" ๐.
Finally, two new entries have been added to this registry, as follows ๐:
6.3.1. "header.a" for DKIM
Method: dkimDefinition: RFC 8601ptype: headerProperty: aValue: value of signature "a" tagStatus: activeVersion: 1
6.3.2. "header.s" for DKIM
Method: dkimDefinition: RFC 8601ptype: headerProperty: sValue: value of signature "s" tagStatus: activeVersion: 1
6.4. "Email Authentication Property Types" Registry Description
[RFC7410] created the "Email Authentication Property Types" registry ๐.
Entries in this registry are subject to the Expert Review rules as described in [IANA-CONSIDERATIONS]. Each entry in the registry requires the following values:
ptype: the name of the ptype being registered, which 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 this "ptype" is meant to cover.
For new entries, the designated expert needs to ensure that the description provided for the new entry adequately describes the intended use. An example would be helpful to include in the entry's defining document (if any), although entries in the "Email Authentication Methods" registry or the "Email Authentication Result Names" registry might also serve as examples of intended use ๐.
As this is a complete restatement of the definition and rules for this registry, IANA has updated this registry to show Section 2.3 of this document as the current definitions for the "body", "header", "policy", and "smtp" entries of that registry ๐ซถ.
6.5. "Email Authentication Property Types" Registry Update
All current entries in this registry have been updated to replace [RFC7601] with this document ๐โจ.
6.6. "Email Authentication Result Names" Registry Description
Names of message authentication result codes supported by this specification must be registered with IANA, with the exception of experimental codes as described in Section 2.7.7 ๐งช.
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 result 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 and code.
An entry in this registry contains the following:
Auth Method: an authentication method for which results are being 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 the meaning of this method-code combination or a reference to such a definition.Status: the status of this entry, which is one of the following:active: The entry is in current use.deprecated: The entry is no longer in current use.
6.7. "Email Authentication Result Names" Registry Update
For the following entries in this registry, the new "Specification" field has been set as follows ๐๏ธ:
- All "auth" method result codes ("fail", "none", "pass", "permerror", and "temperror") are now specified in Section 2.7.4 of this document.
- All "dkim" method result names ("fail", "neutral", "none", "pass", "permerror", "policy", and "temperror") are now specified in Section 2.7.1 of this document.
- All "iprev" method result names ("fail", "pass", "permerror", and "temperror") are now specified in Section 2.7.3 of this document.
- The "spf" method result names "fail", "neutral", "none", "pass", "permerror", "policy", "softfail", and "temperror" are now specified in Section 2.7.2 of this document. The registration for result name "hardfail" is not updated ๐ค.
The following entries in this registry have been updated with a new "Status" field set to "deprecated", and with no change to the "Specification" field as they reference historic protocols ๐๏ธ:
- All "domainkeys" method result names ("fail", "neutral", "none", "pass", "permerror", "policy", and "temperror").
- All "sender-id" method result names ("fail", "neutral", "none", "pass", "permerror", "policy", "softfail", and "temperror").
6.8. SMTP Enhanced Status Codes
The entry for X.7.25 in the "Enumerated Status Codes" subregistry of the "Simple Mail Transfer Protocol (SMTP) Enhanced Status Codes Registry" has been updated to refer only to Section 3.3 of [AUTH-ESC], as that is where that registration was done ๐ฎ๐.
7. Security Considerations โ ๏ธ
The following security considerations apply when adding or processing the Authentication-Results header field:
7.1. Forged Header Fields ๐
okay bestie, an MTA that ISN'T doing the filtering from Section 5 is basically leaving MUAs wide open to false conclusions ๐ญ. A sneaky user or agent could forge a header field, use the DNS domain of a receiving ADMD as the authserv-id token, and then claim in the rest of the value that the message was properly authenticated ๐. The non-conformant MTA wouldn't strip the fake one, so the MUA could trust it when it absolutely shouldn't.
So, to keep things safe, it's best not to have processing of the Authentication-Results header field turned on by default ๐
โโ๏ธ. It should be ignored, at least for enacting filtering decisions, unless a user or administrator specifically turns it on after checking that the border MTA is compliant. It's totally fine for an MUA to know about this spec and still keep an explicit list of hostnames whose Authentication-Results header fields it trusts, but that list should start out empty ๐ซถ.
Some alternative solutions were proposed a while ago. Nobody has built them yet because there wasn't much demand, but they're written down in case they become useful someday ๐:
- 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 From header field be signed, although in this application, 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, but this isn't especially palatable 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 Received header 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, this header field should always appear above a Received header 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 ๐.
Anyway, 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. With the huge variety of messaging environments out there today, the consensus is that picking one particular mechanism for this doesn't belong in this document ๐คทโโ๏ธ.
Forged header field attacks can also be mitigated by moving the authentication results data into metadata attached to the message ๐ง. An SMTP extension [SMTP] could be set up to pass authentication results from the border MTA to intermediate and delivery MTAs. The delivery MTA could then store those results as metadata, which gets retrieved and rendered with the message by an IMAP client [IMAP] that knows about a similar extension in that protocol. The delivery MTA should only trust data coming through this extension from MTAs it trusts, and border MTAs should not accept data through this extension from any source. In a setup like this, there's no way for an outside agent to forge authentication data ๐๐ .
7.2. Misleading Results ๐
Until some form of service for checking the reputation of a sending agent is widely deployed, a "pass" in this header field does NOT make the message trustworthy ๐ฉ. Spam or other undesirable mail can absolutely pass checks from several of the methods listed above. For example, a piece of spam signed with [DKIM] by the spammer who sent it, which might be a spammer or a compromised system ๐. This problem isn't solved by removing forged header fields (discussed above) either ๐ค.
So MUAs and downstream filters have to be careful using this header, even after possibly malicious headers have been scrubbed ๐งผ.
7.3. Header Field Position ๐
Even though [MAIL] has requirements about this, header fields can sometimes get reordered along the way by intermediate MTAs ๐. The goal of only adding this header field at the top of a message is basically an acknowledgment that some MTAs do reorder header fields, while most don't. So, in the general case, there will be some indication of which MTAs (if any) handled the message after this header field was added ๐ซถ.
7.4. Reverse IP Query Denial-of-Service Attacks ๐ช๏ธ
Section 4.6.4 of [SPF] points out that recursive evaluations of SPF records need limits, so nobody can abuse or attack the DNS while verifying arriving client connections ๐. A verifier that wants to do this check and report the info needs to be careful not to go to unbounded lengths resolving "A" and "PTR" queries ๐ง. MUAs or other filters that use an "iprev" result from this document need to understand the algorithm the verifier used to report that result and, especially, its limitations ๐.
7.5. Mitigation of Backscatter ๐
If you don't follow the instructions in Section 4.2, you can end up with a denial-of-service attack caused by generating DSN messages [DSN] (or equivalent) to addresses that never sent the rejected messages ๐ฌ.
7.6. Internal MTA Lists ๐
Section 5 describes how to scrub header fields that might contain forged authentication results about a message ๐งน. A compliant installation has to include, at each MTA, a list of other MTAs that are known to be compliant and trustworthy. If that list doesn't stay current as the internal infrastructure changes, the ADMD could be exposed to attack โ ๏ธ.
7.7. Attacks against Authentication Methods ๐ฅท
If an attack against an authentication method becomes known, then the agent verifying that method can be fooled into thinking an inauthentic message is authentic, and so 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 ๐ฅ
Just like any other header field in the message, an attacker can add an Authentication-Results header field that is extraordinarily large or otherwise malformed, trying to find or exploit weaknesses in header field parsing code ๐พ. Implementers should 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 ๐ฑ. Yes, having compromised internal machines is a much bigger concern than proving the value of this header field, but the risk can be reduced. Internal MTAs can be set up to remove this header field if it claims to have been added by a trusted border MTA (as described above), yet the SMTP connection [SMTP] isn't coming from an internal machine known to be running an authorized MTA ๐งฝ. However, in a configuration like this, 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 hold other messages inside them ๐ช. A message like that can also contain an Authentication-Results header field. Processing these is outside the intended scope of this document (see Section 1.3), but a little guidance for MUA developers is still appropriate here ๐.
MTAs are generally unlikely to strip Authentication-Results header fields during mailbox delivery, so normative language in Section 4.1 warns MUAs to ignore these instances inside MIME attachments, like when a message gets forwarded ๐
โโ๏ธ. Also, when a message digest is extracted to separate mail store messages or other media, these header fields should be removed so they're never interpreted improperly by MUAs that might consume them later ๐งน.
There can be cases where header fields included in encapsulated messages actually have value, such as when they come from messages within the same ADMD where they'll be consumed ๐ . Be careful, though: the consumer needs to fully understand what the header field means and the message's handling history before giving any value, positive or negative, to that data ๐ง.
7.11. Reverse Mapping ๐
Even though Section 3 of this memo explicitly supports the "iprev" method, its value as an authentication mechanism is limited ๐ฅ. Implementers of this specification, and of agents that use the data it relays, are encouraged to get familiar with the issues raised by [DNSOP-REVERSE] when deciding whether or not to include support for "iprev" ๐โจ.
8. References ๐
8.1. Normative References ๐โจ
okay bestie, here's the reading list ๐ซถ these are the docs this spec leans on, all lined up with their RFC numbers, DOIs, and dates so you can find every single one.
- [ABNF] Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax Specifications: ABNF", STD 68, RFC 5234, DOI 10.17487/RFC5234, January 2008,
<https://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,
<https://www.rfc-editor.org/info/rfc3864>. - [MAIL] Resnick, P., Ed., "Internet Message Format", RFC 5322, DOI 10.17487/RFC5322, October 2008,
<https://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,
<https://www.rfc-editor.org/info/rfc2045>. - [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997,
<https://www.rfc-editor.org/info/rfc2119>. - [RFC6530] Klensin, J. and Y. Ko, "Overview and Framework for Internationalized Email", RFC 6530, DOI 10.17487/RFC6530, February 2012,
<https://www.rfc-editor.org/info/rfc6530>. - [RFC6531] Yao, J. and W. Mao, "SMTP Extension for Internationalized Email", RFC 6531, DOI 10.17487/RFC6531, February 2012,
<https://www.rfc-editor.org/info/rfc6531>. - [RFC6532] Yang, A., Steele, S., and N. Freed, "Internationalized Email Headers", RFC 6532, DOI 10.17487/RFC6532, February 2012,
<https://www.rfc-editor.org/info/rfc6532>. - [RFC7601] Kucherawy, M., "Message Header Field for Indicating Message Authentication Status", RFC 7601, DOI 10.17487/RFC7601, August 2015,
<https://www.rfc-editor.org/info/rfc7601>. - [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, May 2017,
<https://www.rfc-editor.org/info/rfc8174>. - [SMTP] Klensin, J., "Simple Mail Transfer Protocol", RFC 5321, DOI 10.17487/RFC5321, October 2008,
<https://www.rfc-editor.org/info/rfc5321>.
8.2. Informative References ๐๐
these ones are the background reading ๐ง the extra context, the history, and the neighbours of this spec, all in one cute list.
- [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,
<https://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,
<https://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,
<https://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,
<https://www.rfc-editor.org/info/rfc4954>. - [AUTH-ESC] Kucherawy, M., "Email Authentication Status Codes", RFC 7372, DOI 10.17487/RFC7372, September 2014,
<https://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,
<https://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,
<https://www.rfc-editor.org/info/rfc7489>. - [DNS] Mockapetris, P., "Domain names - implementation and specification", STD 13, RFC 1035, DOI 10.17487/RFC1035, November 1987,
<https://www.rfc-editor.org/info/rfc1035>. - [DNS-IP6] Thomson, S., Huitema, C., Ksinant, V., and M. Souissi, "DNS Extensions to Support IP Version 6", STD 88, RFC 3596, DOI 10.17487/RFC3596, October 2003,
<https://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,
<https://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,
<https://www.rfc-editor.org/info/rfc3464>. - [EMAIL-ARCH] Crocker, D., "Internet Mail Architecture", RFC 5598, DOI 10.17487/RFC5598, July 2009,
<https://www.rfc-editor.org/info/rfc5598>. - [IANA-CONSIDERATIONS] Cotton, M., Leiba, B., and T. Narten, "Guidelines for Writing an IANA Considerations Section in RFCs", BCP 26, RFC 8126, DOI 10.17487/RFC8126, June 2017,
<https://www.rfc-editor.org/info/rfc8126>. - [IMAP] Crispin, M., "INTERNET MESSAGE ACCESS PROTOCOL - VERSION 4rev1", RFC 3501, DOI 10.17487/RFC3501, March 2003,
<https://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,
<https://www.rfc-editor.org/info/rfc1939>. - [RFC5451] Kucherawy, M., "Message Header Field for Indicating Message Authentication Status", RFC 5451, DOI 10.17487/RFC5451, April 2009,
<https://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,
<https://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,
<https://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,
<https://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,
<https://www.rfc-editor.org/info/rfc7410>. - [RFC8301] Kitterman, S., "Cryptographic Algorithm and Key Usage Update to DomainKeys Identified Mail (DKIM)", RFC 8301, DOI 10.17487/RFC8301, January 2018,
<https://www.rfc-editor.org/info/rfc8301>. - [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,
<https://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,
<https://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,
<https://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,
<https://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,
<https://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,
<https://www.rfc-editor.org/info/rfc5518>.
Appendix A. Legacy MUAs ๐ฐ๏ธ๐
okay so this one is for the people building mail apps ๐
many MUAs are probably never gonna get updated to understand the Authentication-Results header field and what it means, and that's just real ๐ญ so in the interest of convenience and a quicker rollout, a delivery MTA might want to consider adding things that the existing MUAs already process, in addition to the Authentication-Results header field. one idea is a Priority header field on messages that don't already have one, with a value that shows how strong the authentication was: "low" for weak or no authentication, and "normal" or "high" for good or strong authentication. ๐ธ
Some modern MUAs can already filter based on what's in this header field, and honestly that's iconic ๐ฅ but there's keen interest in MUAs showing some kind of graphical representation of what this header field means to end users. until that shows up (basically while this spec and its successors keep getting adopted), other interim ways of sharing authentication results may be necessary ๐ฆ
Appendix B. Authentication-Results Examples ๐งโจ
this section is the fun part bestie ๐ it shows some examples of how to use this header field to show authentication results.
B.1. Trivial Case: Header Field Not Present ๐
here's the trivial case, the one where nothing's there at all:
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: Header Field Not Present The Authentication-Results header field is completely absent. The MUA may make no conclusion about the validity of the message. this could be the case because (1) the message authentication services were not available at the time of delivery, (2) no service is provided, or (3) the MTA is not in compliance with this specification. ๐ no header means no verdict, so the MUA is left guessing, and that's the whole vibe ๐ซถ
B.2. Nearly Trivial Case: Service Provided, but No Authentication Done โจ
Okay so this one is giving minimal ๐ฅน. A message gets delivered by an MTA that follows this spec, but it doesn't actually do any message authentication:
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 ๐ธ
Bestie, the Authentication-Results header is there ๐, which shows the delivering MTA follows this spec. It used its DNS domain name as the authserv-id. The "none" (with no method or result tokens after it) means no message authentication happened at all ๐. The version number of the spec the field's content follows is spelled out right there too, so nothing is hidden.
B.3. Service Provided, Authentication Done ๐ฆ
This message got delivered by an MTA that follows this spec and actually ran 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 is here, and it tells us the border MTA follows this spec ๐. The authserv-id is the DNS domain name again. The MTA checked the message with the method from [SPF] ๐ฅ. Since that method can't authenticate the local-part, it got left out of the result's value. An MUA could pull out and pass along this extra info if it wants to โจ.
B.4. Service Provided, Several Authentications Done, Single MTA ๐
This message came in through one MTA that follows this spec, and that MTA ran 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; iprev=pass
policy.iprev=192.0.2.200
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 is present, so the delivering MTA clearly follows this spec ๐ซถ. The receiving DNS domain name is the authserv-id, same as before. The sender proved who they were to the MTA using a method from [AUTH] ๐, and both the SPF and "iprev" checks ran and passed โ . An MUA could grab this extra info and relay it if it wants.
Two Authentication-Results header fields are not required here, since the same host did all of the checking. The authenticating agent could have squished all the results into one header field. ๐
This example is a scenario where a remote user on a dial-up connection (example.net) sends mail to a border MTA (example.com) using SMTP authentication to prove who they are ๐. The dial-up provider got explicit permission to relay mail as example.net, which is why the SPF check gave a "pass" result ๐.
B.5. Service Provided, Several Authentications Done, Different MTAs ๐ธ
This message got relayed inbound by two different MTAs that both follow this spec, and they ran multiple message authentication checks between them ๐:
Authentication-Results: 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 is present, so this follows the spec ๐. The authserv-id is the recipient's DNS domain name again. There are two of these headers because two different MTAs in the delivery chain did authentication tests ๐ฆ. The first one, mail-router.example.com, says SMTP AUTH and SPF were both used, and that SMTP AUTH passed while SPF failed ๐ญ. For the SMTP AUTH check, extra info sits in the comment field, which the MUA can show if it wants ๐.
The second MTA, auth-checker.example.com, says it ran a DKIM test, and that test passed โ . Extra details about one of the tests are again in a comment that the MUA may choose to show. Also worth noticing: a DKIM signature added by example.com assured the integrity of the lower Authentication-Results field ๐.
Since different hosts did the two sets of authentication checks, the header fields cannot be consolidated in this example. ๐
This is a more typical example of a message coming into example.com from a user on a dial-up connection at example.net ๐. The user seems legit, since they had a valid password for SMTP AUTH at the border MTA ๐. The SPF test failed because example.com never gave example.net's dial-up network permission to relay mail on its behalf ๐ . The DKIM test passed because the sending user had a private key that matched one of example.com's published public keys, and mail-router.example.com used it to sign the message โจ.
B.6. Service Provided, Multi-tiered Authentication Done ๐ง
This message had authentication done at several stages, and one of them 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 one is multi-tiered authentication with an extended trust boundary, and it's kind of a saga ๐ฟ.
The message got sent by someone at example.com's New York office (newyork.example.com) to a mailing list managed at an intermediary. The message was signed at the origin using DKIM โ๏ธ.
The message went to a mailing list service provider called "example.net", which example.com uses. There, meetings@example.net gets expanded into a long list of recipients, one of whom sits at the Chicago office ๐ธ. For this example, we'll assume the trust boundary for chicago.example.com includes the mailing list server at example.net ๐ซถ.
The mailing list server there authenticated the message first, then added an Authentication-Results header field saying so, using its DNS domain name as the authserv-id ๐. Then it changed the message by tacking some footer text onto 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 doesn't get removed ๐ . It evaluates both signatures and finds that the first one (the most recent) is a "pass". The second one is a "fail", because of those modifications we just talked about ๐ญ. But here's the twist: the first signature covered the Authentication-Results header added at mail-router.example.net, and that header validated the second signature ๐ง . So, indirectly, it can be figured out that the authentications claimed by both signatures really are valid ๐.
Note that two styles of presenting metadata about the result 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 such 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 ๐
okay bestie, the formal syntax lets you sprinkle comments all over the content in a bunch of spots, and this example is totally legal ๐
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 ๐
Appendix C. Operational Considerations about Message Authentication ๐ฆ
okay so the whole Authentication-Results header field is built on the idea that authentication (and, presumably later on, reputation) work gets done by border MTAs, not by MUAs or intermediate MTAs. The later hops just use the results the border ones worked out ๐ Is this mandatory to take part in electronic mail or message authentication? Nope, certainly not. But this header field and how it's been deployed so far are based on that model. The assumption covers several common ADMD requirements, and honestly they're iconic:
- Service operators prefer to sort out problem messages as close to the border of the ADMD as possible ๐ง That makes it possible to reject messages at the SMTP level instead of generating a DSN internally. So if the authentication or reputation work happens only at the MUA or an intermediate MTA, that goal is basically out of reach ๐ญ
- Border MTAs are more likely to have direct access to external sources of authentication or reputation information, because modern MUAs inside an ADMD are more likely to be heavily firewalled ๐งฑ So some MUAs might not even be able to finish authentication or reputation evaluations without complex proxy configurations or similar hassles.
- MUAs rely on the upstream MTAs inside their trust boundaries to make correct (as much as is possible) evaluations about the message's envelope, header, and content โจ So MUAs don't need to know how to do the work the upstream MTAs do. They only need the results of that work ๐ซถ
- Evaluations about the quality of a message cost something, whether it's simple token matching (like a list of preferred DNS domains) or cryptographic verification (like public/private key work), so they need to be kept to a minimum ๐ธ Doing those tests at the border MTA is way preferred over doing them at every MUA that handles the message. If an ADMD's environment sticks to common messaging protocols, a reputation query or authentication check run by a border MTA returns the same result as the same query run by an MUA. But in an environment where the MUA does the work, a message arriving for multiple recipients would cause authentication or reputation evaluation to happen more than once for the same message (that is, at each MUA). That's needless amplification of resource use and a possible denial-of-service attack vector ๐จ
- Minimizing change is good ๐ As new authentication and reputation methods show up, the list of methods supported by this header field would presumably get extended. If MUAs just consume the contents of this header field instead of actually trying to do authentication and/or reputation work, they only need to learn to parse this header field once. New methods then only need a configuration change at the MUAs and software changes at the MTAs, which are presumably fewer in number. When deciding whether to implement these functions in MTAs or MUAs, the issues of individual flexibility, infrastructure inertia, and scale of effort must be considered. It's typically easier to change a single MUA than an MTA, because the change affects fewer users and can be pursued with less care. However, changing many MUAs is more effort than changing a smaller number of MTAs.
- For decisions affecting message delivery and display, assessment based on authentication and reputation is best done close to the time of message transit, while the message is on its way to a user's inbox, not afterwards โณ DKIM keys, IP address reputations, etc., can change over time or even become invalid, and users can take a long time to read a message once it's delivered. So the value of this work degrades, maybe quickly, once delivery is complete. That seriously diminishes the value of doing this work anywhere other than at MTAs ๐
Many operational choices are possible within an ADMD, including the venue for performing authentication and/or reputation assessment ๐ง The current specification doesn't dictate any of those choices. What it does do is make it easier when information produced by one stage of analysis needs to travel with the message to the next stage ๐
Appendix D. Changes since RFC 7601 ๐
- Added IANA registration for DKIM "a" and "s" properties. ๐
- Included EAI guidance. ๐
- Adjusted some ABNF tokens and names for easier inclusion by other documents. ๐ง
- Made minor editorial adjustments. โ๏ธ
- Deprecated entries from RFCs that are now Historic. ๐ชฆ
- Erratum 4671 resolved. โ
- Erratum 5435 resolved. โ
Acknowledgments ๐ซถ
the author wants to give a huge shoutout to these lovely people for reviewing the document and giving constructive criticism: Kurt Andersen, Seth Blank, Tim Draegen, Scott Kitterman, John Levine, and Alessandro Vesely ๐ thank you, queens ๐
Author's Address ๐
Murray S. Kucherawy
270 Upland Drive
San Francisco, CA 94127
United States of America
Email: superuser@gmail.com
๐ฆ where this page comes from
- ietf: rfc8601 2019-05
- ๐ girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms