idnits 2.17.1 draft-ietf-dmarc-rfc7601bis-02.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- -- The draft header indicates that this document obsoletes RFC7601, but the abstract doesn't seem to mention this, which it should. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (May 9, 2018) is 2172 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) == Missing Reference: 'CFWS' is mentioned on line 506, but not defined == Missing Reference: 'RFC7208' is mentioned on line 829, but not defined ** Obsolete normative reference: RFC 5451 (Obsoleted by RFC 7001) ** Obsolete normative reference: RFC 6577 (Obsoleted by RFC 7001) ** Obsolete normative reference: RFC 7001 (Obsoleted by RFC 7601) ** Obsolete normative reference: RFC 7601 (Obsoleted by RFC 8601) -- Obsolete informational reference (is this intentional?): RFC 4870 (ref. 'DOMAINKEYS') (Obsoleted by RFC 4871) -- Obsolete informational reference (is this intentional?): RFC 3501 (ref. 'IMAP') (Obsoleted by RFC 9051) -- Obsolete informational reference (is this intentional?): RFC 7410 (Obsoleted by RFC 7601) Summary: 4 errors (**), 0 flaws (~~), 3 warnings (==), 5 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 DMARC Working Group M. Kucherawy 3 Internet-Draft May 9, 2018 4 Obsoletes: 7601 (if approved) 5 Intended status: Standards Track 6 Expires: November 10, 2018 8 Message Header Field for Indicating Message Authentication Status 9 draft-ietf-dmarc-rfc7601bis-02 11 Abstract 13 This document specifies a message header field called Authentication- 14 Results for use with electronic mail messages to indicate the results 15 of message authentication efforts. Any receiver-side software, such 16 as mail filters or Mail User Agents (MUAs), can use this header field 17 to relay that information in a convenient and meaningful way to users 18 or to make sorting and filtering decisions. 20 Status of this Memo 22 This Internet-Draft is submitted in full conformance with the 23 provisions of BCP 78 and BCP 79. 25 Internet-Drafts are working documents of the Internet Engineering 26 Task Force (IETF). Note that other groups may also distribute 27 working documents as Internet-Drafts. The list of current Internet- 28 Drafts is at http://datatracker.ietf.org/drafts/current/. 30 Internet-Drafts are draft documents valid for a maximum of six months 31 and may be updated, replaced, or obsoleted by other documents at any 32 time. It is inappropriate to use Internet-Drafts as reference 33 material or to cite them other than as "work in progress." 35 This Internet-Draft will expire on November 10, 2018. 37 Copyright Notice 39 Copyright (c) 2018 IETF Trust and the persons identified as the 40 document authors. All rights reserved. 42 This document is subject to BCP 78 and the IETF Trust's Legal 43 Provisions Relating to IETF Documents 44 (http://trustee.ietf.org/license-info) in effect on the date of 45 publication of this document. Please review these documents 46 carefully, as they describe your rights and restrictions with respect 47 to this document. Code Components extracted from this document must 48 include Simplified BSD License text as described in Section 4.e of 49 the Trust Legal Provisions and are provided without warranty as 50 described in the Simplified BSD License. 52 Table of Contents 54 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 4 55 1.1. Purpose . . . . . . . . . . . . . . . . . . . . . . . . . 5 56 1.2. Trust Boundary . . . . . . . . . . . . . . . . . . . . . . 6 57 1.3. Processing Scope . . . . . . . . . . . . . . . . . . . . . 6 58 1.4. Requirements . . . . . . . . . . . . . . . . . . . . . . . 6 59 1.5. Definitions . . . . . . . . . . . . . . . . . . . . . . . 7 60 1.5.1. Key Words . . . . . . . . . . . . . . . . . . . . . . 7 61 1.5.2. Internationalized Email . . . . . . . . . . . . . . . 7 62 1.5.3. Security . . . . . . . . . . . . . . . . . . . . . . . 7 63 1.5.4. Email Architecture . . . . . . . . . . . . . . . . . . 8 64 1.5.5. Other Terms . . . . . . . . . . . . . . . . . . . . . 9 65 1.6. Trust Environment . . . . . . . . . . . . . . . . . . . . 9 66 2. Definition and Format of the Header Field . . . . . . . . . . 9 67 2.1. General Description . . . . . . . . . . . . . . . . . . . 9 68 2.2. Formal Definition . . . . . . . . . . . . . . . . . . . . 10 69 2.3. Property Types (ptypes) and Properties . . . . . . . . . . 12 70 2.4. The "policy" ptype . . . . . . . . . . . . . . . . . . . . 13 71 2.5. Authentication Identifier Field . . . . . . . . . . . . . 14 72 2.6. Version Tokens . . . . . . . . . . . . . . . . . . . . . . 15 73 2.7. Defined Methods and Result Values . . . . . . . . . . . . 16 74 2.7.1. DKIM and DomainKeys . . . . . . . . . . . . . . . . . 16 75 2.7.2. SPF and Sender ID . . . . . . . . . . . . . . . . . . 18 76 2.7.3. "iprev" . . . . . . . . . . . . . . . . . . . . . . . 19 77 2.7.4. SMTP AUTH . . . . . . . . . . . . . . . . . . . . . . 20 78 2.7.5. Other Registered Codes . . . . . . . . . . . . . . . . 21 79 2.7.6. Extension Methods . . . . . . . . . . . . . . . . . . 21 80 2.7.7. Extension Result Codes . . . . . . . . . . . . . . . . 22 81 3. The "iprev" Authentication Method . . . . . . . . . . . . . . 22 82 4. Adding the Header Field to a Message . . . . . . . . . . . . . 24 83 4.1. Header Field Position and Interpretation . . . . . . . . . 25 84 4.2. Local Policy Enforcement . . . . . . . . . . . . . . . . . 26 85 5. Removing Existing Header Fields . . . . . . . . . . . . . . . 27 86 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 28 87 6.1. The Authentication-Results Header Field . . . . . . . . . 28 88 6.2. "Email Authentication Methods" Registry Description . . . 28 89 6.3. "Email Authentication Methods" Registry Update . . . . . . 28 90 6.4. "Email Authentication Property Types" Registry . . . . . . 29 91 6.5. "Email Authentication Result Names" Description . . . . . 29 92 6.6. "Email Authentication Result Names" Update . . . . . . . . 29 93 7. Security Considerations . . . . . . . . . . . . . . . . . . . 29 94 7.1. Forged Header Fields . . . . . . . . . . . . . . . . . . . 30 95 7.2. Misleading Results . . . . . . . . . . . . . . . . . . . . 31 96 7.3. Header Field Position . . . . . . . . . . . . . . . . . . 32 97 7.4. Reverse IP Query Denial-of-Service Attacks . . . . . . . . 32 98 7.5. Mitigation of Backscatter . . . . . . . . . . . . . . . . 32 99 7.6. Internal MTA Lists . . . . . . . . . . . . . . . . . . . . 32 100 7.7. Attacks against Authentication Methods . . . . . . . . . . 32 101 7.8. Intentionally Malformed Header Fields . . . . . . . . . . 33 102 7.9. Compromised Internal Hosts . . . . . . . . . . . . . . . . 33 103 7.10. Encapsulated Instances . . . . . . . . . . . . . . . . . . 33 104 7.11. Reverse Mapping . . . . . . . . . . . . . . . . . . . . . 33 105 8. References . . . . . . . . . . . . . . . . . . . . . . . . . . 34 106 8.1. Normative References . . . . . . . . . . . . . . . . . . . 34 107 8.2. Informative References . . . . . . . . . . . . . . . . . . 35 108 Appendix A. Legacy MUAs . . . . . . . . . . . . . . . . . . . . . 37 109 Appendix B. Authentication-Results Examples . . . . . . . . . . . 38 110 B.1. Trivial Case; Header Field Not Present . . . . . . . . . . 38 111 B.2. Nearly Trivial Case; Service Provided, but No 112 Authentication Done . . . . . . . . . . . . . . . . . . . 39 113 B.3. Service Provided, Authentication Done . . . . . . . . . . 40 114 B.4. Service Provided, Several Authentications Done, Single 115 MTA . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 116 B.5. Service Provided, Several Authentications Done, 117 Different MTAs . . . . . . . . . . . . . . . . . . . . . . 42 118 B.6. Service Provided, Multi-tiered Authentication Done . . . . 44 119 B.7. Comment-Heavy Example . . . . . . . . . . . . . . . . . . 45 120 Appendix C. Operational Considerations about Message 121 Authentication . . . . . . . . . . . . . . . . . . . 46 122 Appendix D. Changes Since RFC7601 . . . . . . . . . . . . . . . . 47 123 Appendix E. Acknowledgments . . . . . . . . . . . . . . . . . . . 47 124 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . . 47 126 1. Introduction 128 This document describes a header field called Authentication-Results 129 for electronic mail messages that presents the results of a message 130 authentication effort in a machine-readable format. The intent of 131 the header field is to create a place to collect such data when 132 message authentication mechanisms are in use so that a Mail User 133 Agent (MUA) and downstream filters can make filtering decisions 134 and/or provide a recommendation to the user as to the validity of the 135 message's origin and possibly the safety and integrity of its 136 content. 138 End users are not expected to be direct consumers of this header 139 field. This header field is intended for consumption by programs 140 that will then use such data or render it in a human-usable form. 142 This document specifies the format of this header field and discusses 143 the implications of its presence or absence. However, it does not 144 discuss how the data contained in the header field ought to be used, 145 such as what filtering decisions are appropriate or how an MUA might 146 render those results, as these are local policy and/or user interface 147 design questions that are not appropriate for this document. 149 At the time of publication of this document, the following are 150 published email authentication methods: 152 o Author Domain Signing Practices ([ADSP]) (Historic) 154 o SMTP Service Extension for Authentication ([AUTH]) 156 o DomainKeys Identified Mail Signatures ([DKIM]) 158 o Domain-based Message Authentication, Reporting and Conformance 159 ([DMARC]) 161 o Sender Policy Framework ([SPF]) 163 o reverse IP address name validation ("iprev", defined in Section 3) 165 o Require-Recipient-Valid-Since Header Field and SMTP Service 166 Extension ([RRVS]) 168 o S/MIME Signature Verification ([SMIME-REG]) 170 o Vouch By Reference ([VBR]) 172 o DomainKeys ([DOMAINKEYS]) (Historic) 173 o Sender ID ([SENDERID]) (Experimental) 175 There exist registries for tokens used within this header field that 176 refer to the specifications listed above. Section 6 describes the 177 registries and their contents and specifies the process by which 178 entries are added or updated. It also updates the existing contents 179 to match the current states of these specifications. 181 This specification is not intended to be restricted to domain-based 182 authentication schemes, but the existing schemes in that family have 183 proven to be a good starting point for implementations. The goal is 184 to give current and future authentication schemes a common framework 185 within which to deliver their results to downstream agents and 186 discourage the creation of unique header fields for each. 188 Although SPF defined a header field called "Received-SPF" and the 189 historic DomainKeys defined one called "DomainKey-Status" for this 190 purpose, those header fields are specific to the conveyance of their 191 respective results only and thus are insufficient to satisfy the 192 requirements enumerated below. In addition, many SPF implementations 193 have adopted the header field specified here at least as an option, 194 and DomainKeys has been obsoleted by DKIM. 196 1.1. Purpose 198 The header field defined in this document is expected to serve 199 several purposes: 201 1. Convey the results of various message authentication checks, 202 which are applied by upstream filters and Mail Transfer Agents 203 (MTAs) and then passed to MUAs and downstream filters within the 204 same "trust domain". Such agents might wish to render those 205 results to end users or to use those data to apply more or less 206 stringent content checks based on authentication results; 208 2. Provide a common location within a message for this data; 210 3. Create an extensible framework for reporting new authentication 211 methods as they emerge. 213 In particular, the mere presence of this header field does not mean 214 its contents are valid. Rather, the header field is reporting 215 assertions made by one or more authentication schemes (supposedly) 216 applied somewhere upstream. For an MUA or downstream filter to treat 217 the assertions as actually valid, there must be an assessment of the 218 trust relationship among such agents, the validating MTA, and the 219 mechanism for conveying the information. 221 1.2. Trust Boundary 223 This document makes several references to the "trust boundary" of an 224 administrative management domain (ADMD). Given the diversity among 225 existing mail environments, a precise definition of this term isn't 226 possible. 228 Simply put, a transfer from the producer of the header field to the 229 consumer must occur within a context that permits the consumer to 230 treat assertions by the producer as being reliable and accurate 231 (trustworthy). How this trust is obtained is outside the scope of 232 this document. It is entirely a local matter. 234 Thus, this document defines a "trust boundary" as the delineation 235 between "external" and "internal" entities. Services that are 236 internal -- within the trust boundary -- are provided by the ADMD's 237 infrastructure for its users. Those that are external are outside of 238 the authority of the ADMD. By this definition, hosts that are within 239 a trust boundary are subject to the ADMD's authority and policies, 240 independent of their physical placement or their physical operation. 241 For example, a host within a trust boundary might actually be 242 operated by a remote service provider and reside physically within 243 its data center. 245 It is possible for a message to be evaluated inside a trust boundary 246 but then depart and re-enter the trust boundary. An example might be 247 a forwarded message such as a message/rfc822 attachment (see 248 Multipurpose Internet Mail Extensions [MIME]) or one that is part of 249 a multipart/digest. The details reported by this field cannot be 250 trusted in that case. Thus, this field found within one of those 251 media types is typically ignored. 253 1.3. Processing Scope 255 The content of this header field is meant to convey to message 256 consumers that authentication work on the message was already done 257 within its trust boundary, and those results are being presented. It 258 is not intended to provide message parameters to consumers so that 259 they can perform authentication protocols on their own. 261 1.4. Requirements 263 This document establishes no new requirements on existing protocols 264 or servers. 266 In particular, this document establishes no requirement on MTAs to 267 reject or filter arriving messages that do not pass authentication 268 checks. The data conveyed by the specified header field's contents 269 are for the information of MUAs and filters and are to be used at 270 their discretion. 272 1.5. Definitions 274 This section defines various terms used throughout this document. 276 1.5.1. Key Words 278 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 279 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 280 document are to be interpreted as described in [KEYWORDS]. 282 1.5.2. Internationalized Email 284 In this document, there are references to messages formatted to 285 support Email Address Internationalization (EAI). Reference material 286 for this can be found in [RFC6530], [RFC6531], and [RFC6532]. 287 Generally speaking, these documents allow UTF-8 in most places that 288 free-form text can be found, and U-labels where domain names can be 289 used, and this document extends Authentication-Results accordingly. 291 1.5.3. Security 293 "Guidelines for Writing RFC Text on Security Considerations" 294 ([SECURITY]) discusses authentication and authorization and the 295 conflation of the two concepts. The use of those terms within the 296 context of recent message security work has given rise to slightly 297 different definitions, and this document reflects those current 298 usages, as follows: 300 o "Authorization" is the establishment of permission to use a 301 resource or represent an identity. In this context, authorization 302 indicates that a message from a particular ADMD arrived via a 303 route the ADMD has explicitly approved. 305 o "Authentication" is the assertion of validity of a piece of data 306 about a message (such as the sender's identity) or the message in 307 its entirety. 309 As examples: SPF and Sender ID are authorization mechanisms in that 310 they express a result that shows whether or not the ADMD that 311 apparently sent the message has explicitly authorized the connecting 312 Simple Mail Transfer Protocol ([SMTP]) client to relay messages on 313 its behalf, but they do not actually validate any other property of 314 the message itself. By contrast, DKIM is agnostic as to the routing 315 of a message but uses cryptographic signatures to authenticate 316 agents, assign (some) responsibility for the message (which implies 317 authorization), and ensure that the listed portions of the message 318 were not modified in transit. Since the signatures are not tied to 319 SMTP connections, they can be added by either the ADMD of origin, 320 intermediate ADMDs (such as a mailing list server), other handling 321 agents, or any combination. 323 Rather than create a separate header field for each class of 324 solution, this proposal groups them both into a single header field. 326 1.5.4. Email Architecture 328 o A "border MTA" is an MTA that acts as a gateway between the 329 general Internet and the users within an organizational boundary. 330 (See also Section 1.2.) 332 o A "delivery MTA" (or Mail Delivery Agent or MDA) is an MTA that 333 actually enacts delivery of a message to a user's inbox or other 334 final delivery. 336 o An "intermediate MTA" is any MTA that is not a delivery MTA and is 337 also not the first MTA to handle the message. 339 The following diagram illustrates the flow of mail among these 340 defined components. See Internet Mail Architecture [EMAIL-ARCH] for 341 further discussion on general email system architecture, which 342 includes detailed descriptions of these components, and Appendix C of 343 this document for discussion about the common aspects of email 344 authentication in current environments. 346 +-----+ +-----+ +------------+ 347 | MUA |-->| MSA |-->| Border MTA | 348 +-----+ +-----+ +------------+ 349 | 350 | 351 V 352 +----------+ 353 | Internet | 354 +----------+ 355 | 356 | 357 V 358 +-----+ +-----+ +------------------+ +------------+ 359 | MUA |<--| MDA |<--| Intermediate MTA |<--| Border MTA | 360 +-----+ +-----+ +------------------+ +------------+ 362 Generally, it is assumed that the work of applying message 363 authentication schemes takes place at a border MTA or a delivery MTA. 364 This specification is written with that assumption in mind. However, 365 there are some sites at which the entire mail infrastructure consists 366 of a single host. In such cases, such terms as "border MTA" and 367 "delivery MTA" might well apply to the same machine or even the very 368 same agent. It is also possible that some message authentication 369 tests could take place on an intermediate MTA. Although this 370 document doesn't specifically describe such cases, they are not meant 371 to be excluded. 373 1.5.5. Other Terms 375 In this document, the term "producer" refers to any component that 376 adds this header field to messages it is handling, and "consumer" 377 refers to any component that identifies, extracts, and parses the 378 header field to use as part of a handling decision. 380 1.6. Trust Environment 382 This header field permits one or more message validation mechanisms 383 to communicate output to one or more separate assessment mechanisms. 384 These mechanisms operate within a unified trust boundary that defines 385 an Administrative Management Domain (ADMD). An ADMD contains one or 386 more entities that perform validation and generate the header field 387 and one or more that consume it for some type of assessment. The 388 field often contains no integrity or validation mechanism of its own, 389 so its presence must be trusted implicitly. Hence, valid use of the 390 header field requires removing any occurrences of it that are present 391 when the message enters the ADMD. This ensures that later 392 occurrences have been added within the trust boundary of the ADMD. 394 The authserv-id token defined in Section 2.2 can be used to reference 395 an entire ADMD or a specific validation engine within an ADMD. 396 Although the labeling scheme is left as an operational choice, some 397 guidance for selecting a token is provided in later sections of this 398 document. 400 2. Definition and Format of the Header Field 402 This section gives a general overview of the format of the header 403 field being defined and then provides more formal specification. 405 2.1. General Description 407 The header field specified here is called Authentication-Results. It 408 is a Structured Header Field as defined in Internet Message Format 409 ([MAIL]), and thus all of the related definitions in that document 410 apply. 412 This header field is added at the top of the message as it transits 413 MTAs that do authentication checks, so some idea of how far away the 414 checks were done can be inferred. It is therefore considered to be a 415 trace field as defined in [MAIL], and thus all of the related 416 definitions in that document apply. 418 The value of the header field (after removing comments) consists of 419 an authentication identifier, an optional version, and then a series 420 of statements and supporting data. The statements are of the form 421 "method=result" and indicate which authentication method(s) were 422 applied and their respective results. For each such statement, the 423 supporting data can include a "reason" string and one or more 424 "property=value" statements indicating which message properties were 425 evaluated to reach that conclusion. 427 The header field can appear more than once in a single message, more 428 than one result can be represented in a single header field, or a 429 combination of these can be applied. 431 2.2. Formal Definition 433 Formally, the header field is specified as follows using Augmented 434 Backus-Naur Form ([ABNF]): 436 authres-header-field = "Authentication-Results:" authres-payload 438 authres-payload = [CFWS] authserv-id 439 [ CFWS authres-version ] 440 ( no-result / 1*resinfo ) [CFWS] CRLF 442 authserv-id = value 443 ; see below for a description of this element 445 authres-version = 1*DIGIT [CFWS] 446 ; indicates which version of this specification is in use; 447 ; this specification is version "1", and the absence of a 448 ; version implies this version of the specification 450 no-result = [CFWS] ";" [CFWS] "none" 451 ; the special case of "none" is used to indicate that no 452 ; message authentication was performed 454 resinfo = [CFWS] ";" methodspec [ CFWS reasonspec ] 455 *( CFWS propspec ) 457 methodspec = [CFWS] method [CFWS] "=" [CFWS] result 458 ; indicates which authentication method was evaluated 459 ; and what its output was 461 reasonspec = "reason" [CFWS] "=" [CFWS] value 462 ; a free-form comment on the reason the given result 463 ; was returned 465 propspec = ptype [CFWS] "." [CFWS] property [CFWS] "=" pvalue 466 ; an indication of which properties of the message 467 ; were evaluated by the authentication scheme being 468 ; applied to yield the reported result 470 method = Keyword [ [CFWS] "/" [CFWS] method-version ] 471 ; a method indicates which method's result is 472 ; represented by "result", and is one of the methods 473 ; explicitly defined as valid in this document 474 ; or is an extension method as defined below 476 method-version = 1*DIGIT [CFWS] 477 ; indicates which version of the method specification is 478 ; in use, corresponding to the matching entry in the IANA 479 ; "Email Authentication Methods" registry; a value of "1" 480 ; is assumed if this version string is absent 482 result = Keyword 483 ; indicates the results of the attempt to authenticate 484 ; the message; see below for details 486 ptype = Keyword 487 ; indicates whether the property being evaluated was 488 ; a parameter to an [SMTP] command, was a value taken 489 ; from a message header field, was some property of 490 ; the message body, or was some other property evaluated by 491 ; the receiving MTA; expected to be one of the "property 492 ; types" explicitly defined as valid, or an extension 493 ; ptype, as defined below 495 property = special-smtp-verb / Keyword 496 ; indicates more specifically than "ptype" what the 497 ; source of the evaluated property is; the exact meaning 498 ; is specific to the method whose result is being reported 499 ; and is defined more clearly below 501 special-smtp-verb = "mailfrom" / "rcptto" 502 ; special cases of [SMTP] commands that are made up 503 ; of multiple words 505 pvalue = [CFWS] ( value / [ [ local-part ] "@" ] domain-name ) 506 [CFWS] 507 ; the value extracted from the message property defined 508 ; by the "ptype.property" construction 510 "local-part" is defined in Section 3.4.1 of [MAIL], as modified by 511 [RFC6531]. 513 "CFWS" is defined in Section 3.2.2 of [MAIL]. 515 "domain-name" is as defined in Section 3.5 of [DKIM] where the "d=" 516 tag is defined, with "sob-domain" as modified by by [RFC6531]. 518 "Keyword" is defined in Section 4.1.2 of [SMTP]. When used in 519 "result" above, it is further constrained by the necessity of being 520 enumerated in Section 2.7. 522 "value" is as defined in Section 5.1 of [MIME]. 524 See Section 2.5 for a description of the authserv-id element. 526 If the value portion of a "pvalue" construction identifies something 527 intended to be an email identity, then it MUST use the right hand 528 portion of that ABNF definition. 530 The list of commands eligible for use with the "smtp" ptype can be 531 found in Section 4.1 of [SMTP]. 533 The "propspec" may be omitted if, for example, the method was unable 534 to extract any properties to do its evaluation yet has a result to 535 report. 537 Where an SMTP command name is being reported as a "property", the 538 agent generating the header field represents that command by 539 converting it to lowercase and dropping any spaces (e.g., "MAIL FROM" 540 becomes "mailfrom", "RCPT TO" becomes "rcptto", etc.). 542 A "ptype" value of "policy" indicates a policy decision about the 543 message not specific to a property of the message that could be 544 extracted. See Section 2.4 for details. 546 Examples of complete messages using this header field can be found in 547 Appendix B. 549 2.3. Property Types (ptypes) and Properties 551 The "ptype" in the ABNF above indicates the general type of property 552 being described by the result being reported, upon which the reported 553 result was based. Coupled with the "property", which is more 554 specific, they indicate from where the reported data were extracted. 555 This can include part of the message header or body, some part of the 556 SMTP session, a secondary output of an authentication method (apart 557 from its pure result), or some other aspect of the message's 558 handling. 560 Combinations of ptypes and properties are registered and described in 561 the "Email Authentication Methods" registry, coupled with the 562 authentication methods with which they are used. This is further 563 described in Section 6. 565 Legal values of "ptype" are as defined in the IANA "Email 566 Authentication Property Types" registry, created by [RFC7410]. The 567 initial values and what they typically indicate are as follows, based 568 on [RFC7001]: 570 body: Information that was extracted from the body of the message. 571 This might be an arbitrary string of bytes, a hash of a string of 572 bytes, a Uniform Resource Identifier, or some other content of 573 interest. The "property" is an indication of where within the 574 message body the extracted content was found, and can indicate an 575 offset, identify a MIME part, etc. 577 header: Indicates information that was extracted from the header of 578 the message. This might be the value of a header field or some 579 portion of a header field. The "property" gives a more precise 580 indication of the place in the header from which the extraction 581 took place. 583 policy: A local policy mechanism was applied that augments or 584 overrides the result returned by the authentication mechanism. 585 (See Section 2.4.) 587 smtp: Indicates information that was extracted from an SMTP command 588 that was used to relay the message. The "property" indicates 589 which SMTP command included the extracted content as a parameter. 591 Results reported using unknown ptypes MUST NOT be used in making 592 handling decisions. They can be safely ignored by consumers. 594 Entries in the "Email Authentication Methods" registry can define 595 properties that deviate from these definitions when appropriate. 596 Such deviations need to be clear in the registry and/or in the 597 defining document. See Section 2.7.1 for an example. 599 2.4. The "policy" ptype 601 A special ptype value of "policy" is also defined. This ptype is 602 provided to indicate that some local policy mechanism was applied 603 that augments or even replaces (i.e., overrides) the result returned 604 by the authentication mechanism. The property and value in this case 605 identify the local policy that was applied and the result it 606 returned. 608 For example, a DKIM signature is not required to include the Subject 609 header field in the set of fields that are signed. An ADMD receiving 610 such a message might decide that such a signature is unacceptable, 611 even if it passes, because the content of the Subject header field 612 could be altered post-signing without invalidating the signature. 613 Such an ADMD could replace the DKIM "pass" result with a "policy" 614 result and then also include the following in the corresponding 615 Authentication-Result field: 617 ... dkim=fail policy.dkim-rules=unsigned-subject ... 619 In this case, the property is "dkim-rules", indicating some local 620 check by that name took place and that check returned a result of 621 "unsigned-subject". These are arbitrary names selected by (and 622 presumably used within) the ADMD making use of them, so they are not 623 normally registered with IANA or otherwise specified apart from 624 setting syntax restrictions that allow for easy parsing within the 625 rest of the header field. 627 This ptype existed in the original specification for this header 628 field, but without a complete description or example of intended use. 629 As a result, it has not seen any practical use to date that matches 630 its intended purpose. These added details are provided to guide 631 implementers toward proper use. 633 2.5. Authentication Identifier Field 635 Every Authentication-Results header field has an authentication 636 service identifier field (authserv-id above). Specifically, this is 637 any string intended to identify the authentication service within the 638 ADMD that conducted authentication checks on the message. This 639 identifier is intended to be machine-readable and not necessarily 640 meaningful to users. 642 Note that in an EAI-formatted message, this identifier may be 643 expressed in UTF-8. 645 Since agents consuming this field will use this identifier to 646 determine whether its contents are of interest (and are safe to use), 647 the uniqueness of the identifier MUST be guaranteed by the ADMD that 648 generates it and MUST pertain to that ADMD. MUAs or downstream 649 filters SHOULD use this identifier to determine whether or not the 650 data contained in an Authentication-Results header field ought to be 651 used or ignored. 653 For simplicity and scalability, the authentication service identifier 654 SHOULD be a common token used throughout the ADMD. Common practice 655 is to use the DNS domain name used by or within that ADMD, sometimes 656 called the "organizational domain", but this is not strictly 657 necessary. 659 For tracing and debugging purposes, the authentication identifier can 660 instead be the specific hostname of the MTA performing the 661 authentication check whose result is being reported. Moreover, some 662 implementations define a substructure to the identifier; these are 663 outside of the scope of this specification. 665 Note, however, that using a local, relative identifier like a flat 666 hostname, rather than a hierarchical and globally unique ADMD 667 identifier like a DNS domain name, makes configuration more difficult 668 for large sites. The hierarchical identifier permits aggregating 669 related, trusted systems together under a single, parent identifier, 670 which in turn permits assessing the trust relationship with a single 671 reference. The alternative is a flat namespace requiring 672 individually listing each trusted system. Since consumers will use 673 the identifier to determine whether to use the contents of the header 674 field: 676 o Changes to the identifier impose a large, centralized 677 administrative burden. 679 o Ongoing administrative changes require constantly updating this 680 centralized table, making it difficult to ensure that an MUA or 681 downstream filter will have access to accurate information for 682 assessing the usability of the header field's content. In 683 particular, consumers of the header field will need to know not 684 only the current identifier(s) in use but previous ones as well to 685 account for delivery latency or later re-assessment of the header 686 field's contents. 688 Examples of valid authentication identifiers are "example.com", 689 "mail.example.org", "ms1.newyork.example.com", and "example-auth". 691 2.6. Version Tokens 693 The grammar above provides for the optional inclusion of versions on 694 both the header field itself (attached to the authserv-id token) and 695 on each of the methods being reported. The method version refers to 696 the method itself, which is specified in the documents describing 697 those methods, while the authserv-id version refers to this document 698 and thus the syntax of this header field. 700 The purpose of including these is to avoid misinterpretation of the 701 results. That is, if a parser finds a version after an authserv-id 702 that it does not explicitly know, it can immediately discontinue 703 trying to parse since what follows might not be in an expected 704 format. For a method version, the parser SHOULD ignore a method 705 result if the version is not supported in case the semantics of the 706 result have a different meaning than what is expected. For example, 707 if a hypothetical DKIM version 2 yielded a "pass" result for 708 different reasons than version 1 does, a consumer of this field might 709 not want to use the altered semantics. Allowing versions in the 710 syntax is a way to indicate this and let the consumer of the header 711 field decide. 713 2.7. Defined Methods and Result Values 715 Each individual authentication method returns one of a set of 716 specific result values. The subsections below provide references to 717 the documents defining the authentication methods specifically 718 supported by this document, and their corresponding result values. 719 Verifiers SHOULD use these values as described below. New methods 720 not specified in this document, but intended to be supported by the 721 header field defined here, MUST include a similar result table either 722 in their defining documents or in supplementary ones. 724 2.7.1. DKIM and DomainKeys 726 DKIM is represented by the "dkim" method and is defined in [DKIM]. 727 DomainKeys is defined in [DOMAINKEYS] and is represented by the 728 "domainkeys" method. 730 Section 3.8 of [DOMAINKEYS] enumerates some possible results of a 731 DomainKeys evaluation. Those results are not used when generating 732 this header field; rather, the results returned are listed below. 734 A signature is "acceptable to the ADMD" if it passes local policy 735 checks (or there are no specific local policy checks). For example, 736 an ADMD policy might require that the signature(s) on the message be 737 added using the DNS domain present in the From header field of the 738 message, thus making third-party signatures unacceptable even if they 739 verify. 741 Both DKIM and DomainKeys use the same result set, as follows: 743 none: The message was not signed. 745 pass: The message was signed, the signature or signatures were 746 acceptable to the ADMD, and the signature(s) passed verification 747 tests. 749 fail: The message was signed and the signature or signatures were 750 acceptable to the ADMD, but they failed the verification test(s). 752 policy: The message was signed, but some aspect of the signature or 753 signatures was not acceptable to the ADMD. 755 neutral: The message was signed, but the signature or signatures 756 contained syntax errors or were not otherwise able to be 757 processed. This result is also used for other failures not 758 covered elsewhere in this list. 760 temperror: The message could not be verified due to some error that 761 is likely transient in nature, such as a temporary inability to 762 retrieve a public key. A later attempt may produce a final 763 result. 765 permerror: The message could not be verified due to some error that 766 is unrecoverable, such as a required header field being absent. A 767 later attempt is unlikely to produce a final result. 769 DKIM results are reported using a ptype of "header". The property, 770 however, represents one of the tags found in the DKIM-Signature 771 header field rather than a distinct header field. For example, the 772 ptype-property combination "header.d" refers to the content of the 773 "d" (signing domain) tag from within the signature header field, and 774 not a distinct header field called "d". 776 Note that in an EAI-formatted message, the values of the "d" and "i" 777 properties can be expressed in UTF-8. 779 In addition to previous registrations, this document registers the 780 DKIM tag "a" (cryptographic algorithm used to sign the message) as a 781 reportable property. This can be used to aid receivers during post- 782 verification processing. In particular, [RFC8301] obsoleted use of 783 the "rsa-sha1" algorithm in DKIM, so it is important to be able to 784 distinguish such signatures from those using preferred algorithms. 786 The ability to report different DKIM results for a message with 787 multiple signatures is described in [RFC6008]. 789 [DKIM] advises that if a message fails verification, it is to be 790 treated as an unsigned message. A report of "fail" here permits the 791 receiver of the report to decide how to handle the failure. A report 792 of "neutral" or "none" preempts that choice, ensuring the message 793 will be treated as if it had not been signed. 795 Section 3.1 of [DOMAINKEYS] describes a process by which the sending 796 address of the message is determined. DomainKeys results are thus 797 reported along with the signing domain name, the sending address of 798 the message, and the name of the header field from which the latter 799 was extracted. This means that a DomainKeys result includes a ptype- 800 property combination of "header.d", plus one of "header.from" and 801 "header.sender". The sending address extracted from the header is 802 included with any [MAIL]-style comments removed; moreover, the local- 803 part of the address and the "@" character are removed if it has not 804 been authenticated in some way. 806 2.7.2. SPF and Sender ID 808 SPF and Sender ID use the "spf" and "sender-id" method names, 809 respectively. The result values for SPF are defined in Section 2.6 810 of [SPF], and those definitions are included here by reference: 812 +-----------+--------------------------------+ 813 | Code | Meaning | 814 +-----------+--------------------------------+ 815 | none | [RFC7208], Section 2.6.1 | 816 +-----------+--------------------------------+ 817 | pass | [RFC7208], Section 2.6.3 | 818 +-----------+--------------------------------+ 819 | fail | [RFC7208], Section 2.6.4 | 820 +-----------+--------------------------------+ 821 | softfail | [RFC7208], Section 2.6.5 | 822 +-----------+--------------------------------+ 823 | policy | RFC 7601, Section 2.4 | 824 +-----------+--------------------------------+ 825 | neutral | [RFC7208], Section 2.6.2 | 826 +-----------+--------------------------------+ 827 | temperror | [RFC7208], Section 2.6.6 | 828 +-----------+--------------------------------+ 829 | permerror | [RFC7208], Section 2.6.7 | 830 +-----------+--------------------------------+ 832 These result codes are used in the context of this specification to 833 reflect the result returned by the component conducting SPF 834 evaluation. 836 For SPF, the ptype used is "smtp", and the property is either 837 "mailfrom" or "helo", since those values are the ones SPF can 838 evaluate. (If the SMTP client issued the EHLO command instead of 839 HELO, the property used is "helo".) 841 Note that in an EAI-formatted message, the "mailfrom" value can be 842 expressed in UTF-8. 844 The "sender-id" method is described in [SENDERID]. For this method, 845 the ptype used is "header" and the property will be the name of the 846 header field from which the Purported Responsible Address (see [PRA]) 847 was extracted -- namely, one of "Resent-Sender", "Resent-From", 848 "Sender", or "From". 850 The results for Sender ID are listed and described in Section 4.2 of 851 [SENDERID], but for the purposes of this specification, the SPF 852 definitions enumerated above are used instead. Also, [SENDERID] 853 specifies result codes that use mixed case, but they are typically 854 used all lowercase in this context. 856 For both methods, an additional result of "policy" is defined, which 857 means the client was authorized to inject or relay mail on behalf of 858 the sender's DNS domain according to the authentication method's 859 algorithm, but local policy dictates that the result is unacceptable. 860 For example, "policy" might be used if SPF returns a "pass" result, 861 but a local policy check matches the sending DNS domain to one found 862 in an explicit list of unacceptable DNS domains (e.g., spammers). 864 If the retrieved sender policies used to evaluate SPF and Sender ID 865 do not contain explicit provisions for authenticating the local-part 866 (see Section 3.4.1 of [MAIL]) of an address, the "pvalue" reported 867 along with results for these mechanisms SHOULD NOT include the local- 868 part or the following "@" character. 870 2.7.3. "iprev" 872 The result values used by the "iprev" method, defined in Section 3, 873 are as follows: 875 pass: The DNS evaluation succeeded, i.e., the "reverse" and 876 "forward" lookup results were returned and were in agreement. 878 fail: The DNS evaluation failed. In particular, the "reverse" and 879 "forward" lookups each produced results, but they were not in 880 agreement, or the "forward" query completed but produced no 881 result, e.g., a DNS RCODE of 3, commonly known as NXDOMAIN, or an 882 RCODE of 0 (NOERROR) in a reply containing no answers, was 883 returned. 885 temperror: The DNS evaluation could not be completed due to some 886 error that is likely transient in nature, such as a temporary DNS 887 error, e.g., a DNS RCODE of 2, commonly known as SERVFAIL, or 888 other error condition resulted. A later attempt may produce a 889 final result. 891 permerror: The DNS evaluation could not be completed because no PTR 892 data are published for the connecting IP address, e.g., a DNS 893 RCODE of 3, commonly known as NXDOMAIN, or an RCODE of 0 (NOERROR) 894 in a reply containing no answers, was returned. This prevented 895 completion of the evaluation. A later attempt is unlikely to 896 produce a final result. 898 There is no "none" for this method since any TCP connection 899 delivering email has an IP address associated with it, so some kind 900 of evaluation will always be possible. 902 The result is reported using a ptype of "policy" (as this is not part 903 of any established protocol) and a property of "iprev". 905 For discussion of the format of DNS replies, see "Domain Names - 906 Implementation and Specification" ([DNS]). 908 2.7.4. SMTP AUTH 910 SMTP AUTH (defined in [AUTH]) is represented by the "auth" method. 911 Its result values are as follows: 913 none: SMTP authentication was not attempted. 915 pass: The SMTP client authenticated to the server reporting the 916 result using the protocol described in [AUTH]. 918 fail: The SMTP client attempted to authenticate to the server using 919 the protocol described in [AUTH] but was not successful (such as 920 providing a valid identity but an incorrect password). 922 temperror: The SMTP client attempted to authenticate using the 923 protocol described in [AUTH] but was not able to complete the 924 attempt due to some error that is likely transient in nature, such 925 as a temporary directory service lookup error. A later attempt 926 may produce a final result. 928 permerror: The SMTP client attempted to authenticate using the 929 protocol described in [AUTH] but was not able to complete the 930 attempt due to some error that is likely not transient in nature, 931 such as a permanent directory service lookup error. A later 932 attempt is not likely to produce a final result. 934 The result of AUTH is reported using a ptype of "smtp" and a property 935 of either: 937 o "auth", in which case the value is the authorization identity 938 generated by the exchange initiated by the AUTH command; or 940 o "mailfrom", in which case the value is the mailbox identified by 941 the AUTH parameter used with the MAIL FROM command. Note that in 942 an EAI-formatted message, these values can be expressed in UTF-8. 944 If both identities are available, both can be reported. For example, 945 consider this command issued by a client that has completed session 946 authentication with the AUTH command resulting in an authorized 947 identity of "client@c.example": 949 MAIL FROM: AUTH= 951 This could result in a "resinfo" construction like so: 953 ; auth=pass smtp.auth=client@c.example smtp.mailfrom=bob@b.example 955 Note that in all cases other than "pass", the message was sent by an 956 unauthenticated client. All non-"pass" cases SHOULD thus be treated 957 as equivalent with respect to this method. 959 2.7.5. Other Registered Codes 961 Result codes were also registered in other RFCs as follows: 963 o Vouch By Reference (in [AR-VBR], represented by "vbr"); 965 o Authorized Third-Party Signatures (in [ATPS], represented by 966 "dkim-atps"); 968 o Author Domain Signing Practices (in [ADSP], represented by "dkim- 969 adsp"); 971 o Require-Recipient-Valid-Since (in [RRVS], represented by "rrvs"); 973 o S/MIME (in [SMIME-REG], represented by "smime"). 975 Note that "vbr.mv" and "vbr.md", which are already registered, are 976 permitted to be UTF-8 in an EAI-formatted message. 978 2.7.6. Extension Methods 980 Additional authentication method identifiers (extension methods) may 981 be defined in the future by later revisions or extensions to this 982 specification. These method identifiers are registered with the 983 Internet Assigned Numbers Authority (IANA) and, preferably, published 984 in an RFC. See Section 6 for further details. 986 Extension methods can be defined for the following reasons: 988 1. To allow additional information from new authentication systems 989 to be communicated to MUAs or downstream filters. The names of 990 such identifiers ought to reflect the name of the method being 991 defined but ought not be needlessly long. 993 2. To allow the creation of "sub-identifiers" that indicate 994 different levels of authentication and differentiate between 995 their relative strengths, e.g., "auth1-weak" and "auth1-strong". 997 Authentication method implementers are encouraged to provide adequate 998 information, via message header field comments if necessary, to allow 999 an MUA developer to understand or relay ancillary details of 1000 authentication results. For example, if it might be of interest to 1001 relay what data was used to perform an evaluation, such information 1002 could be relayed as a comment in the header field, such as: 1004 Authentication-Results: example.com; 1005 foo=pass bar.baz=blob (2 of 3 tests OK) 1007 Experimental method identifiers MUST only be used within ADMDs that 1008 have explicitly consented to use them. These method identifiers and 1009 the parameters associated with them are not documented in RFCs. 1010 Therefore, they are subject to change at any time and not suitable 1011 for production use. Any MTA, MUA, or downstream filter intended for 1012 production use SHOULD ignore or delete any Authentication-Results 1013 header field that includes an experimental (unknown) method 1014 identifier. 1016 2.7.7. Extension Result Codes 1018 Additional result codes (extension results) might be defined in the 1019 future by later revisions or extensions to this specification. 1020 Result codes MUST be registered with the Internet Assigned Numbers 1021 Authority (IANA) and preferably published in an RFC. See Section 6 1022 for further details. 1024 Experimental results MUST only be used within ADMDs that have 1025 explicitly consented to use them. These results and the parameters 1026 associated with them are not formally documented. Therefore, they 1027 are subject to change at any time and not suitable for production 1028 use. Any MTA, MUA, or downstream filter intended for production use 1029 SHOULD ignore or delete any Authentication-Results header field that 1030 includes an extension result. 1032 3. The "iprev" Authentication Method 1034 This section defines an additional authentication method called 1035 "iprev". 1037 "iprev" is an attempt to verify that a client appears to be valid 1038 based on some DNS queries, which is to say that the IP address is 1039 explicitly associated with a domain name. Upon receiving a session 1040 initiation of some kind from a client, the IP address of the client 1041 peer is queried for matching names (i.e., a number-to-name 1042 translation, also known as a "reverse lookup" or a "PTR" record 1043 query). Once that result is acquired, a lookup of each of the names 1044 (i.e., a name-to-number translation, or an "A" or "AAAA" record 1045 query) thus retrieved is done. The response to this second check 1046 will typically result in at least one mapping back to the client's IP 1047 address. 1049 Expressed as an algorithm: If the client peer's IP address is I, the 1050 list of names to which I maps (after a "PTR" query) is the set N, and 1051 the union of IP addresses to which each member of N maps (after 1052 corresponding "A" and "AAAA" queries) is L, then this test is 1053 successful if I is an element of L. 1055 Often an MTA receiving a connection that fails this test will simply 1056 reject the connection using the enhanced status code defined in 1057 [AUTH-ESC]. If an operator instead wishes to make this information 1058 available to downstream agents as a factor in handling decisions, it 1059 records a result in accordance with Section 2.7.3. 1061 The response to a PTR query could contain multiple names. To prevent 1062 heavy DNS loads, agents performing these queries MUST be implemented 1063 such that the number of names evaluated by generation of 1064 corresponding A or AAAA queries is limited so as not to be unduly 1065 taxing to the DNS infrastructure, though it MAY be configurable by an 1066 administrator. As an example, Section 4.6.4 of [SPF] chose a limit 1067 of 10 for its implementation of this algorithm. 1069 "DNS Extensions to Support IP Version 6" ([DNS-IP6]) discusses the 1070 query formats for the IPv6 case. 1072 There is some contention regarding the wisdom and reliability of this 1073 test. For example, in some regions, it can be difficult for this 1074 test ever to pass because the practice of arranging to match the 1075 forward and reverse DNS is infrequently observed. Therefore, the 1076 precise implementation details of how a verifier performs an "iprev" 1077 test are not specified here. The verifier MAY report a successful or 1078 failed "iprev" test at its discretion having done some kind of check 1079 of the validity of the connection's identity using DNS. It is 1080 incumbent upon an agent making use of the reported "iprev" result to 1081 understand what exactly that particular verifier is attempting to 1082 report. 1084 Extensive discussion of reverse DNS mapping and its implications can 1085 be found in "Considerations for the use of DNS Reverse Mapping" 1086 ([DNSOP-REVERSE]). In particular, it recommends that applications 1087 avoid using this test as a means of authentication or security. Its 1088 presence in this document is not an endorsement but is merely 1089 acknowledgment that the method remains common and provides the means 1090 to relay the results of that test. 1092 4. Adding the Header Field to a Message 1094 This specification makes no attempt to evaluate the relative 1095 strengths of various message authentication methods that may become 1096 available. The methods listed are an order-independent set; their 1097 sequence does not indicate relative strength or importance of one 1098 method over another. Instead, the MUA or downstream filter consuming 1099 this header field is to interpret the result of each method based on 1100 its own knowledge of what that method evaluates. 1102 Each "method" MUST refer to an authentication method declared in the 1103 IANA registry or an extension method as described in Section 2.7.6, 1104 and each "result" MUST refer to a result code declared in the IANA 1105 registry or an extension result code as defined in Section 2.7.7. 1106 See Section 6 for further information about the registered methods 1107 and result codes. 1109 An MTA compliant with this specification adds this header field 1110 (after performing one or more message authentication tests) to 1111 indicate which MTA or ADMD performed the test, which test got 1112 applied, and what the result was. If an MTA applies more than one 1113 such test, it adds this header field either once per test or once 1114 indicating all of the results. An MTA MUST NOT add a result to an 1115 existing header field. 1117 An MTA MAY add this header field containing only the authentication 1118 identifier portion and the "none" token (see Section 2.2) to indicate 1119 explicitly that no message authentication schemes were applied prior 1120 to delivery of this message. 1122 An MTA adding this header field has to take steps to identify it as 1123 legitimate to the MUAs or downstream filters that will ultimately 1124 consume its content. One process to do so is described in Section 5. 1125 Further measures may be necessary in some environments. Some 1126 possible solutions are enumerated in Section 7.1. This document does 1127 not mandate any specific solution to this issue as each environment 1128 has its own facilities and limitations. 1130 Most known message authentication methods focus on a particular 1131 identifier to evaluate. SPF and Sender ID differ in that they can 1132 yield a result based on more than one identifier; specifically, SPF 1133 can evaluate the RFC5321.HELO parameter or the RFC5321.MailFrom 1134 parameter, and Sender ID can evaluate the RFC5321.MailFrom parameter 1135 or the Purported Responsible Address (PRA) identity. When generating 1136 this field to report those results, only the parameter that yielded 1137 the result is included. 1139 For MTAs that add this header field, adding header fields in order 1140 (at the top), per Section 3.6 of [MAIL], is particularly important. 1141 Moreover, this header field SHOULD be inserted above any other trace 1142 header fields such MTAs might prepend. This placement allows easy 1143 detection of header fields that can be trusted. 1145 End users making direct use of this header field might inadvertently 1146 trust information that has not been properly vetted. If, for 1147 example, a basic SPF result were to be relayed that claims an 1148 authenticated addr-spec, the local-part of that addr-spec has 1149 actually not been authenticated. Thus, an MTA adding this header 1150 field SHOULD NOT include any data that has not been authenticated by 1151 the method(s) being applied. Moreover, MUAs SHOULD NOT render to 1152 users such information if it is presented by a method known not to 1153 authenticate it. 1155 4.1. Header Field Position and Interpretation 1157 In order to ensure non-ambiguous results and avoid the impact of 1158 false header fields, MUAs and downstream filters SHOULD NOT interpret 1159 this header field unless specifically configured to do so by the user 1160 or administrator. That is, this interpretation should not be "on by 1161 default". Naturally then, users or administrators ought not activate 1162 such a feature unless (1) they are certain the header field will be 1163 validly added by an agent within the ADMD that accepts the mail that 1164 is ultimately read by the MUA, and (2) instances of the header field 1165 that appear to originate within the ADMD but are actually added by 1166 foreign MTAs will be removed before delivery. 1168 Furthermore, MUAs and downstream filters SHOULD NOT interpret this 1169 header field unless the authentication service identifier it bears 1170 appears to be one used within its own ADMD as configured by the user 1171 or administrator. 1173 MUAs and downstream filters MUST ignore any result reported using a 1174 "result" not specified in the IANA "Result Code" registry or a 1175 "ptype" not listed in the "Email Authentication Property Types" 1176 registry for such values as defined in Section 6. Moreover, such 1177 agents MUST ignore a result indicated for any "method" they do not 1178 specifically support. 1180 An MUA SHOULD NOT reveal these results to end users, absent careful 1181 human factors design considerations and testing, for the presentation 1182 of trust-related materials. For example, an attacker could register 1183 examp1e.com (note the digit "1" (one)) and send signed mail to 1184 intended victims; a verifier would detect that the signature was 1185 valid and report a "pass" even though it's clear the DNS domain name 1186 was intended to mislead. See Section 7.2 for further discussion. 1188 As stated in Section 2.1, this header field MUST be treated as though 1189 it were a trace header field as defined in Section 3.6.7 of [MAIL] 1190 and hence MUST NOT be reordered and MUST be prepended to the message, 1191 so that there is generally some indication upon delivery of where in 1192 the chain of handling MTAs the message authentication was done. 1194 Note that there are a few message handlers that are only capable of 1195 appending new header fields to a message. Strictly speaking, these 1196 handlers are not compliant with this specification. They can still 1197 add the header field to carry authentication details, but any signal 1198 about where in the handling chain the work was done may be lost. 1199 Consumers SHOULD be designed such that this can be tolerated, 1200 especially from a producer known to have this limitation. 1202 MUAs SHOULD ignore instances of this header field discovered within 1203 message/rfc822 MIME attachments. 1205 Further discussion of these topics can be found in Section 7 below. 1207 4.2. Local Policy Enforcement 1209 Some sites have a local policy that considers any particular 1210 authentication policy's non-recoverable failure results (typically 1211 "fail" or similar) as justification for rejecting the message. In 1212 such cases, the border MTA SHOULD issue an SMTP rejection response to 1213 the message, rather than adding this header field and allowing the 1214 message to proceed toward delivery. This is more desirable than 1215 allowing the message to reach an internal host's MTA or spam filter, 1216 thus possibly generating a local rejection such as a Delivery Status 1217 Notification (DSN) [DSN] to a forged originator. Such generated 1218 rejections are colloquially known as "backscatter". 1220 The same MAY also be done for local policy decisions overriding the 1221 results of the authentication methods (e.g., the "policy" result 1222 codes described in Section 2.7). 1224 Such rejections at the SMTP protocol level are not possible if local 1225 policy is enforced at the MUA and not the MTA. 1227 5. Removing Existing Header Fields 1229 For security reasons, any MTA conforming to this specification MUST 1230 delete any discovered instance of this header field that claims, by 1231 virtue of its authentication service identifier, to have been added 1232 within its trust boundary but that did not come directly from another 1233 trusted MTA. For example, an MTA for example.com receiving a message 1234 MUST delete or otherwise obscure any instance of this header field 1235 bearing an authentication service identifier indicating that the 1236 header field was added within example.com prior to adding its own 1237 header fields. This could mean each MTA will have to be equipped 1238 with a list of internal MTAs known to be compliant (and hence 1239 trustworthy). 1241 For messages that are EAI-formatted messages, this test is done after 1242 converting A-labels into U-labels. 1244 For simplicity and maximum security, a border MTA could remove all 1245 instances of this header field on mail crossing into its trust 1246 boundary. However, this may conflict with the desire to access 1247 authentication results performed by trusted external service 1248 providers. It may also invalidate signed messages whose signatures 1249 cover external instances of this header field. A more robust border 1250 MTA could allow a specific list of authenticating MTAs whose 1251 information is to be admitted, removing the header field originating 1252 from all others. 1254 As stated in Section 1.2, a formal definition of "trust boundary" is 1255 deliberately not made here. It is entirely possible that a border 1256 MTA for example.com will explicitly trust authentication results 1257 asserted by upstream host example.net even though they exist in 1258 completely disjoint administrative boundaries. In that case, the 1259 border MTA MAY elect not to delete those results; moreover, the 1260 upstream host doing some authentication work could apply a signing 1261 technology such as [DKIM] on its own results to assure downstream 1262 hosts of their authenticity. An example of this is provided in 1263 Appendix B. 1265 Similarly, in the case of messages signed using [DKIM] or other 1266 message-signing methods that sign header fields, this removal action 1267 could invalidate one or more signatures on the message if they 1268 covered the header field to be removed. This behavior can be 1269 desirable since there's little value in validating the signature on a 1270 message with forged header fields. However, signing agents MAY 1271 therefore elect to omit these header fields from signing to avoid 1272 this situation. 1274 An MTA SHOULD remove any instance of this header field bearing a 1275 version (express or implied) that it does not support. However, an 1276 MTA MUST remove such a header field if the [SMTP] connection relaying 1277 the message is not from a trusted internal MTA. This means the MTA 1278 needs to be able to understand versions of this header field at least 1279 as late as the ones understood by the MUAs or other consumers within 1280 its ADMD. 1282 6. IANA Considerations 1284 IANA has registered the defined header field and created registries 1285 as described below. These registry actions were originally defined 1286 by [RFC5451] and updated by [RFC6577] and [RFC7001]. The created 1287 registries were further updated in [RFC7601] to make them more 1288 complete. 1290 Each is listed below, though generally they are not changed by this 1291 document. 1293 6.1. The Authentication-Results Header Field 1295 The Authentication-Results header field was added to the IANA 1296 "Permanent Message Header Field Names" registry, per the procedure 1297 found in [IANA-HEADERS]. That entry will be updated to reference 1298 this document. The following is the registration template: 1300 Header field name: Authentication-Results 1301 Applicable protocol: mail ([MAIL]) 1302 Status: Standard 1303 Author/Change controller: IETF 1304 Specification document(s): [this document] 1305 Related information: none 1307 6.2. "Email Authentication Methods" Registry Description 1309 No changes are made to the description of this registry. 1311 6.3. "Email Authentication Methods" Registry Update 1313 The following entries are added: 1315 Method: dkim 1317 Definition: [this document] 1318 ptype: header 1320 property: a 1322 Description: value of signature "a" tag 1324 Status: active 1326 Version: 1 1328 Method: dkim 1330 Definition: [this document] 1332 ptype: header 1334 property: s 1336 Description: value of signature "s" tag 1338 Status: active 1340 Version: 1 1342 6.4. "Email Authentication Property Types" Registry 1344 [RFC7410] created the "Email Authentication Property Types" registry. 1346 No changes are made to the description of this registry. However, it 1347 should be noted that Section 2.3 contains slightly different language 1348 than prior versions of this document, allowing a broader space from 1349 which to extract meaningful identifiers and report them through this 1350 mechanism. 1352 6.5. "Email Authentication Result Names" Description 1354 No changes are made to the description of this registry. 1356 6.6. "Email Authentication Result Names" Update 1358 No changes are made to entries in this registry. 1360 7. Security Considerations 1362 The following security considerations apply when adding or processing 1363 the Authentication-Results header field: 1365 7.1. Forged Header Fields 1367 An MUA or filter that accesses a mailbox whose messages are handled 1368 by a non-conformant MTA, and understands Authentication-Results 1369 header fields, could potentially make false conclusions based on 1370 forged header fields. A malicious user or agent could forge a header 1371 field using the DNS domain of a receiving ADMD as the authserv-id 1372 token in the value of the header field and, with the rest of the 1373 value, claim that the message was properly authenticated. The non- 1374 conformant MTA would fail to strip the forged header field, and the 1375 MUA could inappropriately trust it. 1377 For this reason, it is best not to have processing of the 1378 Authentication-Results header field enabled by default; instead, it 1379 should be ignored, at least for the purposes of enacting filtering 1380 decisions, unless specifically enabled by the user or administrator 1381 after verifying that the border MTA is compliant. It is acceptable 1382 to have an MUA aware of this specification but have an explicit list 1383 of hostnames whose Authentication-Results header fields are 1384 trustworthy; however, this list should initially be empty. 1386 Proposed alternative solutions to this problem were made some time 1387 ago and are listed below. To date, they have not been developed due 1388 to lack of demand but are documented here should the information be 1389 useful at some point in the future: 1391 1. Possibly the simplest is a digital signature protecting the 1392 header field, such as using [DKIM], that can be verified by an 1393 MUA by using a posted public key. Although one of the main 1394 purposes of this document is to relieve the burden of doing 1395 message authentication work at the MUA, this only requires that 1396 the MUA learn a single authentication scheme even if a number of 1397 them are in use at the border MTA. Note that [DKIM] requires 1398 that the From header field be signed, although in this 1399 application, the signing agent (a trusted MTA) likely cannot 1400 authenticate that value, so the fact that it is signed should be 1401 ignored. Where the authserv-id is the ADMD's domain name, the 1402 authserv-id matching this valid internal signature's "d=" DKIM 1403 value is sufficient. 1405 2. Another would be a means to interrogate the MTA that added the 1406 header field to see if it is actually providing any message 1407 authentication services and saw the message in question, but this 1408 isn't especially palatable given the work required to craft and 1409 implement such a scheme. 1411 3. Yet another might be a method to interrogate the internal MTAs 1412 that apparently handled the message (based on Received header 1413 fields) to determine whether any of them conform to Section 5 of 1414 this memo. This, too, has potentially high barriers to entry. 1416 4. Extensions to [IMAP], [SMTP], and [POP3] could be defined to 1417 allow an MUA or filtering agent to acquire the authserv-id in use 1418 within an ADMD, thus allowing it to identify which 1419 Authentication-Results header fields it can trust. 1421 5. On the presumption that internal MTAs are fully compliant with 1422 Section 3.6 of [MAIL] and the compliant internal MTAs are using 1423 their own hostnames or the ADMD's DNS domain name as the 1424 authserv-id token, the header field proposed here should always 1425 appear above a Received header added by a trusted MTA. This can 1426 be used as a test for header field validity. 1428 Support for some of these is being considered for future work. 1430 In any case, a mechanism needs to exist for an MUA or filter to 1431 verify that the host that appears to have added the header field (a) 1432 actually did so and (b) is legitimately adding that header field for 1433 this delivery. Given the variety of messaging environments deployed 1434 today, consensus appears to be that specifying a particular mechanism 1435 for doing so is not appropriate for this document. 1437 Mitigation of the forged header field attack can also be accomplished 1438 by moving the authentication results data into metadata associated 1439 with the message. In particular, an [SMTP] extension could be 1440 established to communicate authentication results from the border MTA 1441 to intermediate and delivery MTAs; the latter of these could arrange 1442 to store the authentication results as metadata retrieved and 1443 rendered along with the message by an [IMAP] client aware of a 1444 similar extension in that protocol. The delivery MTA would be told 1445 to trust data via this extension only from MTAs it trusts, and border 1446 MTAs would not accept data via this extension from any source. There 1447 is no vector in such an arrangement for forgery of authentication 1448 data by an outside agent. 1450 7.2. Misleading Results 1452 Until some form of service for querying the reputation of a sending 1453 agent is widely deployed, the existence of this header field 1454 indicating a "pass" does not render the message trustworthy. It is 1455 possible for an arriving piece of spam or other undesirable mail to 1456 pass checks by several of the methods enumerated above (e.g., a piece 1457 of spam signed using [DKIM] by the originator of the spam, which 1458 might be a spammer or a compromised system). In particular, this 1459 issue is not resolved by forged header field removal discussed above. 1461 Hence, MUAs and downstream filters must take some care with use of 1462 this header even after possibly malicious headers are scrubbed. 1464 7.3. Header Field Position 1466 Despite the requirements of [MAIL], header fields can sometimes be 1467 reordered en route by intermediate MTAs. The goal of requiring 1468 header field addition only at the top of a message is an 1469 acknowledgment that some MTAs do reorder header fields, but most do 1470 not. Thus, in the general case, there will be some indication of 1471 which MTAs (if any) handled the message after the addition of the 1472 header field defined here. 1474 7.4. Reverse IP Query Denial-of-Service Attacks 1476 Section 4.6.4 of [SPF] describes a DNS-based denial-of-service attack 1477 for verifiers that attempt DNS-based identity verification of 1478 arriving client connections. A verifier wishing to do this check and 1479 report this information needs to take care not to go to unbounded 1480 lengths to resolve "A" and "PTR" queries. MUAs or other filters 1481 making use of an "iprev" result specified by this document need to be 1482 aware of the algorithm used by the verifier reporting the result and, 1483 especially, its limitations. 1485 7.5. Mitigation of Backscatter 1487 Failing to follow the instructions of Section 4.2 can result in a 1488 denial-of-service attack caused by the generation of [DSN] messages 1489 (or equivalent) to addresses that did not send the messages being 1490 rejected. 1492 7.6. Internal MTA Lists 1494 Section 5 describes a procedure for scrubbing header fields that may 1495 contain forged authentication results about a message. A compliant 1496 installation will have to include, at each MTA, a list of other MTAs 1497 known to be compliant and trustworthy. Failing to keep this list 1498 current as internal infrastructure changes may expose an ADMD to 1499 attack. 1501 7.7. Attacks against Authentication Methods 1503 If an attack becomes known against an authentication method, clearly 1504 then the agent verifying that method can be fooled into thinking an 1505 inauthentic message is authentic, and thus the value of this header 1506 field can be misleading. It follows that any attack against the 1507 authentication methods supported by this document is also a security 1508 consideration here. 1510 7.8. Intentionally Malformed Header Fields 1512 It is possible for an attacker to add an Authentication-Results 1513 header field that is extraordinarily large or otherwise malformed in 1514 an attempt to discover or exploit weaknesses in header field parsing 1515 code. Implementers must thoroughly verify all such header fields 1516 received from MTAs and be robust against intentionally as well as 1517 unintentionally malformed header fields. 1519 7.9. Compromised Internal Hosts 1521 An internal MUA or MTA that has been compromised could generate mail 1522 with a forged From header field and a forged Authentication-Results 1523 header field that endorses it. Although it is clearly a larger 1524 concern to have compromised internal machines than it is to prove the 1525 value of this header field, this risk can be mitigated by arranging 1526 that internal MTAs will remove this header field if it claims to have 1527 been added by a trusted border MTA (as described above), yet the 1528 [SMTP] connection is not coming from an internal machine known to be 1529 running an authorized MTA. However, in such a configuration, 1530 legitimate MTAs will have to add this header field when legitimate 1531 internal-only messages are generated. This is also covered in 1532 Section 5. 1534 7.10. Encapsulated Instances 1536 MIME messages can contain attachments of type "message/rfc822", which 1537 contain other messages. Such an encapsulated message can also 1538 contain an Authentication-Results header field. Although the 1539 processing of these is outside of the intended scope of this document 1540 (see Section 1.3), some early guidance to MUA developers is 1541 appropriate here. 1543 Since MTAs are unlikely to strip Authentication-Results header fields 1544 after mailbox delivery, MUAs are advised in Section 4.1 to ignore 1545 such instances within MIME attachments. Moreover, when extracting a 1546 message digest to separate mail store messages or other media, such 1547 header fields should be removed so that they will never be 1548 interpreted improperly by MUAs that might later consume them. 1550 7.11. Reverse Mapping 1552 Although Section 3 of this memo includes explicit support for the 1553 "iprev" method, its value as an authentication mechanism is limited. 1554 Implementers of both this proposal and agents that use the data it 1555 relays are encouraged to become familiar with the issues raised by 1556 [DNSOP-REVERSE] when deciding whether or not to include support for 1557 "iprev". 1559 8. References 1561 8.1. Normative References 1563 [ABNF] Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax 1564 Specifications: ABNF", STD 68, RFC 5234, DOI 10.17487/ 1565 RFC5234, January 2008, 1566 . 1568 [DKIM] Crocker, D., Ed., Hansen, T., Ed., and M. Kucherawy, Ed., 1569 "DomainKeys Identified Mail (DKIM) Signatures", STD 76, 1570 RFC 6376, DOI 10.17487/RFC6376, September 2011, 1571 . 1573 [IANA-HEADERS] 1574 Klyne, G., Nottingham, M., and J. Mogul, "Registration 1575 Procedures for Message Header Fields", BCP 90, RFC 3864, 1576 DOI 10.17487/RFC3864, September 2004, 1577 . 1579 [KEYWORDS] 1580 Bradner, S., "Key words for use in RFCs to Indicate 1581 Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/ 1582 RFC2119, March 1997, 1583 . 1585 [MAIL] Resnick, P., Ed., "Internet Message Format", RFC 5322, 1586 DOI 10.17487/RFC5322, October 2008, 1587 . 1589 [MIME] Freed, N. and N. Borenstein, "Multipurpose Internet Mail 1590 Extensions (MIME) Part One: Format of Internet Message 1591 Bodies", RFC 2045, DOI 10.17487/RFC2045, November 1996, 1592 . 1594 [RFC5451] Kucherawy, M., "Message Header Field for Indicating 1595 Message Authentication Status", RFC 5451, DOI 10.17487/ 1596 RFC5451, April 2009, 1597 . 1599 [RFC6008] Kucherawy, M., "Authentication-Results Registration for 1600 Differentiating among Cryptographic Results", RFC 6008, 1601 DOI 10.17487/RFC6008, September 2010, 1602 . 1604 [RFC6530] Klensin, J. and Y. Ko, "Overview and Framework for 1605 Internationalized Email", RFC 6530, DOI 10.17487/RFC6530, 1606 February 2012, . 1608 [RFC6531] Yao, J. and W. Mao, "SMTP Extension for Internationalized 1609 Email", RFC 6531, DOI 10.17487/RFC6531, February 2012, 1610 . 1612 [RFC6532] Yang, A., Steele, S., and N. Freed, "Internationalized 1613 Email Headers", RFC 6532, DOI 10.17487/RFC6532, 1614 February 2012, . 1616 [RFC6577] Kucherawy, M., "Authentication-Results Registration Update 1617 for Sender Policy Framework (SPF) Results", RFC 6577, 1618 DOI 10.17487/RFC6577, March 2012, 1619 . 1621 [RFC7001] Kucherawy, M., "Message Header Field for Indicating 1622 Message Authentication Status", RFC 7001, DOI 10.17487/ 1623 RFC7001, September 2013, 1624 . 1626 [RFC7601] Kucherawy, M., "Message Header Field for Indicating 1627 Message Authentication Status", RFC 7601, DOI 10.17487/ 1628 RFC7601, August 2015, 1629 . 1631 [RFC8301] Kitterman, S., "Cryptographic Algorithm and Key Usage 1632 Update to DomainKeys Identified Mail (DKIM)", RFC 8301, 1633 DOI 10.17487/RFC8301, January 2018, 1634 . 1636 [SMTP] Klensin, J., "Simple Mail Transfer Protocol", RFC 5321, 1637 DOI 10.17487/RFC5321, October 2008, 1638 . 1640 8.2. Informative References 1642 [ADSP] Allman, E., Fenton, J., Delany, M., and J. Levine, 1643 "DomainKeys Identified Mail (DKIM) Author Domain Signing 1644 Practices (ADSP)", RFC 5617, DOI 10.17487/RFC5617, 1645 August 2009, . 1647 [AR-VBR] Kucherawy, M., "Authentication-Results Registration for 1648 Vouch by Reference Results", RFC 6212, DOI 10.17487/ 1649 RFC6212, April 2011, 1650 . 1652 [ATPS] Kucherawy, M., "DomainKeys Identified Mail (DKIM) 1653 Authorized Third-Party Signatures", RFC 6541, 1654 DOI 10.17487/RFC6541, February 2012, 1655 . 1657 [AUTH] Siemborski, R., Ed. and A. Melnikov, Ed., "SMTP Service 1658 Extension for Authentication", RFC 4954, DOI 10.17487/ 1659 RFC4954, July 2007, 1660 . 1662 [AUTH-ESC] 1663 Kucherawy, M., "Email Authentication Status Codes", 1664 RFC 7372, DOI 10.17487/RFC7372, September 2014, 1665 . 1667 [DMARC] Kucherawy, M., Ed. and E. Zwicky, Ed., "Domain-based 1668 Message Authentication, Reporting, and Conformance 1669 (DMARC)", RFC 7489, DOI 10.17487/RFC7489, March 2015, 1670 . 1672 [DNS] Mockapetris, P., "Domain names - implementation and 1673 specification", STD 13, RFC 1035, DOI 10.17487/RFC1035, 1674 November 1987, . 1676 [DNS-IP6] Thomson, S., Huitema, C., Ksinant, V., and M. Souissi, 1677 "DNS Extensions to Support IP Version 6", RFC 3596, 1678 DOI 10.17487/RFC3596, October 2003, 1679 . 1681 [DNSOP-REVERSE] 1682 Senie, D. and A. Sullivan, "Considerations for the use of 1683 DNS Reverse Mapping", Work in Progress, draft-ietf-dnsop- 1684 reverse-mapping-considerations-06, March 2008. 1686 [DOMAINKEYS] 1687 Delany, M., "Domain-Based Email Authentication Using 1688 Public Keys Advertised in the DNS (DomainKeys)", RFC 4870, 1689 DOI 10.17487/RFC4870, May 2007, 1690 . 1692 [DSN] Moore, K. and G. Vaudreuil, "An Extensible Message Format 1693 for Delivery Status Notifications", RFC 3464, 1694 DOI 10.17487/RFC3464, January 2003, 1695 . 1697 [EMAIL-ARCH] 1698 Crocker, D., "Internet Mail Architecture", RFC 5598, 1699 DOI 10.17487/RFC5598, July 2009, 1700 . 1702 [IMAP] Crispin, M., "INTERNET MESSAGE ACCESS PROTOCOL - VERSION 1703 4rev1", RFC 3501, DOI 10.17487/RFC3501, March 2003, 1704 . 1706 [POP3] Myers, J. and M. Rose, "Post Office Protocol - Version 3", 1707 STD 53, RFC 1939, DOI 10.17487/RFC1939, May 1996, 1708 . 1710 [PRA] Lyon, J., "Purported Responsible Address in E-Mail 1711 Messages", RFC 4407, DOI 10.17487/RFC4407, April 2006, 1712 . 1714 [RFC7410] Kucherawy, M., "A Property Types Registry for the 1715 Authentication-Results Header Field", RFC 7410, 1716 DOI 10.17487/RFC7410, December 2014, 1717 . 1719 [RRVS] Mills, W. and M. Kucherawy, "The Require-Recipient-Valid- 1720 Since Header Field and SMTP Service Extension", RFC 7293, 1721 DOI 10.17487/RFC7293, July 2014, 1722 . 1724 [SECURITY] 1725 Rescorla, E. and B. Korver, "Guidelines for Writing RFC 1726 Text on Security Considerations", BCP 72, RFC 3552, 1727 DOI 10.17487/RFC3552, July 2003, 1728 . 1730 [SENDERID] 1731 Lyon, J. and M. Wong, "Sender ID: Authenticating E-Mail", 1732 RFC 4406, DOI 10.17487/RFC4406, April 2006, 1733 . 1735 [SMIME-REG] 1736 Melnikov, A., "Authentication-Results Registration for 1737 S/MIME Signature Verification", RFC 7281, DOI 10.17487/ 1738 RFC7281, June 2014, 1739 . 1741 [SPF] Kitterman, S., "Sender Policy Framework (SPF) for 1742 Authorizing Use of Domains in Email, Version 1", RFC 7208, 1743 DOI 10.17487/RFC7208, April 2014, 1744 . 1746 [VBR] Hoffman, P., Levine, J., and A. Hathcock, "Vouch By 1747 Reference", RFC 5518, DOI 10.17487/RFC5518, April 2009, 1748 . 1750 Appendix A. Legacy MUAs 1752 Implementers of this protocol should be aware that many MUAs are 1753 unlikely to be retrofitted to support the new header field and its 1754 semantics. In the interests of convenience and quicker adoption, a 1755 delivery MTA might want to consider adding things that are processed 1756 by existing MUAs in addition to the Authentication-Results header 1757 field. One suggestion is to include a Priority header field, on 1758 messages that don't already have such a header field, containing a 1759 value that reflects the strength of the authentication that was 1760 accomplished, e.g., "low" for weak or no authentication, "normal" or 1761 "high" for good or strong authentication. 1763 Some modern MUAs can already filter based on the content of this 1764 header field. However, there is keen interest in having MUAs make 1765 some kind of graphical representation of this header field's meaning 1766 to end users. Until this capability is added (i.e., while this 1767 proposal and its successors are being adopted), other interim means 1768 of conveying authentication results may be necessary. 1770 Appendix B. Authentication-Results Examples 1772 This section presents some examples of the use of this header field 1773 to indicate authentication results. 1775 B.1. Trivial Case; Header Field Not Present 1777 The trivial case: 1779 Received: from mail-router.example.com 1780 (mail-router.example.com [192.0.2.1]) 1781 by server.example.org (8.11.6/8.11.6) 1782 with ESMTP id g1G0r1kA003489; 1783 Fri, Feb 15 2002 17:19:07 -0800 1784 From: sender@example.com 1785 Date: Fri, Feb 15 2002 16:54:30 -0800 1786 To: receiver@example.org 1787 Message-Id: <12345.abc@example.com> 1788 Subject: here's a sample 1790 Hello! Goodbye! 1792 Example 1: Trivial Case 1794 The Authentication-Results header field is completely absent. The 1795 MUA may make no conclusion about the validity of the message. This 1796 could be the case because the message authentication services were 1797 not available at the time of delivery, or no service is provided, or 1798 the MTA is not in compliance with this specification. 1800 B.2. Nearly Trivial Case; Service Provided, but No Authentication Done 1802 A message that was delivered by an MTA that conforms to this 1803 specification but provides no actual message authentication service: 1805 Authentication-Results: example.org 1; none 1806 Received: from mail-router.example.com 1807 (mail-router.example.com [192.0.2.1]) 1808 by server.example.org (8.11.6/8.11.6) 1809 with ESMTP id g1G0r1kA003489; 1810 Fri, Feb 15 2002 17:19:07 -0800 1811 From: sender@example.com 1812 Date: Fri, Feb 15 2002 16:54:30 -0800 1813 To: receiver@example.org 1814 Message-Id: <12345.abc@example.com> 1815 Subject: here's a sample 1817 Hello! Goodbye! 1819 Example 2: Header Present but No Authentication Done 1821 The Authentication-Results header field is present, showing that the 1822 delivering MTA conforms to this specification. It used its DNS 1823 domain name as the authserv-id. The presence of "none" (and the 1824 absence of any method or result tokens) indicates that no message 1825 authentication was done. The version number of the specification to 1826 which the field's content conforms is explicitly provided. 1828 B.3. Service Provided, Authentication Done 1830 A message that was delivered by an MTA that conforms to this 1831 specification and applied some message authentication: 1833 Authentication-Results: example.com; 1834 spf=pass smtp.mailfrom=example.net 1835 Received: from dialup-1-2-3-4.example.net 1836 (dialup-1-2-3-4.example.net [192.0.2.200]) 1837 by mail-router.example.com (8.11.6/8.11.6) 1838 with ESMTP id g1G0r1kA003489; 1839 Fri, Feb 15 2002 17:19:07 -0800 1840 From: sender@example.net 1841 Date: Fri, Feb 15 2002 16:54:30 -0800 1842 To: receiver@example.com 1843 Message-Id: <12345.abc@example.net> 1844 Subject: here's a sample 1846 Hello! Goodbye! 1848 Example 3: Header Reporting Results 1850 The Authentication-Results header field is present, indicating that 1851 the border MTA conforms to this specification. The authserv-id is 1852 once again the DNS domain name. Furthermore, the message was 1853 authenticated by that MTA via the method specified in [SPF]. Note 1854 that since that method cannot authenticate the local-part, it has 1855 been omitted from the result's value. The MUA could extract and 1856 relay this extra information if desired. 1858 B.4. Service Provided, Several Authentications Done, Single MTA 1860 A message that was relayed inbound via a single MTA that conforms to 1861 this specification and applied three different message authentication 1862 checks: 1864 Authentication-Results: example.com; 1865 auth=pass (cram-md5) smtp.auth=sender@example.net; 1866 spf=pass smtp.mailfrom=example.net 1867 Authentication-Results: example.com; 1868 sender-id=pass header.from=example.net 1869 Received: from dialup-1-2-3-4.example.net (8.11.6/8.11.6) 1870 (dialup-1-2-3-4.example.net [192.0.2.200]) 1871 by mail-router.example.com (8.11.6/8.11.6) 1872 with ESMTPA id g1G0r1kA003489; 1873 Fri, Feb 15 2002 17:19:07 -0800 1874 Date: Fri, Feb 15 2002 16:54:30 -0800 1875 To: receiver@example.com 1876 From: sender@example.net 1877 Message-Id: <12345.abc@example.net> 1878 Subject: here's a sample 1880 Hello! Goodbye! 1882 Example 4: Headers Reporting Results from One MTA 1884 The Authentication-Results header field is present, indicating that 1885 the delivering MTA conforms to this specification. Once again, the 1886 receiving DNS domain name is used as the authserv-id. Furthermore, 1887 the sender authenticated herself/himself to the MTA via a method 1888 specified in [AUTH], and both SPF and Sender ID checks were done and 1889 passed. The MUA could extract and relay this extra information if 1890 desired. 1892 Two Authentication-Results header fields are not required since the 1893 same host did all of the checking. The authenticating agent could 1894 have consolidated all the results into one header field. 1896 This example illustrates a scenario in which a remote user on a 1897 dial-up connection (example.net) sends mail to a border MTA 1898 (example.com) using SMTP authentication to prove identity. The 1899 dial-up provider has been explicitly authorized to relay mail as 1900 example.com, producing "pass" results from the SPF and Sender ID 1901 checks. 1903 B.5. Service Provided, Several Authentications Done, Different MTAs 1905 A message that was relayed inbound by two different MTAs that conform 1906 to this specification and applied multiple message authentication 1907 checks: 1909 Authentication-Results: example.com; 1910 sender-id=fail header.from=example.com; 1911 dkim=pass (good signature) header.d=example.com 1912 Received: from mail-router.example.com 1913 (mail-router.example.com [192.0.2.1]) 1914 by auth-checker.example.com (8.11.6/8.11.6) 1915 with ESMTP id i7PK0sH7021929; 1916 Fri, Feb 15 2002 17:19:22 -0800 1917 DKIM-Signature: v=1; a=rsa-sha256; s=gatsby; d=example.com; 1918 t=1188964191; c=simple/simple; h=From:Date:To:Subject: 1919 Message-Id:Authentication-Results; 1920 bh=sEuZGD/pSr7ANysbY3jtdaQ3Xv9xPQtS0m70; 1921 b=EToRSuvUfQVP3Bkz ... rTB0t0gYnBVCM= 1922 Authentication-Results: example.com; 1923 auth=pass (cram-md5) smtp.auth=sender@example.com; 1924 spf=fail smtp.mailfrom=example.com 1925 Received: from dialup-1-2-3-4.example.net 1926 (dialup-1-2-3-4.example.net [192.0.2.200]) 1927 by mail-router.example.com (8.11.6/8.11.6) 1928 with ESMTPA id g1G0r1kA003489; 1929 Fri, Feb 15 2002 17:19:07 -0800 1930 From: sender@example.com 1931 Date: Fri, Feb 15 2002 16:54:30 -0800 1932 To: receiver@example.com 1933 Message-Id: <12345.abc@example.com> 1934 Subject: here's a sample 1936 Hello! Goodbye! 1938 Example 5: Headers Reporting Results from Multiple MTAs 1940 The Authentication-Results header field is present, indicating 1941 conformance to this specification. Once again, the authserv-id used 1942 is the recipient's DNS domain name. The header field is present 1943 twice because two different MTAs in the chain of delivery did 1944 authentication tests. The first MTA, mail-router.example.com, 1945 reports that SMTP AUTH and SPF were both used and that the former 1946 passed while the latter failed. In the SMTP AUTH case, additional 1947 information is provided in the comment field, which the MUA can 1948 choose to render if desired. 1950 The second MTA, auth-checker.example.com, reports that it did a 1951 Sender ID test (which failed) and a DKIM test (which passed). Again, 1952 additional data about one of the tests is provided as a comment, 1953 which the MUA may choose to render. Also noteworthy here is the fact 1954 that there is a DKIM signature added by example.com that assured the 1955 integrity of the lower Authentication-Results field. 1957 Since different hosts did the two sets of authentication checks, the 1958 header fields cannot be consolidated in this example. 1960 This example illustrates more typical transmission of mail into 1961 example.com from a user on a dial-up connection example.net. The 1962 user appears to be legitimate as he/she had a valid password allowing 1963 authentication at the border MTA using SMTP AUTH. The SPF and Sender 1964 ID tests failed since example.com has not granted example.net 1965 authority to relay mail on its behalf. However, the DKIM test passed 1966 because the sending user had a private key matching one of 1967 example.com's published public keys and used it to sign the message. 1969 B.6. Service Provided, Multi-tiered Authentication Done 1971 A message that had authentication done at various stages, one of 1972 which was outside the receiving ADMD: 1974 Authentication-Results: example.com; 1975 dkim=pass reason="good signature" 1976 header.i=@mail-router.example.net; 1977 dkim=fail reason="bad signature" 1978 header.i=@newyork.example.com 1979 Received: from mail-router.example.net 1980 (mail-router.example.net [192.0.2.250]) 1981 by chicago.example.com (8.11.6/8.11.6) 1982 for 1983 with ESMTP id i7PK0sH7021929; 1984 Fri, Feb 15 2002 17:19:22 -0800 1985 DKIM-Signature: v=1; a=rsa-sha256; s=furble; 1986 d=mail-router.example.net; t=1188964198; c=relaxed/simple; 1987 h=From:Date:To:Message-Id:Subject:Authentication-Results; 1988 bh=ftA9J6GtX8OpwUECzHnCkRzKw1uk6FNiLfJl5Nmv49E=; 1989 b=oINEO8hgn/gnunsg ... 9n9ODSNFSDij3= 1990 Authentication-Results: example.net; 1991 dkim=pass (good signature) header.i=@newyork.example.com 1992 Received: from smtp.newyork.example.com 1993 (smtp.newyork.example.com [192.0.2.220]) 1994 by mail-router.example.net (8.11.6/8.11.6) 1995 with ESMTP id g1G0r1kA003489; 1996 Fri, Feb 15 2002 17:19:07 -0800 1997 DKIM-Signature: v=1; a=rsa-sha256; s=gatsby; 1998 d=newyork.example.com; 1999 t=1188964191; c=simple/simple; 2000 h=From:Date:To:Message-Id:Subject; 2001 bh=sEu28nfs9fuZGD/pSr7ANysbY3jtdaQ3Xv9xPQtS0m7=; 2002 b=EToRSuvUfQVP3Bkz ... rTB0t0gYnBVCM= 2003 From: sender@newyork.example.com 2004 Date: Fri, Feb 15 2002 16:54:30 -0800 2005 To: meetings@example.net 2006 Message-Id: <12345.abc@newyork.example.com> 2007 Subject: here's a sample 2009 Example 6: Headers Reporting Results from Multiple MTAs in Different 2010 ADMDs 2012 In this example, we see multi-tiered authentication with an extended 2013 trust boundary. 2015 The message was sent from someone at example.com's New York office 2016 (newyork.example.com) to a mailing list managed at an intermediary. 2018 The message was signed at the origin using DKIM. 2020 The message was sent to a mailing list service provider called 2021 example.net, which is used by example.com. There, 2022 meetings@example.net is expanded to a long list of recipients, one of 2023 whom is at the Chicago office. In this example, we will assume that 2024 the trust boundary for chicago.example.com includes the mailing list 2025 server at example.net. 2027 The mailing list server there first authenticated the message and 2028 affixed an Authentication-Results header field indicating such using 2029 its DNS domain name for the authserv-id. It then altered the message 2030 by affixing some footer text to the body, including some 2031 administrivia such as unsubscription instructions. Finally, the 2032 mailing list server affixes a second DKIM signature and begins 2033 distribution of the message. 2035 The border MTA for chicago.example.com explicitly trusts results from 2036 mail-router.example.net, so that header field is not removed. It 2037 performs evaluation of both signatures and determines that the first 2038 (most recent) is a "pass" but, because of the aforementioned 2039 modifications, the second is a "fail". However, the first signature 2040 included the Authentication-Results header added at mail- 2041 router.example.net that validated the second signature. Thus, 2042 indirectly, it can be determined that the authentications claimed by 2043 both signatures are indeed valid. 2045 Note that two styles of presenting metadata about the result are in 2046 use here. In one case, the "reason=" clause is present, which is 2047 intended for easy extraction by parsers; in the other case, the CFWS 2048 production of the ABNF is used to include such data as a header field 2049 comment. The latter can be harder for parsers to extract given the 2050 varied supported syntaxes of mail header fields. 2052 B.7. Comment-Heavy Example 2054 The formal syntax permits comments within the content in a number of 2055 places. For the sake of illustration, this example is also legal: 2057 Authentication-Results: foo.example.net (foobar) 1 (baz); 2058 dkim (Because I like it) / 1 (One yay) = (wait for it) fail 2059 policy (A dot can go here) . (like that) expired 2060 (this surprised me) = (as I wasn't expecting it) 1362471462 2062 Example 7: A Very Comment-Heavy but Perfectly Legal Example 2064 Appendix C. Operational Considerations about Message Authentication 2066 This protocol is predicated on the idea that authentication (and 2067 presumably in the future, reputation) work is typically done by 2068 border MTAs rather than MUAs or intermediate MTAs; the latter merely 2069 make use of the results determined by the former. Certainly this is 2070 not mandatory for participation in electronic mail or message 2071 authentication, but this protocol and its deployment to date are 2072 based on that model. The assumption satisfies several common ADMD 2073 requirements: 2075 1. Service operators prefer to resolve the handling of problem 2076 messages as close to the border of the ADMD as possible. This 2077 enables, for example, rejection of messages at the SMTP level 2078 rather than generating a DSN internally. Thus, doing any of the 2079 authentication or reputation work exclusively at the MUA or 2080 intermediate MTA renders this desire unattainable. 2082 2. Border MTAs are more likely to have direct access to external 2083 sources of authentication or reputation information since modern 2084 MUAs are more likely to be heavily firewalled. Thus, some MUAs 2085 might not even be able to complete the task of performing 2086 authentication or reputation evaluations without complex proxy 2087 configurations or similar burdens. 2089 3. MUAs rely upon the upstream MTAs within their trust boundaries to 2090 make correct (as much as is possible) evaluations about the 2091 message's envelope, header, and content. Thus, MUAs don't need 2092 to know how to do the work that upstream MTAs do; they only need 2093 the results of that work. 2095 4. Evaluations about the quality of a message, from simple token 2096 matching (e.g., a list of preferred DNS domains) to cryptanalysis 2097 (e.g., public/private key work), do have a cost and thus need to 2098 be minimized. To that end, performing those tests at the border 2099 MTA is far preferred to doing that work at each MUA that handles 2100 a message. If an ADMD's environment adheres to common messaging 2101 protocols, a reputation query or an authentication check 2102 performed by a border MTA would return the same result as the 2103 same query performed by an MUA. By contrast, in an environment 2104 where the MUA does the work, a message arriving for multiple 2105 recipients would thus cause authentication or reputation 2106 evaluation to be done more than once for the same message (i.e., 2107 at each MUA), causing needless amplification of resource use and 2108 creating a possible denial-of-service attack vector. 2110 5. Minimizing change is good. As new authentication and reputation 2111 methods emerge, the list of methods supported by this header 2112 field would presumably be extended. If MUAs simply consume the 2113 contents of this header field rather than actually attempt to do 2114 authentication and/or reputation work, then MUAs only need to 2115 learn to parse this header field once; emergence of new methods 2116 requires only a configuration change at the MUAs and software 2117 changes at the MTAs (which are presumably fewer in number). When 2118 choosing to implement these functions in MTAs vs. MUAs, the 2119 issues of individual flexibility, infrastructure inertia, and 2120 scale of effort must be considered. It is typically easier to 2121 change a single MUA than an MTA because the modification affects 2122 fewer users and can be pursued with less care. However, changing 2123 many MUAs is more effort than changing a smaller number of MTAs. 2125 6. For decisions affecting message delivery and display, assessment 2126 based on authentication and reputation is best performed close to 2127 the time of message transit, as a message makes its journey 2128 toward a user's inbox, not afterwards. DKIM keys and IP address 2129 reputations, etc., can change over time or even become invalid, 2130 and users can take a long time to read a message once delivered. 2131 The value of this work thus degrades, perhaps quickly, once the 2132 delivery process has completed. This seriously diminishes the 2133 value of this work when done elsewhere than at MTAs. 2135 Many operational choices are possible within an ADMD, including the 2136 venue for performing authentication and/or reputation assessment. 2137 The current specification does not dictate any of those choices. 2138 Rather, it facilitates those cases in which information produced by 2139 one stage of analysis needs to be transported with the message to the 2140 next stage. 2142 Appendix D. Changes Since RFC7601 2144 o Added IANA registration for DKIM "a" and "s" properties. 2146 o Include EAI guidance. 2148 Appendix E. Acknowledgments 2150 The author wishes to acknowledge the following individuals for their 2151 review and constructive criticism of this document: Seth Blank, John 2152 Levine, Scott Kitterman 2154 Author's Address 2156 Murray S. Kucherawy 2157 270 Upland Drive 2158 San Francisco, CA 94127 2159 United States 2161 Email: superuser@gmail.com