idnits 2.17.1 draft-ietf-dmarc-rfc7601bis-04.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 updates 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 (November 14, 2018) is 1984 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 510, but not defined == Missing Reference: 'RFC7208' is mentioned on line 836, 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 November 14, 2018 4 Updates: 7601 (if approved) 5 Intended status: Standards Track 6 Expires: May 18, 2019 8 Message Header Field for Indicating Message Authentication Status 9 draft-ietf-dmarc-rfc7601bis-04 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 May 18, 2019. 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 . . . . . . . . . . 13 70 2.4. The "policy" ptype . . . . . . . . . . . . . . . . . . . . 14 71 2.5. Authentication Identifier Field . . . . . . . . . . . . . 14 72 2.6. Version Tokens . . . . . . . . . . . . . . . . . . . . . . 16 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 . . . . . . . . . . . . . . 23 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.3.1. 'header.a' for DKIM . . . . . . . . . . . . . . . . . 29 91 6.3.2. 'header.s' for DKIM . . . . . . . . . . . . . . . . . 29 92 6.4. "Email Authentication Property Types" Registry . . . . . . 29 93 6.5. "Email Authentication Result Names" Description . . . . . 29 94 6.6. "Email Authentication Result Names" Update . . . . . . . . 30 95 7. Security Considerations . . . . . . . . . . . . . . . . . . . 30 96 7.1. Forged Header Fields . . . . . . . . . . . . . . . . . . . 30 97 7.2. Misleading Results . . . . . . . . . . . . . . . . . . . . 32 98 7.3. Header Field Position . . . . . . . . . . . . . . . . . . 32 99 7.4. Reverse IP Query Denial-of-Service Attacks . . . . . . . . 32 100 7.5. Mitigation of Backscatter . . . . . . . . . . . . . . . . 32 101 7.6. Internal MTA Lists . . . . . . . . . . . . . . . . . . . . 32 102 7.7. Attacks against Authentication Methods . . . . . . . . . . 33 103 7.8. Intentionally Malformed Header Fields . . . . . . . . . . 33 104 7.9. Compromised Internal Hosts . . . . . . . . . . . . . . . . 33 105 7.10. Encapsulated Instances . . . . . . . . . . . . . . . . . . 33 106 7.11. Reverse Mapping . . . . . . . . . . . . . . . . . . . . . 34 107 8. References . . . . . . . . . . . . . . . . . . . . . . . . . . 34 108 8.1. Normative References . . . . . . . . . . . . . . . . . . . 34 109 8.2. Informative References . . . . . . . . . . . . . . . . . . 36 110 Appendix A. Legacy MUAs . . . . . . . . . . . . . . . . . . . . . 38 111 Appendix B. Authentication-Results Examples . . . . . . . . . . . 38 112 B.1. Trivial Case; Header Field Not Present . . . . . . . . . . 39 113 B.2. Nearly Trivial Case; Service Provided, but No 114 Authentication Done . . . . . . . . . . . . . . . . . . . 39 115 B.3. Service Provided, Authentication Done . . . . . . . . . . 40 116 B.4. Service Provided, Several Authentications Done, Single 117 MTA . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 118 B.5. Service Provided, Several Authentications Done, 119 Different MTAs . . . . . . . . . . . . . . . . . . . . . . 42 120 B.6. Service Provided, Multi-tiered Authentication Done . . . . 44 121 B.7. Comment-Heavy Example . . . . . . . . . . . . . . . . . . 45 122 Appendix C. Operational Considerations about Message 123 Authentication . . . . . . . . . . . . . . . . . . . 46 124 Appendix D. Changes Since RFC7601 . . . . . . . . . . . . . . . . 47 125 Appendix E. Acknowledgments . . . . . . . . . . . . . . . . . . . 47 126 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . . 48 128 1. Introduction 130 This document describes a header field called Authentication-Results 131 for electronic mail messages that presents the results of a message 132 authentication effort in a machine-readable format. The intent of 133 the header field is to create a place to collect such data when 134 message authentication mechanisms are in use so that a Mail User 135 Agent (MUA) and downstream filters can make filtering decisions 136 and/or provide a recommendation to the user as to the validity of the 137 message's origin and possibly the safety and integrity of its 138 content. 140 End users are not expected to be direct consumers of this header 141 field. This header field is intended for consumption by programs 142 that will then use such data or render it in a human-usable form. 144 This document specifies the format of this header field and discusses 145 the implications of its presence or absence. However, it does not 146 discuss how the data contained in the header field ought to be used, 147 such as what filtering decisions are appropriate or how an MUA might 148 render those results, as these are local policy and/or user interface 149 design questions that are not appropriate for this document. 151 At the time of publication of this document, the following are 152 published email authentication methods: 154 o Author Domain Signing Practices ([ADSP]) (Historic) 156 o SMTP Service Extension for Authentication ([AUTH]) 158 o DomainKeys Identified Mail Signatures ([DKIM]) 160 o Domain-based Message Authentication, Reporting and Conformance 161 ([DMARC]) 163 o Sender Policy Framework ([SPF]) 165 o reverse IP address name validation ("iprev", defined in Section 3) 167 o Require-Recipient-Valid-Since Header Field and SMTP Service 168 Extension ([RRVS]) 170 o S/MIME Signature Verification ([SMIME-REG]) 172 o Vouch By Reference ([VBR]) 174 o DomainKeys ([DOMAINKEYS]) (Historic) 175 o Sender ID ([SENDERID]) (Experimental) 177 There exist registries for tokens used within this header field that 178 refer to the specifications listed above. Section 6 describes the 179 registries and their contents and specifies the process by which 180 entries are added or updated. It also updates the existing contents 181 to match the current states of these specifications. 183 The goal of this work is to give current and future authentication 184 schemes a common framework within which to deliver their results to 185 downstream agents and discourage the creation of unique header fields 186 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 applied 216 somewhere upstream. For an MUA or downstream filter to treat the 217 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 specification groups them both into a single header 325 field. 327 1.5.4. Email Architecture 329 o A "border MTA" is an MTA that acts as a gateway between the 330 general Internet and the users within an organizational boundary. 331 (See also Section 1.2.) 333 o A "delivery MTA" (or Mail Delivery Agent or MDA) is an MTA that 334 actually enacts delivery of a message to a user's inbox or other 335 final delivery. 337 o An "intermediate MTA" is any MTA that is not a delivery MTA and is 338 also not the first MTA to handle the message. 340 The following diagram illustrates the flow of mail among these 341 defined components. See Internet Mail Architecture [EMAIL-ARCH] for 342 further discussion on general email system architecture, which 343 includes detailed descriptions of these components, and Appendix C of 344 this document for discussion about the common aspects of email 345 authentication in current environments. 347 +-----+ +-----+ +------------+ 348 | MUA |-->| MSA |-->| Border MTA | 349 +-----+ +-----+ +------------+ 350 | 351 | 352 V 353 +----------+ 354 | Internet | 355 +----------+ 356 | 357 | 358 V 359 +-----+ +-----+ +------------------+ +------------+ 360 | MUA |<--| MDA |<--| Intermediate MTA |<--| Border MTA | 361 +-----+ +-----+ +------------------+ +------------+ 363 Generally, it is assumed that the work of applying message 364 authentication schemes takes place at a border MTA or a delivery MTA. 366 This specification is written with that assumption in mind. However, 367 there are some sites at which the entire mail infrastructure consists 368 of a single host. In such cases, such terms as "border MTA" and 369 "delivery MTA" might well apply to the same machine or even the very 370 same agent. It is also possible that some message authentication 371 tests could take place on an intermediate MTA. Although this 372 document doesn't specifically describe such cases, they are not meant 373 to be excluded. 375 1.5.5. Other Terms 377 In this document, the term "producer" refers to any component that 378 adds this header field to messages it is handling, and "consumer" 379 refers to any component that identifies, extracts, and parses the 380 header field to use as part of a handling decision. 382 1.6. Trust Environment 384 This header field permits one or more message validation mechanisms 385 to communicate output to one or more separate assessment mechanisms. 386 These mechanisms operate within a unified trust boundary that defines 387 an Administrative Management Domain (ADMD). An ADMD contains one or 388 more entities that perform validation and generate the header field 389 and one or more that consume it for some type of assessment. The 390 field often contains no integrity or validation mechanism of its own, 391 so its presence must be trusted implicitly. Hence, valid use of the 392 header field requires removing any occurrences of it that claim to be 393 associated with the ADMD when the message enters the ADMD. This 394 ensures that later occurrences have been added within the trust 395 boundary of the ADMD. 397 The authserv-id token defined in Section 2.2 can be used to reference 398 an entire ADMD or a specific validation engine within an ADMD. 399 Although the labeling scheme is left as an operational choice, some 400 guidance for selecting a token is provided in later sections of this 401 document. 403 2. Definition and Format of the Header Field 405 This section gives a general overview of the format of the header 406 field being defined and then provides a formal specification. 408 2.1. General Description 410 The header field specified here is called Authentication-Results. It 411 is a Structured Header Field as defined in Internet Message Format 412 ([MAIL]), and thus all of the related definitions in that document 413 apply. 415 This header field is added at the top of the message as it transits 416 MTAs that do authentication checks, so some idea of how far away the 417 checks were done can be inferred. It is therefore considered to be a 418 trace field as defined in [MAIL], and thus all of the related 419 definitions in that document apply. 421 The value of the header field (after removing comments) consists of 422 an authentication identifier, an optional version, and then a series 423 of statements and supporting data. The statements are of the form 424 "method=result" and indicate which authentication method(s) were 425 applied and their respective results. For each such statement, the 426 supporting data can include a "reason" string and one or more 427 "property=value" statements indicating which message properties were 428 evaluated to reach that conclusion. 430 The header field can appear more than once in a single message, more 431 than one result can be represented in a single header field, or a 432 combination of these can be applied. 434 2.2. Formal Definition 436 Formally, the header field is specified as follows using Augmented 437 Backus-Naur Form ([ABNF]): 439 authres-header-field = "Authentication-Results:" authres-payload 441 authres-payload = [CFWS] authserv-id 442 [ CFWS authres-version ] 443 ( no-result / 1*resinfo ) [CFWS] CRLF 445 authserv-id = value 446 ; see below for a description of this element 448 authres-version = 1*DIGIT [CFWS] 449 ; indicates which version of this specification is in use; 450 ; this specification is version "1", and the absence of a 451 ; version implies this version of the specification 453 no-result = [CFWS] ";" [CFWS] "none" 454 ; the special case of "none" is used to indicate that no 455 ; message authentication was performed 457 resinfo = [CFWS] ";" methodspec [ CFWS reasonspec ] 458 *( CFWS propspec ) 460 methodspec = [CFWS] method [CFWS] "=" [CFWS] result 461 ; indicates which authentication method was evaluated 462 ; and what its output was 464 reasonspec = "reason" [CFWS] "=" [CFWS] value 465 ; a free-form comment on the reason the given result 466 ; was returned 468 propspec = ptype [CFWS] "." [CFWS] property [CFWS] "=" pvalue 469 ; an indication of which properties of the message 470 ; were evaluated by the authentication scheme being 471 ; applied to yield the reported result 473 method = Keyword [ [CFWS] "/" [CFWS] method-version ] 474 ; a method indicates which method's result is 475 ; represented by "result", and is one of the methods 476 ; explicitly defined as valid in this document 477 ; or is an extension method as defined below 479 method-version = 1*DIGIT [CFWS] 480 ; indicates which version of the method specification is 481 ; in use, corresponding to the matching entry in the IANA 482 ; "Email Authentication Methods" registry; a value of "1" 483 ; is assumed if this version string is absent 485 result = Keyword 486 ; indicates the results of the attempt to authenticate 487 ; the message; see below for details 489 ptype = Keyword 490 ; indicates whether the property being evaluated was 491 ; a parameter to an [SMTP] command, was a value taken 492 ; from a message header field, was some property of 493 ; the message body, or was some other property evaluated by 494 ; the receiving MTA; expected to be one of the "property 495 ; types" explicitly defined as valid, or an extension 496 ; ptype, as defined below 498 property = special-smtp-verb / Keyword 499 ; indicates more specifically than "ptype" what the 500 ; source of the evaluated property is; the exact meaning 501 ; is specific to the method whose result is being reported 502 ; and is defined more clearly below 504 special-smtp-verb = "mailfrom" / "rcptto" 505 ; special cases of [SMTP] commands that are made up 506 ; of multiple words 508 pvalue = [CFWS] ( value / [ [ local-part ] "@" ] domain-name ) 510 [CFWS] 511 ; the value extracted from the message property defined 512 ; by the "ptype.property" construction 514 "local-part" is defined in Section 3.4.1 of [MAIL], as modified by 515 [RFC6531]. 517 "CFWS" is defined in Section 3.2.2 of [MAIL]. 519 "domain-name" is as defined in Section 3.5 of [DKIM] where the "d=" 520 tag is defined, with "sub-domain" as modified by [RFC6531]. 522 "Keyword" is defined in Section 4.1.2 of [SMTP]. It is further 523 constrained by the necessity of being registered in the IANA registry 524 relevant to the context in which it is used. See Section 2.7, 525 Section 2.3, and Section 6. 527 "value" is as defined in Section 5.1 of [MIME], with "quoted-string" 528 updated as specified in RFC 6532. 530 See Section 2.5 for a description of the authserv-id element. 532 If the value portion of a "pvalue" construction identifies something 533 intended to be an email identity, then it MUST use the right hand 534 portion of that ABNF definition. 536 The list of commands eligible for use with the "smtp" ptype can be 537 found in Section 4.1 of [SMTP]. 539 The "propspec" may be omitted if, for example, the method was unable 540 to extract any properties to do its evaluation yet still has a result 541 to report. It may also be omitted if the agent generating this 542 result wishes not to reveal such properties to downstream agents. 544 Where an SMTP command name is being reported as a "property", the 545 agent generating the header field represents that command by 546 converting it to lowercase and dropping any spaces (e.g., "MAIL FROM" 547 becomes "mailfrom", "RCPT TO" becomes "rcptto", etc.). 549 A "ptype" value of "policy" indicates a policy decision about the 550 message not specific to a property of the message that could be 551 extracted. See Section 2.4 for details. 553 Examples of complete messages using this header field can be found in 554 Appendix B. 556 2.3. Property Types (ptypes) and Properties 558 The "ptype" in the ABNF above indicates the general type of property 559 being described by the result being reported, upon which the reported 560 result was based. Coupled with the "property", which is more 561 specific, they indicate from where the reported data were extracted. 562 This can include part of the message header or body, some part of the 563 SMTP session, a secondary output of an authentication method (apart 564 from its pure result), or some other aspect of the message's 565 handling. 567 Combinations of ptypes and properties are registered and described in 568 the "Email Authentication Methods" registry, coupled with the 569 authentication methods with which they are used. This is further 570 described in Section 6. 572 Legal values of "ptype" are as defined in the IANA "Email 573 Authentication Property Types" registry, created by [RFC7410]. The 574 initial values and what they typically indicate are as follows, based 575 on [RFC7001]: 577 body: Information that was extracted from the body of the message. 578 This might be an arbitrary string of bytes, a hash of a string of 579 bytes, a Uniform Resource Identifier, or some other content of 580 interest. The "property" is an indication of where within the 581 message body the extracted content was found, and can indicate an 582 offset, identify a MIME part, etc. 584 header: Indicates information that was extracted from the header of 585 the message. This might be the value of a header field or some 586 portion of a header field. The "property" gives a more precise 587 indication of the place in the header from which the extraction 588 took place. 590 policy: A local policy mechanism was applied that augments or 591 overrides the result returned by the authentication mechanism. 592 (See Section 2.4.) 594 smtp: Indicates information that was extracted from an SMTP command 595 that was used to relay the message. The "property" indicates 596 which SMTP command included the extracted content as a parameter. 598 Results reported using unknown ptypes MUST NOT be used in making 599 handling decisions. They can be safely ignored by consumers. 601 Entries in the "Email Authentication Methods" registry can define 602 properties that deviate from these definitions when appropriate. 603 Such deviations need to be clear in the registry and/or in the 604 defining document. See Section 2.7.1 for an example. 606 2.4. The "policy" ptype 608 A special ptype value of "policy" is also defined. This ptype is 609 provided to indicate that some local policy mechanism was applied 610 that augments or even replaces (i.e., overrides) the result returned 611 by the authentication mechanism. The property and value in this case 612 identify the local policy that was applied and the result it 613 returned. 615 For example, a DKIM signature is not required to include the Subject 616 header field in the set of fields that are signed. An ADMD receiving 617 such a message might decide that such a signature is unacceptable, 618 even if it passes, because the content of the Subject header field 619 could be altered post-signing without invalidating the signature. 620 Such an ADMD could replace the DKIM "pass" result with a "policy" 621 result and then also include the following in the corresponding 622 Authentication-Result field: 624 ... dkim=policy policy.dkim-rules=unsigned-subject ... 626 In this case, the property is "dkim-rules", indicating some local 627 check by that name took place and that check returned a result of 628 "unsigned-subject". These are arbitrary names selected by (and 629 presumably used within) the ADMD making use of them, so they are not 630 normally registered with IANA or otherwise specified apart from 631 setting syntax restrictions that allow for easy parsing within the 632 rest of the header field. 634 This ptype existed in the original specification for this header 635 field, but without a complete description or example of intended use. 636 As a result, it has not seen any practical use to date that matches 637 its intended purpose. These added details are provided to guide 638 implementers toward proper use. 640 2.5. Authentication Identifier Field 642 Every Authentication-Results header field has an authentication 643 service identifier field (authserv-id above). Specifically, this is 644 any string intended to identify the authentication service within the 645 ADMD that conducted authentication checks on the message. This 646 identifier is intended to be machine-readable and not necessarily 647 meaningful to users. 649 Note that in an EAI-formatted message, this identifier may be 650 expressed in UTF-8. 652 Since agents consuming this field will use this identifier to 653 determine whether its contents are of interest (and are safe to use), 654 the uniqueness of the identifier MUST be guaranteed by the ADMD that 655 generates it and MUST pertain to that ADMD. MUAs or downstream 656 filters SHOULD use this identifier to determine whether or not the 657 data contained in an Authentication-Results header field ought to be 658 used or ignored. 660 For simplicity and scalability, the authentication service identifier 661 SHOULD be a common token used throughout the ADMD. Common practice 662 is to use the DNS domain name used by or within that ADMD, sometimes 663 called the "organizational domain", but this is not strictly 664 necessary. 666 For tracing and debugging purposes, the authentication identifier can 667 instead be the specific hostname of the MTA performing the 668 authentication check whose result is being reported. Moreover, some 669 implementations define a substructure to the identifier; such 670 structures are outside of the scope of this specification. 672 Note, however, that using a local, relative identifier like a flat 673 hostname, rather than a hierarchical and globally unique ADMD 674 identifier like a DNS domain name, makes configuration more difficult 675 for large sites. The hierarchical identifier permits aggregating 676 related, trusted systems together under a single, parent identifier, 677 which in turn permits assessing the trust relationship with a single 678 reference. The alternative is a flat namespace requiring 679 individually listing each trusted system. Since consumers will use 680 the identifier to determine whether to use the contents of the header 681 field: 683 o Changes to the identifier impose a large, centralized 684 administrative burden. 686 o Ongoing administrative changes require constantly updating this 687 centralized table, making it difficult to ensure that an MUA or 688 downstream filter will have access to accurate information for 689 assessing the usability of the header field's content. In 690 particular, consumers of the header field will need to know not 691 only the current identifier(s) in use but previous ones as well to 692 account for delivery latency or later re-assessment of the header 693 field's contents. 695 Examples of valid authentication identifiers are "example.com", 696 "mail.example.org", "ms1.newyork.example.com", and "example-auth". 698 2.6. Version Tokens 700 The grammar above provides for the optional inclusion of versions on 701 both the header field itself (attached to the authserv-id token) and 702 on each of the methods being reported. The method version refers to 703 the method itself, which is specified in the documents describing 704 those methods, while the authserv-id version refers to this document 705 and thus the syntax of this header field. 707 The purpose of including these is to avoid misinterpretation of the 708 results. That is, if a parser finds a version after an authserv-id 709 that it does not explicitly know, it can immediately discontinue 710 trying to parse since what follows might not be in an expected 711 format. For a method version, the parser SHOULD ignore a method 712 result if the version is not supported in case the semantics of the 713 result have a different meaning than what is expected. For example, 714 if a hypothetical DKIM version 2 yielded a "pass" result for 715 different reasons than version 1 does, a consumer of this field might 716 not want to use the altered semantics. Allowing versions in the 717 syntax is a way to indicate this and let the consumer of the header 718 field decide. 720 2.7. Defined Methods and Result Values 722 Each individual authentication method returns one of a set of 723 specific result values. The subsections below provide references to 724 the documents defining the authentication methods specifically 725 supported by this document, and their corresponding result values. 726 Verifiers SHOULD use these values as described below. New methods 727 not specified in this document, but intended to be supported by the 728 header field defined here, MUST include a similar result table either 729 in their defining documents or in supplementary ones. 731 2.7.1. DKIM and DomainKeys 733 DKIM is represented by the "dkim" method and is defined in [DKIM]. 734 DomainKeys is defined in [DOMAINKEYS] and is represented by the 735 "domainkeys" method. 737 Section 3.8 of [DOMAINKEYS] enumerates some possible results of a 738 DomainKeys evaluation. Those results are not used when generating 739 this header field; rather, the results returned are listed below. 741 A signature is "acceptable to the ADMD" if it passes local policy 742 checks (or there are no specific local policy checks). For example, 743 an ADMD policy might require that the signature(s) on the message be 744 added using the DNS domain present in the From header field of the 745 message, thus making third-party signatures unacceptable even if they 746 verify. 748 Both DKIM and DomainKeys use the same result set, as follows: 750 none: The message was not signed. 752 pass: The message was signed, the signature or signatures were 753 acceptable to the ADMD, and the signature(s) passed verification 754 tests. 756 fail: The message was signed and the signature or signatures were 757 acceptable to the ADMD, but they failed the verification test(s). 759 policy: The message was signed, but some aspect of the signature or 760 signatures was not acceptable to the ADMD. 762 neutral: The message was signed, but the signature or signatures 763 contained syntax errors or were not otherwise able to be 764 processed. This result is also used for other failures not 765 covered elsewhere in this list. 767 temperror: The message could not be verified due to some error that 768 is likely transient in nature, such as a temporary inability to 769 retrieve a public key. A later attempt may produce a final 770 result. 772 permerror: The message could not be verified due to some error that 773 is unrecoverable, such as a required header field being absent. A 774 later attempt is unlikely to produce a final result. 776 DKIM results are reported using a ptype of "header". The property, 777 however, represents one of the tags found in the DKIM-Signature 778 header field rather than a distinct header field. For example, the 779 ptype-property combination "header.d" refers to the content of the 780 "d" (signing domain) tag from within the signature header field, and 781 not a distinct header field called "d". 783 Note that in an EAI-formatted message, the values of the "d" and "i" 784 properties can be expressed in UTF-8. 786 In addition to previous registrations, this document registers the 787 DKIM tag "a" (cryptographic algorithm used to sign the message) as a 788 reportable property. This can be used to aid receivers during post- 789 verification processing. In particular, [RFC8301] obsoleted use of 790 the "rsa-sha1" algorithm in DKIM, so it is important to be able to 791 distinguish such signatures from those using preferred algorithms. 793 The ability to report different DKIM results for a message with 794 multiple signatures is described in [RFC6008]. 796 [DKIM] advises that if a message fails verification, it is to be 797 treated as an unsigned message. A report of "fail" here permits the 798 receiver of the report to decide how to handle the failure. A report 799 of "neutral" or "none" preempts that choice, ensuring the message 800 will be treated as if it had not been signed. 802 Section 3.1 of [DOMAINKEYS] describes a process by which the sending 803 address of the message is determined. DomainKeys results are thus 804 reported along with the signing domain name, the sending address of 805 the message, and the name of the header field from which the latter 806 was extracted. This means that a DomainKeys result includes a ptype- 807 property combination of "header.d", plus one of "header.from" and 808 "header.sender". The sending address extracted from the header is 809 included with any [MAIL]-style comments removed; moreover, the local- 810 part of the address and the "@" character are removed if it has not 811 been authenticated in some way. 813 2.7.2. SPF and Sender ID 815 SPF and Sender ID use the "spf" and "sender-id" method names, 816 respectively. The result values for SPF are defined in Section 2.6 817 of [SPF], and those definitions are included here by reference: 819 +-----------+--------------------------------+ 820 | Code | Meaning | 821 +-----------+--------------------------------+ 822 | none | [RFC7208], Section 2.6.1 | 823 +-----------+--------------------------------+ 824 | pass | [RFC7208], Section 2.6.3 | 825 +-----------+--------------------------------+ 826 | fail | [RFC7208], Section 2.6.4 | 827 +-----------+--------------------------------+ 828 | softfail | [RFC7208], Section 2.6.5 | 829 +-----------+--------------------------------+ 830 | policy | RFC 7601, Section 2.4 | 831 +-----------+--------------------------------+ 832 | neutral | [RFC7208], Section 2.6.2 | 833 +-----------+--------------------------------+ 834 | temperror | [RFC7208], Section 2.6.6 | 835 +-----------+--------------------------------+ 836 | permerror | [RFC7208], Section 2.6.7 | 837 +-----------+--------------------------------+ 839 These result codes are used in the context of this specification to 840 reflect the result returned by the component conducting SPF 841 evaluation. 843 For SPF, the ptype used is "smtp", and the property is either 844 "mailfrom" or "helo", since those values are the ones SPF can 845 evaluate. (If the SMTP client issued the EHLO command instead of 846 HELO, the property used is "helo".) 848 Note that in an EAI-formatted message, the "mailfrom" value can be 849 expressed in UTF-8. 851 The "sender-id" method is described in [SENDERID]. For this method, 852 the ptype used is "header" and the property will be the name of the 853 header field from which the Purported Responsible Address (see [PRA]) 854 was extracted -- namely, one of "Resent-Sender", "Resent-From", 855 "Sender", or "From". 857 The results for Sender ID are listed and described in Section 4.2 of 858 [SENDERID], but for the purposes of this specification, the SPF 859 definitions enumerated above are used instead. Also, [SENDERID] 860 specifies result codes that use mixed case, but they are typically 861 used all lowercase in this context. 863 For both methods, an additional result of "policy" is defined, which 864 means the client was authorized to inject or relay mail on behalf of 865 the sender's DNS domain according to the authentication method's 866 algorithm, but local policy dictates that the result is unacceptable. 867 For example, "policy" might be used if SPF returns a "pass" result, 868 but a local policy check matches the sending DNS domain to one found 869 in an explicit list of unacceptable DNS domains (e.g., spammers). 871 If the retrieved sender policies used to evaluate SPF and Sender ID 872 do not contain explicit provisions for authenticating the local-part 873 (see Section 3.4.1 of [MAIL]) of an address, the "pvalue" reported 874 along with results for these mechanisms SHOULD NOT include the local- 875 part or the following "@" character. 877 2.7.3. "iprev" 879 The result values used by the "iprev" method, defined in Section 3, 880 are as follows: 882 pass: The DNS evaluation succeeded, i.e., the "reverse" and 883 "forward" lookup results were returned and were in agreement. 885 fail: The DNS evaluation failed. In particular, the "reverse" and 886 "forward" lookups each produced results, but they were not in 887 agreement, or the "forward" query completed but produced no 888 result, e.g., a DNS RCODE of 3, commonly known as NXDOMAIN, or an 889 RCODE of 0 (NOERROR) in a reply containing no answers, was 890 returned. 892 temperror: The DNS evaluation could not be completed due to some 893 error that is likely transient in nature, such as a temporary DNS 894 error, e.g., a DNS RCODE of 2, commonly known as SERVFAIL, or 895 other error condition resulted. A later attempt may produce a 896 final result. 898 permerror: The DNS evaluation could not be completed because no PTR 899 data are published for the connecting IP address, e.g., a DNS 900 RCODE of 3, commonly known as NXDOMAIN, or an RCODE of 0 (NOERROR) 901 in a reply containing no answers, was returned. This prevented 902 completion of the evaluation. A later attempt is unlikely to 903 produce a final result. 905 There is no "none" for this method since any TCP connection 906 delivering email has an IP address associated with it, so some kind 907 of evaluation will always be possible. 909 The result is reported using a ptype of "policy" (as this is not part 910 of any established protocol) and a property of "iprev". 912 For discussion of the format of DNS replies, see "Domain Names - 913 Implementation and Specification" ([DNS]). 915 2.7.4. SMTP AUTH 917 SMTP AUTH (defined in [AUTH]) is represented by the "auth" method. 918 Its result values are as follows: 920 none: SMTP authentication was not attempted. 922 pass: The SMTP client authenticated to the server reporting the 923 result using the protocol described in [AUTH]. 925 fail: The SMTP client attempted to authenticate to the server using 926 the protocol described in [AUTH] but was not successful (such as 927 providing a valid identity but an incorrect password). 929 temperror: The SMTP client attempted to authenticate using the 930 protocol described in [AUTH] but was not able to complete the 931 attempt due to some error that is likely transient in nature, such 932 as a temporary directory service lookup error. A later attempt 933 may produce a final result. 935 permerror: The SMTP client attempted to authenticate using the 936 protocol described in [AUTH] but was not able to complete the 937 attempt due to some error that is likely not transient in nature, 938 such as a permanent directory service lookup error. A later 939 attempt is not likely to produce a final result. 941 The result of AUTH is reported using a ptype of "smtp" and a property 942 of either: 944 o "auth", in which case the value is the authorization identity 945 generated by the exchange initiated by the AUTH command; or 947 o "mailfrom", in which case the value is the mailbox identified by 948 the AUTH parameter used with the MAIL FROM command. Note that in 949 an EAI-formatted message, these values can be expressed in UTF-8. 951 If both identities are available, both can be reported. For example, 952 consider this command issued by a client that has completed session 953 authentication with the AUTH command resulting in an authorized 954 identity of "client@c.example": 956 MAIL FROM: AUTH= 958 This could result in a "resinfo" construction like so: 960 ; auth=pass smtp.auth=client@c.example smtp.mailfrom=bob@b.example 962 Note that in all cases other than "pass", the message was sent by an 963 unauthenticated client. All non-"pass" cases SHOULD thus be treated 964 as equivalent with respect to this method. 966 2.7.5. Other Registered Codes 968 Result codes were also registered in other RFCs as follows: 970 o Vouch By Reference (in [AR-VBR], represented by "vbr"); 972 o Authorized Third-Party Signatures (in [ATPS], represented by 973 "dkim-atps"); 975 o Author Domain Signing Practices (in [ADSP], represented by "dkim- 976 adsp"); 978 o Require-Recipient-Valid-Since (in [RRVS], represented by "rrvs"); 980 o S/MIME (in [SMIME-REG], represented by "smime"). 982 Note that "vbr.mv" and "vbr.md", which are already registered, are 983 permitted to be UTF-8 in an EAI-formatted message. 985 2.7.6. Extension Methods 987 Additional authentication method identifiers (extension methods) may 988 be defined in the future by later revisions or extensions to this 989 specification. These method identifiers are registered with the 990 Internet Assigned Numbers Authority (IANA) and, preferably, published 991 in an RFC. See Section 6 for further details. 993 Extension methods can be defined for the following reasons: 995 1. To allow additional information from new authentication systems 996 to be communicated to MUAs or downstream filters. The names of 997 such identifiers ought to reflect the name of the method being 998 defined but ought not be needlessly long. 1000 2. To allow the creation of "sub-identifiers" that indicate 1001 different levels of authentication and differentiate between 1002 their relative strengths, e.g., "auth1-weak" and "auth1-strong". 1004 Authentication method implementers are encouraged to provide adequate 1005 information, via message header field comments if necessary, to allow 1006 an MUA developer to understand or relay ancillary details of 1007 authentication results. For example, if it might be of interest to 1008 relay what data was used to perform an evaluation, such information 1009 could be relayed as a comment in the header field, such as: 1011 Authentication-Results: example.com; 1012 foo=pass bar.baz=blob (2 of 3 tests OK) 1014 Experimental method identifiers MUST only be used within ADMDs that 1015 have explicitly consented to use them. These method identifiers and 1016 the parameters associated with them are not documented in RFCs. 1017 Therefore, they are subject to change at any time and not suitable 1018 for production use. Any MTA, MUA, or downstream filter intended for 1019 production use SHOULD ignore or delete any Authentication-Results 1020 header field that includes an experimental (unknown) method 1021 identifier. 1023 2.7.7. Extension Result Codes 1025 Additional result codes (extension results) might be defined in the 1026 future by later revisions or extensions to this specification. Non- 1027 experimental result codes MUST be registered with the Internet 1028 Assigned Numbers Authority (IANA) and preferably published in an RFC. 1029 See Section 6 for further details. 1031 Experimental results MUST only be used within ADMDs that have 1032 explicitly consented to use them. These results and the parameters 1033 associated with them are not formally documented. Therefore, they 1034 are subject to change at any time and not suitable for production 1035 use. Any MTA, MUA, or downstream filter intended for production use 1036 SHOULD ignore or delete any Authentication-Results header field that 1037 includes an extension result. 1039 3. The "iprev" Authentication Method 1041 This section defines an additional authentication method called 1042 "iprev". 1044 "iprev" is an attempt to verify that a client appears to be valid 1045 based on some DNS queries, which is to say that the IP address is 1046 explicitly associated with a domain name. Upon receiving a session 1047 initiation of some kind from a client, the IP address of the client 1048 peer is queried for matching names (i.e., a number-to-name 1049 translation, also known as a "reverse lookup" or a "PTR" record 1050 query). Once that result is acquired, a lookup of each of the names 1051 (i.e., a name-to-number translation, or an "A" or "AAAA" record 1052 query) thus retrieved is done. The response to this second check 1053 will typically result in at least one mapping back to the client's IP 1054 address. 1056 Expressed as an algorithm: If the client peer's IP address is I, the 1057 list of names to which I maps (after a "PTR" query) is the set N, and 1058 the union of IP addresses to which each member of N maps (after 1059 corresponding "A" and "AAAA" queries) is L, then this test is 1060 successful if I is an element of L. 1062 Often an MTA receiving a connection that fails this test will simply 1063 reject the connection using the enhanced status code defined in 1064 [AUTH-ESC]. If an operator instead wishes to make this information 1065 available to downstream agents as a factor in handling decisions, it 1066 records a result in accordance with Section 2.7.3. 1068 The response to a PTR query could contain multiple names. To prevent 1069 heavy DNS loads, agents performing these queries MUST be implemented 1070 such that the number of names evaluated by generation of 1071 corresponding A or AAAA queries is limited so as not to be unduly 1072 taxing to the DNS infrastructure, though it MAY be configurable by an 1073 administrator. As an example, Section 4.6.4 of [SPF] chose a limit 1074 of 10 for its implementation of this algorithm. 1076 "DNS Extensions to Support IP Version 6" ([DNS-IP6]) discusses the 1077 query formats for the IPv6 case. 1079 There is some contention regarding the wisdom and reliability of this 1080 test. For example, in some regions, it can be difficult for this 1081 test ever to pass because the practice of arranging to match the 1082 forward and reverse DNS is infrequently observed. Therefore, the 1083 precise implementation details of how a verifier performs an "iprev" 1084 test are not specified here. The verifier MAY report a successful or 1085 failed "iprev" test at its discretion having done some kind of check 1086 of the validity of the connection's identity using DNS. It is 1087 incumbent upon an agent making use of the reported "iprev" result to 1088 understand what exactly that particular verifier is attempting to 1089 report. 1091 Extensive discussion of reverse DNS mapping and its implications can 1092 be found in "Considerations for the use of DNS Reverse Mapping" 1093 ([DNSOP-REVERSE]). In particular, it recommends that applications 1094 avoid using this test as a means of authentication or security. Its 1095 presence in this document is not an endorsement but is merely 1096 acknowledgment that the method remains common and provides the means 1097 to relay the results of that test. 1099 4. Adding the Header Field to a Message 1101 This specification makes no attempt to evaluate the relative 1102 strengths of various message authentication methods that may become 1103 available. The methods listed are an order-independent set; their 1104 sequence does not indicate relative strength or importance of one 1105 method over another. Instead, the MUA or downstream filter consuming 1106 this header field is to interpret the result of each method based on 1107 its own knowledge of what that method evaluates. 1109 Each "method" MUST refer to an authentication method declared in the 1110 IANA registry or an extension method as described in Section 2.7.6, 1111 and each "result" MUST refer to a result code declared in the IANA 1112 registry or an extension result code as defined in Section 2.7.7. 1113 See Section 6 for further information about the registered methods 1114 and result codes. 1116 An MTA compliant with this specification adds this header field 1117 (after performing one or more message authentication tests) to 1118 indicate which MTA or ADMD performed the test, which test was 1119 applied, and what the result was. If an MTA applies more than one 1120 such test, it adds this header field either once per test or once 1121 indicating all of the results. An MTA MUST NOT add a result to an 1122 existing header field. 1124 An MTA MAY add this header field containing only the authentication 1125 identifier portion and the "none" token (see Section 2.2) to indicate 1126 explicitly that no message authentication schemes were applied prior 1127 to delivery of this message. 1129 An MTA adding this header field has to take steps to identify it as 1130 legitimate to the MUAs or downstream filters that will ultimately 1131 consume its content. One process to do so is described in Section 5. 1132 Further measures may be necessary in some environments. Some 1133 possible solutions are enumerated in Section 7.1. This document does 1134 not mandate any specific solution to this issue as each environment 1135 has its own facilities and limitations. 1137 Most known message authentication methods focus on a particular 1138 identifier to evaluate. SPF and Sender ID differ in that they can 1139 yield a result based on more than one identifier; specifically, SPF 1140 can evaluate the RFC5321.HELO parameter or the RFC5321.MailFrom 1141 parameter, and Sender ID can evaluate the RFC5321.MailFrom parameter 1142 or the Purported Responsible Address (PRA) identity. When generating 1143 this field to report those results, only the parameter that yielded 1144 the result is included. 1146 For MTAs that add this header field, adding header fields in order 1147 (at the top), per Section 3.6 of [MAIL], is particularly important. 1148 Moreover, this header field SHOULD be inserted above any other trace 1149 header fields such MTAs might prepend. This placement allows easy 1150 detection of header fields that can be trusted. 1152 End users making direct use of this header field might inadvertently 1153 trust information that has not been properly vetted. If, for 1154 example, a basic SPF result were to be relayed that claims an 1155 authenticated addr-spec, the local-part of that addr-spec has 1156 actually not been authenticated. Thus, an MTA adding this header 1157 field SHOULD NOT include any data that has not been authenticated by 1158 the method(s) being applied. Moreover, MUAs SHOULD NOT render to 1159 users such information if it is presented by a method known not to 1160 authenticate it. 1162 4.1. Header Field Position and Interpretation 1164 In order to ensure non-ambiguous results and avoid the impact of 1165 false header fields, MUAs and downstream filters SHOULD NOT interpret 1166 this header field unless specifically configured to do so by the user 1167 or administrator. That is, this interpretation should not be "on by 1168 default". Naturally then, users or administrators ought not activate 1169 such a feature unless (1) they are certain the header field will be 1170 validly added by an agent within the ADMD that accepts the mail that 1171 is ultimately read by the MUA, and (2) instances of the header field 1172 that appear to originate within the ADMD but are actually added by 1173 foreign MTAs will be removed before delivery. 1175 Furthermore, MUAs and downstream filters SHOULD NOT interpret this 1176 header field unless the authentication service identifier of the 1177 header field is used within the ADMD as configured by the user or 1178 administrator. 1180 MUAs and downstream filters MUST ignore any result reported using a 1181 "result" not specified in the IANA "Result Code" registry or a 1182 "ptype" not listed in the "Email Authentication Property Types" 1183 registry for such values as defined in Section 6. Moreover, such 1184 agents MUST ignore a result indicated for any "method" they do not 1185 specifically support. 1187 An MUA SHOULD NOT reveal these results to end users, absent careful 1188 human factors design considerations and testing, for the presentation 1189 of trust-related materials. For example, an attacker could register 1190 examp1e.com (note the digit "1" (one)) and send signed mail to 1191 intended victims; a verifier would detect that the signature was 1192 valid and report a "pass" even though it's clear the DNS domain name 1193 was intended to mislead. See Section 7.2 for further discussion. 1195 As stated in Section 2.1, this header field MUST be treated as though 1196 it were a trace header field as defined in Section 3.6.7 of [MAIL] 1197 and hence MUST NOT be reordered and MUST be prepended to the message, 1198 so that there is generally some indication upon delivery of where in 1199 the chain of handling MTAs the message authentication was done. 1201 Note that there are a few message handlers that are only capable of 1202 appending new header fields to a message. Strictly speaking, these 1203 handlers are not compliant with this specification. They can still 1204 add the header field to carry authentication details, but any signal 1205 about where in the handling chain the work was done may be lost. 1206 Consumers SHOULD be designed such that this can be tolerated, 1207 especially from a producer known to have this limitation. 1209 MUAs SHOULD ignore instances of this header field discovered within 1210 message/rfc822 MIME attachments. 1212 Further discussion of these topics can be found in Section 7 below. 1214 4.2. Local Policy Enforcement 1216 Some sites have a local policy that considers any particular 1217 authentication policy's non-recoverable failure results (typically 1218 "fail" or similar) as justification for rejecting the message. In 1219 such cases, the border MTA SHOULD issue an SMTP rejection response to 1220 the message, rather than adding this header field and allowing the 1221 message to proceed toward delivery. This is more desirable than 1222 allowing the message to reach an internal host's MTA or spam filter, 1223 thus possibly generating a local rejection such as a Delivery Status 1224 Notification (DSN) [DSN] to a forged originator. Such generated 1225 rejections are colloquially known as "backscatter". 1227 The same MAY also be done for local policy decisions overriding the 1228 results of the authentication methods (e.g., the "policy" result 1229 codes described in Section 2.7). 1231 Such rejections at the SMTP protocol level are not possible if local 1232 policy is enforced at the MUA and not the MTA. 1234 5. Removing Existing Header Fields 1236 To mitigate the impact of forged header fields, any MTA conforming to 1237 this specification MUST delete any discovered instance of this header 1238 field that claims, by virtue of its authentication service 1239 identifier, to have been added within its trust boundary but that did 1240 not come directly from another trusted MTA. For example, an MTA for 1241 example.com receiving a message MUST delete or otherwise obscure any 1242 instance of this header field bearing an authentication service 1243 identifier indicating that the header field was added within 1244 example.com prior to adding its own header fields. This could mean 1245 each MTA will have to be equipped with a list of internal MTAs known 1246 to be compliant (and hence trustworthy). 1248 For messages that are EAI-formatted messages, this test is done after 1249 converting A-labels into U-labels. 1251 For simplicity and maximum security, a border MTA could remove all 1252 instances of this header field on mail crossing into its trust 1253 boundary. However, this may conflict with the desire to access 1254 authentication results performed by trusted external service 1255 providers. It may also invalidate signed messages whose signatures 1256 cover external instances of this header field. A more robust border 1257 MTA could allow a specific list of authenticating MTAs whose 1258 information is to be admitted, removing the header field originating 1259 from all others. 1261 As stated in Section 1.2, a formal definition of "trust boundary" is 1262 deliberately not made here. It is entirely possible that a border 1263 MTA for example.com will explicitly trust authentication results 1264 asserted by upstream host example.net even though they exist in 1265 completely disjoint administrative boundaries. In that case, the 1266 border MTA MAY elect not to delete those results; moreover, the 1267 upstream host doing some authentication work could apply a signing 1268 technology such as [DKIM] on its own results to assure downstream 1269 hosts of their authenticity. An example of this is provided in 1270 Appendix B. 1272 Similarly, in the case of messages signed using [DKIM] or other 1273 message-signing methods that sign header fields, this removal action 1274 could invalidate one or more signatures on the message if they 1275 covered the header field to be removed. This behavior can be 1276 desirable since there's little value in validating the signature on a 1277 message with forged header fields. However, signing agents MAY 1278 therefore elect to omit these header fields from signing to avoid 1279 this situation. 1281 An MTA SHOULD remove any instance of this header field bearing a 1282 version (express or implied) that it does not support. However, an 1283 MTA MUST remove such a header field if the [SMTP] connection relaying 1284 the message is not from a trusted internal MTA. This means the MTA 1285 needs to be able to understand versions of this header field at least 1286 as late as the ones understood by the MUAs or other consumers within 1287 its ADMD. 1289 6. IANA Considerations 1291 IANA has registered the defined header field and created registries 1292 as described below. These registry actions were originally defined 1293 by [RFC5451] and updated by [RFC6577] and [RFC7001]. The created 1294 registries were further updated in [RFC7601] to make them more 1295 complete. 1297 Each is listed below, though generally they are not changed by this 1298 document. 1300 6.1. The Authentication-Results Header Field 1302 The Authentication-Results header field was added to the IANA 1303 "Permanent Message Header Field Names" registry, per the procedure 1304 found in [IANA-HEADERS]. That entry will be updated to reference 1305 this document. The following is the registration template: 1307 Header field name: Authentication-Results 1308 Applicable protocol: mail ([MAIL]) 1309 Status: Standard 1310 Author/Change controller: IETF 1311 Specification document(s): [this document] 1312 Related information: none 1314 6.2. "Email Authentication Methods" Registry Description 1316 No changes are made to the description of this registry. 1318 6.3. "Email Authentication Methods" Registry Update 1320 The following two entries are added. 1322 6.3.1. 'header.a' for DKIM 1324 Method: dkim 1326 Definition: [this document] 1328 ptype: header 1330 property: a 1332 Description: value of signature "a" tag 1334 Status: active 1336 Version: 1 1338 6.3.2. 'header.s' for DKIM 1340 "header.s" for DKIM: 1342 Method: dkim 1344 Definition: [this document] 1346 ptype: header 1348 property: s 1350 Description: value of signature "s" tag 1352 Status: active 1354 Version: 1 1356 6.4. "Email Authentication Property Types" Registry 1358 [RFC7410] created the "Email Authentication Property Types" registry. 1360 No changes are made to the description of this registry. However, it 1361 should be noted that Section 2.3 contains slightly different language 1362 than prior versions of this document, allowing a broader space from 1363 which to extract meaningful identifiers and report them through this 1364 mechanism. 1366 6.5. "Email Authentication Result Names" Description 1368 No changes are made to the description of this registry. 1370 6.6. "Email Authentication Result Names" Update 1372 No changes are made to entries in this registry. 1374 7. Security Considerations 1376 The following security considerations apply when adding or processing 1377 the Authentication-Results header field: 1379 7.1. Forged Header Fields 1381 An MUA or filter that accesses a mailbox whose messages are handled 1382 by a non-conformant MTA, and understands Authentication-Results 1383 header fields, could potentially make false conclusions based on 1384 forged header fields. A malicious user or agent could forge a header 1385 field using the DNS domain of a receiving ADMD as the authserv-id 1386 token in the value of the header field and, with the rest of the 1387 value, claim that the message was properly authenticated. The non- 1388 conformant MTA would fail to strip the forged header field, and the 1389 MUA could inappropriately trust it. 1391 For this reason, it is best not to have processing of the 1392 Authentication-Results header field enabled by default; instead, it 1393 should be ignored, at least for the purposes of enacting filtering 1394 decisions, unless specifically enabled by the user or administrator 1395 after verifying that the border MTA is compliant. It is acceptable 1396 to have an MUA aware of this specification but have an explicit list 1397 of hostnames whose Authentication-Results header fields are 1398 trustworthy; however, this list should initially be empty. 1400 Proposed alternative solutions to this problem were made some time 1401 ago and are listed below. To date, they have not been developed due 1402 to lack of demand but are documented here should the information be 1403 useful at some point in the future: 1405 1. Possibly the simplest is a digital signature protecting the 1406 header field, such as using [DKIM], that can be verified by an 1407 MUA by using a posted public key. Although one of the main 1408 purposes of this document is to relieve the burden of doing 1409 message authentication work at the MUA, this only requires that 1410 the MUA learn a single authentication scheme even if a number of 1411 them are in use at the border MTA. Note that [DKIM] requires 1412 that the From header field be signed, although in this 1413 application, the signing agent (a trusted MTA) likely cannot 1414 authenticate that value, so the fact that it is signed should be 1415 ignored. Where the authserv-id is the ADMD's domain name, the 1416 authserv-id matching this valid internal signature's "d=" DKIM 1417 value is sufficient. 1419 2. Another would be a means to interrogate the MTA that added the 1420 header field to see if it is actually providing any message 1421 authentication services and saw the message in question, but this 1422 isn't especially palatable given the work required to craft and 1423 implement such a scheme. 1425 3. Yet another might be a method to interrogate the internal MTAs 1426 that apparently handled the message (based on Received header 1427 fields) to determine whether any of them conform to Section 5 of 1428 this memo. This, too, has potentially high barriers to entry. 1430 4. Extensions to [IMAP], [SMTP], and [POP3] could be defined to 1431 allow an MUA or filtering agent to acquire the authserv-id in use 1432 within an ADMD, thus allowing it to identify which 1433 Authentication-Results header fields it can trust. 1435 5. On the presumption that internal MTAs are fully compliant with 1436 Section 3.6 of [MAIL] and the compliant internal MTAs are using 1437 their own hostnames or the ADMD's DNS domain name as the 1438 authserv-id token, the header field proposed here should always 1439 appear above a Received header added by a trusted MTA. This can 1440 be used as a test for header field validity. 1442 Support for some of these is being considered for future work. 1444 In any case, a mechanism needs to exist for an MUA or filter to 1445 verify that the host that appears to have added the header field (a) 1446 actually did so and (b) is legitimately adding that header field for 1447 this delivery. Given the variety of messaging environments deployed 1448 today, consensus appears to be that specifying a particular mechanism 1449 for doing so is not appropriate for this document. 1451 Mitigation of the forged header field attack can also be accomplished 1452 by moving the authentication results data into metadata associated 1453 with the message. In particular, an [SMTP] extension could be 1454 established to communicate authentication results from the border MTA 1455 to intermediate and delivery MTAs; the latter of these could arrange 1456 to store the authentication results as metadata retrieved and 1457 rendered along with the message by an [IMAP] client aware of a 1458 similar extension in that protocol. The delivery MTA would be told 1459 to trust data via this extension only from MTAs it trusts, and border 1460 MTAs would not accept data via this extension from any source. There 1461 is no vector in such an arrangement for forgery of authentication 1462 data by an outside agent. 1464 7.2. Misleading Results 1466 Until some form of service for querying the reputation of a sending 1467 agent is widely deployed, the existence of this header field 1468 indicating a "pass" does not render the message trustworthy. It is 1469 possible for an arriving piece of spam or other undesirable mail to 1470 pass checks by several of the methods enumerated above (e.g., a piece 1471 of spam signed using [DKIM] by the originator of the spam, which 1472 might be a spammer or a compromised system). In particular, this 1473 issue is not resolved by forged header field removal discussed above. 1475 Hence, MUAs and downstream filters must take some care with use of 1476 this header even after possibly malicious headers are scrubbed. 1478 7.3. Header Field Position 1480 Despite the requirements of [MAIL], header fields can sometimes be 1481 reordered en route by intermediate MTAs. The goal of requiring 1482 header field addition only at the top of a message is an 1483 acknowledgment that some MTAs do reorder header fields, but most do 1484 not. Thus, in the general case, there will be some indication of 1485 which MTAs (if any) handled the message after the addition of the 1486 header field defined here. 1488 7.4. Reverse IP Query Denial-of-Service Attacks 1490 Section 4.6.4 of [SPF] describes a DNS-based denial-of-service attack 1491 for verifiers that attempt DNS-based identity verification of 1492 arriving client connections. A verifier wishing to do this check and 1493 report this information needs to take care not to go to unbounded 1494 lengths to resolve "A" and "PTR" queries. MUAs or other filters 1495 making use of an "iprev" result specified by this document need to be 1496 aware of the algorithm used by the verifier reporting the result and, 1497 especially, its limitations. 1499 7.5. Mitigation of Backscatter 1501 Failing to follow the instructions of Section 4.2 can result in a 1502 denial-of-service attack caused by the generation of [DSN] messages 1503 (or equivalent) to addresses that did not send the messages being 1504 rejected. 1506 7.6. Internal MTA Lists 1508 Section 5 describes a procedure for scrubbing header fields that may 1509 contain forged authentication results about a message. A compliant 1510 installation will have to include, at each MTA, a list of other MTAs 1511 known to be compliant and trustworthy. Failing to keep this list 1512 current as internal infrastructure changes may expose an ADMD to 1513 attack. 1515 7.7. Attacks against Authentication Methods 1517 If an attack becomes known against an authentication method, clearly 1518 then the agent verifying that method can be fooled into thinking an 1519 inauthentic message is authentic, and thus the value of this header 1520 field can be misleading. It follows that any attack against the 1521 authentication methods supported by this document is also a security 1522 consideration here. 1524 7.8. Intentionally Malformed Header Fields 1526 As with any other header field found in a message, it is possible for 1527 an attacker to add an Authentication-Results header field that is 1528 extraordinarily large or otherwise malformed in an attempt to 1529 discover or exploit weaknesses in header field parsing code. 1530 Implementers must thoroughly verify all such header fields received 1531 from MTAs and be robust against intentionally as well as 1532 unintentionally malformed header fields. 1534 7.9. Compromised Internal Hosts 1536 An internal MUA or MTA that has been compromised could generate mail 1537 with a forged From header field and a forged Authentication-Results 1538 header field that endorses it. Although it is clearly a larger 1539 concern to have compromised internal machines than it is to prove the 1540 value of this header field, this risk can be mitigated by arranging 1541 that internal MTAs will remove this header field if it claims to have 1542 been added by a trusted border MTA (as described above), yet the 1543 [SMTP] connection is not coming from an internal machine known to be 1544 running an authorized MTA. However, in such a configuration, 1545 legitimate MTAs will have to add this header field when legitimate 1546 internal-only messages are generated. This is also covered in 1547 Section 5. 1549 7.10. Encapsulated Instances 1551 MIME messages can contain attachments of type "message/rfc822", which 1552 contain other messages. Such an encapsulated message can also 1553 contain an Authentication-Results header field. Although the 1554 processing of these is outside of the intended scope of this document 1555 (see Section 1.3), some early guidance to MUA developers is 1556 appropriate here. 1558 Since MTAs are unlikely to strip Authentication-Results header fields 1559 after mailbox delivery, MUAs are advised in Section 4.1 to ignore 1560 such instances within MIME attachments. Moreover, when extracting a 1561 message digest to separate mail store messages or other media, such 1562 header fields should be removed so that they will never be 1563 interpreted improperly by MUAs that might later consume them. 1565 7.11. Reverse Mapping 1567 Although Section 3 of this memo includes explicit support for the 1568 "iprev" method, its value as an authentication mechanism is limited. 1569 Implementers of both this specification and agents that use the data 1570 it relays are encouraged to become familiar with the issues raised by 1571 [DNSOP-REVERSE] when deciding whether or not to include support for 1572 "iprev". 1574 8. References 1576 8.1. Normative References 1578 [ABNF] Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax 1579 Specifications: ABNF", STD 68, RFC 5234, DOI 10.17487/ 1580 RFC5234, January 2008, 1581 . 1583 [DKIM] Crocker, D., Ed., Hansen, T., Ed., and M. Kucherawy, Ed., 1584 "DomainKeys Identified Mail (DKIM) Signatures", STD 76, 1585 RFC 6376, DOI 10.17487/RFC6376, September 2011, 1586 . 1588 [IANA-HEADERS] 1589 Klyne, G., Nottingham, M., and J. Mogul, "Registration 1590 Procedures for Message Header Fields", BCP 90, RFC 3864, 1591 DOI 10.17487/RFC3864, September 2004, 1592 . 1594 [KEYWORDS] 1595 Bradner, S., "Key words for use in RFCs to Indicate 1596 Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/ 1597 RFC2119, March 1997, 1598 . 1600 [MAIL] Resnick, P., Ed., "Internet Message Format", RFC 5322, 1601 DOI 10.17487/RFC5322, October 2008, 1602 . 1604 [MIME] Freed, N. and N. Borenstein, "Multipurpose Internet Mail 1605 Extensions (MIME) Part One: Format of Internet Message 1606 Bodies", RFC 2045, DOI 10.17487/RFC2045, November 1996, 1607 . 1609 [RFC5451] Kucherawy, M., "Message Header Field for Indicating 1610 Message Authentication Status", RFC 5451, DOI 10.17487/ 1611 RFC5451, April 2009, 1612 . 1614 [RFC6008] Kucherawy, M., "Authentication-Results Registration for 1615 Differentiating among Cryptographic Results", RFC 6008, 1616 DOI 10.17487/RFC6008, September 2010, 1617 . 1619 [RFC6530] Klensin, J. and Y. Ko, "Overview and Framework for 1620 Internationalized Email", RFC 6530, DOI 10.17487/RFC6530, 1621 February 2012, . 1623 [RFC6531] Yao, J. and W. Mao, "SMTP Extension for Internationalized 1624 Email", RFC 6531, DOI 10.17487/RFC6531, February 2012, 1625 . 1627 [RFC6532] Yang, A., Steele, S., and N. Freed, "Internationalized 1628 Email Headers", RFC 6532, DOI 10.17487/RFC6532, 1629 February 2012, . 1631 [RFC6577] Kucherawy, M., "Authentication-Results Registration Update 1632 for Sender Policy Framework (SPF) Results", RFC 6577, 1633 DOI 10.17487/RFC6577, March 2012, 1634 . 1636 [RFC7001] Kucherawy, M., "Message Header Field for Indicating 1637 Message Authentication Status", RFC 7001, DOI 10.17487/ 1638 RFC7001, September 2013, 1639 . 1641 [RFC7601] Kucherawy, M., "Message Header Field for Indicating 1642 Message Authentication Status", RFC 7601, DOI 10.17487/ 1643 RFC7601, August 2015, 1644 . 1646 [RFC8301] Kitterman, S., "Cryptographic Algorithm and Key Usage 1647 Update to DomainKeys Identified Mail (DKIM)", RFC 8301, 1648 DOI 10.17487/RFC8301, January 2018, 1649 . 1651 [SMTP] Klensin, J., "Simple Mail Transfer Protocol", RFC 5321, 1652 DOI 10.17487/RFC5321, October 2008, 1653 . 1655 8.2. Informative References 1657 [ADSP] Allman, E., Fenton, J., Delany, M., and J. Levine, 1658 "DomainKeys Identified Mail (DKIM) Author Domain Signing 1659 Practices (ADSP)", RFC 5617, DOI 10.17487/RFC5617, 1660 August 2009, . 1662 [AR-VBR] Kucherawy, M., "Authentication-Results Registration for 1663 Vouch by Reference Results", RFC 6212, DOI 10.17487/ 1664 RFC6212, April 2011, 1665 . 1667 [ATPS] Kucherawy, M., "DomainKeys Identified Mail (DKIM) 1668 Authorized Third-Party Signatures", RFC 6541, 1669 DOI 10.17487/RFC6541, February 2012, 1670 . 1672 [AUTH] Siemborski, R., Ed. and A. Melnikov, Ed., "SMTP Service 1673 Extension for Authentication", RFC 4954, DOI 10.17487/ 1674 RFC4954, July 2007, 1675 . 1677 [AUTH-ESC] 1678 Kucherawy, M., "Email Authentication Status Codes", 1679 RFC 7372, DOI 10.17487/RFC7372, September 2014, 1680 . 1682 [DMARC] Kucherawy, M., Ed. and E. Zwicky, Ed., "Domain-based 1683 Message Authentication, Reporting, and Conformance 1684 (DMARC)", RFC 7489, DOI 10.17487/RFC7489, March 2015, 1685 . 1687 [DNS] Mockapetris, P., "Domain names - implementation and 1688 specification", STD 13, RFC 1035, DOI 10.17487/RFC1035, 1689 November 1987, . 1691 [DNS-IP6] Thomson, S., Huitema, C., Ksinant, V., and M. Souissi, 1692 "DNS Extensions to Support IP Version 6", RFC 3596, 1693 DOI 10.17487/RFC3596, October 2003, 1694 . 1696 [DNSOP-REVERSE] 1697 Senie, D. and A. Sullivan, "Considerations for the use of 1698 DNS Reverse Mapping", Work in Progress, draft-ietf-dnsop- 1699 reverse-mapping-considerations-06, March 2008. 1701 [DOMAINKEYS] 1702 Delany, M., "Domain-Based Email Authentication Using 1703 Public Keys Advertised in the DNS (DomainKeys)", RFC 4870, 1704 DOI 10.17487/RFC4870, May 2007, 1705 . 1707 [DSN] Moore, K. and G. Vaudreuil, "An Extensible Message Format 1708 for Delivery Status Notifications", RFC 3464, 1709 DOI 10.17487/RFC3464, January 2003, 1710 . 1712 [EMAIL-ARCH] 1713 Crocker, D., "Internet Mail Architecture", RFC 5598, 1714 DOI 10.17487/RFC5598, July 2009, 1715 . 1717 [IMAP] Crispin, M., "INTERNET MESSAGE ACCESS PROTOCOL - VERSION 1718 4rev1", RFC 3501, DOI 10.17487/RFC3501, March 2003, 1719 . 1721 [POP3] Myers, J. and M. Rose, "Post Office Protocol - Version 3", 1722 STD 53, RFC 1939, DOI 10.17487/RFC1939, May 1996, 1723 . 1725 [PRA] Lyon, J., "Purported Responsible Address in E-Mail 1726 Messages", RFC 4407, DOI 10.17487/RFC4407, April 2006, 1727 . 1729 [RFC7410] Kucherawy, M., "A Property Types Registry for the 1730 Authentication-Results Header Field", RFC 7410, 1731 DOI 10.17487/RFC7410, December 2014, 1732 . 1734 [RRVS] Mills, W. and M. Kucherawy, "The Require-Recipient-Valid- 1735 Since Header Field and SMTP Service Extension", RFC 7293, 1736 DOI 10.17487/RFC7293, July 2014, 1737 . 1739 [SECURITY] 1740 Rescorla, E. and B. Korver, "Guidelines for Writing RFC 1741 Text on Security Considerations", BCP 72, RFC 3552, 1742 DOI 10.17487/RFC3552, July 2003, 1743 . 1745 [SENDERID] 1746 Lyon, J. and M. Wong, "Sender ID: Authenticating E-Mail", 1747 RFC 4406, DOI 10.17487/RFC4406, April 2006, 1748 . 1750 [SMIME-REG] 1751 Melnikov, A., "Authentication-Results Registration for 1752 S/MIME Signature Verification", RFC 7281, DOI 10.17487/ 1753 RFC7281, June 2014, 1754 . 1756 [SPF] Kitterman, S., "Sender Policy Framework (SPF) for 1757 Authorizing Use of Domains in Email, Version 1", RFC 7208, 1758 DOI 10.17487/RFC7208, April 2014, 1759 . 1761 [VBR] Hoffman, P., Levine, J., and A. Hathcock, "Vouch By 1762 Reference", RFC 5518, DOI 10.17487/RFC5518, April 2009, 1763 . 1765 Appendix A. Legacy MUAs 1767 Implementers of this protocol should be aware that many MUAs are 1768 unlikely to be retrofitted to support the new header field and its 1769 semantics. In the interests of convenience and quicker adoption, a 1770 delivery MTA might want to consider adding things that are processed 1771 by existing MUAs in addition to the Authentication-Results header 1772 field. One suggestion is to include a Priority header field, on 1773 messages that don't already have such a header field, containing a 1774 value that reflects the strength of the authentication that was 1775 accomplished, e.g., "low" for weak or no authentication, "normal" or 1776 "high" for good or strong authentication. 1778 Some modern MUAs can already filter based on the content of this 1779 header field. However, there is keen interest in having MUAs make 1780 some kind of graphical representation of this header field's meaning 1781 to end users. Until this capability is added (i.e., while this 1782 specification and its successors continue to be adopted), other 1783 interim means of conveying authentication results may be necessary. 1785 Appendix B. Authentication-Results Examples 1787 This section presents some examples of the use of this header field 1788 to indicate authentication results. 1790 B.1. Trivial Case; Header Field Not Present 1792 The trivial case: 1794 Received: from mail-router.example.com 1795 (mail-router.example.com [192.0.2.1]) 1796 by server.example.org (8.11.6/8.11.6) 1797 with ESMTP id g1G0r1kA003489; 1798 Fri, Feb 15 2002 17:19:07 -0800 1799 From: sender@example.com 1800 Date: Fri, Feb 15 2002 16:54:30 -0800 1801 To: receiver@example.org 1802 Message-Id: <12345.abc@example.com> 1803 Subject: here's a sample 1805 Hello! Goodbye! 1807 Example 1: Trivial Case 1809 The Authentication-Results header field is completely absent. The 1810 MUA may make no conclusion about the validity of the message. This 1811 could be the case because the message authentication services were 1812 not available at the time of delivery, or no service is provided, or 1813 the MTA is not in compliance with this specification. 1815 B.2. Nearly Trivial Case; Service Provided, but No Authentication Done 1817 A message that was delivered by an MTA that conforms to this 1818 specification but provides no actual message authentication service: 1820 Authentication-Results: example.org 1; none 1821 Received: from mail-router.example.com 1822 (mail-router.example.com [192.0.2.1]) 1823 by server.example.org (8.11.6/8.11.6) 1824 with ESMTP id g1G0r1kA003489; 1825 Fri, Feb 15 2002 17:19:07 -0800 1826 From: sender@example.com 1827 Date: Fri, Feb 15 2002 16:54:30 -0800 1828 To: receiver@example.org 1829 Message-Id: <12345.abc@example.com> 1830 Subject: here's a sample 1832 Hello! Goodbye! 1834 Example 2: Header Present but No Authentication Done 1836 The Authentication-Results header field is present, showing that the 1837 delivering MTA conforms to this specification. It used its DNS 1838 domain name as the authserv-id. The presence of "none" (and the 1839 absence of any method or result tokens) indicates that no message 1840 authentication was done. The version number of the specification to 1841 which the field's content conforms is explicitly provided. 1843 B.3. Service Provided, Authentication Done 1845 A message that was delivered by an MTA that conforms to this 1846 specification and applied some message authentication: 1848 Authentication-Results: example.com; 1849 spf=pass smtp.mailfrom=example.net 1850 Received: from dialup-1-2-3-4.example.net 1851 (dialup-1-2-3-4.example.net [192.0.2.200]) 1852 by mail-router.example.com (8.11.6/8.11.6) 1853 with ESMTP id g1G0r1kA003489; 1854 Fri, Feb 15 2002 17:19:07 -0800 1855 From: sender@example.net 1856 Date: Fri, Feb 15 2002 16:54:30 -0800 1857 To: receiver@example.com 1858 Message-Id: <12345.abc@example.net> 1859 Subject: here's a sample 1861 Hello! Goodbye! 1863 Example 3: Header Reporting Results 1865 The Authentication-Results header field is present, indicating that 1866 the border MTA conforms to this specification. The authserv-id is 1867 once again the DNS domain name. Furthermore, the message was 1868 authenticated by that MTA via the method specified in [SPF]. Note 1869 that since that method cannot authenticate the local-part, it has 1870 been omitted from the result's value. The MUA could extract and 1871 relay this extra information if desired. 1873 B.4. Service Provided, Several Authentications Done, Single MTA 1875 A message that was relayed inbound via a single MTA that conforms to 1876 this specification and applied three different message authentication 1877 checks: 1879 Authentication-Results: example.com; 1880 auth=pass (cram-md5) smtp.auth=sender@example.net; 1881 spf=pass smtp.mailfrom=example.net 1882 Authentication-Results: example.com; 1883 sender-id=pass header.from=example.net 1884 Received: from dialup-1-2-3-4.example.net (8.11.6/8.11.6) 1885 (dialup-1-2-3-4.example.net [192.0.2.200]) 1886 by mail-router.example.com (8.11.6/8.11.6) 1887 with ESMTPA id g1G0r1kA003489; 1888 Fri, Feb 15 2002 17:19:07 -0800 1889 Date: Fri, Feb 15 2002 16:54:30 -0800 1890 To: receiver@example.com 1891 From: sender@example.net 1892 Message-Id: <12345.abc@example.net> 1893 Subject: here's a sample 1895 Hello! Goodbye! 1897 Example 4: Headers Reporting Results from One MTA 1899 The Authentication-Results header field is present, indicating that 1900 the delivering MTA conforms to this specification. Once again, the 1901 receiving DNS domain name is used as the authserv-id. Furthermore, 1902 the sender authenticated herself/himself to the MTA via a method 1903 specified in [AUTH], and both SPF and Sender ID checks were done and 1904 passed. The MUA could extract and relay this extra information if 1905 desired. 1907 Two Authentication-Results header fields are not required since the 1908 same host did all of the checking. The authenticating agent could 1909 have consolidated all the results into one header field. 1911 This example illustrates a scenario in which a remote user on a 1912 dial-up connection (example.net) sends mail to a border MTA 1913 (example.com) using SMTP authentication to prove identity. The 1914 dial-up provider has been explicitly authorized to relay mail as 1915 example.net, producing "pass" results from the SPF and Sender ID 1916 checks. 1918 B.5. Service Provided, Several Authentications Done, Different MTAs 1920 A message that was relayed inbound by two different MTAs that conform 1921 to this specification and applied multiple message authentication 1922 checks: 1924 Authentication-Results: example.com; 1925 sender-id=fail header.from=example.com; 1926 dkim=pass (good signature) header.d=example.com 1927 Received: from mail-router.example.com 1928 (mail-router.example.com [192.0.2.1]) 1929 by auth-checker.example.com (8.11.6/8.11.6) 1930 with ESMTP id i7PK0sH7021929; 1931 Fri, Feb 15 2002 17:19:22 -0800 1932 DKIM-Signature: v=1; a=rsa-sha256; s=gatsby; d=example.com; 1933 t=1188964191; c=simple/simple; h=From:Date:To:Subject: 1934 Message-Id:Authentication-Results; 1935 bh=sEuZGD/pSr7ANysbY3jtdaQ3Xv9xPQtS0m70; 1936 b=EToRSuvUfQVP3Bkz ... rTB0t0gYnBVCM= 1937 Authentication-Results: example.com; 1938 auth=pass (cram-md5) smtp.auth=sender@example.com; 1939 spf=fail smtp.mailfrom=example.com 1940 Received: from dialup-1-2-3-4.example.net 1941 (dialup-1-2-3-4.example.net [192.0.2.200]) 1942 by mail-router.example.com (8.11.6/8.11.6) 1943 with ESMTPA id g1G0r1kA003489; 1944 Fri, Feb 15 2002 17:19:07 -0800 1945 From: sender@example.com 1946 Date: Fri, Feb 15 2002 16:54:30 -0800 1947 To: receiver@example.com 1948 Message-Id: <12345.abc@example.com> 1949 Subject: here's a sample 1951 Hello! Goodbye! 1953 Example 5: Headers Reporting Results from Multiple MTAs 1955 The Authentication-Results header field is present, indicating 1956 conformance to this specification. Once again, the authserv-id used 1957 is the recipient's DNS domain name. The header field is present 1958 twice because two different MTAs in the chain of delivery did 1959 authentication tests. The first MTA, mail-router.example.com, 1960 reports that SMTP AUTH and SPF were both used and that the former 1961 passed while the latter failed. In the SMTP AUTH case, additional 1962 information is provided in the comment field, which the MUA can 1963 choose to render if desired. 1965 The second MTA, auth-checker.example.com, reports that it did a 1966 Sender ID test (which failed) and a DKIM test (which passed). Again, 1967 additional data about one of the tests is provided as a comment, 1968 which the MUA may choose to render. Also noteworthy here is the fact 1969 that there is a DKIM signature added by example.com that assured the 1970 integrity of the lower Authentication-Results field. 1972 Since different hosts did the two sets of authentication checks, the 1973 header fields cannot be consolidated in this example. 1975 This example illustrates more typical transmission of mail into 1976 example.com from a user on a dial-up connection example.net. The 1977 user appears to be legitimate as he/she had a valid password allowing 1978 authentication at the border MTA using SMTP AUTH. The SPF test 1979 failed since example.com has not granted example.net's dial-up 1980 network authority to relay mail on its behalf. The Sender ID test 1981 failed since example.com has not granted mail-router.example.com 1982 authority to relay mail on its behalf. However, the DKIM test passed 1983 because the sending user had a private key matching one of 1984 example.com's published public keys and mail-router.example.com used 1985 it to sign the message. 1987 B.6. Service Provided, Multi-tiered Authentication Done 1989 A message that had authentication done at various stages, one of 1990 which was outside the receiving ADMD: 1992 Authentication-Results: example.com; 1993 dkim=pass reason="good signature" 1994 header.i=@mail-router.example.net; 1995 dkim=fail reason="bad signature" 1996 header.i=@newyork.example.com 1997 Received: from mail-router.example.net 1998 (mail-router.example.net [192.0.2.250]) 1999 by chicago.example.com (8.11.6/8.11.6) 2000 for 2001 with ESMTP id i7PK0sH7021929; 2002 Fri, Feb 15 2002 17:19:22 -0800 2003 DKIM-Signature: v=1; a=rsa-sha256; s=furble; 2004 d=mail-router.example.net; t=1188964198; c=relaxed/simple; 2005 h=From:Date:To:Message-Id:Subject:Authentication-Results; 2006 bh=ftA9J6GtX8OpwUECzHnCkRzKw1uk6FNiLfJl5Nmv49E=; 2007 b=oINEO8hgn/gnunsg ... 9n9ODSNFSDij3= 2008 Authentication-Results: example.net; 2009 dkim=pass (good signature) header.i=@newyork.example.com 2010 Received: from smtp.newyork.example.com 2011 (smtp.newyork.example.com [192.0.2.220]) 2012 by mail-router.example.net (8.11.6/8.11.6) 2013 with ESMTP id g1G0r1kA003489; 2014 Fri, Feb 15 2002 17:19:07 -0800 2015 DKIM-Signature: v=1; a=rsa-sha256; s=gatsby; 2016 d=newyork.example.com; 2017 t=1188964191; c=simple/simple; 2018 h=From:Date:To:Message-Id:Subject; 2019 bh=sEu28nfs9fuZGD/pSr7ANysbY3jtdaQ3Xv9xPQtS0m7=; 2020 b=EToRSuvUfQVP3Bkz ... rTB0t0gYnBVCM= 2021 From: sender@newyork.example.com 2022 Date: Fri, Feb 15 2002 16:54:30 -0800 2023 To: meetings@example.net 2024 Message-Id: <12345.abc@newyork.example.com> 2025 Subject: here's a sample 2027 Example 6: Headers Reporting Results from Multiple MTAs in Different 2028 ADMDs 2030 In this example, we see multi-tiered authentication with an extended 2031 trust boundary. 2033 The message was sent from someone at example.com's New York office 2034 (newyork.example.com) to a mailing list managed at an intermediary. 2036 The message was signed at the origin using DKIM. 2038 The message was sent to a mailing list service provider called 2039 example.net, which is used by example.com. There, 2040 meetings@example.net is expanded to a long list of recipients, one of 2041 whom is at the Chicago office. In this example, we will assume that 2042 the trust boundary for chicago.example.com includes the mailing list 2043 server at example.net. 2045 The mailing list server there first authenticated the message and 2046 affixed an Authentication-Results header field indicating such using 2047 its DNS domain name for the authserv-id. It then altered the message 2048 by affixing some footer text to the body, including some 2049 administrivia such as unsubscription instructions. Finally, the 2050 mailing list server affixes a second DKIM signature and begins 2051 distribution of the message. 2053 The border MTA for chicago.example.com explicitly trusts results from 2054 mail-router.example.net, so that header field is not removed. It 2055 performs evaluation of both signatures and determines that the first 2056 (most recent) is a "pass" but, because of the aforementioned 2057 modifications, the second is a "fail". However, the first signature 2058 included the Authentication-Results header added at mail- 2059 router.example.net that validated the second signature. Thus, 2060 indirectly, it can be determined that the authentications claimed by 2061 both signatures are indeed valid. 2063 Note that two styles of presenting metadata about the result are in 2064 use here. In one case, the "reason=" clause is present, which is 2065 intended for easy extraction by parsers; in the other case, the CFWS 2066 production of the ABNF is used to include such data as a header field 2067 comment. The latter can be harder for parsers to extract given the 2068 varied supported syntaxes of mail header fields. 2070 B.7. Comment-Heavy Example 2072 The formal syntax permits comments within the content in a number of 2073 places. For the sake of illustration, this example is also legal: 2075 Authentication-Results: foo.example.net (foobar) 1 (baz); 2076 dkim (Because I like it) / 1 (One yay) = (wait for it) fail 2077 policy (A dot can go here) . (like that) expired 2078 (this surprised me) = (as I wasn't expecting it) 1362471462 2080 Example 7: A Very Comment-Heavy but Perfectly Legal Example 2082 Appendix C. Operational Considerations about Message Authentication 2084 This protocol is predicated on the idea that authentication (and 2085 presumably in the future, reputation) work is typically done by 2086 border MTAs rather than MUAs or intermediate MTAs; the latter merely 2087 make use of the results determined by the former. Certainly this is 2088 not mandatory for participation in electronic mail or message 2089 authentication, but this protocol and its deployment to date are 2090 based on that model. The assumption satisfies several common ADMD 2091 requirements: 2093 1. Service operators prefer to resolve the handling of problem 2094 messages as close to the border of the ADMD as possible. This 2095 enables, for example, rejection of messages at the SMTP level 2096 rather than generating a DSN internally. Thus, doing any of the 2097 authentication or reputation work exclusively at the MUA or 2098 intermediate MTA renders this desire unattainable. 2100 2. Border MTAs are more likely to have direct access to external 2101 sources of authentication or reputation information since modern 2102 MUAs are more likely to be heavily firewalled. Thus, some MUAs 2103 might not even be able to complete the task of performing 2104 authentication or reputation evaluations without complex proxy 2105 configurations or similar burdens. 2107 3. MUAs rely upon the upstream MTAs within their trust boundaries to 2108 make correct (as much as is possible) evaluations about the 2109 message's envelope, header, and content. Thus, MUAs don't need 2110 to know how to do the work that upstream MTAs do; they only need 2111 the results of that work. 2113 4. Evaluations about the quality of a message, from simple token 2114 matching (e.g., a list of preferred DNS domains) to cryptanalysis 2115 (e.g., public/private key work), do have a cost and thus need to 2116 be minimized. To that end, performing those tests at the border 2117 MTA is far preferred to doing that work at each MUA that handles 2118 a message. If an ADMD's environment adheres to common messaging 2119 protocols, a reputation query or an authentication check 2120 performed by a border MTA would return the same result as the 2121 same query performed by an MUA. By contrast, in an environment 2122 where the MUA does the work, a message arriving for multiple 2123 recipients would thus cause authentication or reputation 2124 evaluation to be done more than once for the same message (i.e., 2125 at each MUA), causing needless amplification of resource use and 2126 creating a possible denial-of-service attack vector. 2128 5. Minimizing change is good. As new authentication and reputation 2129 methods emerge, the list of methods supported by this header 2130 field would presumably be extended. If MUAs simply consume the 2131 contents of this header field rather than actually attempt to do 2132 authentication and/or reputation work, then MUAs only need to 2133 learn to parse this header field once; emergence of new methods 2134 requires only a configuration change at the MUAs and software 2135 changes at the MTAs (which are presumably fewer in number). When 2136 choosing to implement these functions in MTAs vs. MUAs, the 2137 issues of individual flexibility, infrastructure inertia, and 2138 scale of effort must be considered. It is typically easier to 2139 change a single MUA than an MTA because the modification affects 2140 fewer users and can be pursued with less care. However, changing 2141 many MUAs is more effort than changing a smaller number of MTAs. 2143 6. For decisions affecting message delivery and display, assessment 2144 based on authentication and reputation is best performed close to 2145 the time of message transit, as a message makes its journey 2146 toward a user's inbox, not afterwards. DKIM keys and IP address 2147 reputations, etc., can change over time or even become invalid, 2148 and users can take a long time to read a message once delivered. 2149 The value of this work thus degrades, perhaps quickly, once the 2150 delivery process has completed. This seriously diminishes the 2151 value of this work when done elsewhere than at MTAs. 2153 Many operational choices are possible within an ADMD, including the 2154 venue for performing authentication and/or reputation assessment. 2155 The current specification does not dictate any of those choices. 2156 Rather, it facilitates those cases in which information produced by 2157 one stage of analysis needs to be transported with the message to the 2158 next stage. 2160 Appendix D. Changes Since RFC7601 2162 o Added IANA registration for DKIM "a" and "s" properties. 2164 o Include EAI guidance. 2166 o Adjust some ABNF tokens and names for easier inclusion by other 2167 documents. 2169 Appendix E. Acknowledgments 2171 The author wishes to acknowledge the following individuals for their 2172 review and constructive criticism of this document: Seth Blank, Tim 2173 Draegen, John Levine, Scott Kitterman, and Alessandro Vesely. 2175 Author's Address 2177 Murray S. Kucherawy 2178 270 Upland Drive 2179 San Francisco, CA 94127 2180 United States 2182 Email: superuser@gmail.com