idnits 2.17.1 draft-ietf-dmarc-rfc7601bis-03.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- -- The draft header indicates that this document obsoletes RFC7601, but the abstract doesn't seem to mention this, which it should. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (August 22, 2018) is 2067 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 835, 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 August 22, 2018 4 Obsoletes: 7601 (if approved) 5 Intended status: Standards Track 6 Expires: February 23, 2019 8 Message Header Field for Indicating Message Authentication Status 9 draft-ietf-dmarc-rfc7601bis-03 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 February 23, 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]. 529 See Section 2.5 for a description of the authserv-id element. 531 If the value portion of a "pvalue" construction identifies something 532 intended to be an email identity, then it MUST use the right hand 533 portion of that ABNF definition. 535 The list of commands eligible for use with the "smtp" ptype can be 536 found in Section 4.1 of [SMTP]. 538 The "propspec" may be omitted if, for example, the method was unable 539 to extract any properties to do its evaluation yet still has a result 540 to report. It may also be omitted if the agent generating this 541 result wishes not to reveal such properties to downstream agents. 543 Where an SMTP command name is being reported as a "property", the 544 agent generating the header field represents that command by 545 converting it to lowercase and dropping any spaces (e.g., "MAIL FROM" 546 becomes "mailfrom", "RCPT TO" becomes "rcptto", etc.). 548 A "ptype" value of "policy" indicates a policy decision about the 549 message not specific to a property of the message that could be 550 extracted. See Section 2.4 for details. 552 Examples of complete messages using this header field can be found in 553 Appendix B. 555 2.3. Property Types (ptypes) and Properties 557 The "ptype" in the ABNF above indicates the general type of property 558 being described by the result being reported, upon which the reported 559 result was based. Coupled with the "property", which is more 560 specific, they indicate from where the reported data were extracted. 561 This can include part of the message header or body, some part of the 562 SMTP session, a secondary output of an authentication method (apart 563 from its pure result), or some other aspect of the message's 564 handling. 566 Combinations of ptypes and properties are registered and described in 567 the "Email Authentication Methods" registry, coupled with the 568 authentication methods with which they are used. This is further 569 described in Section 6. 571 Legal values of "ptype" are as defined in the IANA "Email 572 Authentication Property Types" registry, created by [RFC7410]. The 573 initial values and what they typically indicate are as follows, based 574 on [RFC7001]: 576 body: Information that was extracted from the body of the message. 577 This might be an arbitrary string of bytes, a hash of a string of 578 bytes, a Uniform Resource Identifier, or some other content of 579 interest. The "property" is an indication of where within the 580 message body the extracted content was found, and can indicate an 581 offset, identify a MIME part, etc. 583 header: Indicates information that was extracted from the header of 584 the message. This might be the value of a header field or some 585 portion of a header field. The "property" gives a more precise 586 indication of the place in the header from which the extraction 587 took place. 589 policy: A local policy mechanism was applied that augments or 590 overrides the result returned by the authentication mechanism. 591 (See Section 2.4.) 593 smtp: Indicates information that was extracted from an SMTP command 594 that was used to relay the message. The "property" indicates 595 which SMTP command included the extracted content as a parameter. 597 Results reported using unknown ptypes MUST NOT be used in making 598 handling decisions. They can be safely ignored by consumers. 600 Entries in the "Email Authentication Methods" registry can define 601 properties that deviate from these definitions when appropriate. 602 Such deviations need to be clear in the registry and/or in the 603 defining document. See Section 2.7.1 for an example. 605 2.4. The "policy" ptype 607 A special ptype value of "policy" is also defined. This ptype is 608 provided to indicate that some local policy mechanism was applied 609 that augments or even replaces (i.e., overrides) the result returned 610 by the authentication mechanism. The property and value in this case 611 identify the local policy that was applied and the result it 612 returned. 614 For example, a DKIM signature is not required to include the Subject 615 header field in the set of fields that are signed. An ADMD receiving 616 such a message might decide that such a signature is unacceptable, 617 even if it passes, because the content of the Subject header field 618 could be altered post-signing without invalidating the signature. 619 Such an ADMD could replace the DKIM "pass" result with a "policy" 620 result and then also include the following in the corresponding 621 Authentication-Result field: 623 ... dkim=policy policy.dkim-rules=unsigned-subject ... 625 In this case, the property is "dkim-rules", indicating some local 626 check by that name took place and that check returned a result of 627 "unsigned-subject". These are arbitrary names selected by (and 628 presumably used within) the ADMD making use of them, so they are not 629 normally registered with IANA or otherwise specified apart from 630 setting syntax restrictions that allow for easy parsing within the 631 rest of the header field. 633 This ptype existed in the original specification for this header 634 field, but without a complete description or example of intended use. 635 As a result, it has not seen any practical use to date that matches 636 its intended purpose. These added details are provided to guide 637 implementers toward proper use. 639 2.5. Authentication Identifier Field 641 Every Authentication-Results header field has an authentication 642 service identifier field (authserv-id above). Specifically, this is 643 any string intended to identify the authentication service within the 644 ADMD that conducted authentication checks on the message. This 645 identifier is intended to be machine-readable and not necessarily 646 meaningful to users. 648 Note that in an EAI-formatted message, this identifier may be 649 expressed in UTF-8. 651 Since agents consuming this field will use this identifier to 652 determine whether its contents are of interest (and are safe to use), 653 the uniqueness of the identifier MUST be guaranteed by the ADMD that 654 generates it and MUST pertain to that ADMD. MUAs or downstream 655 filters SHOULD use this identifier to determine whether or not the 656 data contained in an Authentication-Results header field ought to be 657 used or ignored. 659 For simplicity and scalability, the authentication service identifier 660 SHOULD be a common token used throughout the ADMD. Common practice 661 is to use the DNS domain name used by or within that ADMD, sometimes 662 called the "organizational domain", but this is not strictly 663 necessary. 665 For tracing and debugging purposes, the authentication identifier can 666 instead be the specific hostname of the MTA performing the 667 authentication check whose result is being reported. Moreover, some 668 implementations define a substructure to the identifier; such 669 structures are outside of the scope of this specification. 671 Note, however, that using a local, relative identifier like a flat 672 hostname, rather than a hierarchical and globally unique ADMD 673 identifier like a DNS domain name, makes configuration more difficult 674 for large sites. The hierarchical identifier permits aggregating 675 related, trusted systems together under a single, parent identifier, 676 which in turn permits assessing the trust relationship with a single 677 reference. The alternative is a flat namespace requiring 678 individually listing each trusted system. Since consumers will use 679 the identifier to determine whether to use the contents of the header 680 field: 682 o Changes to the identifier impose a large, centralized 683 administrative burden. 685 o Ongoing administrative changes require constantly updating this 686 centralized table, making it difficult to ensure that an MUA or 687 downstream filter will have access to accurate information for 688 assessing the usability of the header field's content. In 689 particular, consumers of the header field will need to know not 690 only the current identifier(s) in use but previous ones as well to 691 account for delivery latency or later re-assessment of the header 692 field's contents. 694 Examples of valid authentication identifiers are "example.com", 695 "mail.example.org", "ms1.newyork.example.com", and "example-auth". 697 2.6. Version Tokens 699 The grammar above provides for the optional inclusion of versions on 700 both the header field itself (attached to the authserv-id token) and 701 on each of the methods being reported. The method version refers to 702 the method itself, which is specified in the documents describing 703 those methods, while the authserv-id version refers to this document 704 and thus the syntax of this header field. 706 The purpose of including these is to avoid misinterpretation of the 707 results. That is, if a parser finds a version after an authserv-id 708 that it does not explicitly know, it can immediately discontinue 709 trying to parse since what follows might not be in an expected 710 format. For a method version, the parser SHOULD ignore a method 711 result if the version is not supported in case the semantics of the 712 result have a different meaning than what is expected. For example, 713 if a hypothetical DKIM version 2 yielded a "pass" result for 714 different reasons than version 1 does, a consumer of this field might 715 not want to use the altered semantics. Allowing versions in the 716 syntax is a way to indicate this and let the consumer of the header 717 field decide. 719 2.7. Defined Methods and Result Values 721 Each individual authentication method returns one of a set of 722 specific result values. The subsections below provide references to 723 the documents defining the authentication methods specifically 724 supported by this document, and their corresponding result values. 725 Verifiers SHOULD use these values as described below. New methods 726 not specified in this document, but intended to be supported by the 727 header field defined here, MUST include a similar result table either 728 in their defining documents or in supplementary ones. 730 2.7.1. DKIM and DomainKeys 732 DKIM is represented by the "dkim" method and is defined in [DKIM]. 733 DomainKeys is defined in [DOMAINKEYS] and is represented by the 734 "domainkeys" method. 736 Section 3.8 of [DOMAINKEYS] enumerates some possible results of a 737 DomainKeys evaluation. Those results are not used when generating 738 this header field; rather, the results returned are listed below. 740 A signature is "acceptable to the ADMD" if it passes local policy 741 checks (or there are no specific local policy checks). For example, 742 an ADMD policy might require that the signature(s) on the message be 743 added using the DNS domain present in the From header field of the 744 message, thus making third-party signatures unacceptable even if they 745 verify. 747 Both DKIM and DomainKeys use the same result set, as follows: 749 none: The message was not signed. 751 pass: The message was signed, the signature or signatures were 752 acceptable to the ADMD, and the signature(s) passed verification 753 tests. 755 fail: The message was signed and the signature or signatures were 756 acceptable to the ADMD, but they failed the verification test(s). 758 policy: The message was signed, but some aspect of the signature or 759 signatures was not acceptable to the ADMD. 761 neutral: The message was signed, but the signature or signatures 762 contained syntax errors or were not otherwise able to be 763 processed. This result is also used for other failures not 764 covered elsewhere in this list. 766 temperror: The message could not be verified due to some error that 767 is likely transient in nature, such as a temporary inability to 768 retrieve a public key. A later attempt may produce a final 769 result. 771 permerror: The message could not be verified due to some error that 772 is unrecoverable, such as a required header field being absent. A 773 later attempt is unlikely to produce a final result. 775 DKIM results are reported using a ptype of "header". The property, 776 however, represents one of the tags found in the DKIM-Signature 777 header field rather than a distinct header field. For example, the 778 ptype-property combination "header.d" refers to the content of the 779 "d" (signing domain) tag from within the signature header field, and 780 not a distinct header field called "d". 782 Note that in an EAI-formatted message, the values of the "d" and "i" 783 properties can be expressed in UTF-8. 785 In addition to previous registrations, this document registers the 786 DKIM tag "a" (cryptographic algorithm used to sign the message) as a 787 reportable property. This can be used to aid receivers during post- 788 verification processing. In particular, [RFC8301] obsoleted use of 789 the "rsa-sha1" algorithm in DKIM, so it is important to be able to 790 distinguish such signatures from those using preferred algorithms. 792 The ability to report different DKIM results for a message with 793 multiple signatures is described in [RFC6008]. 795 [DKIM] advises that if a message fails verification, it is to be 796 treated as an unsigned message. A report of "fail" here permits the 797 receiver of the report to decide how to handle the failure. A report 798 of "neutral" or "none" preempts that choice, ensuring the message 799 will be treated as if it had not been signed. 801 Section 3.1 of [DOMAINKEYS] describes a process by which the sending 802 address of the message is determined. DomainKeys results are thus 803 reported along with the signing domain name, the sending address of 804 the message, and the name of the header field from which the latter 805 was extracted. This means that a DomainKeys result includes a ptype- 806 property combination of "header.d", plus one of "header.from" and 807 "header.sender". The sending address extracted from the header is 808 included with any [MAIL]-style comments removed; moreover, the local- 809 part of the address and the "@" character are removed if it has not 810 been authenticated in some way. 812 2.7.2. SPF and Sender ID 814 SPF and Sender ID use the "spf" and "sender-id" method names, 815 respectively. The result values for SPF are defined in Section 2.6 816 of [SPF], and those definitions are included here by reference: 818 +-----------+--------------------------------+ 819 | Code | Meaning | 820 +-----------+--------------------------------+ 821 | none | [RFC7208], Section 2.6.1 | 822 +-----------+--------------------------------+ 823 | pass | [RFC7208], Section 2.6.3 | 824 +-----------+--------------------------------+ 825 | fail | [RFC7208], Section 2.6.4 | 826 +-----------+--------------------------------+ 827 | softfail | [RFC7208], Section 2.6.5 | 828 +-----------+--------------------------------+ 829 | policy | RFC 7601, Section 2.4 | 830 +-----------+--------------------------------+ 831 | neutral | [RFC7208], Section 2.6.2 | 832 +-----------+--------------------------------+ 833 | temperror | [RFC7208], Section 2.6.6 | 834 +-----------+--------------------------------+ 835 | permerror | [RFC7208], Section 2.6.7 | 836 +-----------+--------------------------------+ 838 These result codes are used in the context of this specification to 839 reflect the result returned by the component conducting SPF 840 evaluation. 842 For SPF, the ptype used is "smtp", and the property is either 843 "mailfrom" or "helo", since those values are the ones SPF can 844 evaluate. (If the SMTP client issued the EHLO command instead of 845 HELO, the property used is "helo".) 847 Note that in an EAI-formatted message, the "mailfrom" value can be 848 expressed in UTF-8. 850 The "sender-id" method is described in [SENDERID]. For this method, 851 the ptype used is "header" and the property will be the name of the 852 header field from which the Purported Responsible Address (see [PRA]) 853 was extracted -- namely, one of "Resent-Sender", "Resent-From", 854 "Sender", or "From". 856 The results for Sender ID are listed and described in Section 4.2 of 857 [SENDERID], but for the purposes of this specification, the SPF 858 definitions enumerated above are used instead. Also, [SENDERID] 859 specifies result codes that use mixed case, but they are typically 860 used all lowercase in this context. 862 For both methods, an additional result of "policy" is defined, which 863 means the client was authorized to inject or relay mail on behalf of 864 the sender's DNS domain according to the authentication method's 865 algorithm, but local policy dictates that the result is unacceptable. 866 For example, "policy" might be used if SPF returns a "pass" result, 867 but a local policy check matches the sending DNS domain to one found 868 in an explicit list of unacceptable DNS domains (e.g., spammers). 870 If the retrieved sender policies used to evaluate SPF and Sender ID 871 do not contain explicit provisions for authenticating the local-part 872 (see Section 3.4.1 of [MAIL]) of an address, the "pvalue" reported 873 along with results for these mechanisms SHOULD NOT include the local- 874 part or the following "@" character. 876 2.7.3. "iprev" 878 The result values used by the "iprev" method, defined in Section 3, 879 are as follows: 881 pass: The DNS evaluation succeeded, i.e., the "reverse" and 882 "forward" lookup results were returned and were in agreement. 884 fail: The DNS evaluation failed. In particular, the "reverse" and 885 "forward" lookups each produced results, but they were not in 886 agreement, or the "forward" query completed but produced no 887 result, e.g., a DNS RCODE of 3, commonly known as NXDOMAIN, or an 888 RCODE of 0 (NOERROR) in a reply containing no answers, was 889 returned. 891 temperror: The DNS evaluation could not be completed due to some 892 error that is likely transient in nature, such as a temporary DNS 893 error, e.g., a DNS RCODE of 2, commonly known as SERVFAIL, or 894 other error condition resulted. A later attempt may produce a 895 final result. 897 permerror: The DNS evaluation could not be completed because no PTR 898 data are published for the connecting IP address, e.g., a DNS 899 RCODE of 3, commonly known as NXDOMAIN, or an RCODE of 0 (NOERROR) 900 in a reply containing no answers, was returned. This prevented 901 completion of the evaluation. A later attempt is unlikely to 902 produce a final result. 904 There is no "none" for this method since any TCP connection 905 delivering email has an IP address associated with it, so some kind 906 of evaluation will always be possible. 908 The result is reported using a ptype of "policy" (as this is not part 909 of any established protocol) and a property of "iprev". 911 For discussion of the format of DNS replies, see "Domain Names - 912 Implementation and Specification" ([DNS]). 914 2.7.4. SMTP AUTH 916 SMTP AUTH (defined in [AUTH]) is represented by the "auth" method. 917 Its result values are as follows: 919 none: SMTP authentication was not attempted. 921 pass: The SMTP client authenticated to the server reporting the 922 result using the protocol described in [AUTH]. 924 fail: The SMTP client attempted to authenticate to the server using 925 the protocol described in [AUTH] but was not successful (such as 926 providing a valid identity but an incorrect password). 928 temperror: The SMTP client attempted to authenticate using the 929 protocol described in [AUTH] but was not able to complete the 930 attempt due to some error that is likely transient in nature, such 931 as a temporary directory service lookup error. A later attempt 932 may produce a final result. 934 permerror: The SMTP client attempted to authenticate using the 935 protocol described in [AUTH] but was not able to complete the 936 attempt due to some error that is likely not transient in nature, 937 such as a permanent directory service lookup error. A later 938 attempt is not likely to produce a final result. 940 The result of AUTH is reported using a ptype of "smtp" and a property 941 of either: 943 o "auth", in which case the value is the authorization identity 944 generated by the exchange initiated by the AUTH command; or 946 o "mailfrom", in which case the value is the mailbox identified by 947 the AUTH parameter used with the MAIL FROM command. Note that in 948 an EAI-formatted message, these values can be expressed in UTF-8. 950 If both identities are available, both can be reported. For example, 951 consider this command issued by a client that has completed session 952 authentication with the AUTH command resulting in an authorized 953 identity of "client@c.example": 955 MAIL FROM: AUTH= 957 This could result in a "resinfo" construction like so: 959 ; auth=pass smtp.auth=client@c.example smtp.mailfrom=bob@b.example 961 Note that in all cases other than "pass", the message was sent by an 962 unauthenticated client. All non-"pass" cases SHOULD thus be treated 963 as equivalent with respect to this method. 965 2.7.5. Other Registered Codes 967 Result codes were also registered in other RFCs as follows: 969 o Vouch By Reference (in [AR-VBR], represented by "vbr"); 971 o Authorized Third-Party Signatures (in [ATPS], represented by 972 "dkim-atps"); 974 o Author Domain Signing Practices (in [ADSP], represented by "dkim- 975 adsp"); 977 o Require-Recipient-Valid-Since (in [RRVS], represented by "rrvs"); 979 o S/MIME (in [SMIME-REG], represented by "smime"). 981 Note that "vbr.mv" and "vbr.md", which are already registered, are 982 permitted to be UTF-8 in an EAI-formatted message. 984 2.7.6. Extension Methods 986 Additional authentication method identifiers (extension methods) may 987 be defined in the future by later revisions or extensions to this 988 specification. These method identifiers are registered with the 989 Internet Assigned Numbers Authority (IANA) and, preferably, published 990 in an RFC. See Section 6 for further details. 992 Extension methods can be defined for the following reasons: 994 1. To allow additional information from new authentication systems 995 to be communicated to MUAs or downstream filters. The names of 996 such identifiers ought to reflect the name of the method being 997 defined but ought not be needlessly long. 999 2. To allow the creation of "sub-identifiers" that indicate 1000 different levels of authentication and differentiate between 1001 their relative strengths, e.g., "auth1-weak" and "auth1-strong". 1003 Authentication method implementers are encouraged to provide adequate 1004 information, via message header field comments if necessary, to allow 1005 an MUA developer to understand or relay ancillary details of 1006 authentication results. For example, if it might be of interest to 1007 relay what data was used to perform an evaluation, such information 1008 could be relayed as a comment in the header field, such as: 1010 Authentication-Results: example.com; 1011 foo=pass bar.baz=blob (2 of 3 tests OK) 1013 Experimental method identifiers MUST only be used within ADMDs that 1014 have explicitly consented to use them. These method identifiers and 1015 the parameters associated with them are not documented in RFCs. 1016 Therefore, they are subject to change at any time and not suitable 1017 for production use. Any MTA, MUA, or downstream filter intended for 1018 production use SHOULD ignore or delete any Authentication-Results 1019 header field that includes an experimental (unknown) method 1020 identifier. 1022 2.7.7. Extension Result Codes 1024 Additional result codes (extension results) might be defined in the 1025 future by later revisions or extensions to this specification. Non- 1026 experimental result codes MUST be registered with the Internet 1027 Assigned Numbers Authority (IANA) and preferably published in an RFC. 1028 See Section 6 for further details. 1030 Experimental results MUST only be used within ADMDs that have 1031 explicitly consented to use them. These results and the parameters 1032 associated with them are not formally documented. Therefore, they 1033 are subject to change at any time and not suitable for production 1034 use. Any MTA, MUA, or downstream filter intended for production use 1035 SHOULD ignore or delete any Authentication-Results header field that 1036 includes an extension result. 1038 3. The "iprev" Authentication Method 1040 This section defines an additional authentication method called 1041 "iprev". 1043 "iprev" is an attempt to verify that a client appears to be valid 1044 based on some DNS queries, which is to say that the IP address is 1045 explicitly associated with a domain name. Upon receiving a session 1046 initiation of some kind from a client, the IP address of the client 1047 peer is queried for matching names (i.e., a number-to-name 1048 translation, also known as a "reverse lookup" or a "PTR" record 1049 query). Once that result is acquired, a lookup of each of the names 1050 (i.e., a name-to-number translation, or an "A" or "AAAA" record 1051 query) thus retrieved is done. The response to this second check 1052 will typically result in at least one mapping back to the client's IP 1053 address. 1055 Expressed as an algorithm: If the client peer's IP address is I, the 1056 list of names to which I maps (after a "PTR" query) is the set N, and 1057 the union of IP addresses to which each member of N maps (after 1058 corresponding "A" and "AAAA" queries) is L, then this test is 1059 successful if I is an element of L. 1061 Often an MTA receiving a connection that fails this test will simply 1062 reject the connection using the enhanced status code defined in 1063 [AUTH-ESC]. If an operator instead wishes to make this information 1064 available to downstream agents as a factor in handling decisions, it 1065 records a result in accordance with Section 2.7.3. 1067 The response to a PTR query could contain multiple names. To prevent 1068 heavy DNS loads, agents performing these queries MUST be implemented 1069 such that the number of names evaluated by generation of 1070 corresponding A or AAAA queries is limited so as not to be unduly 1071 taxing to the DNS infrastructure, though it MAY be configurable by an 1072 administrator. As an example, Section 4.6.4 of [SPF] chose a limit 1073 of 10 for its implementation of this algorithm. 1075 "DNS Extensions to Support IP Version 6" ([DNS-IP6]) discusses the 1076 query formats for the IPv6 case. 1078 There is some contention regarding the wisdom and reliability of this 1079 test. For example, in some regions, it can be difficult for this 1080 test ever to pass because the practice of arranging to match the 1081 forward and reverse DNS is infrequently observed. Therefore, the 1082 precise implementation details of how a verifier performs an "iprev" 1083 test are not specified here. The verifier MAY report a successful or 1084 failed "iprev" test at its discretion having done some kind of check 1085 of the validity of the connection's identity using DNS. It is 1086 incumbent upon an agent making use of the reported "iprev" result to 1087 understand what exactly that particular verifier is attempting to 1088 report. 1090 Extensive discussion of reverse DNS mapping and its implications can 1091 be found in "Considerations for the use of DNS Reverse Mapping" 1092 ([DNSOP-REVERSE]). In particular, it recommends that applications 1093 avoid using this test as a means of authentication or security. Its 1094 presence in this document is not an endorsement but is merely 1095 acknowledgment that the method remains common and provides the means 1096 to relay the results of that test. 1098 4. Adding the Header Field to a Message 1100 This specification makes no attempt to evaluate the relative 1101 strengths of various message authentication methods that may become 1102 available. The methods listed are an order-independent set; their 1103 sequence does not indicate relative strength or importance of one 1104 method over another. Instead, the MUA or downstream filter consuming 1105 this header field is to interpret the result of each method based on 1106 its own knowledge of what that method evaluates. 1108 Each "method" MUST refer to an authentication method declared in the 1109 IANA registry or an extension method as described in Section 2.7.6, 1110 and each "result" MUST refer to a result code declared in the IANA 1111 registry or an extension result code as defined in Section 2.7.7. 1112 See Section 6 for further information about the registered methods 1113 and result codes. 1115 An MTA compliant with this specification adds this header field 1116 (after performing one or more message authentication tests) to 1117 indicate which MTA or ADMD performed the test, which test was 1118 applied, and what the result was. If an MTA applies more than one 1119 such test, it adds this header field either once per test or once 1120 indicating all of the results. An MTA MUST NOT add a result to an 1121 existing header field. 1123 An MTA MAY add this header field containing only the authentication 1124 identifier portion and the "none" token (see Section 2.2) to indicate 1125 explicitly that no message authentication schemes were applied prior 1126 to delivery of this message. 1128 An MTA adding this header field has to take steps to identify it as 1129 legitimate to the MUAs or downstream filters that will ultimately 1130 consume its content. One process to do so is described in Section 5. 1131 Further measures may be necessary in some environments. Some 1132 possible solutions are enumerated in Section 7.1. This document does 1133 not mandate any specific solution to this issue as each environment 1134 has its own facilities and limitations. 1136 Most known message authentication methods focus on a particular 1137 identifier to evaluate. SPF and Sender ID differ in that they can 1138 yield a result based on more than one identifier; specifically, SPF 1139 can evaluate the RFC5321.HELO parameter or the RFC5321.MailFrom 1140 parameter, and Sender ID can evaluate the RFC5321.MailFrom parameter 1141 or the Purported Responsible Address (PRA) identity. When generating 1142 this field to report those results, only the parameter that yielded 1143 the result is included. 1145 For MTAs that add this header field, adding header fields in order 1146 (at the top), per Section 3.6 of [MAIL], is particularly important. 1147 Moreover, this header field SHOULD be inserted above any other trace 1148 header fields such MTAs might prepend. This placement allows easy 1149 detection of header fields that can be trusted. 1151 End users making direct use of this header field might inadvertently 1152 trust information that has not been properly vetted. If, for 1153 example, a basic SPF result were to be relayed that claims an 1154 authenticated addr-spec, the local-part of that addr-spec has 1155 actually not been authenticated. Thus, an MTA adding this header 1156 field SHOULD NOT include any data that has not been authenticated by 1157 the method(s) being applied. Moreover, MUAs SHOULD NOT render to 1158 users such information if it is presented by a method known not to 1159 authenticate it. 1161 4.1. Header Field Position and Interpretation 1163 In order to ensure non-ambiguous results and avoid the impact of 1164 false header fields, MUAs and downstream filters SHOULD NOT interpret 1165 this header field unless specifically configured to do so by the user 1166 or administrator. That is, this interpretation should not be "on by 1167 default". Naturally then, users or administrators ought not activate 1168 such a feature unless (1) they are certain the header field will be 1169 validly added by an agent within the ADMD that accepts the mail that 1170 is ultimately read by the MUA, and (2) instances of the header field 1171 that appear to originate within the ADMD but are actually added by 1172 foreign MTAs will be removed before delivery. 1174 Furthermore, MUAs and downstream filters SHOULD NOT interpret this 1175 header field unless the authentication service identifier of the 1176 header field is used within the ADMD as configured by the user or 1177 administrator. 1179 MUAs and downstream filters MUST ignore any result reported using a 1180 "result" not specified in the IANA "Result Code" registry or a 1181 "ptype" not listed in the "Email Authentication Property Types" 1182 registry for such values as defined in Section 6. Moreover, such 1183 agents MUST ignore a result indicated for any "method" they do not 1184 specifically support. 1186 An MUA SHOULD NOT reveal these results to end users, absent careful 1187 human factors design considerations and testing, for the presentation 1188 of trust-related materials. For example, an attacker could register 1189 examp1e.com (note the digit "1" (one)) and send signed mail to 1190 intended victims; a verifier would detect that the signature was 1191 valid and report a "pass" even though it's clear the DNS domain name 1192 was intended to mislead. See Section 7.2 for further discussion. 1194 As stated in Section 2.1, this header field MUST be treated as though 1195 it were a trace header field as defined in Section 3.6.7 of [MAIL] 1196 and hence MUST NOT be reordered and MUST be prepended to the message, 1197 so that there is generally some indication upon delivery of where in 1198 the chain of handling MTAs the message authentication was done. 1200 Note that there are a few message handlers that are only capable of 1201 appending new header fields to a message. Strictly speaking, these 1202 handlers are not compliant with this specification. They can still 1203 add the header field to carry authentication details, but any signal 1204 about where in the handling chain the work was done may be lost. 1205 Consumers SHOULD be designed such that this can be tolerated, 1206 especially from a producer known to have this limitation. 1208 MUAs SHOULD ignore instances of this header field discovered within 1209 message/rfc822 MIME attachments. 1211 Further discussion of these topics can be found in Section 7 below. 1213 4.2. Local Policy Enforcement 1215 Some sites have a local policy that considers any particular 1216 authentication policy's non-recoverable failure results (typically 1217 "fail" or similar) as justification for rejecting the message. In 1218 such cases, the border MTA SHOULD issue an SMTP rejection response to 1219 the message, rather than adding this header field and allowing the 1220 message to proceed toward delivery. This is more desirable than 1221 allowing the message to reach an internal host's MTA or spam filter, 1222 thus possibly generating a local rejection such as a Delivery Status 1223 Notification (DSN) [DSN] to a forged originator. Such generated 1224 rejections are colloquially known as "backscatter". 1226 The same MAY also be done for local policy decisions overriding the 1227 results of the authentication methods (e.g., the "policy" result 1228 codes described in Section 2.7). 1230 Such rejections at the SMTP protocol level are not possible if local 1231 policy is enforced at the MUA and not the MTA. 1233 5. Removing Existing Header Fields 1235 To mitigate the impact of forged header fields, any MTA conforming to 1236 this specification MUST delete any discovered instance of this header 1237 field that claims, by virtue of its authentication service 1238 identifier, to have been added within its trust boundary but that did 1239 not come directly from another trusted MTA. For example, an MTA for 1240 example.com receiving a message MUST delete or otherwise obscure any 1241 instance of this header field bearing an authentication service 1242 identifier indicating that the header field was added within 1243 example.com prior to adding its own header fields. This could mean 1244 each MTA will have to be equipped with a list of internal MTAs known 1245 to be compliant (and hence trustworthy). 1247 For messages that are EAI-formatted messages, this test is done after 1248 converting A-labels into U-labels. 1250 For simplicity and maximum security, a border MTA could remove all 1251 instances of this header field on mail crossing into its trust 1252 boundary. However, this may conflict with the desire to access 1253 authentication results performed by trusted external service 1254 providers. It may also invalidate signed messages whose signatures 1255 cover external instances of this header field. A more robust border 1256 MTA could allow a specific list of authenticating MTAs whose 1257 information is to be admitted, removing the header field originating 1258 from all others. 1260 As stated in Section 1.2, a formal definition of "trust boundary" is 1261 deliberately not made here. It is entirely possible that a border 1262 MTA for example.com will explicitly trust authentication results 1263 asserted by upstream host example.net even though they exist in 1264 completely disjoint administrative boundaries. In that case, the 1265 border MTA MAY elect not to delete those results; moreover, the 1266 upstream host doing some authentication work could apply a signing 1267 technology such as [DKIM] on its own results to assure downstream 1268 hosts of their authenticity. An example of this is provided in 1269 Appendix B. 1271 Similarly, in the case of messages signed using [DKIM] or other 1272 message-signing methods that sign header fields, this removal action 1273 could invalidate one or more signatures on the message if they 1274 covered the header field to be removed. This behavior can be 1275 desirable since there's little value in validating the signature on a 1276 message with forged header fields. However, signing agents MAY 1277 therefore elect to omit these header fields from signing to avoid 1278 this situation. 1280 An MTA SHOULD remove any instance of this header field bearing a 1281 version (express or implied) that it does not support. However, an 1282 MTA MUST remove such a header field if the [SMTP] connection relaying 1283 the message is not from a trusted internal MTA. This means the MTA 1284 needs to be able to understand versions of this header field at least 1285 as late as the ones understood by the MUAs or other consumers within 1286 its ADMD. 1288 6. IANA Considerations 1290 IANA has registered the defined header field and created registries 1291 as described below. These registry actions were originally defined 1292 by [RFC5451] and updated by [RFC6577] and [RFC7001]. The created 1293 registries were further updated in [RFC7601] to make them more 1294 complete. 1296 Each is listed below, though generally they are not changed by this 1297 document. 1299 6.1. The Authentication-Results Header Field 1301 The Authentication-Results header field was added to the IANA 1302 "Permanent Message Header Field Names" registry, per the procedure 1303 found in [IANA-HEADERS]. That entry will be updated to reference 1304 this document. The following is the registration template: 1306 Header field name: Authentication-Results 1307 Applicable protocol: mail ([MAIL]) 1308 Status: Standard 1309 Author/Change controller: IETF 1310 Specification document(s): [this document] 1311 Related information: none 1313 6.2. "Email Authentication Methods" Registry Description 1315 No changes are made to the description of this registry. 1317 6.3. "Email Authentication Methods" Registry Update 1319 The following two entries are added. 1321 6.3.1. 'header.a' for DKIM 1323 Method: dkim 1325 Definition: [this document] 1327 ptype: header 1329 property: a 1331 Description: value of signature "a" tag 1333 Status: active 1335 Version: 1 1337 6.3.2. 'header.s' for DKIM 1339 "header.s" for DKIM: 1341 Method: dkim 1343 Definition: [this document] 1345 ptype: header 1347 property: s 1349 Description: value of signature "s" tag 1351 Status: active 1353 Version: 1 1355 6.4. "Email Authentication Property Types" Registry 1357 [RFC7410] created the "Email Authentication Property Types" registry. 1359 No changes are made to the description of this registry. However, it 1360 should be noted that Section 2.3 contains slightly different language 1361 than prior versions of this document, allowing a broader space from 1362 which to extract meaningful identifiers and report them through this 1363 mechanism. 1365 6.5. "Email Authentication Result Names" Description 1367 No changes are made to the description of this registry. 1369 6.6. "Email Authentication Result Names" Update 1371 No changes are made to entries in this registry. 1373 7. Security Considerations 1375 The following security considerations apply when adding or processing 1376 the Authentication-Results header field: 1378 7.1. Forged Header Fields 1380 An MUA or filter that accesses a mailbox whose messages are handled 1381 by a non-conformant MTA, and understands Authentication-Results 1382 header fields, could potentially make false conclusions based on 1383 forged header fields. A malicious user or agent could forge a header 1384 field using the DNS domain of a receiving ADMD as the authserv-id 1385 token in the value of the header field and, with the rest of the 1386 value, claim that the message was properly authenticated. The non- 1387 conformant MTA would fail to strip the forged header field, and the 1388 MUA could inappropriately trust it. 1390 For this reason, it is best not to have processing of the 1391 Authentication-Results header field enabled by default; instead, it 1392 should be ignored, at least for the purposes of enacting filtering 1393 decisions, unless specifically enabled by the user or administrator 1394 after verifying that the border MTA is compliant. It is acceptable 1395 to have an MUA aware of this specification but have an explicit list 1396 of hostnames whose Authentication-Results header fields are 1397 trustworthy; however, this list should initially be empty. 1399 Proposed alternative solutions to this problem were made some time 1400 ago and are listed below. To date, they have not been developed due 1401 to lack of demand but are documented here should the information be 1402 useful at some point in the future: 1404 1. Possibly the simplest is a digital signature protecting the 1405 header field, such as using [DKIM], that can be verified by an 1406 MUA by using a posted public key. Although one of the main 1407 purposes of this document is to relieve the burden of doing 1408 message authentication work at the MUA, this only requires that 1409 the MUA learn a single authentication scheme even if a number of 1410 them are in use at the border MTA. Note that [DKIM] requires 1411 that the From header field be signed, although in this 1412 application, the signing agent (a trusted MTA) likely cannot 1413 authenticate that value, so the fact that it is signed should be 1414 ignored. Where the authserv-id is the ADMD's domain name, the 1415 authserv-id matching this valid internal signature's "d=" DKIM 1416 value is sufficient. 1418 2. Another would be a means to interrogate the MTA that added the 1419 header field to see if it is actually providing any message 1420 authentication services and saw the message in question, but this 1421 isn't especially palatable given the work required to craft and 1422 implement such a scheme. 1424 3. Yet another might be a method to interrogate the internal MTAs 1425 that apparently handled the message (based on Received header 1426 fields) to determine whether any of them conform to Section 5 of 1427 this memo. This, too, has potentially high barriers to entry. 1429 4. Extensions to [IMAP], [SMTP], and [POP3] could be defined to 1430 allow an MUA or filtering agent to acquire the authserv-id in use 1431 within an ADMD, thus allowing it to identify which 1432 Authentication-Results header fields it can trust. 1434 5. On the presumption that internal MTAs are fully compliant with 1435 Section 3.6 of [MAIL] and the compliant internal MTAs are using 1436 their own hostnames or the ADMD's DNS domain name as the 1437 authserv-id token, the header field proposed here should always 1438 appear above a Received header added by a trusted MTA. This can 1439 be used as a test for header field validity. 1441 Support for some of these is being considered for future work. 1443 In any case, a mechanism needs to exist for an MUA or filter to 1444 verify that the host that appears to have added the header field (a) 1445 actually did so and (b) is legitimately adding that header field for 1446 this delivery. Given the variety of messaging environments deployed 1447 today, consensus appears to be that specifying a particular mechanism 1448 for doing so is not appropriate for this document. 1450 Mitigation of the forged header field attack can also be accomplished 1451 by moving the authentication results data into metadata associated 1452 with the message. In particular, an [SMTP] extension could be 1453 established to communicate authentication results from the border MTA 1454 to intermediate and delivery MTAs; the latter of these could arrange 1455 to store the authentication results as metadata retrieved and 1456 rendered along with the message by an [IMAP] client aware of a 1457 similar extension in that protocol. The delivery MTA would be told 1458 to trust data via this extension only from MTAs it trusts, and border 1459 MTAs would not accept data via this extension from any source. There 1460 is no vector in such an arrangement for forgery of authentication 1461 data by an outside agent. 1463 7.2. Misleading Results 1465 Until some form of service for querying the reputation of a sending 1466 agent is widely deployed, the existence of this header field 1467 indicating a "pass" does not render the message trustworthy. It is 1468 possible for an arriving piece of spam or other undesirable mail to 1469 pass checks by several of the methods enumerated above (e.g., a piece 1470 of spam signed using [DKIM] by the originator of the spam, which 1471 might be a spammer or a compromised system). In particular, this 1472 issue is not resolved by forged header field removal discussed above. 1474 Hence, MUAs and downstream filters must take some care with use of 1475 this header even after possibly malicious headers are scrubbed. 1477 7.3. Header Field Position 1479 Despite the requirements of [MAIL], header fields can sometimes be 1480 reordered en route by intermediate MTAs. The goal of requiring 1481 header field addition only at the top of a message is an 1482 acknowledgment that some MTAs do reorder header fields, but most do 1483 not. Thus, in the general case, there will be some indication of 1484 which MTAs (if any) handled the message after the addition of the 1485 header field defined here. 1487 7.4. Reverse IP Query Denial-of-Service Attacks 1489 Section 4.6.4 of [SPF] describes a DNS-based denial-of-service attack 1490 for verifiers that attempt DNS-based identity verification of 1491 arriving client connections. A verifier wishing to do this check and 1492 report this information needs to take care not to go to unbounded 1493 lengths to resolve "A" and "PTR" queries. MUAs or other filters 1494 making use of an "iprev" result specified by this document need to be 1495 aware of the algorithm used by the verifier reporting the result and, 1496 especially, its limitations. 1498 7.5. Mitigation of Backscatter 1500 Failing to follow the instructions of Section 4.2 can result in a 1501 denial-of-service attack caused by the generation of [DSN] messages 1502 (or equivalent) to addresses that did not send the messages being 1503 rejected. 1505 7.6. Internal MTA Lists 1507 Section 5 describes a procedure for scrubbing header fields that may 1508 contain forged authentication results about a message. A compliant 1509 installation will have to include, at each MTA, a list of other MTAs 1510 known to be compliant and trustworthy. Failing to keep this list 1511 current as internal infrastructure changes may expose an ADMD to 1512 attack. 1514 7.7. Attacks against Authentication Methods 1516 If an attack becomes known against an authentication method, clearly 1517 then the agent verifying that method can be fooled into thinking an 1518 inauthentic message is authentic, and thus the value of this header 1519 field can be misleading. It follows that any attack against the 1520 authentication methods supported by this document is also a security 1521 consideration here. 1523 7.8. Intentionally Malformed Header Fields 1525 It is possible for an attacker to add an Authentication-Results 1526 header field that is extraordinarily large or otherwise malformed in 1527 an attempt to discover or exploit weaknesses in header field parsing 1528 code. Implementers must thoroughly verify all such header fields 1529 received from MTAs and be robust against intentionally as well as 1530 unintentionally malformed header fields. 1532 7.9. Compromised Internal Hosts 1534 An internal MUA or MTA that has been compromised could generate mail 1535 with a forged From header field and a forged Authentication-Results 1536 header field that endorses it. Although it is clearly a larger 1537 concern to have compromised internal machines than it is to prove the 1538 value of this header field, this risk can be mitigated by arranging 1539 that internal MTAs will remove this header field if it claims to have 1540 been added by a trusted border MTA (as described above), yet the 1541 [SMTP] connection is not coming from an internal machine known to be 1542 running an authorized MTA. However, in such a configuration, 1543 legitimate MTAs will have to add this header field when legitimate 1544 internal-only messages are generated. This is also covered in 1545 Section 5. 1547 7.10. Encapsulated Instances 1549 MIME messages can contain attachments of type "message/rfc822", which 1550 contain other messages. Such an encapsulated message can also 1551 contain an Authentication-Results header field. Although the 1552 processing of these is outside of the intended scope of this document 1553 (see Section 1.3), some early guidance to MUA developers is 1554 appropriate here. 1556 Since MTAs are unlikely to strip Authentication-Results header fields 1557 after mailbox delivery, MUAs are advised in Section 4.1 to ignore 1558 such instances within MIME attachments. Moreover, when extracting a 1559 message digest to separate mail store messages or other media, such 1560 header fields should be removed so that they will never be 1561 interpreted improperly by MUAs that might later consume them. 1563 7.11. Reverse Mapping 1565 Although Section 3 of this memo includes explicit support for the 1566 "iprev" method, its value as an authentication mechanism is limited. 1567 Implementers of both this specification and agents that use the data 1568 it relays are encouraged to become familiar with the issues raised by 1569 [DNSOP-REVERSE] when deciding whether or not to include support for 1570 "iprev". 1572 8. References 1574 8.1. Normative References 1576 [ABNF] Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax 1577 Specifications: ABNF", STD 68, RFC 5234, DOI 10.17487/ 1578 RFC5234, January 2008, 1579 . 1581 [DKIM] Crocker, D., Ed., Hansen, T., Ed., and M. Kucherawy, Ed., 1582 "DomainKeys Identified Mail (DKIM) Signatures", STD 76, 1583 RFC 6376, DOI 10.17487/RFC6376, September 2011, 1584 . 1586 [IANA-HEADERS] 1587 Klyne, G., Nottingham, M., and J. Mogul, "Registration 1588 Procedures for Message Header Fields", BCP 90, RFC 3864, 1589 DOI 10.17487/RFC3864, September 2004, 1590 . 1592 [KEYWORDS] 1593 Bradner, S., "Key words for use in RFCs to Indicate 1594 Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/ 1595 RFC2119, March 1997, 1596 . 1598 [MAIL] Resnick, P., Ed., "Internet Message Format", RFC 5322, 1599 DOI 10.17487/RFC5322, October 2008, 1600 . 1602 [MIME] Freed, N. and N. Borenstein, "Multipurpose Internet Mail 1603 Extensions (MIME) Part One: Format of Internet Message 1604 Bodies", RFC 2045, DOI 10.17487/RFC2045, November 1996, 1605 . 1607 [RFC5451] Kucherawy, M., "Message Header Field for Indicating 1608 Message Authentication Status", RFC 5451, DOI 10.17487/ 1609 RFC5451, April 2009, 1610 . 1612 [RFC6008] Kucherawy, M., "Authentication-Results Registration for 1613 Differentiating among Cryptographic Results", RFC 6008, 1614 DOI 10.17487/RFC6008, September 2010, 1615 . 1617 [RFC6530] Klensin, J. and Y. Ko, "Overview and Framework for 1618 Internationalized Email", RFC 6530, DOI 10.17487/RFC6530, 1619 February 2012, . 1621 [RFC6531] Yao, J. and W. Mao, "SMTP Extension for Internationalized 1622 Email", RFC 6531, DOI 10.17487/RFC6531, February 2012, 1623 . 1625 [RFC6532] Yang, A., Steele, S., and N. Freed, "Internationalized 1626 Email Headers", RFC 6532, DOI 10.17487/RFC6532, 1627 February 2012, . 1629 [RFC6577] Kucherawy, M., "Authentication-Results Registration Update 1630 for Sender Policy Framework (SPF) Results", RFC 6577, 1631 DOI 10.17487/RFC6577, March 2012, 1632 . 1634 [RFC7001] Kucherawy, M., "Message Header Field for Indicating 1635 Message Authentication Status", RFC 7001, DOI 10.17487/ 1636 RFC7001, September 2013, 1637 . 1639 [RFC7601] Kucherawy, M., "Message Header Field for Indicating 1640 Message Authentication Status", RFC 7601, DOI 10.17487/ 1641 RFC7601, August 2015, 1642 . 1644 [RFC8301] Kitterman, S., "Cryptographic Algorithm and Key Usage 1645 Update to DomainKeys Identified Mail (DKIM)", RFC 8301, 1646 DOI 10.17487/RFC8301, January 2018, 1647 . 1649 [SMTP] Klensin, J., "Simple Mail Transfer Protocol", RFC 5321, 1650 DOI 10.17487/RFC5321, October 2008, 1651 . 1653 8.2. Informative References 1655 [ADSP] Allman, E., Fenton, J., Delany, M., and J. Levine, 1656 "DomainKeys Identified Mail (DKIM) Author Domain Signing 1657 Practices (ADSP)", RFC 5617, DOI 10.17487/RFC5617, 1658 August 2009, . 1660 [AR-VBR] Kucherawy, M., "Authentication-Results Registration for 1661 Vouch by Reference Results", RFC 6212, DOI 10.17487/ 1662 RFC6212, April 2011, 1663 . 1665 [ATPS] Kucherawy, M., "DomainKeys Identified Mail (DKIM) 1666 Authorized Third-Party Signatures", RFC 6541, 1667 DOI 10.17487/RFC6541, February 2012, 1668 . 1670 [AUTH] Siemborski, R., Ed. and A. Melnikov, Ed., "SMTP Service 1671 Extension for Authentication", RFC 4954, DOI 10.17487/ 1672 RFC4954, July 2007, 1673 . 1675 [AUTH-ESC] 1676 Kucherawy, M., "Email Authentication Status Codes", 1677 RFC 7372, DOI 10.17487/RFC7372, September 2014, 1678 . 1680 [DMARC] Kucherawy, M., Ed. and E. Zwicky, Ed., "Domain-based 1681 Message Authentication, Reporting, and Conformance 1682 (DMARC)", RFC 7489, DOI 10.17487/RFC7489, March 2015, 1683 . 1685 [DNS] Mockapetris, P., "Domain names - implementation and 1686 specification", STD 13, RFC 1035, DOI 10.17487/RFC1035, 1687 November 1987, . 1689 [DNS-IP6] Thomson, S., Huitema, C., Ksinant, V., and M. Souissi, 1690 "DNS Extensions to Support IP Version 6", RFC 3596, 1691 DOI 10.17487/RFC3596, October 2003, 1692 . 1694 [DNSOP-REVERSE] 1695 Senie, D. and A. Sullivan, "Considerations for the use of 1696 DNS Reverse Mapping", Work in Progress, draft-ietf-dnsop- 1697 reverse-mapping-considerations-06, March 2008. 1699 [DOMAINKEYS] 1700 Delany, M., "Domain-Based Email Authentication Using 1701 Public Keys Advertised in the DNS (DomainKeys)", RFC 4870, 1702 DOI 10.17487/RFC4870, May 2007, 1703 . 1705 [DSN] Moore, K. and G. Vaudreuil, "An Extensible Message Format 1706 for Delivery Status Notifications", RFC 3464, 1707 DOI 10.17487/RFC3464, January 2003, 1708 . 1710 [EMAIL-ARCH] 1711 Crocker, D., "Internet Mail Architecture", RFC 5598, 1712 DOI 10.17487/RFC5598, July 2009, 1713 . 1715 [IMAP] Crispin, M., "INTERNET MESSAGE ACCESS PROTOCOL - VERSION 1716 4rev1", RFC 3501, DOI 10.17487/RFC3501, March 2003, 1717 . 1719 [POP3] Myers, J. and M. Rose, "Post Office Protocol - Version 3", 1720 STD 53, RFC 1939, DOI 10.17487/RFC1939, May 1996, 1721 . 1723 [PRA] Lyon, J., "Purported Responsible Address in E-Mail 1724 Messages", RFC 4407, DOI 10.17487/RFC4407, April 2006, 1725 . 1727 [RFC7410] Kucherawy, M., "A Property Types Registry for the 1728 Authentication-Results Header Field", RFC 7410, 1729 DOI 10.17487/RFC7410, December 2014, 1730 . 1732 [RRVS] Mills, W. and M. Kucherawy, "The Require-Recipient-Valid- 1733 Since Header Field and SMTP Service Extension", RFC 7293, 1734 DOI 10.17487/RFC7293, July 2014, 1735 . 1737 [SECURITY] 1738 Rescorla, E. and B. Korver, "Guidelines for Writing RFC 1739 Text on Security Considerations", BCP 72, RFC 3552, 1740 DOI 10.17487/RFC3552, July 2003, 1741 . 1743 [SENDERID] 1744 Lyon, J. and M. Wong, "Sender ID: Authenticating E-Mail", 1745 RFC 4406, DOI 10.17487/RFC4406, April 2006, 1746 . 1748 [SMIME-REG] 1749 Melnikov, A., "Authentication-Results Registration for 1750 S/MIME Signature Verification", RFC 7281, DOI 10.17487/ 1751 RFC7281, June 2014, 1752 . 1754 [SPF] Kitterman, S., "Sender Policy Framework (SPF) for 1755 Authorizing Use of Domains in Email, Version 1", RFC 7208, 1756 DOI 10.17487/RFC7208, April 2014, 1757 . 1759 [VBR] Hoffman, P., Levine, J., and A. Hathcock, "Vouch By 1760 Reference", RFC 5518, DOI 10.17487/RFC5518, April 2009, 1761 . 1763 Appendix A. Legacy MUAs 1765 Implementers of this protocol should be aware that many MUAs are 1766 unlikely to be retrofitted to support the new header field and its 1767 semantics. In the interests of convenience and quicker adoption, a 1768 delivery MTA might want to consider adding things that are processed 1769 by existing MUAs in addition to the Authentication-Results header 1770 field. One suggestion is to include a Priority header field, on 1771 messages that don't already have such a header field, containing a 1772 value that reflects the strength of the authentication that was 1773 accomplished, e.g., "low" for weak or no authentication, "normal" or 1774 "high" for good or strong authentication. 1776 Some modern MUAs can already filter based on the content of this 1777 header field. However, there is keen interest in having MUAs make 1778 some kind of graphical representation of this header field's meaning 1779 to end users. Until this capability is added (i.e., while this 1780 specification and its successors continue to be adopted), other 1781 interim means of conveying authentication results may be necessary. 1783 Appendix B. Authentication-Results Examples 1785 This section presents some examples of the use of this header field 1786 to indicate authentication results. 1788 B.1. Trivial Case; Header Field Not Present 1790 The trivial case: 1792 Received: from mail-router.example.com 1793 (mail-router.example.com [192.0.2.1]) 1794 by server.example.org (8.11.6/8.11.6) 1795 with ESMTP id g1G0r1kA003489; 1796 Fri, Feb 15 2002 17:19:07 -0800 1797 From: sender@example.com 1798 Date: Fri, Feb 15 2002 16:54:30 -0800 1799 To: receiver@example.org 1800 Message-Id: <12345.abc@example.com> 1801 Subject: here's a sample 1803 Hello! Goodbye! 1805 Example 1: Trivial Case 1807 The Authentication-Results header field is completely absent. The 1808 MUA may make no conclusion about the validity of the message. This 1809 could be the case because the message authentication services were 1810 not available at the time of delivery, or no service is provided, or 1811 the MTA is not in compliance with this specification. 1813 B.2. Nearly Trivial Case; Service Provided, but No Authentication Done 1815 A message that was delivered by an MTA that conforms to this 1816 specification but provides no actual message authentication service: 1818 Authentication-Results: example.org 1; none 1819 Received: from mail-router.example.com 1820 (mail-router.example.com [192.0.2.1]) 1821 by server.example.org (8.11.6/8.11.6) 1822 with ESMTP id g1G0r1kA003489; 1823 Fri, Feb 15 2002 17:19:07 -0800 1824 From: sender@example.com 1825 Date: Fri, Feb 15 2002 16:54:30 -0800 1826 To: receiver@example.org 1827 Message-Id: <12345.abc@example.com> 1828 Subject: here's a sample 1830 Hello! Goodbye! 1832 Example 2: Header Present but No Authentication Done 1834 The Authentication-Results header field is present, showing that the 1835 delivering MTA conforms to this specification. It used its DNS 1836 domain name as the authserv-id. The presence of "none" (and the 1837 absence of any method or result tokens) indicates that no message 1838 authentication was done. The version number of the specification to 1839 which the field's content conforms is explicitly provided. 1841 B.3. Service Provided, Authentication Done 1843 A message that was delivered by an MTA that conforms to this 1844 specification and applied some message authentication: 1846 Authentication-Results: example.com; 1847 spf=pass smtp.mailfrom=example.net 1848 Received: from dialup-1-2-3-4.example.net 1849 (dialup-1-2-3-4.example.net [192.0.2.200]) 1850 by mail-router.example.com (8.11.6/8.11.6) 1851 with ESMTP id g1G0r1kA003489; 1852 Fri, Feb 15 2002 17:19:07 -0800 1853 From: sender@example.net 1854 Date: Fri, Feb 15 2002 16:54:30 -0800 1855 To: receiver@example.com 1856 Message-Id: <12345.abc@example.net> 1857 Subject: here's a sample 1859 Hello! Goodbye! 1861 Example 3: Header Reporting Results 1863 The Authentication-Results header field is present, indicating that 1864 the border MTA conforms to this specification. The authserv-id is 1865 once again the DNS domain name. Furthermore, the message was 1866 authenticated by that MTA via the method specified in [SPF]. Note 1867 that since that method cannot authenticate the local-part, it has 1868 been omitted from the result's value. The MUA could extract and 1869 relay this extra information if desired. 1871 B.4. Service Provided, Several Authentications Done, Single MTA 1873 A message that was relayed inbound via a single MTA that conforms to 1874 this specification and applied three different message authentication 1875 checks: 1877 Authentication-Results: example.com; 1878 auth=pass (cram-md5) smtp.auth=sender@example.net; 1879 spf=pass smtp.mailfrom=example.net 1880 Authentication-Results: example.com; 1881 sender-id=pass header.from=example.net 1882 Received: from dialup-1-2-3-4.example.net (8.11.6/8.11.6) 1883 (dialup-1-2-3-4.example.net [192.0.2.200]) 1884 by mail-router.example.com (8.11.6/8.11.6) 1885 with ESMTPA id g1G0r1kA003489; 1886 Fri, Feb 15 2002 17:19:07 -0800 1887 Date: Fri, Feb 15 2002 16:54:30 -0800 1888 To: receiver@example.com 1889 From: sender@example.net 1890 Message-Id: <12345.abc@example.net> 1891 Subject: here's a sample 1893 Hello! Goodbye! 1895 Example 4: Headers Reporting Results from One MTA 1897 The Authentication-Results header field is present, indicating that 1898 the delivering MTA conforms to this specification. Once again, the 1899 receiving DNS domain name is used as the authserv-id. Furthermore, 1900 the sender authenticated herself/himself to the MTA via a method 1901 specified in [AUTH], and both SPF and Sender ID checks were done and 1902 passed. The MUA could extract and relay this extra information if 1903 desired. 1905 Two Authentication-Results header fields are not required since the 1906 same host did all of the checking. The authenticating agent could 1907 have consolidated all the results into one header field. 1909 This example illustrates a scenario in which a remote user on a 1910 dial-up connection (example.net) sends mail to a border MTA 1911 (example.com) using SMTP authentication to prove identity. The 1912 dial-up provider has been explicitly authorized to relay mail as 1913 example.net, producing "pass" results from the SPF and Sender ID 1914 checks. 1916 B.5. Service Provided, Several Authentications Done, Different MTAs 1918 A message that was relayed inbound by two different MTAs that conform 1919 to this specification and applied multiple message authentication 1920 checks: 1922 Authentication-Results: example.com; 1923 sender-id=fail header.from=example.com; 1924 dkim=pass (good signature) header.d=example.com 1925 Received: from mail-router.example.com 1926 (mail-router.example.com [192.0.2.1]) 1927 by auth-checker.example.com (8.11.6/8.11.6) 1928 with ESMTP id i7PK0sH7021929; 1929 Fri, Feb 15 2002 17:19:22 -0800 1930 DKIM-Signature: v=1; a=rsa-sha256; s=gatsby; d=example.com; 1931 t=1188964191; c=simple/simple; h=From:Date:To:Subject: 1932 Message-Id:Authentication-Results; 1933 bh=sEuZGD/pSr7ANysbY3jtdaQ3Xv9xPQtS0m70; 1934 b=EToRSuvUfQVP3Bkz ... rTB0t0gYnBVCM= 1935 Authentication-Results: example.com; 1936 auth=pass (cram-md5) smtp.auth=sender@example.com; 1937 spf=fail smtp.mailfrom=example.com 1938 Received: from dialup-1-2-3-4.example.net 1939 (dialup-1-2-3-4.example.net [192.0.2.200]) 1940 by mail-router.example.com (8.11.6/8.11.6) 1941 with ESMTPA id g1G0r1kA003489; 1942 Fri, Feb 15 2002 17:19:07 -0800 1943 From: sender@example.com 1944 Date: Fri, Feb 15 2002 16:54:30 -0800 1945 To: receiver@example.com 1946 Message-Id: <12345.abc@example.com> 1947 Subject: here's a sample 1949 Hello! Goodbye! 1951 Example 5: Headers Reporting Results from Multiple MTAs 1953 The Authentication-Results header field is present, indicating 1954 conformance to this specification. Once again, the authserv-id used 1955 is the recipient's DNS domain name. The header field is present 1956 twice because two different MTAs in the chain of delivery did 1957 authentication tests. The first MTA, mail-router.example.com, 1958 reports that SMTP AUTH and SPF were both used and that the former 1959 passed while the latter failed. In the SMTP AUTH case, additional 1960 information is provided in the comment field, which the MUA can 1961 choose to render if desired. 1963 The second MTA, auth-checker.example.com, reports that it did a 1964 Sender ID test (which failed) and a DKIM test (which passed). Again, 1965 additional data about one of the tests is provided as a comment, 1966 which the MUA may choose to render. Also noteworthy here is the fact 1967 that there is a DKIM signature added by example.com that assured the 1968 integrity of the lower Authentication-Results field. 1970 Since different hosts did the two sets of authentication checks, the 1971 header fields cannot be consolidated in this example. 1973 This example illustrates more typical transmission of mail into 1974 example.com from a user on a dial-up connection example.net. The 1975 user appears to be legitimate as he/she had a valid password allowing 1976 authentication at the border MTA using SMTP AUTH. The SPF test 1977 failed since example.com has not granted example.net's dial-up 1978 network authority to relay mail on its behalf. The Sender ID test 1979 failed since example.com has not granted mail-router.example.com 1980 authority to relay mail on its behalf. However, the DKIM test passed 1981 because the sending user had a private key matching one of 1982 example.com's published public keys and mail-router.example.com used 1983 it to sign the message. 1985 B.6. Service Provided, Multi-tiered Authentication Done 1987 A message that had authentication done at various stages, one of 1988 which was outside the receiving ADMD: 1990 Authentication-Results: example.com; 1991 dkim=pass reason="good signature" 1992 header.i=@mail-router.example.net; 1993 dkim=fail reason="bad signature" 1994 header.i=@newyork.example.com 1995 Received: from mail-router.example.net 1996 (mail-router.example.net [192.0.2.250]) 1997 by chicago.example.com (8.11.6/8.11.6) 1998 for 1999 with ESMTP id i7PK0sH7021929; 2000 Fri, Feb 15 2002 17:19:22 -0800 2001 DKIM-Signature: v=1; a=rsa-sha256; s=furble; 2002 d=mail-router.example.net; t=1188964198; c=relaxed/simple; 2003 h=From:Date:To:Message-Id:Subject:Authentication-Results; 2004 bh=ftA9J6GtX8OpwUECzHnCkRzKw1uk6FNiLfJl5Nmv49E=; 2005 b=oINEO8hgn/gnunsg ... 9n9ODSNFSDij3= 2006 Authentication-Results: example.net; 2007 dkim=pass (good signature) header.i=@newyork.example.com 2008 Received: from smtp.newyork.example.com 2009 (smtp.newyork.example.com [192.0.2.220]) 2010 by mail-router.example.net (8.11.6/8.11.6) 2011 with ESMTP id g1G0r1kA003489; 2012 Fri, Feb 15 2002 17:19:07 -0800 2013 DKIM-Signature: v=1; a=rsa-sha256; s=gatsby; 2014 d=newyork.example.com; 2015 t=1188964191; c=simple/simple; 2016 h=From:Date:To:Message-Id:Subject; 2017 bh=sEu28nfs9fuZGD/pSr7ANysbY3jtdaQ3Xv9xPQtS0m7=; 2018 b=EToRSuvUfQVP3Bkz ... rTB0t0gYnBVCM= 2019 From: sender@newyork.example.com 2020 Date: Fri, Feb 15 2002 16:54:30 -0800 2021 To: meetings@example.net 2022 Message-Id: <12345.abc@newyork.example.com> 2023 Subject: here's a sample 2025 Example 6: Headers Reporting Results from Multiple MTAs in Different 2026 ADMDs 2028 In this example, we see multi-tiered authentication with an extended 2029 trust boundary. 2031 The message was sent from someone at example.com's New York office 2032 (newyork.example.com) to a mailing list managed at an intermediary. 2034 The message was signed at the origin using DKIM. 2036 The message was sent to a mailing list service provider called 2037 example.net, which is used by example.com. There, 2038 meetings@example.net is expanded to a long list of recipients, one of 2039 whom is at the Chicago office. In this example, we will assume that 2040 the trust boundary for chicago.example.com includes the mailing list 2041 server at example.net. 2043 The mailing list server there first authenticated the message and 2044 affixed an Authentication-Results header field indicating such using 2045 its DNS domain name for the authserv-id. It then altered the message 2046 by affixing some footer text to the body, including some 2047 administrivia such as unsubscription instructions. Finally, the 2048 mailing list server affixes a second DKIM signature and begins 2049 distribution of the message. 2051 The border MTA for chicago.example.com explicitly trusts results from 2052 mail-router.example.net, so that header field is not removed. It 2053 performs evaluation of both signatures and determines that the first 2054 (most recent) is a "pass" but, because of the aforementioned 2055 modifications, the second is a "fail". However, the first signature 2056 included the Authentication-Results header added at mail- 2057 router.example.net that validated the second signature. Thus, 2058 indirectly, it can be determined that the authentications claimed by 2059 both signatures are indeed valid. 2061 Note that two styles of presenting metadata about the result are in 2062 use here. In one case, the "reason=" clause is present, which is 2063 intended for easy extraction by parsers; in the other case, the CFWS 2064 production of the ABNF is used to include such data as a header field 2065 comment. The latter can be harder for parsers to extract given the 2066 varied supported syntaxes of mail header fields. 2068 B.7. Comment-Heavy Example 2070 The formal syntax permits comments within the content in a number of 2071 places. For the sake of illustration, this example is also legal: 2073 Authentication-Results: foo.example.net (foobar) 1 (baz); 2074 dkim (Because I like it) / 1 (One yay) = (wait for it) fail 2075 policy (A dot can go here) . (like that) expired 2076 (this surprised me) = (as I wasn't expecting it) 1362471462 2078 Example 7: A Very Comment-Heavy but Perfectly Legal Example 2080 Appendix C. Operational Considerations about Message Authentication 2082 This protocol is predicated on the idea that authentication (and 2083 presumably in the future, reputation) work is typically done by 2084 border MTAs rather than MUAs or intermediate MTAs; the latter merely 2085 make use of the results determined by the former. Certainly this is 2086 not mandatory for participation in electronic mail or message 2087 authentication, but this protocol and its deployment to date are 2088 based on that model. The assumption satisfies several common ADMD 2089 requirements: 2091 1. Service operators prefer to resolve the handling of problem 2092 messages as close to the border of the ADMD as possible. This 2093 enables, for example, rejection of messages at the SMTP level 2094 rather than generating a DSN internally. Thus, doing any of the 2095 authentication or reputation work exclusively at the MUA or 2096 intermediate MTA renders this desire unattainable. 2098 2. Border MTAs are more likely to have direct access to external 2099 sources of authentication or reputation information since modern 2100 MUAs are more likely to be heavily firewalled. Thus, some MUAs 2101 might not even be able to complete the task of performing 2102 authentication or reputation evaluations without complex proxy 2103 configurations or similar burdens. 2105 3. MUAs rely upon the upstream MTAs within their trust boundaries to 2106 make correct (as much as is possible) evaluations about the 2107 message's envelope, header, and content. Thus, MUAs don't need 2108 to know how to do the work that upstream MTAs do; they only need 2109 the results of that work. 2111 4. Evaluations about the quality of a message, from simple token 2112 matching (e.g., a list of preferred DNS domains) to cryptanalysis 2113 (e.g., public/private key work), do have a cost and thus need to 2114 be minimized. To that end, performing those tests at the border 2115 MTA is far preferred to doing that work at each MUA that handles 2116 a message. If an ADMD's environment adheres to common messaging 2117 protocols, a reputation query or an authentication check 2118 performed by a border MTA would return the same result as the 2119 same query performed by an MUA. By contrast, in an environment 2120 where the MUA does the work, a message arriving for multiple 2121 recipients would thus cause authentication or reputation 2122 evaluation to be done more than once for the same message (i.e., 2123 at each MUA), causing needless amplification of resource use and 2124 creating a possible denial-of-service attack vector. 2126 5. Minimizing change is good. As new authentication and reputation 2127 methods emerge, the list of methods supported by this header 2128 field would presumably be extended. If MUAs simply consume the 2129 contents of this header field rather than actually attempt to do 2130 authentication and/or reputation work, then MUAs only need to 2131 learn to parse this header field once; emergence of new methods 2132 requires only a configuration change at the MUAs and software 2133 changes at the MTAs (which are presumably fewer in number). When 2134 choosing to implement these functions in MTAs vs. MUAs, the 2135 issues of individual flexibility, infrastructure inertia, and 2136 scale of effort must be considered. It is typically easier to 2137 change a single MUA than an MTA because the modification affects 2138 fewer users and can be pursued with less care. However, changing 2139 many MUAs is more effort than changing a smaller number of MTAs. 2141 6. For decisions affecting message delivery and display, assessment 2142 based on authentication and reputation is best performed close to 2143 the time of message transit, as a message makes its journey 2144 toward a user's inbox, not afterwards. DKIM keys and IP address 2145 reputations, etc., can change over time or even become invalid, 2146 and users can take a long time to read a message once delivered. 2147 The value of this work thus degrades, perhaps quickly, once the 2148 delivery process has completed. This seriously diminishes the 2149 value of this work when done elsewhere than at MTAs. 2151 Many operational choices are possible within an ADMD, including the 2152 venue for performing authentication and/or reputation assessment. 2153 The current specification does not dictate any of those choices. 2154 Rather, it facilitates those cases in which information produced by 2155 one stage of analysis needs to be transported with the message to the 2156 next stage. 2158 Appendix D. Changes Since RFC7601 2160 o Added IANA registration for DKIM "a" and "s" properties. 2162 o Include EAI guidance. 2164 o Adjust some ABNF tokens and names for easier inclusion by other 2165 documents. 2167 Appendix E. Acknowledgments 2169 The author wishes to acknowledge the following individuals for their 2170 review and constructive criticism of this document: Seth Blank, Tim 2171 Draegen, John Levine, Scott Kitterman, and Alessandro Vesely. 2173 Author's Address 2175 Murray S. Kucherawy 2176 270 Upland Drive 2177 San Francisco, CA 94127 2178 United States 2180 Email: superuser@gmail.com