RFC 7601

Message Header Field for Indicating Message Authentication Status

๐Ÿ“… published August 2015, from ietf

RFC 7601: Message Header Field for Indicating Message Authentication Status ๐Ÿ’Œ

Okay bestie, let's get into RFC 7601. ๐ŸŽ€ It's a Standards Track doc by M. Kucherawy, published in August 2015, and it's part of the IETF's official stream. It lives under ISSN 2070-1721. The big deal is that it obsoletes RFC 7001 and RFC 7410, so those older versions are replaced by this one. It doesn't list any RFCs it updates. ๐Ÿ’…โœจ

This is part 1 of 11, so there's more to come! ๐Ÿงš


Abstract ๐Ÿฆ‹

Okay so this doc defines a message header field called Authentication-Results, for email. Its whole purpose is to show the results of message authentication checks, like a little report card for the email. Receiver-side software, like mail filters or Mail User Agents (MUAs), can read it and show the info to users in a clean way, or use it to decide what to sort or filter. It's giving organization. ๐Ÿ—‚๏ธ๐Ÿ’–

Status of This Memo ๐ŸŒธ

Lowkey the most official part: this is an Internet Standards Track document. The IETF made it, so it reflects what the IETF community agreed on. It got public review and was approved by the Internet Engineering Steering Group (IESG). If you want more on Internet Standards, check Section 2 of RFC 5741. ๐Ÿ“œ

You can find the current status, any errata, and how to send feedback at http://www.rfc-editor.org/info/rfc7601. ๐Ÿ”—

Copyright (c) 2015 IETF Trust and the people listed as document authors. All rights reserved. ๐Ÿ”’

This doc is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info), as they stood when this was published. Read those carefully because they spell out your rights and restrictions for this doc, no cap. ๐Ÿงพ

If you pull Code Components out of this doc, they must include Simplified BSD License text, as described in Section 4.e of the Trust Legal Provisions. They also come with no warranty, as the Simplified BSD License describes. Be safe, bestie. ๐Ÿซถ

Table of Contents ๐Ÿ“š

1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   3
  1.1.  Purpose . . . . . . . . . . . . . . . . . . . . . . . . .   5
  1.2.  Trust Boundary  . . . . . . . . . . . . . . . . . . . . .   5
  1.3.  Processing Scope  . . . . . . . . . . . . . . . . . . . .   6
  1.4.  Requirements  . . . . . . . . . . . . . . . . . . . . . .   6
  1.5.  Definitions . . . . . . . . . . . . . . . . . . . . . . .   6
    1.5.1.  Key Words . . . . . . . . . . . . . . . . . . . . . .   6
    1.5.2.  Security  . . . . . . . . . . . . . . . . . . . . . .   7
    1.5.3.  Email Architecture  . . . . . . . . . . . . . . . . .   7
    1.5.4.  Other Terms . . . . . . . . . . . . . . . . . . . . .   8
  1.6.  Trust Environment . . . . . . . . . . . . . . . . . . . .   8
2.  Definition and Format of the Header Field . . . . . . . . . .   9
  2.1.  General Description . . . . . . . . . . . . . . . . . . .   9
  2.2.  Formal Definition . . . . . . . . . . . . . . . . . . . .  10
  2.3.  Property Types (ptypes) and Properties  . . . . . . . . .  12
  2.4.  The "policy" ptype  . . . . . . . . . . . . . . . . . . .  13
  2.5.  Authentication Identifier Field . . . . . . . . . . . . .  14
  2.6.  Version Tokens  . . . . . . . . . . . . . . . . . . . . .  15
  2.7.  Defined Methods and Result Values . . . . . . . . . . . .  15
    2.7.1.  DKIM and DomainKeys . . . . . . . . . . . . . . . . .  16
    2.7.2.  SPF and Sender ID . . . . . . . . . . . . . . . . . .  18
    2.7.3.  "iprev" . . . . . . . . . . . . . . . . . . . . . . .  19
    2.7.4.  SMTP AUTH . . . . . . . . . . . . . . . . . . . . . .  20
    2.7.5.  Other Registered Codes  . . . . . . . . . . . . . . .  21
    2.7.6.  Extension Methods . . . . . . . . . . . . . . . . . .  21
    2.7.7.  Extension Result Codes  . . . . . . . . . . . . . . .  22
3.  The "iprev" Authentication Method . . . . . . . . . . . . . .  22
4.  Adding the Header Field to a Message  . . . . . . . . . . . .  23
  4.1.  Header Field Position and Interpretation  . . . . . . . .  25
  4.2.  Local Policy Enforcement  . . . . . . . . . . . . . . . .  26
5.  Removing Existing Header Fields . . . . . . . . . . . . . . .  26
6.  IANA Considerations . . . . . . . . . . . . . . . . . . . . .  27
  6.1.  The Authentication-Results Header Field . . . . . . . . .  27
  6.2.  "Email Authentication Methods" Registry Description . . .  28
  6.3.  "Email Authentication Methods" Registry Update  . . . . .  29
  6.4.  "Email Authentication Property Types" Registry  . . . . .  30
  6.5.  "Email Authentication Result Names" Description . . . . .  31
  6.6.  "Email Authentication Result Names" Update  . . . . . . .  32
  6.7.  SMTP Enhanced Status Codes  . . . . . . . . . . . . . . .  33
7.  Security Considerations . . . . . . . . . . . . . . . . . . .  33
  7.1.  Forged Header Fields  . . . . . . . . . . . . . . . . . .  33
  7.2.  Misleading Results  . . . . . . . . . . . . . . . . . . .  35
  7.3.  Header Field Position . . . . . . . . . . . . . . . . . .  35
  7.4.  Reverse IP Query Denial-of-Service Attacks  . . . . . . .  35
  7.5.  Mitigation of Backscatter . . . . . . . . . . . . . . . .  36
  7.6.  Internal MTA Lists  . . . . . . . . . . . . . . . . . . .  36
  7.7.  Attacks against Authentication Methods  . . . . . . . . .  36
  7.8.  Intentionally Malformed Header Fields . . . . . . . . . .  36
  7.9.  Compromised Internal Hosts  . . . . . . . . . . . . . . .  36
  7.10. Encapsulated Instances  . . . . . . . . . . . . . . . . .  37
  7.11. Reverse Mapping . . . . . . . . . . . . . . . . . . . . .  37
8.  References  . . . . . . . . . . . . . . . . . . . . . . . . .  37
  8.1.  Normative References  . . . . . . . . . . . . . . . . . .  37
  8.2.  Informative References  . . . . . . . . . . . . . . . . .  38
Appendix A.  Legacy MUAs  . . . . . . . . . . . . . . . . . . . .  42
Appendix B.  Authentication-Results Examples  . . . . . . . . . .  42
  B.1.  Trivial Case; Header Field Not Present  . . . . . . . . .  42
  B.2.  Nearly Trivial Case; Service Provided, but No
        Authentication Done . . . . . . . . . . . . . . . . . . .  43
  B.3.  Service Provided, Authentication Done . . . . . . . . . .  44
  B.4.  Service Provided, Several Authentications Done, Single
        MTA . . . . . . . . . . . . . . . . . . . . . . . . . . .  45
  B.5.  Service Provided, Several Authentications Done, Different
        MTAs  . . . . . . . . . . . . . . . . . . . . . . . . . .  46
  B.6.  Service Provided, Multi-tiered Authentication Done  . . .  48
  B.7.  Comment-Heavy Example . . . . . . . . . . . . . . . . . .  49
Appendix C.  Operational Considerations about Message
             Authentication . . . . . . . . . . . . . . . . . . .  50
Appendix D.  Changes since RFC 7001 . . . . . . . . . . . . . . .  51
Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . .  53
Author's Address  . . . . . . . . . . . . . . . . . . . . . . . .  53

1. Introduction ๐ŸŒŸ

Okay so this section sets the vibe. It describes Authentication-Results, a header field for email that presents the results of a message authentication effort in a machine-readable format. The point is to have one place to collect that data whenever message authentication mechanisms are running. That way a Mail User Agent (MUA) and downstream filters can make filtering decisions, and/or give the user a recommendation about whether the message's origin is valid and maybe whether its content is safe and intact. ๐Ÿ”๐Ÿ’…

This doc revises the original definition in [RFC5451]. It's based on the authentication protocols in current use, and it also picks up errata logged since the original spec came out. ๐Ÿ› ๏ธ

End users aren't really supposed to be the direct consumers of this header field. It's meant for programs, which will use the data or turn it into something humans can read. ๐Ÿค–

This doc specifies the format of the header field and talks about what it means when the field is present or absent. It does NOT get into how the data should be used, like which filtering decisions are right or how an MUA should display the results. Those are local policy and user interface design questions, and they don't belong in this doc. Not my business, bestie. ๐Ÿ™…โ€โ™€๏ธ

At the time this was published, these are the published email authentication methods:

  • Author Domain Signing Practices ([ADSP]) (Historic)
  • SMTP Service Extension for Authentication ([AUTH])
  • DomainKeys Identified Mail Signatures ([DKIM])
  • Domain-based Message Authentication, Reporting and Conformance ([DMARC])
  • Sender Policy Framework ([SPF])
  • reverse IP address name validation ("iprev", defined in Section 3)
  • Require-Recipient-Valid-Since Header Field and SMTP Service Extension ([RRVS])
  • S/MIME Signature Verification ([SMIME-REG])
  • Vouch By Reference ([VBR])
  • DomainKeys ([DOMAINKEYS]) (Historic)
  • Sender ID ([SENDERID]) (Experimental)

There are registries for the tokens used in this header field, and they point back to the specs listed above. Section 6 describes those registries, what's in them, and how entries get added or updated. It also updates the existing contents so they match the current state of those specs. ๐Ÿ“‹โœจ

This spec isn't meant to be limited to domain-based authentication schemes. The existing schemes in that family turned out to be a good starting point for implementations, though. The goal is to give current and future authentication schemes one shared framework for delivering their results to downstream agents, and to discourage making a brand new header field for each one. ๐Ÿงš

Now the tea โ˜•: SPF defined a header field called "Received-SPF", and the historic DomainKeys defined one called DomainKey-Status. Those fields are only meant for conveying their own results, so they aren't enough to meet the requirements listed below. Plus, lots of SPF implementations have adopted the header field specified here, at least as an option. And DomainKeys has been obsoleted by DKIM. Glow-up era ๐Ÿ’–

1.1. Purpose ๐ŸŽฏ

The header field defined in this doc is expected to serve a few purposes:

  1. Convey the results of various message authentication checks. Upstream filters and Mail Transfer Agents (MTAs) apply those checks, then pass the results to MUAs and downstream filters within the same "trust domain". Those agents might want to show the results to end users, or use the data to apply stricter or looser content checks based on authentication results;
  2. Provide a common location within a message for this data;
  3. Create an extensible framework for reporting new authentication methods as they come out.

Here's the important bit ๐Ÿšจ: the mere presence of this header field does NOT mean its contents are valid. The field is just reporting assertions made by one or more authentication schemes that were (supposedly) applied somewhere upstream. For an MUA or downstream filter to actually treat those assertions as valid, there must be an assessment of the trust relationship among those agents, the validating MTA, and the mechanism used to convey the information. Trust, but verify, periodt. ๐Ÿ‘‘๐Ÿ’€

1.2. Trust Boundary ๐Ÿฆ‹

Okay so this doc keeps talking about the "trust boundary" of an ADMD (administrative management domain), and bestie, the mail world is SO diverse that a precise definition just isn't possible ๐Ÿ˜ญ.

Simply put, a transfer from the producer of the header field to the consumer has to happen inside a context that lets the consumer treat the producer's assertions as reliable and accurate (trustworthy). How that trust gets obtained is outside the scope of this doc. It's entirely a local matter ๐Ÿ’….

So this doc defines a "trust boundary" as the line between "external" and "internal" entities โœจ. Services that are internal (inside the trust boundary) are provided by the ADMD's infrastructure for its users. Anything external is outside the authority of the ADMD. By this definition, hosts inside a trust boundary are subject to the ADMD's authority and policies, no matter where they physically sit or how they're physically run. For example, a host inside a trust boundary might actually be operated by a remote service provider and live physically in that provider's data center. Wild but valid ๐ŸŒˆ.

A message can also be evaluated inside a trust boundary, then leave and re-enter it ๐Ÿ”„. One example is a forwarded message such as a message/rfc822 attachment (see Multipurpose Internet Mail Extensions [MIME]), or one that's part of a multipart/digest. The details reported by this field cannot be trusted in that case, so this field found inside one of those media types is typically ignored ๐Ÿ™ˆ.


1.3. Processing Scope ๐ŸŽ€

The whole point of this header field is to tell message consumers that authentication work was already done on the message inside its trust boundary, and to show them those results ๐Ÿ“ฃ. It is NOT meant to hand consumers message parameters so they can run authentication protocols on their own. Not the vibe ๐Ÿ™…โ€โ™€๏ธ.

1.4. Requirements ๐Ÿ“

This document establishes no new requirements on existing protocols or servers ๐Ÿซถ.

Also, this document establishes no requirement on MTAs to reject or filter arriving messages that fail authentication checks. The data carried in the specified header field's contents is for the information of MUAs and filters, and they get to use it at their discretion ๐Ÿ’–.

1.5. Definitions ๐Ÿ“š

This section defines the terms used throughout the doc, so everyone is on the same page ๐Ÿง .

1.5.1. Key Words ๐Ÿ”‘

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [KEYWORDS] โœจ.

1.5.2. Security ๐Ÿ”

"Guidelines for Writing RFC Text on Security Considerations" ([SECURITY]) talks about authentication and authorization, and how people keep mashing the two concepts together ๐Ÿ˜ฉ. Those terms have picked up slightly different meanings in recent message security work, and this doc follows those current usages, like so:

  • "Authorization" is the establishment of permission to use a resource or represent an identity. In this context, authorization means that a message from a particular ADMD arrived via a route the ADMD has explicitly approved ๐Ÿšช.
  • "Authentication" is the assertion of validity of a piece of data about a message (like the sender's identity) or of the message in its entirety ๐Ÿชช.

For examples: SPF and Sender ID are authorization mechanisms, because they express a result showing whether the ADMD that apparently sent the message has explicitly authorized the connecting Simple Mail Transfer Protocol ([SMTP]) client to relay messages on its behalf. They do NOT actually validate any other property of the message itself ๐Ÿคทโ€โ™€๏ธ. DKIM, by contrast, doesn't care how a message was routed. It uses cryptographic signatures to authenticate agents, assign (some) responsibility for the message (which implies authorization), and ensure that the listed portions of the message weren't modified in transit ๐Ÿ”. Because the signatures aren't tied to SMTP connections, they can be added by the ADMD of origin, by intermediate ADMDs (like a mailing list server), by other handling agents, or by any combination of those ๐Ÿงš.

Rather than create a separate header field for each class of solution, this proposal groups them both into a single header field ๐ŸŽ.

1.5.3. Email Architecture ๐Ÿ“ฌ

  • A "border MTA" is an MTA that acts as a gateway between the general Internet and the users within an organizational boundary. (See also Section 1.2.) ๐Ÿšง
  • A "delivery MTA" (or Mail Delivery Agent or MDA) is an MTA that actually enacts delivery of a message to a user's inbox or other final delivery ๐Ÿ“ฅ.
  • An "intermediate MTA" is any MTA that is not a delivery MTA and is also not the first MTA to handle the message ๐Ÿ”.

Here's how mail flows between these components. For more on general email system architecture, including detailed descriptions of these components, check Internet Mail Architecture [EMAIL-ARCH]. Appendix C of this document talks about the common aspects of email authentication in current environments ๐ŸŒธ.

                          +-----+   +-----+   +------------+
                          | MUA |-->| MSA |-->| Border MTA |
                          +-----+   +-----+   +------------+
                                                    |
                                                    |
                                                    V
                                               +----------+
                                               | Internet |
                                               +----------+
                                                    |
                                                    |
                                                    V
   +-----+   +-----+   +------------------+   +------------+
   | MUA |<--| MDA |<--| Intermediate MTA |<--| Border MTA |
   +-----+   +-----+   +------------------+   +------------+

Generally, it's assumed that applying message authentication schemes happens at a border MTA or a delivery MTA, and this spec is written with that assumption in mind ๐Ÿซง. BUT some sites run their entire mail infrastructure on a single host. At those sites, "border MTA" and "delivery MTA" might well apply to the same machine, or even the very same agent ๐Ÿคฏ. It's also possible that some message authentication tests take place on an intermediate MTA. This doc doesn't specifically describe those cases, but they aren't meant to be excluded ๐Ÿ‘€.

1.5.4. Other Terms ๐Ÿ’ญ

In this document, "producer" refers to any component that adds this header field to messages it's handling. "Consumer" refers to any component that identifies, extracts, and parses the header field to use as part of a handling decision ๐Ÿงƒ.

1.6. Trust Environment ๐Ÿฐ

This header field lets one or more message validation mechanisms pass their output along to one or more separate assessment mechanisms ๐Ÿ“จ. All of these mechanisms operate within a unified trust boundary that defines an Administrative Management Domain (ADMD). An ADMD contains one or more entities that perform validation and generate the header field, and one or more that consume it for some type of assessment ๐Ÿค.

Here's the tea: the field often has no integrity or validation mechanism of its own, so its presence must be trusted implicitly ๐Ÿ˜ฌ. That's why valid use of the header field requires removing any occurrences of it that are present when the message enters the ADMD. This makes sure any later occurrences were added within the ADMD's trust boundary ๐Ÿ›ก๏ธ.

The authserv-id token defined in Section 2.2 can be used to reference an entire ADMD or a specific validation engine within an ADMD ๐Ÿท๏ธ. The labeling scheme is left as an operational choice, but some guidance for picking a token is provided in later sections of this document โœจ.

2. Definition and Format of the Header Field ๐Ÿ’Œ

This section gives a general overview of the format of the header field being defined, and then provides a more formal specification ๐Ÿง.

2.1. General Description ๐Ÿงฉ

The header field specified here is called Authentication-Results. It's a Structured Header Field as defined in Internet Message Format ([MAIL]), so all of the related definitions in that document apply ๐Ÿ’….

This header field gets added at the top of the message as it transits MTAs that do authentication checks, so you can infer some idea of how far away the checks were done ๐Ÿ”ญ. That makes it a trace field as defined in [MAIL], and all of the related definitions in that document apply to it too ๐Ÿฆ‹.

The value of the header field (after removing comments) is made up of an authentication identifier, an optional version, and then a series of statements and supporting data ๐ŸŽ€. The statements take the form "method=result" and show which authentication method(s) were applied and what their results were. For each statement, the supporting data can include a "reason" string and one or more "property=value" statements showing which message properties were evaluated to reach that conclusion ๐Ÿ”.

The header field can appear more than once in a single message. More than one result can also be packed into a single header field. Or you can combine both of those things ๐ŸŒˆโœจ.

2.2. Formal Definition โœจ

okay so the header field gets the full ABNF treatment ([ABNF]) ๐Ÿค“ here's the whole grammar, bestie:

  authres-header = "Authentication-Results:" [CFWS] authserv-id
           [ CFWS authres-version ]
           ( no-result / 1*resinfo ) [CFWS] CRLF

  authserv-id = value
              ; see below for a description of this element

  authres-version = 1*DIGIT [CFWS]
          ; indicates which version of this specification is in use;
          ; this specification is version "1", and the absence of a
          ; version implies this version of the specification

  no-result = [CFWS] ";" [CFWS] "none"
            ; the special case of "none" is used to indicate that no
            ; message authentication was performed

  resinfo = [CFWS] ";" methodspec [ CFWS reasonspec ]
            *( CFWS propspec )

  methodspec = [CFWS] method [CFWS] "=" [CFWS] result
             ; indicates which authentication method was evaluated
             ; and what its output was

  reasonspec = "reason" [CFWS] "=" [CFWS] value
             ; a free-form comment on the reason the given result
             ; was returned

  propspec = ptype [CFWS] "." [CFWS] property [CFWS] "=" pvalue
           ; an indication of which properties of the message
           ; were evaluated by the authentication scheme being
           ; applied to yield the reported result

  method = Keyword [ [CFWS] "/" [CFWS] method-version ]
         ; a method indicates which method's result is
         ; represented by "result", and is one of the methods
         ; explicitly defined as valid in this document
         ; or is an extension method as defined below

  method-version = 1*DIGIT [CFWS]
         ; indicates which version of the method specification is
         ; in use, corresponding to the matching entry in the IANA
         ; "Email Authentication Methods" registry; a value of "1"
         ; is assumed if this version string is absent

  result = Keyword
         ; indicates the results of the attempt to authenticate
         ; the message; see below for details

  ptype = Keyword
        ; indicates whether the property being evaluated was
        ; a parameter to an [SMTP] command, was a value taken
        ; from a message header field, was some property of
        ; the message body, or was some other property evaluated by
        ; the receiving MTA; expected to be one of the "property
        ; types" explicitly defined as valid, or an extension
        ; ptype, as defined below

  property = special-smtp-verb / Keyword
          ; indicates more specifically than "ptype" what the
          ; source of the evaluated property is; the exact meaning
          ; is specific to the method whose result is being reported
          ; and is defined more clearly below

  special-smtp-verb = "mailfrom" / "rcptto"
          ; special cases of [SMTP] commands that are made up
          ; of multiple words

  pvalue = [CFWS] ( value / [ [ local-part ] "@" ] domain-name )
           [CFWS]
         ; the value extracted from the message property defined
         ; by the "ptype.property" construction

"local-part" is defined in Section 3.4.1 of [MAIL], and "CFWS" is defined in Section 3.2.2 of [MAIL] ๐Ÿ“ฌ

"Keyword" is defined in Section 4.1.2 of [SMTP] ๐Ÿ’Œ

The "value" is as defined in Section 5.1 of [MIME] ๐ŸŽ€

The "domain-name" is as defined in Section 3.5 of [DKIM] ๐ŸŒธ

The "Keyword" used in "result" above is further constrained by the necessity of being enumerated in Section 2.7 ๐Ÿ“‹

See Section 2.5 for a description of the authserv-id element ๐Ÿ‘€

If the value portion of a "pvalue" construction identifies something intended to be an email identity, then it MUST use the right hand portion of that ABNF definition ๐Ÿ’…

The list of commands eligible for use with the "smtp" ptype can be found in Section 4.1 of [SMTP] ๐Ÿฆ‹

The "propspec" may be omitted if, for example, the method was unable to extract any properties to do its evaluation yet has a result to report ๐Ÿ™ˆ

Where an SMTP command name is being reported as a "property", the agent generating the header field represents that command by converting it to lowercase and dropping any spaces (e.g., "MAIL FROM" becomes "mailfrom", "RCPT TO" becomes "rcptto", etc.) ๐Ÿงš

A "ptype" value of "policy" indicates a policy decision about the message not specific to a property of the message that could be extracted. See Section 2.4 for details ๐Ÿ”ฅ

Examples of complete messages using this header field can be found in Appendix B ๐Ÿ’œ


2.3. Property Types (ptypes) and Properties ๐ŸŒˆ

the "ptype" in the ABNF above is basically the general category of property the result is based on ๐Ÿ’– paired with the "property" (which is more specific), they tell you exactly which part of the message the data came from. iconic ๐Ÿ‘‘

Combinations of ptypes and properties are registered and described in the "Email Authentication Methods" registry, coupled with the authentication methods they're used with. More on this in Section 6 โœจ

Legal values of "ptype" are as defined in the IANA "Email Authentication Property Types" registry, created by [RFC7410]. The initial values and what they typically indicate are as follows, based on [RFC7001] ๐Ÿ“

body: Information that was extracted from the body of the message. This might be an arbitrary string of bytes, a hash of a string of bytes, a Uniform Resource Identifier, or some other content of interest. The "property" is an indication of where within the message body the extracted content was found, and can indicate an offset, identify a MIME part, etc. ๐ŸŒท

header: Indicates information that was extracted from the header of the message. This might be the value of a header field or some portion of a header field. The "property" gives a more precise indication of the place in the header from which the extraction took place. ๐Ÿ“ฎ

policy: A local policy mechanism was applied that augments or overrides the result returned by the authentication mechanism. (See Section 2.4.) ๐Ÿ›ก๏ธ

smtp: Indicates information that was extracted from an SMTP command that was used to relay the message. The "property" indicates which SMTP command included the extracted content as a parameter. ๐Ÿš€

Results reported using unknown ptypes MUST NOT be used in making handling decisions. They can be safely ignored by consumers. ๐Ÿ™…โ€โ™€๏ธ

Entries in the "Email Authentication Methods" registry can define properties that deviate from these definitions when appropriate. Such deviations need to be clear in the registry and/or in the defining document. See Section 2.7.1 for an example ๐Ÿฆ„


2.4. The "policy" ptype ๐Ÿ’…

a special ptype value of "policy" exists too ๐Ÿ’โ€โ™€๏ธ it's there to show that some local policy mechanism was applied that augments or even replaces (aka overrides) the result from the authentication mechanism. The property and value in this case identify the local policy that was applied and the result it returned ๐Ÿซถ

For example, a DKIM signature is not required to include the Subject header field in the set of fields that are signed ๐Ÿ™ˆ so an ADMD receiving such a message might decide that the signature is unacceptable, even if it passes, because the Subject content could be altered post-signing without invalidating the signature. Such an ADMD could replace the DKIM "pass" result with a "policy" result and then also include the following in the corresponding Authentication-Results field:

   ... dkim=fail policy.dkim-rules=unsigned-subject ...

In this case, the property is "dkim-rules", indicating some local check by that name took place and that check returned a result of "unsigned-subject". These are arbitrary names selected by (and presumably used within) the ADMD making use of them, so they are not normally registered with IANA or otherwise specified apart from setting syntax restrictions that allow for easy parsing within the rest of the header field ๐Ÿง

This ptype existed in the original specification for this header field, but without a complete description or example of intended use ๐Ÿฅบ

As a result, it has not seen any practical use to date that matches its intended purpose. These added details are provided to guide implementers toward proper use ๐ŸŒŸ


2.5. Authentication Identifier Field ๐Ÿ†”

every Authentication-Results header field has an authentication service identifier field (authserv-id above) โœจ basically it's any string meant to identify the authentication service within the ADMD that ran the authentication checks on the message. It's intended to be machine-readable and not necessarily meaningful to users ๐Ÿค–

Since agents consuming this field use this identifier to decide whether its contents are of interest (and safe to use), the uniqueness of the identifier MUST be guaranteed by the ADMD that generates it, and it MUST pertain to that ADMD ๐Ÿ” MUAs or downstream filters SHOULD use this identifier to determine whether or not the data in an Authentication-Results header field ought to be used or ignored ๐Ÿซง

For simplicity and scalability, the authentication service identifier SHOULD be a common token used throughout the ADMD ๐Ÿ’– Common practice is to use the DNS domain name used by or within that ADMD, sometimes called the "organizational domain", but this is not strictly necessary ๐ŸŒธ

For tracing and debugging purposes, the authentication identifier can instead be the specific hostname of the MTA performing the authentication check whose result is being reported ๐Ÿ” Moreover, some implementations define a substructure to the identifier; these are outside of the scope of this specification ๐Ÿงฉ

Note, however, that using a local, relative identifier like a flat hostname, rather than a hierarchical and globally unique ADMD identifier like a DNS domain name, makes configuration more difficult for large sites ๐Ÿ˜ญ The hierarchical identifier permits aggregating related, trusted systems together under a single, parent identifier, which in turn permits assessing the trust relationship with a single reference. The alternative is a flat namespace requiring individually listing each trusted system. Since consumers use the identifier to determine whether to use the contents of the header field:

  • Changes to the identifier impose a large, centralized administrative burden. ๐Ÿ“‰
  • Ongoing administrative changes require constantly updating this centralized table, making it difficult to ensure that an MUA or downstream filter will have access to accurate information for assessing the usability of the header field's content. In particular, consumers of the header field will need to know not only the current identifier(s) in use but previous ones as well to account for delivery latency or later re-assessment of the header field's contents. ๐Ÿซ 

Examples of valid authentication identifiers are "example.com", "mail.example.org", "ms1.newyork.example.com", and "example-auth" ๐ŸŽ€

2.6. Version Tokens ๐Ÿ’–

okay so the grammar up above lets you optionally add versions in two spots ๐ŸŽ€: on the header field itself (attached to the authserv-id token) and on each method being reported. The method version refers to the method itself, which is specified in whatever docs describe that method, while the authserv-id version refers to this document and therefore the syntax of this header field โœจ.

Why bother? To stop people from misreading the results ๐Ÿ‘€. If a parser finds a version after an authserv-id that it doesn't explicitly know, it can immediately stop parsing, because what comes next might not be in the format it expects ๐Ÿ™ˆ. For a method version, the parser SHOULD ignore a method result if that version isn't supported, in case the result means something different than expected. Say a hypothetical DKIM version 2 gave a pass for different reasons than version 1 does. A consumer might not want those altered semantics ๐Ÿ’…. Letting versions live in the syntax is how you flag that and let the consumer of the header field decide ๐Ÿซถ.

2.7. Defined Methods and Result Values ๐Ÿฆ‹

Each individual authentication method hands back one result from a set of specific result values ๐Ÿ“‹. The subsections below point you to the documents defining the authentication methods this document specifically supports, plus their result values. Verifiers SHOULD use these values as described below. New methods that aren't specified in this document, but are meant to be supported by the header field defined here, MUST include a similar result table, either in their defining documents or in supplementary ones ๐ŸŒˆ.

2.7.1. DKIM and DomainKeys ๐Ÿ”

DKIM is the dkim method and is defined in [DKIM]. DomainKeys is defined in [DOMAINKEYS] and is represented by the domainkeys method.

Section 3.8 of [DOMAINKEYS] lists some possible results of a DomainKeys evaluation. Those results aren't used when generating this header field, though. The results that do get returned are listed below instead ๐Ÿ™….

A signature is "acceptable to the ADMD" if it passes local policy checks (or there are no specific local policy checks) ๐Ÿ’. For example, an ADMD policy might require that the signature(s) on the message be added using the DNS domain present in the From header field of the message, which makes third-party signatures unacceptable even if they verify ๐Ÿ‘€.

Both DKIM and DomainKeys use the same result set, so here's the tea โ˜•:

  • none: the message wasn't signed.
  • pass: the message was signed, the signature or signatures were acceptable to the ADMD, and they passed verification tests โœ….
  • fail: the message was signed and the signature or signatures were acceptable to the ADMD, but they failed the verification test(s) ๐Ÿ’€.
  • policy: the message was signed, but some aspect of the signature or signatures wasn't acceptable to the ADMD ๐Ÿšซ.
  • neutral: the message was signed, but the signature or signatures had syntax errors or otherwise couldn't be processed. This result is also used for other failures that aren't covered elsewhere in this list ๐Ÿคทโ€โ™€๏ธ.
  • temperror: the message couldn't be verified because of an error that's likely transient, like a temporary inability to retrieve a public key. A later attempt may produce a final result โณ.
  • permerror: the message couldn't be verified because of an error that's unrecoverable, like a required header field being absent. A later attempt is unlikely to produce a final result ๐Ÿ˜ญ.

DKIM results are reported using a ptype of header. The property, though, represents one of the tags found in the DKIM-Signature header field rather than a distinct header field. For example, the ptype-property combination header.d refers to the content of the d (signing domain) tag from within the signature header field, and not a separate header field called d ๐Ÿงš.

The ability to report different DKIM results for a message with multiple signatures is described in [RFC6008] ๐ŸŒธ.

[DKIM] advises that if a message fails verification, it's to be treated as an unsigned message. A report of fail here lets the receiver of the report decide how to handle the failure. A report of neutral or none preempts that choice, making sure the message gets treated as if it had never been signed ๐Ÿซข.

Section 3.1 of [DOMAINKEYS] describes how the sending address of the message is determined. DomainKeys results are therefore reported along with the signing domain name, the sending address of the message, and the name of the header field that the latter was extracted from. So a DomainKeys result includes the ptype-property combination header.d, plus one of header.from and header.sender. The sending address extracted from the header is included with any [MAIL]-style comments removed. Moreover, the local-part of the address and the @ character are removed if it hasn't been authenticated in some way ๐Ÿ™ˆ.

2.7.2. SPF and Sender ID ๐Ÿ’Œ

spf and sender-id are the method names for SPF and Sender ID, respectively. The result values for SPF are defined in Section 2.6 of [SPF], and those definitions are included here by reference ๐Ÿ“–:

  +-----------+--------------------------------+
  |    Code   | Meaning                        |
  +-----------+--------------------------------+
  | none      | [RFC7208], Section 2.6.1       |
  +-----------+--------------------------------+
  | pass      | [RFC7208], Section 2.6.3       |
  +-----------+--------------------------------+
  | fail      | [RFC7208], Section 2.6.4       |
  +-----------+--------------------------------+
  | softfail  | [RFC7208], Section 2.6.5       |
  +-----------+--------------------------------+
  | policy    | RFC 7601, Section 2.4          |
  +-----------+--------------------------------+
  | neutral   | [RFC7208], Section 2.6.2       |
  +-----------+--------------------------------+
  | temperror | [RFC7208], Section 2.6.6       |
  +-----------+--------------------------------+
  | permerror | [RFC7208], Section 2.6.7       |
  +-----------+--------------------------------+

These result codes are used in the context of this specification to reflect the result returned by whichever component is doing the SPF evaluation ๐ŸŽฏ.

For SPF, the ptype used is smtp, and the property is either mailfrom or helo, since those are the values SPF can evaluate. (If the SMTP client issued the EHLO command instead of HELO, the property used is helo.) ๐Ÿ“ฌ

The sender-id method is described in [SENDERID]. For this method, the ptype used is header, and the property is the name of the header field the Purported Responsible Address (see [PRA]) was extracted from. That's one of Resent-Sender, Resent-From, Sender, or From โœจ.

The results for Sender ID are listed and described in Section 4.2 of [SENDERID], but for this specification, the SPF definitions enumerated above are used instead. Also, [SENDERID] specifies result codes in mixed case, but they're typically used all lowercase in this context ๐Ÿ”ค.

For both methods, there's an additional result of policy, which means the client was authorized to inject or relay mail on behalf of the sender's DNS domain according to the authentication method's algorithm, but local policy says the result is unacceptable ๐Ÿ™…โ€โ™€๏ธ. For example, policy might be used if SPF returns a pass result, but a local policy check matches the sending DNS domain to one found in an explicit list of unacceptable DNS domains (e.g., spammers) ๐Ÿšจ.

If the retrieved sender policies used to evaluate SPF and Sender ID don't contain explicit provisions for authenticating the local-part (see Section 3.4.1 of [MAIL]) of an address, the pvalue reported along with results for these mechanisms SHOULD NOT include the local-part or the following @ character ๐Ÿ™ˆ.

2.7.3. "iprev" ๐Ÿฆ‹

The result values used by the iprev method, which is defined in Section 3, are as follows ๐Ÿ’ซ:

  • pass: the DNS evaluation succeeded. The reverse and forward lookup results were both returned and agreed with each other โœ….
  • fail: the DNS evaluation failed. Either the reverse and forward lookups each produced results but didn't agree, or the forward query completed without producing a result. For example, a DNS RCODE of 3, commonly known as NXDOMAIN, or an RCODE of 0 (NOERROR) in a reply containing no answers, was returned ๐Ÿ’€.
  • temperror: the DNS evaluation couldn't be completed due to an error that's likely transient, like a temporary DNS error. For example, a DNS RCODE of 2, commonly known as SERVFAIL, or some other error condition resulted. A later attempt may produce a final result โณ.
  • permerror: the DNS evaluation couldn't be completed because no PTR data is published for the connecting IP address. For example, a DNS RCODE of 3, commonly known as NXDOMAIN, or an RCODE of 0 (NOERROR) in a reply containing no answers, was returned. This prevented the evaluation from finishing. A later attempt is unlikely to produce a final result ๐Ÿ˜ญ.

There's no none for this method, since any TCP connection delivering email has an IP address associated with it, so some kind of evaluation will always be possible ๐ŸŒˆ.

The result is reported using a ptype of policy (since this isn't part of any established protocol) and a property of iprev ๐ŸŽ€.

For discussion of the format of DNS replies, see "Domain Names - Implementation and Specification" ([DNS]) ๐Ÿ“š.

2.7.4. SMTP AUTH โœจ

okay so SMTP AUTH (defined in [AUTH]) gets its own method name, "auth" ๐Ÿ’… Its result values are:

  • none: SMTP authentication was not attempted. ๐Ÿซฅ
  • pass: The SMTP client authenticated to the server reporting the result using the protocol described in [AUTH]. ๐Ÿ’–
  • fail: The SMTP client tried to authenticate to the server using the protocol described in [AUTH] but was not successful (like, it gave a valid identity but the password was wrong ๐Ÿ’€).
  • temperror: The SMTP client tried to authenticate using the protocol described in [AUTH] but couldn't finish because of some error that's likely temporary, like a directory service lookup that glitched for a sec. A later attempt may produce a final result. ๐ŸŒธ
  • permerror: The SMTP client tried to authenticate using the protocol described in [AUTH] but couldn't finish because of some error that's likely not temporary, like a directory service lookup that's permanently broken. A later attempt is not likely to produce a final result. ๐Ÿ˜ญ

The result of AUTH gets reported using a ptype of smtp and a property of either:

  • auth, in which case the value is the authorization identity generated by the exchange started by the AUTH command; or
  • mailfrom, in which case the value is the mailbox identified by the AUTH parameter used with the MAIL FROM command. ๐ŸŽ€

If both identities are available, both can be reported. For example, imagine this command coming from a client that finished session authentication with the AUTH command, and it ended up with an authorized identity of "client@c.example" ๐Ÿงš

MAIL FROM:<alice@a.example> AUTH=<bob@b.example>

This could turn into a "resinfo" construction like so:

; auth=pass smtp.auth=client@c.example smtp.mailfrom=bob@b.example

Note that in every case except pass, the message was sent by an unauthenticated client. So all the non-"pass" cases SHOULD be treated as equivalent for this method. ๐Ÿ™ˆ


2.7.5. Other Registered Codes ๐Ÿฆ‹

Some result codes were also registered in other RFCs, like this:

  • Vouch By Reference (in [AR-VBR], represented by vbr);
  • Authorized Third-Party Signatures (in [ATPS], represented by dkim-atps);
  • Author Domain Signing Practices (in [ADSP], represented by dkim-adsp);
  • Require-Recipient-Valid-Since (in [RRVS], represented by rrvs);
  • S/MIME (in [SMIME-REG], represented by smime).

2.7.6. Extension Methods ๐Ÿงš

New authentication method identifiers (extension methods) might get defined later on, by future revisions or extensions to this spec. These identifiers are registered with the Internet Assigned Numbers Authority (IANA) and, preferably, published in an RFC. See Section 6 for all the details. ๐Ÿ“š

Extension methods can be defined for these reasons:

  1. To let additional info from new authentication systems get communicated to MUAs or downstream filters. The names of these identifiers ought to reflect the name of the method being defined, but they ought not be needlessly long. โœจ
  2. To allow the creation of "sub-identifiers" that show different levels of authentication and tell apart how strong they are, e.g., "auth1-weak" and "auth1-strong". ๐Ÿ’ช

Authentication method implementers are encouraged to provide enough information, using message header field comments if needed, so an MUA developer can understand or pass along the extra details of the authentication results. For example, if it might be interesting to share what data got used to do an evaluation, that could be relayed as a comment in the header field, like this:

        Authentication-Results: example.com;
                  foo=pass bar.baz=blob (2 of 3 tests OK)

Experimental method identifiers MUST only be used within ADMDs that have explicitly consented to use them. These identifiers and their parameters aren't documented in RFCs, so they can change at any time and are not suitable for production use. ๐Ÿ™…โ€โ™€๏ธ Any MTA, MUA, or downstream filter meant for production use SHOULD ignore or delete any Authentication-Results header field that includes an experimental (unknown) method identifier. ๐Ÿ—‘๏ธ

Experimental stuff is a no-go for production, bestie. Ignore it or delete it. ๐Ÿ’€

2.7.7. Extension Result Codes ๐ŸŒˆ

More result codes (extension results) might get defined later on, by future revisions or extensions to this spec. Result codes MUST be registered with the Internet Assigned Numbers Authority (IANA) and preferably published in an RFC. See Section 6 for further details. ๐Ÿ“š

Experimental results MUST only be used within ADMDs that have explicitly consented to use them. These results and their parameters aren't formally documented, so they can change at any time and are not suitable for production use. Any MTA, MUA, or downstream filter meant for production use SHOULD ignore or delete any Authentication-Results header field that includes an extension result. ๐Ÿซถ


3. The "iprev" Authentication Method ๐Ÿ”

This section defines an extra authentication method called "iprev". ๐ŸŽ€

"iprev" is an attempt to check that a client looks legit based on some DNS queries. Basically, it checks that the IP address is explicitly tied to a domain name. ๐Ÿง  When a session initiation of some kind comes in from a client, the IP address of the client peer gets queried for matching names. That's a number-to-name translation, also called a "reverse lookup" or a "PTR" record query. Once that result comes back, each of the names gets looked up (that's a name-to-number translation, or an "A" or "AAAA" record query). The response to this second check will typically map back to at least one of the client's IP addresses. ๐Ÿ”

Expressed as an algorithm: If the client peer's IP address is I, the list of names I maps to (after a "PTR" query) is the set N, and the union of IP addresses each member of N maps to (after the corresponding "A" and "AAAA" queries) is L, then the test succeeds if I is an element of L. โœ…

Often an MTA that gets a connection failing this test will just reject the connection, using the enhanced status code defined in [AUTH-ESC]. If an operator instead wants to make this info available to downstream agents as a factor in handling decisions, it records a result in line with Section 2.7.3. ๐Ÿ’…

A response to a PTR query could contain multiple names. To prevent heavy DNS loads, agents doing these queries MUST be implemented so that the number of names evaluated by generating corresponding A or AAAA queries is limited, so it isn't unduly taxing on the DNS infrastructure. That limit MAY be configurable by an administrator. For example, Section 4.6.4 of [SPF] picked a limit of 10 for its implementation of this algorithm. ๐Ÿงฎ

"DNS Extensions to Support IP Version 6" ([DNS-IP6]) covers the query formats for the IPv6 case. ๐ŸŒ

There's some contention about how wise and reliable this test is. For example, in some regions it can be hard for this test to ever pass, because matching forward and reverse DNS is rarely done. So the precise implementation details of how a verifier performs an "iprev" test aren't specified here. The verifier MAY report a successful or failed "iprev" test at its discretion, after doing some kind of check of the validity of the connection's identity using DNS. ๐Ÿคทโ€โ™€๏ธ It's up to an agent using the reported "iprev" result to understand exactly what that particular verifier is trying to report. ๐Ÿง

There's a lot of discussion about reverse DNS mapping and what it implies, in "Considerations for the use of DNS Reverse Mapping" ([DNSOP-REVERSE]). In particular, it recommends that applications avoid using this test as a means of authentication or security. Its presence in this document isn't an endorsement. It's just an acknowledgment that the method is still common and gives a way to relay the results of that test. ๐Ÿซถ


4. Adding the Header Field to a Message ๐Ÿ“จ

This spec doesn't try to rank how strong the various message authentication methods are, including ones that might show up later. The methods listed are an order-independent set, so their sequence doesn't say anything about one method being stronger or more important than another. Instead, the MUA or downstream filter consuming this header field is supposed to interpret each method's result based on its own knowledge of what that method evaluates. ๐Ÿง โœจ

Each "method" MUST refer to an authentication method declared in the IANA registry or to an extension method as described in Section 2.7.6, and each "result" MUST refer to a result code declared in the IANA registry or to an extension result code as defined in Section 2.7.7. See Section 6 for more info about the registered methods and result codes. ๐Ÿ“š

An MTA that follows this spec adds this header field (after running one or more message authentication tests) to show which MTA or ADMD ran the test, which test got applied, and what the result was. If an MTA applies more than one of these tests, it adds this header field either once per test or once with all the results together. An MTA MUST NOT add a result to an existing header field. ๐Ÿšซ

An MTA MAY add this header field containing only the authentication identifier portion and the "none" token (see Section 2.2) to clearly show that no message authentication schemes were applied before this message was delivered. ๐Ÿซฅ

An MTA adding this header field has to take steps to prove it's legit to the MUAs or downstream filters that will eventually read its content. One process for doing that is described in Section 5. Some environments may need extra measures, and some possible solutions are listed in Section 7.1. This document doesn't mandate any specific solution, since every environment has its own facilities and limitations. ๐Ÿฐ

Most known message authentication methods focus on one particular identifier to evaluate. SPF and Sender ID are different, because they can yield a result based on more than one identifier. Specifically, SPF can evaluate the RFC5321.HELO parameter or the RFC5321.MailFrom parameter, and Sender ID can evaluate the RFC5321.MailFrom parameter or the Purported Responsible Address (PRA) identity. When generating this field to report those results, only the parameter that yielded the result gets included. ๐ŸŽฏ

For MTAs that add this header field, adding header fields in order (at the top), per Section 3.6 of [MAIL], is super important. Also, this header field SHOULD be inserted above any other trace header fields those MTAs might prepend. That placement makes it easy to spot which header fields can be trusted. ๐Ÿ‘‘

Real talk: end users who use this header field directly might accidentally trust info that never got properly vetted. For example, if a basic SPF result gets relayed that claims an authenticated addr-spec, the local-part of that addr-spec has actually NOT been authenticated. So an MTA adding this header field SHOULD NOT include any data that hasn't been authenticated by the method(s) being applied. And MUAs SHOULD NOT render that kind of info to users if it's presented by a method known not to authenticate it. ๐Ÿ™ˆ๐Ÿ’€

4.1. Header Field Position and Interpretation ๐Ÿ”

okay so, to keep results unambiguous and dodge fake header fields, MUAs and downstream filters SHOULD NOT interpret this header field unless the user or admin specifically configures them to. It is NOT meant to be "on by default" ๐Ÿ™…โ€โ™€๏ธ Users or admins ought not switch this on unless (1) they are certain the header field will be validly added by an agent inside the ADMD that accepts the mail the MUA eventually reads, AND (2) copies that look like they came from inside the ADMD but were actually added by foreign MTAs get removed before delivery. Lowkey a must-do ๐Ÿ’…

Furthermore, MUAs and downstream filters SHOULD NOT interpret this header field unless the authentication service identifier it carries looks like one used within their own ADMD, as configured by the user or administrator. ๐Ÿก

MUAs and downstream filters MUST ignore any result reported using a "result" that isn't in the IANA "Result Code" registry, or a "ptype" that isn't listed in the "Email Authentication Property Types" registry, for such values as defined in Section 6. Moreover, such agents MUST ignore a result indicated for any "method" they don't specifically support. ๐Ÿ—‘๏ธ

An MUA SHOULD NOT reveal these results to end users, absent careful human factors design considerations and testing, when presenting trust-related materials. Real talk, this is super important ๐Ÿ˜ญ For example, an attacker could register examp1e.com (note the digit "1" (one)) and send signed mail to intended victims. A verifier would detect that the signature was valid and report a "pass", even though it's clear the DNS domain name was intended to mislead. See Section 7.2 for further discussion. ๐Ÿ•ต๏ธโ€โ™€๏ธ

As stated in Section 2.1, this header field MUST be treated as though it were a trace header field as defined in Section 3.6.7 of [MAIL]. It therefore MUST NOT be reordered and MUST be prepended to the message, so that there is generally some indication upon delivery of where in the chain of handling MTAs the message authentication was done. It's giving paper trail energy ๐Ÿงพโœจ

Note that there are a few message handlers that can only append new header fields to a message. Strictly speaking, these handlers are not compliant with this specification. They can still add the header field to carry authentication details, but any signal about where in the handling chain the work was done may be lost. Consumers SHOULD be designed such that this can be tolerated, especially from a producer known to have this limitation. ๐Ÿซถ

MUAs SHOULD ignore instances of this header field discovered within message/rfc822 MIME attachments. ๐ŸŽ€

Further discussion of these topics can be found in Section 7 below. ๐Ÿ“š

4.2. Local Policy Enforcement ๐Ÿšง

Some sites have a local policy that treats any particular authentication policy's non-recoverable failure results (typically "fail" or something similar) as justification for rejecting the message. In those cases, the border MTA SHOULD issue an SMTP rejection response to the message, rather than adding this header field and letting the message keep going toward delivery. This is more desirable than letting the message reach an internal host's MTA or spam filter, which could generate a local rejection such as a Delivery Status Notification (DSN) [DSN] to a forged originator. Those generated rejections are colloquially known as "backscatter" ๐ŸŒŠ ick

The same MAY also be done for local policy decisions that override the results of the authentication methods (e.g., the "policy" result codes described in Section 2.7). ๐ŸŒธ

Rejections at the SMTP protocol level are not possible if local policy is enforced at the MUA and not the MTA. ๐Ÿ™ƒ

5. Removing Existing Header Fields ๐Ÿงน

For security reasons, any MTA conforming to this specification MUST delete any discovered instance of this header field that claims, through its authentication service identifier, to have been added within its trust boundary but did not come directly from another trusted MTA. For example, an MTA for example.com receiving a message MUST delete or otherwise obscure any instance of this header field bearing an authentication service identifier that says the header field was added within example.com before adding its own header fields. This could mean each MTA will have to be equipped with a list of internal MTAs known to be compliant (and therefore trustworthy). ๐Ÿ‘€๐Ÿ’–

For simplicity and maximum security, a border MTA could remove all instances of this header field on mail crossing into its trust boundary. However, this may conflict with the desire to access authentication results performed by trusted external service providers. It may also invalidate signed messages whose signatures cover external instances of this header field. A more robust border MTA could allow a specific list of authenticating MTAs whose information is to be admitted, removing the header field originating from all others. ๐Ÿ›ก๏ธ

As stated in Section 1.2, a formal definition of "trust boundary" is deliberately not made here. It is entirely possible that a border MTA for example.com will explicitly trust authentication results asserted by the upstream host example.net, even though they exist in completely disjoint administrative boundaries. In that case, the border MTA MAY elect not to delete those results. Moreover, the upstream host doing some authentication work could apply a signing technology such as [DKIM] to its own results to assure downstream hosts of their authenticity. An example of this is provided in Appendix B. ๐Ÿฆ‹

Similarly, in the case of messages signed using [DKIM] or other message-signing methods that sign header fields, this removal action could invalidate one or more signatures on the message if they covered the header field to be removed. This behavior can be desirable, since there's little value in validating the signature on a message with forged header fields. However, signing agents MAY therefore elect to omit these header fields from signing to avoid this situation. ๐Ÿ”

An MTA SHOULD remove any instance of this header field bearing a version (express or implied) that it does not support. However, an MTA MUST remove such a header field if the [SMTP] connection relaying the message is not from a trusted internal MTA. This means the MTA needs to be able to understand versions of this header field at least as late as the ones understood by the MUAs or other consumers within its ADMD. ๐Ÿ”ขโœจ

6. IANA Considerations ๐Ÿ—‚๏ธ

IANA has registered the defined header field and created tables as described below. These registry actions were originally defined by [RFC5451] and updated by [RFC6577] and [RFC7001]. The created registries are being further updated here to increase their completeness. ๐Ÿ’…

6.1. The Authentication-Results Header Field ๐Ÿ“ฎ

[RFC5451] added the Authentication-Results header field to the IANA "Permanent Message Header Field Names" registry, per the procedure found in [IANA-HEADERS]. That entry has been updated to reference this document. The following is the registration template:

  Header field name: Authentication-Results
  Applicable protocol: mail ([MAIL])
  Status: Standard
  Author/Change controller: IETF
  Specification document(s): RFC 7601
  Related information: none

6.2. "Email Authentication Methods" Registry Description ๐Ÿ“‹

Names of message authentication methods supported by this specification have been registered with IANA, with the exception of experimental names as described in Section 2.7.6. Along with each method, the properties that accompany the method's result are recorded. ๐Ÿงพ

The "Email Authentication Parameters" group, and within it the "Email Authentication Methods" registry, were created by [RFC5451] for this purpose. [RFC6577] added a "status" field for each entry. [RFC7001] amended the rules governing that registry and also added a "version" field to the registry. ๐Ÿ•ฐ๏ธ

The reference for that registry has been updated to reference this document. ๐Ÿ”—

New entries are assigned only for values that have received Expert Review, per [IANA-CONSIDERATIONS]. The designated expert shall be appointed by the IESG. The designated expert has discretion to request that a publication be referenced if a clear, concise definition of the authentication method cannot be provided such that interoperability is assured. Registrations should otherwise be permitted. The designated expert can also handle requests to mark any current registration as "deprecated". ๐Ÿง‘โ€โš–๏ธ

No two entries can have the same combination of method, ptype, and property. ๐Ÿšซ๐Ÿ‘ฏ

An entry in this registry contains the following:

  • Method: the name of the method.
  • Definition: a reference to the document that created this entry, if any (see below).
  • ptype: a "ptype" value appropriate for use with that method.
  • property: a "property" value matching that "ptype", also appropriate for use with that method.
  • Value: a brief description of the value to be supplied with that method/ptype/property tuple.
  • Status: the status of this entry, which is either:
    • active: The entry is in current use.
    • deprecated: The entry is no longer in current use.
  • Version: a version number associated with the method (preferably starting at "1"). ๐Ÿ”ข

The Definition field will typically refer to a permanent document, or at least some descriptive text, where additional information about the entry being added can be found. This might in turn reference the document where the method is defined, so that all of the semantics around creating or interpreting an Authentication-Results header field using this method, ptype, and property can be understood. ๐Ÿ“–๐Ÿ’œ

6.3. "Email Authentication Methods" Registry Update โœจ

okay so here's everything that changed in the "Email Authentication Methods" registry ๐Ÿ’… it's a lot, bestie, but it's all super organized ๐ŸŽ€

  1. The Defined field got renamed to Definition so it matches the other registries in this group ๐Ÿงš
  2. The dkim method entry with header ptype and b property now uses [RFC6008] as its defining document, and the reference got removed from the description ๐Ÿ’œ
  3. All the other dkim, domainkeys, iprev, sender-id, and spf method entries had their Definition fields changed to point at this document. That's because this document has a complete description of the registry and these matching values ๐Ÿฆ‹
  4. All smime entries had their Definition fields changed to [SMIME-REG] ๐ŸŒธ
  5. The value field of the smime entry with property smime-part now reads: "The MIME body part reference that contains the S/MIME signature. See Section 3.2.1 of RFC 7281 for full syntax." ๐Ÿซถ
  6. The single auth method entry was supposed to show the identity from the AUTH parameter to the SMTP MAIL FROM command verb. But there's also an AUTH command verb, so it was a bit of a mix-up ๐Ÿ˜ญ To fix that, its property is now mailfrom and its Definition now points to this document ๐Ÿ‘‘
  7. A new entry was added, and it's giving main character energy โญ
Method:  auth
Definition:  this document (RFC 7601)
ptype:  smtp
property:  auth
Value:  identity confirmed by the AUTH command
Status:  active
Version:  1
  1. The values for the domainkeys entries with ptype header got updated ๐Ÿ“
    • from: contents of the [MAIL] From: header field, after removing comments, and removing the local-part and following "@" if not authenticated
    • sender: contents of the [MAIL] Sender: header field, after removing comments, and removing the local-part and following "@" if not authenticated
  2. All dkim-adsp and domainkeys entries now have their Status set to deprecated ๐Ÿ™ˆ That's because those specs are now Historic. Their Definition fields also reference this document now ๐Ÿ’€

6.4. "Email Authentication Property Types" Registry

[RFC7410] created the "Email Authentication Property Types" registry ๐Ÿงš

Entries in this registry are subject to the Expert Review rules described in [IANA-CONSIDERATIONS]. Each entry needs the following values:

  • ptype: The name of the ptype being registered. It must fit within the ABNF described in Section 2.2.
  • Definition: An optional reference to a defining specification.
  • Description: A brief description of what sort of information this ptype is meant to cover.

For new entries, the Designated Expert needs to make sure the description adequately explains the intended use โœจ An example would be super helpful in the entry's defining document, if there is one. Entries in the "Email Authentication Methods" registry or the "Email Authentication Result Names" registry might also work as examples of intended use ๐ŸŽ€

Since this is a complete restatement of the definition and rules for this registry, IANA updated it to show Section 2.3 of this document as the current definitions for the body, header, policy, and smtp entries. References to [RFC7001] and [RFC7410] have been removed ๐Ÿฆ‹


6.5. "Email Authentication Result Names" Description

Names of message authentication result codes supported by this specification must be registered with IANA. The only exception is experimental codes, as described in Section 2.7.7. A registry was created by [RFC5451] for this purpose. [RFC6577] added the status column, and [RFC7001] updated the rules for that registry ๐ŸŒˆ

New entries are only assigned for values that have received Expert Review, per [IANA-CONSIDERATIONS]. The IESG shall appoint the designated expert. The designated expert has discretion to request that a publication be referenced if a clear, concise definition of the authentication result can't be provided in a way that makes interoperability assured. Otherwise, registrations should be permitted ๐Ÿ’– The designated expert can also handle requests to mark any current registration as deprecated ๐Ÿซถ

No two entries can have the same combination of method and code ๐Ÿ™…โ€โ™€๏ธ

An entry in this registry contains the following:

  • Auth Method: an authentication method for which results are returned using the header field defined in this document.
  • Code: a result code that can be returned for this authentication method.
  • Specification: either free-form text explaining what this method-code combination means, or a reference to such a definition.
  • Status: the status of this entry, which is either:
    • active: The entry is in current use.
    • deprecated: The entry is no longer in current use.

6.6. "Email Authentication Result Names" Update

This document includes a complete description of the registry and obsoletes [RFC7001]. So the following changes were made to this registry per this document ๐Ÿ’…

  • The Defined field has been removed.
  • The Meaning field has been renamed Specification, as described above.
  • The Auth Method field now comes before the Code field.
  • For easier searching, the table is sorted first by Auth Method, then by Code within each Auth Method grouping ๐Ÿ”
  • All entries for the dkim, domainkeys, spf, sender-id, auth, and iprev methods had their Specification fields replaced like this:
    • dkim: Section 2.7.1 of this document (RFC 7601)
    • domainkeys: Section 2.7.1 of this document (RFC 7601)
    • spf: for "hardfail", Section 2.4.2 of [RFC5451]; for all others, Section 2.7.2 of this document (RFC 7601)
    • sender-id: for "hardfail", Section 2.4.2 of [RFC5451]; for all others, Section 2.7.2 of this document (RFC 7601)
    • auth: Section 2.7.4 of this document (RFC 7601)
    • iprev: Section 2.7.3 of this document (RFC 7601)
  • All entries for dkim-adsp that were missing an explicit reference to a defining document now reference [ADSP] in their Specification fields ๐ŸŽ€
  • All entries for dmarc had their Specification fields changed to reference Section 11.2 of [DMARC] ๐ŸŒธ
  • All entries for dkim-adsp and domainkeys had their Status values changed to deprecated, since those specifications are now Historic. Their Specification fields also got a reference to this document ๐Ÿฆ‹

6.7. SMTP Enhanced Status Codes

The entry for X.7.25 in the "Enumerated Status Codes" sub-registry of the "Simple Mail Transfer Protocol (SMTP) Enhanced Status Codes Registry" now refers to this document instead of [RFC7001] ๐Ÿงš


7. Security Considerations โœจ

Okay bestie, this part is serious ๐Ÿ˜ญ Please read it carefully before you touch the Authentication-Results header field ๐Ÿ‘‘

The following security considerations apply when adding or processing the Authentication-Results header field:

7.1. Forged Header Fields ๐ŸŽ€

okay bestie, so an MUA or filter that reads a mailbox handled by a non-conformant MTA, and that understands Authentication-Results header fields, could make totally false conclusions based on forged ones ๐Ÿ˜ญ. A malicious user or agent could forge a header field using the DNS domain of a receiving ADMD as the authserv-id token in the value and, with the rest of the value, claim the message was properly authenticated. The non-conformant MTA would fail to strip the forged header field, and the MUA could wrongly trust it ๐Ÿ’€.

For this reason, it is best not to have processing of the Authentication-Results header field enabled by default. Instead, it should be ignored, at least for the purposes of enacting filtering decisions, unless a user or administrator specifically enables it after verifying that the border MTA is compliant ๐Ÿ”. It is acceptable to have an MUA aware of this specification but have an explicit list of hostnames whose Authentication-Results header fields are trustworthy. However, this list should initially be empty ๐ŸŒธ.

Some alternative solutions to this problem were proposed a while ago and are listed below. To date, they have not been developed due to lack of demand, but they are documented here in case the information is useful at some point in the future โœจ:

  1. 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. In this application, though, the signing agent (a trusted MTA) likely cannot authenticate that value, so the fact that it is signed should be ignored. Where the authserv-id is the ADMD's domain name, the authserv-id matching this valid internal signature's "d=" DKIM value is sufficient ๐Ÿฆ‹.
  2. Another would be a means to interrogate the MTA that added the header field to see if it is actually providing any message authentication services and saw the message in question. This isn't especially palatable, though, given the work required to craft and implement such a scheme ๐Ÿ™ˆ.
  3. 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 ๐Ÿšง.
  4. 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-Results header fields it can trust ๐Ÿงš.
  5. On the presumption that internal MTAs are fully compliant with Section 3.6 of [MAIL], and the compliant internal MTAs are using their own hostnames or the ADMD's DNS domain name as the authserv-id token, the header field proposed here should always appear above a 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 ๐Ÿ‘€.

In any case, a mechanism needs to exist for an MUA or filter to verify that the host that appears to have added the header field (a) actually did so and (b) is legitimately adding that header field for this delivery. Given the variety of messaging environments deployed today, consensus appears to be that specifying a particular mechanism for doing so is not appropriate for this document ๐Ÿคทโ€โ™€๏ธ.

Mitigation of the forged header field attack can also be accomplished by moving the authentication results data into metadata associated with the message. In particular, an [SMTP] extension could be established to communicate authentication results from the border MTA to intermediate and delivery MTAs. The latter could arrange to store the authentication results as metadata, retrieved and rendered along with the message by an [IMAP] client aware of a similar extension in that protocol. The delivery MTA would be told to trust data via this extension only from MTAs it trusts, and border MTAs would not accept data via this extension from any source. There is no vector in such an arrangement for forgery of authentication data by an outside agent ๐Ÿ›ก๏ธโœจ.


7.2. Misleading Results ๐Ÿฅบ

Until some form of service for querying the reputation of a sending agent is widely deployed, the existence of this header field indicating a "pass" does not make the message trustworthy. It is possible for an arriving piece of spam or other undesirable mail to pass checks by several of the methods enumerated above. For example, a piece of spam signed using [DKIM] by the originator of the spam, which might be a spammer or a compromised system, could do this ๐Ÿ‘Ž. In particular, this issue is not resolved by the forged header field removal discussed above ๐Ÿ˜ฌ.

So, MUAs and downstream filters must take some care with use of this header, even after possibly malicious headers are scrubbed ๐Ÿซถ.


7.3. Header Field Position ๐Ÿ“

Despite the requirements of [MAIL], header fields can sometimes be reordered en route by intermediate MTAs. The goal of requiring header field addition only at the top of a message is an acknowledgment that some MTAs do reorder header fields, but most do not. Thus, in the general case, there will be some indication of which MTAs (if any) handled the message after the addition of the header field defined here ๐Ÿง.


7.4. Reverse IP Query Denial-of-Service Attacks ๐ŸŒช๏ธ

Section 4.6.4 of [SPF] describes a DNS-based denial-of-service attack for verifiers that attempt DNS-based identity verification of arriving client connections. A verifier wishing to do this check and report this information needs to take care not to go to unbounded lengths to resolve "A" and "PTR" queries. MUAs or other filters making use of an "iprev" result specified by this document need to be aware of the algorithm used by the verifier reporting the result and, especially, its limitations ๐Ÿ”.


7.5. Mitigation of Backscatter ๐ŸŒ™

Failing to follow the instructions of Section 4.2 can result in a denial-of-service attack caused by the generation of [DSN] messages (or equivalent) to addresses that did not send the messages being rejected. Yikes, that's a whole mess ๐Ÿ˜ฑ.


7.6. Internal MTA Lists ๐Ÿ“‹

Section 5 describes a procedure for scrubbing header fields that may contain forged authentication results about a message. A compliant installation will have to include, at each MTA, a list of other MTAs known to be compliant and trustworthy. Failing to keep this list current as internal infrastructure changes may expose an ADMD to attack ๐Ÿ”„.


7.7. Attacks against Authentication Methods ๐Ÿ’ฅ

If an attack becomes known against an authentication method, then the agent verifying that method can be fooled into thinking an inauthentic message is authentic, and thus the value of this header field can be misleading. It follows that any attack against the authentication methods supported by this document is also a security consideration here ๐Ÿšจ.


7.8. Intentionally Malformed Header Fields ๐Ÿงจ

It is possible for an attacker to add an Authentication-Results header field that is extraordinarily large or otherwise malformed, in an attempt to discover or exploit weaknesses in header field parsing code. Implementers must thoroughly verify all such header fields received from MTAs and be robust against intentionally as well as unintentionally malformed header fields ๐Ÿงฑ๐Ÿ’œ.


7.9. Compromised Internal Hosts ๐Ÿ•ต๏ธโ€โ™€๏ธ

An internal MUA or MTA that has been compromised could generate mail with a forged From header field and a forged Authentication-Results header field that endorses it. It is clearly a larger concern to have compromised internal machines than it is to prove the value of this header field. However, this risk can be mitigated by arranging that internal MTAs will remove this header field if it claims to have been added by a trusted border MTA (as described above), yet the [SMTP] connection is not coming from an internal machine known to be running an authorized MTA. Still, in such a configuration, legitimate MTAs will have to add this header field when legitimate internal-only messages are generated. This is also covered in Section 5 ๐Ÿ’….


7.10. Encapsulated Instances ๐Ÿ“ฆ

MIME messages can contain attachments of type "message/rfc822", which contain other messages. Such an encapsulated message can also contain an Authentication-Results header field. Although the processing of these is outside of the intended scope of this document (see Section 1.3), some early guidance to MUA developers is appropriate here ๐ŸŽ.

Since MTAs are unlikely to strip Authentication-Results header fields after mailbox delivery, MUAs are advised in Section 4.1 to ignore such instances within MIME attachments. Moreover, when extracting a message digest to separate mail store messages or other media, such header fields should be removed so that they will never be interpreted improperly by MUAs that might later consume them ๐Ÿ—‘๏ธ.


7.11. Reverse Mapping ๐Ÿ”

Although Section 3 of this memo includes explicit support for the "iprev" method, its value as an authentication mechanism is limited. Implementers of both this proposal and agents that use the data it relays are encouraged to become familiar with the issues raised by [DNSOP-REVERSE] when deciding whether or not to include support for "iprev" ๐Ÿ“š๐ŸŒˆ.


8. References ๐Ÿ“–

8.1. Normative References ๐Ÿฆ‹

[ABNF] Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax Specifications: ABNF", STD 68, RFC 5234, DOI 10.17487/RFC5234, January 2008, <http://www.rfc-editor.org/info/rfc5234>.

[IANA-HEADERS] Klyne, G., Nottingham, M., and J. Mogul, "Registration Procedures for Message Header Fields", BCP 90, RFC 3864, DOI 10.17487/RFC3864, September 2004, <http://www.rfc-editor.org/info/rfc3864>.

[KEYWORDS] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997, <http://www.rfc-editor.org/info/rfc2119>.

[MAIL] Resnick, P., Ed., "Internet Message Format", RFC 5322, DOI 10.17487/RFC5322, October 2008, <http://www.rfc-editor.org/info/rfc5322>.

[MIME] Freed, N. and N. Borenstein, "Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies", RFC 2045, DOI 10.17487/RFC2045, November 1996, <http://www.rfc-editor.org/info/rfc2045>.

[SMTP] Klensin, J., "Simple Mail Transfer Protocol", RFC 5321, DOI 10.17487/RFC5321, October 2008, <http://www.rfc-editor.org/info/rfc5321>.

8.2. Informative References โœจ

Okay bestie, these are the extra reads that help you understand the whole picture, even though they aren't strictly required ๐Ÿ“š๐Ÿ’–

[ADSP] Allman, E., Fenton, J., Delany, M., and J. Levine, "DomainKeys Identified Mail (DKIM) Author Domain Signing Practices (ADSP)", RFC 5617, DOI 10.17487/RFC5617, August 2009, <http://www.rfc-editor.org/info/rfc5617>.

[AR-VBR] Kucherawy, M., "Authentication-Results Registration for Vouch by Reference Results", RFC 6212, DOI 10.17487/RFC6212, April 2011, <http://www.rfc-editor.org/info/rfc6212>.

[ATPS] Kucherawy, M., "DomainKeys Identified Mail (DKIM) Authorized Third-Party Signatures", RFC 6541, DOI 10.17487/RFC6541, February 2012, <http://www.rfc-editor.org/info/rfc6541>.

[AUTH] Siemborski, R., Ed. and A. Melnikov, Ed., "SMTP Service Extension for Authentication", RFC 4954, DOI 10.17487/RFC4954, July 2007, <http://www.rfc-editor.org/info/rfc4954>.

[AUTH-ESC] Kucherawy, M., "Email Authentication Status Codes", RFC 7372, DOI 10.17487/RFC7372, September 2014, <http://www.rfc-editor.org/info/rfc7372>.

[DKIM] Crocker, D., Ed., Hansen, T., Ed., and M. Kucherawy, Ed., "DomainKeys Identified Mail (DKIM) Signatures", STD 76, RFC 6376, DOI 10.17487/RFC6376, September 2011, <http://www.rfc-editor.org/info/rfc6376>.

[DMARC] Kucherawy, M., Ed. and E. Zwicky, Ed., "Domain-based Message Authentication, Reporting, and Conformance (DMARC)", RFC 7489, DOI 10.17487/RFC7489, March 2015, <http://www.rfc-editor.org/info/rfc7489>.

[DNS] Mockapetris, P., "Domain names - implementation and specification", STD 13, RFC 1035, DOI 10.17487/RFC1035, November 1987, <http://www.rfc-editor.org/info/rfc1035>.

[DNS-IP6] Thomson, S., Huitema, C., Ksinant, V., and M. Souissi, "DNS Extensions to Support IP Version 6", RFC 3596, DOI 10.17487/RFC3596, October 2003, <http://www.rfc-editor.org/info/rfc3596>.

[DNSOP-REVERSE] Senie, D. and A. Sullivan, "Considerations for the use of DNS Reverse Mapping", Work in Progress, draft-ietf-dnsop-reverse-mapping-considerations-06, March 2008.

[DOMAINKEYS] Delany, M., "Domain-Based Email Authentication Using Public Keys Advertised in the DNS (DomainKeys)", RFC 4870, DOI 10.17487/RFC4870, May 2007, <http://www.rfc-editor.org/info/rfc4870>.

[DSN] Moore, K. and G. Vaudreuil, "An Extensible Message Format for Delivery Status Notifications", RFC 3464, DOI 10.17487/RFC3464, January 2003, <http://www.rfc-editor.org/info/rfc3464>.

[EMAIL-ARCH] Crocker, D., "Internet Mail Architecture", RFC 5598, DOI 10.17487/RFC5598, July 2009, <http://www.rfc-editor.org/info/rfc5598>.

[IANA-CONSIDERATIONS] Narten, T. and H. Alvestrand, "Guidelines for Writing an IANA Considerations Section in RFCs", BCP 26, RFC 5226, DOI 10.17487/RFC5226, May 2008, <http://www.rfc-editor.org/info/rfc5226>.

[IMAP] Crispin, M., "INTERNET MESSAGE ACCESS PROTOCOL - VERSION 4rev1", RFC 3501, DOI 10.17487/RFC3501, March 2003, <http://www.rfc-editor.org/info/rfc3501>.

[POP3] Myers, J. and M. Rose, "Post Office Protocol - Version 3", STD 53, RFC 1939, DOI 10.17487/RFC1939, May 1996, <http://www.rfc-editor.org/info/rfc1939>.

[PRA] Lyon, J., "Purported Responsible Address in E-Mail Messages", RFC 4407, DOI 10.17487/RFC4407, April 2006, <http://www.rfc-editor.org/info/rfc4407>.

[RFC5451] Kucherawy, M., "Message Header Field for Indicating Message Authentication Status", RFC 5451, DOI 10.17487/RFC5451, April 2009, <http://www.rfc-editor.org/info/rfc5451>.

[RFC6008] Kucherawy, M., "Authentication-Results Registration for Differentiating among Cryptographic Results", RFC 6008, DOI 10.17487/RFC6008, September 2010, <http://www.rfc-editor.org/info/rfc6008>.

[RFC6577] Kucherawy, M., "Authentication-Results Registration Update for Sender Policy Framework (SPF) Results", RFC 6577, DOI 10.17487/RFC6577, March 2012, <http://www.rfc-editor.org/info/rfc6577>.

[RFC7001] Kucherawy, M., "Message Header Field for Indicating Message Authentication Status", RFC 7001, DOI 10.17487/RFC7001, September 2013, <http://www.rfc-editor.org/info/rfc7001>.

[RFC7410] Kucherawy, M., "A Property Types Registry for the Authentication-Results Header Field", RFC 7410, DOI 10.17487/RFC7410, December 2014, <http://www.rfc-editor.org/info/rfc7410>.

[RRVS] Mills, W. and M. Kucherawy, "The Require-Recipient-Valid-Since Header Field and SMTP Service Extension", RFC 7293, DOI 10.17487/RFC7293, July 2014, <http://www.rfc-editor.org/info/rfc7293>.

[SECURITY] Rescorla, E. and B. Korver, "Guidelines for Writing RFC Text on Security Considerations", BCP 72, RFC 3552, DOI 10.17487/RFC3552, July 2003, <http://www.rfc-editor.org/info/rfc3552>.

[SENDERID] Lyon, J. and M. Wong, "Sender ID: Authenticating E-Mail", RFC 4406, DOI 10.17487/RFC4406, April 2006, <http://www.rfc-editor.org/info/rfc4406>.

[SMIME-REG] Melnikov, A., "Authentication-Results Registration for S/MIME Signature Verification", RFC 7281, DOI 10.17487/RFC7281, June 2014, <http://www.rfc-editor.org/info/rfc7281>.

[SPF] Kitterman, S., "Sender Policy Framework (SPF) for Authorizing Use of Domains in Email, Version 1", RFC 7208, DOI 10.17487/RFC7208, April 2014, <http://www.rfc-editor.org/info/rfc7208>.

[VBR] Hoffman, P., Levine, J., and A. Hathcock, "Vouch By Reference", RFC 5518, DOI 10.17487/RFC5518, April 2009, <http://www.rfc-editor.org/info/rfc5518>.


Appendix A. Legacy MUAs ๐ŸŽ€

Heads up, implementers: lots of MUAs are unlikely to get retrofitted for the new header field and its semantics ๐Ÿ™ˆ So to get adoption moving faster, a delivery MTA might want to add things that existing MUAs already process, alongside the Authentication-Results header field. One idea is a Priority header field on messages that don't already have one, with a value that reflects how strong the authentication was: "low" for weak or no authentication, "normal" or "high" for good or strong authentication ๐Ÿ’…

Some modern MUAs can already filter based on the content of this header field, and people are obsessed with the idea of MUAs showing some kind of graphic for its meaning to end users ๐Ÿ˜ญ Until that exists (aka while this proposal and its successors are being adopted), other interim ways of conveying authentication results may be necessary โœจ


Appendix B. Authentication-Results Examples ๐Ÿฆ‹

This section shows some examples of using this header field to indicate authentication results ๐Ÿ’œ

B.1. Trivial Case; Header Field Not Present

The trivial case:

     Received: from mail-router.example.com
                   (mail-router.example.com [192.0.2.1])
               by server.example.org (8.11.6/8.11.6)
                   with ESMTP id g1G0r1kA003489;
               Fri, Feb 15 2002 17:19:07 -0800
     From: sender@example.com
     Date: Fri, Feb 15 2002 16:54:30 -0800
     To: receiver@example.org
     Message-Id: <12345.abc@example.com>
     Subject: here's a sample

     Hello!  Goodbye!

Example 1: Trivial Case

The Authentication-Results header field is completely absent ๐Ÿซฅ So the MUA can't draw any conclusion about whether the message is valid. That could happen because the message authentication services weren't available at delivery time, no service is provided, or the MTA isn't following this specification.

B.2. Nearly Trivial Case; Service Provided, but No Authentication Done

A message delivered by an MTA that conforms to this specification but provides no actual message authentication service:

     Authentication-Results: example.org 1; none
     Received: from mail-router.example.com
                   (mail-router.example.com [192.0.2.1])
               by server.example.org (8.11.6/8.11.6)
                   with ESMTP id g1G0r1kA003489;
               Fri, Feb 15 2002 17:19:07 -0800
     From: sender@example.com
     Date: Fri, Feb 15 2002 16:54:30 -0800
     To: receiver@example.org
     Message-Id: <12345.abc@example.com>
     Subject: here's a sample

     Hello!  Goodbye!

Example 2: Header Present but No Authentication Done

The Authentication-Results header field is there, showing that the delivering MTA conforms to this specification ๐Ÿ“ It used its DNS domain name as the authserv-id. The presence of "none" (and no method or result tokens) shows that no message authentication was done. The version number of the specification the field's content follows is explicitly given too.

B.3. Service Provided, Authentication Done

A message delivered by an MTA that conforms to this specification and applied some message authentication ๐Ÿ”ฅ

     Authentication-Results: example.com;
               spf=pass smtp.mailfrom=example.net
     Received: from dialup-1-2-3-4.example.net
                   (dialup-1-2-3-4.example.net [192.0.2.200])
               by mail-router.example.com (8.11.6/8.11.6)
                   with ESMTP id g1G0r1kA003489;
               Fri, Feb 15 2002 17:19:07 -0800
     From: sender@example.net
     Date: Fri, Feb 15 2002 16:54:30 -0800
     To: receiver@example.com
     Message-Id: <12345.abc@example.net>
     Subject: here's a sample

     Hello!  Goodbye!

Example 3: Header Reporting Results

The Authentication-Results header field is present, indicating that the border MTA conforms to this specification ๐Ÿ‘‘ The authserv-id is once again the DNS domain name. The message was also authenticated by that MTA via the method specified in [SPF]. Since that method can't authenticate the local-part, it's been left out of the result's value. An MUA could pull out and pass along this extra info if it wanted to โœจ

B.4. Service Provided, Several Authentications Done, Single MTA โœจ

okay so picture this: a message gets relayed inbound through a single MTA that follows this spec, and that MTA runs three different message authentication checks ๐Ÿซถ

        Authentication-Results: example.com;
                  auth=pass (cram-md5) smtp.auth=sender@example.net;
                  spf=pass smtp.mailfrom=example.net
        Authentication-Results: example.com;
                  sender-id=pass header.from=example.net
        Received: from dialup-1-2-3-4.example.net (8.11.6/8.11.6)
                      (dialup-1-2-3-4.example.net [192.0.2.200])
                  by mail-router.example.com (8.11.6/8.11.6)
                      with ESMTPA id g1G0r1kA003489;
                  Fri, Feb 15 2002 17:19:07 -0800
        Date: Fri, Feb 15 2002 16:54:30 -0800
        To: receiver@example.com
        From: sender@example.net
        Message-Id: <12345.abc@example.net>
        Subject: here's a sample

        Hello!  Goodbye!

             Example 4: Headers Reporting Results from One MTA

the Authentication-Results header field is right there, which tells us the delivering MTA conforms to this specification ๐Ÿ’… the receiving DNS domain name is used as the authserv-id again, periodt. the sender authenticated herself/himself to the MTA through a method specified in [AUTH], and both the SPF and Sender ID checks ran and passed ๐ŸŽ€ the MUA could pull out and relay that extra info if it wants to โœจ

two Authentication-Results header fields aren't required here, since the same host did all the checking. the authenticating agent could've consolidated everything into one header field ๐Ÿงš

this one is giving remote user on a dial-up connection (example.net) sending mail to a border MTA (example.com) and using SMTP authentication to prove who they are ๐ŸŒธ the dial-up provider was explicitly authorized to relay mail as example.com, which is why the SPF and Sender ID checks both produced "pass" results ๐Ÿ’–


B.5. Service Provided, Several Authentications Done, Different MTAs ๐Ÿฆ‹

so this message got relayed inbound by two different MTAs that both conform to this specification, and they applied multiple message authentication checks between them ๐Ÿ‘‘

        Authentication-Results: example.com;
                  sender-id=fail header.from=example.com;
                  dkim=pass (good signature) header.d=example.com
        Received: from mail-router.example.com
                      (mail-router.example.com [192.0.2.1])
                  by auth-checker.example.com (8.11.6/8.11.6)
                      with ESMTP id i7PK0sH7021929;
                  Fri, Feb 15 2002 17:19:22 -0800
        DKIM-Signature:  v=1; a=rsa-sha256; s=gatsby; d=example.com;
                  t=1188964191; c=simple/simple; h=From:Date:To:Subject:
                  Message-Id:Authentication-Results;
                  bh=sEuZGD/pSr7ANysbY3jtdaQ3Xv9xPQtS0m70;
                  b=EToRSuvUfQVP3Bkz ... rTB0t0gYnBVCM=
        Authentication-Results: example.com;
                  auth=pass (cram-md5) smtp.auth=sender@example.com;
                  spf=fail smtp.mailfrom=example.com
        Received: from dialup-1-2-3-4.example.net
                      (dialup-1-2-3-4.example.net [192.0.2.200])
                  by mail-router.example.com (8.11.6/8.11.6)
                      with ESMTPA id g1G0r1kA003489;
                  Fri, Feb 15 2002 17:19:07 -0800
        From: sender@example.com
        Date: Fri, Feb 15 2002 16:54:30 -0800
        To: receiver@example.com
        Message-Id: <12345.abc@example.com>
        Subject: here's a sample

        Hello!  Goodbye!

          Example 5: Headers Reporting Results from Multiple MTAs

the Authentication-Results header field is present, indicating conformance to this specification ๐Ÿ’… the authserv-id is the recipient's DNS domain name, same energy as before โœจ the header field shows up twice because two different MTAs in the chain of delivery ran authentication tests ๐Ÿซถ

the first MTA, mail-router.example.com, reports that SMTP AUTH and SPF were both used. the SMTP AUTH check passed while the SPF check failed ๐Ÿ˜ญ for the SMTP AUTH case, extra info sits in the comment field, which the MUA can choose to render if it wants ๐ŸŽ€

the second MTA, auth-checker.example.com, reports that it ran a Sender ID test (which failed) and a DKIM test (which passed) ๐Ÿ”ฅ again, extra data about one of the tests shows up as a comment, which the MUA may choose to render. also lowkey important: there's a DKIM signature added by example.com that assured the integrity of the lower Authentication-Results field ๐ŸŒˆ

since different hosts did the two sets of checks, the header fields cannot be consolidated in this example ๐Ÿ’€

this one is a more typical transmission of mail into example.com from a user on the dial-up connection example.net ๐Ÿงš the user appears legit, since they had a valid password that let them authenticate at the border MTA using SMTP AUTH ๐ŸŒธ the SPF and Sender ID tests failed because example.com never granted example.net authority to relay mail on its behalf. the DKIM test passed, though, because the sending user had a private key matching one of example.com's published public keys and used it to sign the message ๐Ÿ’œ


B.6. Service Provided, Multi-tiered Authentication Done ๐Ÿ“

this message had authentication done at various stages, and one of those stages happened outside the receiving ADMD ๐Ÿ‘€

        Authentication-Results: example.com;
              dkim=pass reason="good signature"
                header.i=@mail-router.example.net;
              dkim=fail reason="bad signature"
                header.i=@newyork.example.com
        Received: from mail-router.example.net
                  (mail-router.example.net [192.0.2.250])
              by chicago.example.com (8.11.6/8.11.6)
                  for <recipient@chicago.example.com>
                  with ESMTP id i7PK0sH7021929;
              Fri, Feb 15 2002 17:19:22 -0800
        DKIM-Signature: v=1; a=rsa-sha256; s=furble;
              d=mail-router.example.net; t=1188964198; c=relaxed/simple;
              h=From:Date:To:Message-Id:Subject:Authentication-Results;
              bh=ftA9J6GtX8OpwUECzHnCkRzKw1uk6FNiLfJl5Nmv49E=;
              b=oINEO8hgn/gnunsg ... 9n9ODSNFSDij3=
        Authentication-Results: example.net;
              dkim=pass (good signature) header.i=@newyork.example.com
        Received: from smtp.newyork.example.com
                  (smtp.newyork.example.com [192.0.2.220])
              by mail-router.example.net (8.11.6/8.11.6)
                  with ESMTP id g1G0r1kA003489;
              Fri, Feb 15 2002 17:19:07 -0800
        DKIM-Signature: v=1; a=rsa-sha256; s=gatsby;
              d=newyork.example.com;
              t=1188964191; c=simple/simple;
              h=From:Date:To:Message-Id:Subject;
              bh=sEu28nfs9fuZGD/pSr7ANysbY3jtdaQ3Xv9xPQtS0m7=;
              b=EToRSuvUfQVP3Bkz ... rTB0t0gYnBVCM=
        From: sender@newyork.example.com
        Date: Fri, Feb 15 2002 16:54:30 -0800
        To: meetings@example.net
        Message-Id: <12345.abc@newyork.example.com>
        Subject: here's a sample

        Example 6: Headers Reporting Results from Multiple MTAs in
                              Different ADMDs

this is multi-tiered authentication with an extended trust boundary, and it's honestly so iconic ๐ŸŒŸ

the message got sent from someone in example.com's New York office (newyork.example.com) to a mailing list managed at an intermediary ๐Ÿ’Œ it was signed at the origin using DKIM โœ๏ธ

the message went to a mailing list service provider called example.net, which example.com uses. over there, meetings@example.net gets expanded to a long list of recipients, one of whom is at the Chicago office ๐Ÿฆ‹ for this example, we'll assume that the trust boundary for chicago.example.com includes the mailing list server at example.net ๐Ÿซถ

the mailing list server authenticated the message first and attached an Authentication-Results header field saying so, using its DNS domain name as the authserv-id ๐Ÿ’… then it altered the message by adding some footer text to the body, including administrivia like unsubscription instructions ๐Ÿ“œ finally, the mailing list server adds a second DKIM signature and starts distributing the message ๐Ÿš€

the border MTA for chicago.example.com explicitly trusts results from mail-router.example.net, so that header field isn't removed ๐Ÿ‘‘ it evaluated both signatures and found that the first (most recent) one is a "pass", but because of the modifications mentioned above, the second is a "fail" ๐Ÿ˜ญ still, the first signature covered the Authentication-Results header added at mail-router.example.net, and that header recorded the validation of the second signature. so, indirectly, you can tell that the authentications claimed by both signatures are indeed valid ๐ŸŒˆ

quick note: two styles of presenting result metadata are in use here ๐Ÿงš in one case the "reason=" clause is present, which is meant for easy extraction by parsers. in the other case, the CFWS production of the ABNF is used to include that data as a header field comment. the latter can be harder for parsers to extract, given the varied supported syntaxes of mail header fields ๐ŸŽ€


B.7. Comment-Heavy Example ๐Ÿ’…

the formal syntax lets comments show up in a bunch of places ๐ŸŒธ just to illustrate, this example is also legal, no cap:

    Authentication-Results: foo.example.net (foobar) 1 (baz);
        dkim (Because I like it) / 1 (One yay) = (wait for it) fail
          policy (A dot can go here) . (like that) expired
          (this surprised me) = (as I wasn't expecting it) 1362471462

     Example 7: A Very Comment-Heavy but Perfectly Legal Example

the comments are literally everywhere and it's still valid, which is giving chaotic main character energy ๐Ÿ’– iykyk ๐Ÿ™ˆ

Appendix C. Operational Considerations about Message Authentication โœจ

okay bestie, so this whole protocol is built on one big vibe ๐Ÿงš: authentication (and, someday, reputation ๐Ÿ‘€) gets done by the border MTAs, not by the MUAs or the middle-of-the-road MTAs. Those just take the results the border MTA already figured out and run with them ๐Ÿ’…. Nobody's forcing you to do it this way for email or message auth, but this protocol and how people have actually deployed it so far both follow that model ๐Ÿ’–. Here's why it slaps, because it hits several common ADMD needs ๐Ÿ”ฅ:

  1. Service operators want to deal with problem messages as close to the edge of the ADMD as they can ๐Ÿšช. For example, that lets you reject a message right at the SMTP level instead of generating a DSN inside your own system ๐Ÿ™…โ€โ™€๏ธ. If you do the authentication or reputation work only at the MUA or an intermediate MTA, that goal is just not happening ๐Ÿ’€.
  2. Border MTAs are way more likely to have direct access to outside sources of authentication or reputation info ๐ŸŒ, because modern MUAs are usually locked down behind heavy firewalls ๐Ÿงฑ. Some MUAs might not even be able to finish authentication or reputation checks without complicated proxy setups or similar hassle ๐Ÿ˜ฉ.
  3. MUAs trust the upstream MTAs inside their trust boundaries to make correct evaluations (as correct as is possible ๐Ÿคž) about the envelope, header, and content of a message ๐Ÿซถ. So MUAs don't need to know how to do the upstream work at all. They just need the results ๐Ÿ’œ.
  4. Judging a message's quality costs something โณ, whether that's simple token matching (like a list of preferred DNS domains) or heavy cryptanalysis (like public/private key work) ๐Ÿงฎ. So you want to keep that cost as low as possible ๐Ÿ“. Doing those tests at the border MTA is way better than doing them again at every single MUA that handles the message ๐Ÿ™…โ€โ™€๏ธ. If the ADMD sticks to common messaging protocols, a reputation query or authentication check run by a border MTA gives the same result as one run by an MUA ๐ŸŽ€. But if the MUA does the work, a message going to multiple recipients would get evaluated more than once, once per MUA ๐Ÿ˜ญ. That's needless resource amplification and a possible denial-of-service attack vector ๐Ÿšจ.
  5. Minimizing change is iconic โœจ. As new authentication and reputation methods show up, this header field's list of supported methods would probably grow ๐ŸŒฑ. If MUAs simply read what's in this header field instead of actually doing authentication or reputation work themselves ๐Ÿง , they only have to learn how to parse the field once ๐Ÿ™Œ. Adding a new method then only needs a config change at the MUAs and software changes at the MTAs (which there are probably fewer of ๐Ÿค). When you're deciding whether to put these functions in MTAs or MUAs, you've got to think about individual flexibility, infrastructure inertia, and how big the effort is ๐Ÿง. Changing a single MUA is usually easier than changing an MTA, since it affects fewer users and can be done with less care ๐Ÿฆ‹. Still, changing lots of MUAs takes more effort than changing a smaller number of MTAs ๐Ÿ˜ฎโ€๐Ÿ’จ.
  6. For decisions about whether a message gets delivered and how it's displayed, authentication and reputation checks work best close to the time the message is in transit, while it's on its way to a user's inbox ๐Ÿ“ฌ, not afterwards โฐ. DKIM keys and IP address reputations can change over time or even go invalid ๐Ÿฅ€, and people can take ages to read a message once it's been delivered ๐Ÿ“–. So the value of this work drops, maybe fast ๐Ÿ“‰, once delivery is done. Doing it anywhere other than the MTAs seriously lowers that value ๐Ÿ˜ญ.

Lots of operational choices are possible inside an ADMD ๐ŸŒˆ, including where authentication and/or reputation assessment happens ๐Ÿ . The current spec doesn't dictate any of those choices ๐Ÿ™…โ€โ™€๏ธ. What it does do is make it easier when info from one stage of analysis has to ride along with the message to the next stage ๐Ÿš€.

Appendix D. Changes since RFC 7001 ๐Ÿ’…

  • Applied RFC 7410 ๐ŸŽ€.
  • Updated all references to RFC 4408 with RFC 7208 ๐Ÿ”„.
  • Added a section explaining "property" values. (Addressed Erratum #4201.) ๐Ÿงพ
  • Did some minor text reorganization ๐Ÿ—‚๏ธ.
  • Gave registry history, enough that this is now the authoritative registry definition ๐Ÿ“œ.
  • Added text explaining each of the method-ptype-property tuples registered by this document ๐Ÿงฉ.
  • Changed the meaning of the "Defined" column of the methods registry so it's the place where each entry was created and described. It's expected this will then refer to the method's defining document. Provided IANA with corresponding update instructions ๐Ÿ›๏ธ.
  • Cleaned up the registry structure and content, and replaced all references to RFC 7001 with pointers to this document ๐Ÿงน.
  • Added references: [DMARC], [PRA], [RFC6008], [RFC6577], [RRVS], [SMIME-REG] ๐Ÿ“š.
  • Added a description of values that can be extracted from SMTP AUTH sessions, plus an example ๐Ÿ”‘.
  • Provided much more complete descriptions of reporting DomainKeys results ๐Ÿ“Š.
  • Added more detail about Sender ID ๐Ÿชช.
  • Marked all ADSP and DomainKeys entries as deprecated, since their defining documents are as well ๐Ÿฅ€.
  • Reworked some text around ignoring unknown ptypes ๐Ÿ™ˆ.
  • Completely described the ptypes registry ๐Ÿ’œ.
  • Mentioned that EHLO is mapped to HELO for SPF ๐Ÿ—บ๏ธ.
  • RFC 7208 uses all-lowercase result strings now, so the prose got adjusted to match ๐Ÿ”ก.
  • Updated the list of supported methods, and mentioned the registries immediately below ๐Ÿ“‹.
  • Mentioned that when a local-part is removed, the "@" goes with it โœ‚๏ธ.
  • Referred to RFC 7328 in the "iprev" definition ๐Ÿ”—.
  • Corrected the "smime-part" prose ๐Ÿ› ๏ธ.
  • Updated examples that use SMTP AUTH to claim "with ESMTPA" in the Received fields ๐Ÿ“จ.
  • Made minor editorial adjustments ๐Ÿ’….

Acknowledgments ๐Ÿซถ

The author would like to thank these lovely people for reviewing this document and giving constructive criticism: Stephane Bortzmeyer, Scott Kitterman, John Levine, Tom Petch, and Pete Resnick. Y'all are the real MVPs ๐Ÿ‘‘๐ŸŒธ.

Author's Address ๐Ÿ’Œ

Murray S. Kucherawy 270 Upland Drive San Francisco, CA 94127 United States

Email: superuser@gmail.com ๐Ÿ“ง

๐Ÿ“ฆ where this page comes from