idnits 2.17.00 (12 Aug 2021) /tmp/idnits22315/draft-ietf-emailcore-rfc5322bis-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 RFC5322, but the abstract doesn't seem to mention this, which it should. -- The draft header indicates that this document updates RFC4021, but the abstract doesn't seem to mention this, which it should. Miscellaneous warnings: ---------------------------------------------------------------------------- == Line 1843 has weird spacing: '... Status stand...' == Line 1849 has weird spacing: '... Status stand...' == Line 1855 has weird spacing: '... Status stand...' == Line 1861 has weird spacing: '... Status stand...' == Line 1867 has weird spacing: '... Status stand...' == (18 more instances...) (Using the creation date from RFC4021, updated by this document, for RFC5378 checks: 2002-05-06) -- The document seems to contain a disclaimer for pre-RFC5378 work, and may have content which was first submitted before 10 November 2008. The disclaimer is necessary when there are original authors that you have been unable to contact, or if some do not wish to grant the BCP78 rights to the IETF Trust. If you are able to get all authors (current and original) to grant those rights, you can and should remove the disclaimer; otherwise, the disclaimer is needed and you can ignore this comment. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- The document date (4 April 2022) is 40 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 748, but not defined -- Obsolete informational reference (is this intentional?): RFC 822 (Obsoleted by RFC 2822) -- Obsolete informational reference (is this intentional?): RFC 2822 (Obsoleted by RFC 5322) == Outdated reference: A later version (-10) exists of draft-ietf-emailcore-rfc5321bis-01 Summary: 0 errors (**), 0 flaws (~~), 8 warnings (==), 6 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group P. Resnick, Ed. 3 Internet-Draft Episteme 4 Obsoletes: 5322 (if approved) 4 April 2022 5 Updates: 4021 (if approved) 6 Intended status: Standards Track 7 Expires: 6 October 2022 9 Internet Message Format 10 draft-ietf-emailcore-rfc5322bis-03 12 Abstract 14 This document specifies the Internet Message Format (IMF), a syntax 15 for text messages that are sent between computer users, within the 16 framework of "electronic mail" messages. This specification is a 17 revision of Request For Comments (RFC) 5322, itself a revision of 18 Request For Comments (RFC) 2822, all of which supersede Request For 19 Comments (RFC) 822, "Standard for the Format of ARPA Internet Text 20 Messages", updating it to reflect current practice and incorporating 21 incremental changes that were specified in other RFCs. 23 Status of This Memo 25 This Internet-Draft is submitted in full conformance with the 26 provisions of BCP 78 and BCP 79. 28 Internet-Drafts are working documents of the Internet Engineering 29 Task Force (IETF). Note that other groups may also distribute 30 working documents as Internet-Drafts. The list of current Internet- 31 Drafts is at https://datatracker.ietf.org/drafts/current/. 33 Internet-Drafts are draft documents valid for a maximum of six months 34 and may be updated, replaced, or obsoleted by other documents at any 35 time. It is inappropriate to use Internet-Drafts as reference 36 material or to cite them other than as "work in progress." 38 This Internet-Draft will expire on 6 October 2022. 40 Copyright Notice 42 Copyright (c) 2022 IETF Trust and the persons identified as the 43 document authors. All rights reserved. 45 This document is subject to BCP 78 and the IETF Trust's Legal 46 Provisions Relating to IETF Documents (https://trustee.ietf.org/ 47 license-info) in effect on the date of publication of this document. 48 Please review these documents carefully, as they describe your rights 49 and restrictions with respect to this document. Code Components 50 extracted from this document must include Revised BSD License text as 51 described in Section 4.e of the Trust Legal Provisions and are 52 provided without warranty as described in the Revised BSD License. 54 This document may contain material from IETF Documents or IETF 55 Contributions published or made publicly available before November 56 10, 2008. The person(s) controlling the copyright in some of this 57 material may not have granted the IETF Trust the right to allow 58 modifications of such material outside the IETF Standards Process. 59 Without obtaining an adequate license from the person(s) controlling 60 the copyright in such materials, this document may not be modified 61 outside the IETF Standards Process, and derivative works of it may 62 not be created outside the IETF Standards Process, except to format 63 it for publication as an RFC or to translate it into languages other 64 than English. 66 Table of Contents 68 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 69 1.1. Scope . . . . . . . . . . . . . . . . . . . . . . . . . . 4 70 1.2. Notational Conventions . . . . . . . . . . . . . . . . . 5 71 1.2.1. Requirements Notation . . . . . . . . . . . . . . . . 5 72 1.2.2. Syntactic Notation . . . . . . . . . . . . . . . . . 5 73 1.2.3. Structure of This Document . . . . . . . . . . . . . 5 74 2. Lexical Analysis of Messages . . . . . . . . . . . . . . . . 7 75 2.1. General Description . . . . . . . . . . . . . . . . . . . 7 76 2.1.1. Line Length Limits . . . . . . . . . . . . . . . . . 8 77 2.2. Header Fields . . . . . . . . . . . . . . . . . . . . . . 8 78 2.2.1. Unstructured Header Field Bodies . . . . . . . . . . 9 79 2.2.2. Structured Header Field Bodies . . . . . . . . . . . 9 80 2.2.3. Long Header Fields . . . . . . . . . . . . . . . . . 9 81 2.3. Body . . . . . . . . . . . . . . . . . . . . . . . . . . 10 82 3. Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 83 3.1. Introduction . . . . . . . . . . . . . . . . . . . . . . 10 84 3.2. Lexical Tokens . . . . . . . . . . . . . . . . . . . . . 11 85 3.2.1. Quoted characters . . . . . . . . . . . . . . . . . . 11 86 3.2.2. Folding White Space and Comments . . . . . . . . . . 12 87 3.2.3. Atom . . . . . . . . . . . . . . . . . . . . . . . . 13 88 3.2.4. Quoted Strings . . . . . . . . . . . . . . . . . . . 14 89 3.2.5. Miscellaneous Tokens . . . . . . . . . . . . . . . . 15 90 3.3. Date and Time Specification . . . . . . . . . . . . . . . 15 91 3.4. Address Specification . . . . . . . . . . . . . . . . . . 17 92 3.4.1. Addr-Spec Specification . . . . . . . . . . . . . . . 18 93 3.5. Overall Message Syntax . . . . . . . . . . . . . . . . . 19 94 3.6. Field Definitions . . . . . . . . . . . . . . . . . . . . 20 95 3.6.1. The Origination Date Field . . . . . . . . . . . . . 23 96 3.6.2. Originator Fields . . . . . . . . . . . . . . . . . . 23 97 3.6.3. Destination Address Fields . . . . . . . . . . . . . 24 98 3.6.4. Identification Fields . . . . . . . . . . . . . . . . 26 99 3.6.5. Informational Fields . . . . . . . . . . . . . . . . 28 100 3.6.6. Resent Fields . . . . . . . . . . . . . . . . . . . . 29 101 3.6.7. Trace Fields . . . . . . . . . . . . . . . . . . . . 31 102 3.6.8. Optional Fields . . . . . . . . . . . . . . . . . . . 32 103 4. Obsolete Syntax . . . . . . . . . . . . . . . . . . . . . . . 32 104 4.1. Miscellaneous Obsolete Tokens . . . . . . . . . . . . . . 33 105 4.2. Obsolete Folding White Space . . . . . . . . . . . . . . 34 106 4.3. Obsolete Date and Time . . . . . . . . . . . . . . . . . 34 107 4.4. Obsolete Addressing . . . . . . . . . . . . . . . . . . . 36 108 4.5. Obsolete Header Fields . . . . . . . . . . . . . . . . . 37 109 4.5.1. Obsolete Origination Date Field . . . . . . . . . . . 38 110 4.5.2. Obsolete Originator Fields . . . . . . . . . . . . . 38 111 4.5.3. Obsolete Destination Address Fields . . . . . . . . . 38 112 4.5.4. Obsolete Identification Fields . . . . . . . . . . . 39 113 4.5.5. Obsolete Informational Fields . . . . . . . . . . . . 39 114 4.5.6. Obsolete Resent Fields . . . . . . . . . . . . . . . 40 115 4.5.7. Obsolete Trace Fields . . . . . . . . . . . . . . . . 40 116 4.5.8. Obsolete optional fields . . . . . . . . . . . . . . 40 117 5. Security Considerations . . . . . . . . . . . . . . . . . . . 41 118 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 42 119 7. References . . . . . . . . . . . . . . . . . . . . . . . . . 45 120 7.1. Normative References . . . . . . . . . . . . . . . . . . 45 121 7.2. Informative References . . . . . . . . . . . . . . . . . 45 122 Appendix A. Example Messages . . . . . . . . . . . . . . . . . . 47 123 A.1. Addressing Examples . . . . . . . . . . . . . . . . . . . 47 124 A.1.1. A Message from One Person to Another with Simple 125 Addressing . . . . . . . . . . . . . . . . . . . . . 47 126 A.1.2. Different Types of Mailboxes . . . . . . . . . . . . 48 127 A.1.3. Group Addresses . . . . . . . . . . . . . . . . . . . 48 128 A.2. Reply Messages . . . . . . . . . . . . . . . . . . . . . 49 129 A.3. Resent Messages . . . . . . . . . . . . . . . . . . . . . 50 130 A.4. Messages with Trace Fields . . . . . . . . . . . . . . . 51 131 A.5. White Space, Comments, and Other Oddities . . . . . . . . 51 132 A.6. Obsoleted Forms . . . . . . . . . . . . . . . . . . . . . 52 133 A.6.1. Obsolete Addressing . . . . . . . . . . . . . . . . . 52 134 A.6.2. Obsolete Dates . . . . . . . . . . . . . . . . . . . 52 135 A.6.3. Obsolete White Space and Comments . . . . . . . . . . 53 136 Appendix B. Differences from Earlier Specifications . . . . . . 53 137 Appendix C. Acknowledgements . . . . . . . . . . . . . . . . . . 56 138 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 56 140 1. Introduction 141 1.1. Scope 143 This document specifies the Internet Message Format (IMF), a syntax 144 for text messages that are sent between computer users, within the 145 framework of "electronic mail" messages. This specification is an 146 update to [RFC5322], itself a revision of [RFC2822], all of which 147 supersede [RFC0822], updating it to reflect current practice and 148 incorporating incremental changes that were specified in other RFCs 149 such as [RFC1123]. 151 This document specifies a syntax only for text messages. In 152 particular, it makes no provision for the transmission of images, 153 audio, or other sorts of structured data in electronic mail messages. 154 There are several extensions published, such as the MIME document 155 series ([RFC2045], [RFC2046], [RFC2049]), which describe mechanisms 156 for the transmission of such data through electronic mail, either by 157 extending the syntax provided here or by structuring such messages to 158 conform to this syntax. Those mechanisms are outside of the scope of 159 this specification. 161 In the context of electronic mail, messages are viewed as having an 162 envelope and contents. The envelope contains whatever information is 163 needed to accomplish transmission and delivery. (See 164 [I-D.ietf-emailcore-rfc5321bis] for a discussion of the envelope.) 165 The contents comprise the object to be delivered to the recipient. 166 This specification applies only to the format and some of the 167 semantics of message contents. It contains no specification of the 168 information in the envelope. 170 However, some message systems may use information from the contents 171 to create the envelope. It is intended that this specification 172 facilitate the acquisition of such information by programs. 174 This specification is intended as a definition of what message 175 content format is to be passed between systems. Though some message 176 systems locally store messages in this format (which eliminates the 177 need for translation between formats) and others use formats that 178 differ from the one specified in this specification, local storage is 179 outside of the scope of this specification. 181 | Note: This specification is not intended to dictate the 182 | internal formats used by sites, the specific message system 183 | features that they are expected to support, or any of the 184 | characteristics of user interface programs that create or read 185 | messages. In addition, this document does not specify an 186 | encoding of the characters for either transport or storage; 187 | that is, it does not specify the number of bits used or how 188 | those bits are specifically transferred over the wire or stored 189 | on disk. 191 1.2. Notational Conventions 193 1.2.1. Requirements Notation 195 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 196 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 197 "OPTIONAL" in this document are to be interpreted as described in 198 [BCP14] RFC2119 RFC8174 when, and only when, they appear in all 199 capitals, as shown here. 201 1.2.2. Syntactic Notation 203 This specification uses the Augmented Backus-Naur Form (ABNF) [STD68] 204 notation for the formal definitions of the syntax of messages. 205 Characters will be specified either by a decimal value (e.g., the 206 value %d65 for uppercase A and %d97 for lowercase A) or by a case- 207 insensitive literal value enclosed in quotation marks (e.g., "A" for 208 either uppercase or lowercase A). 210 1.2.3. Structure of This Document 212 This document is divided into several sections. 214 This section, section 1, is a short introduction to the document. 216 Section 2 lays out the general description of a message and its 217 constituent parts. This is an overview to help the reader understand 218 some of the general principles used in the later portions of this 219 document. Any examples in this section MUST NOT be taken as 220 specification of the formal syntax of any part of a message. 222 Section 3 specifies formal ABNF rules for the structure of each part 223 of a message (the syntax) and describes the relationship between 224 those parts and their meaning in the context of a message (the 225 semantics). That is, it lays out the actual rules for the structure 226 of each part of a message (the syntax) as well as a description of 227 the parts and instructions for their interpretation (the semantics). 228 This includes analysis of the syntax and semantics of subparts of 229 messages that have specific structure. The syntax included in 230 section 3 represents messages as they MUST be created. There are 231 also notes in section 3 to indicate if any of the options specified 232 in the syntax SHOULD be used over any of the others. 234 Both sections 2 and 3 describe messages that are legal to generate 235 for purposes of this specification. 237 Section 4 of this document specifies an "obsolete" syntax. There are 238 references in section 3 to these obsolete syntactic elements. The 239 rules of the obsolete syntax are elements that have appeared in 240 earlier versions of this specification or have previously been widely 241 used in Internet messages. As such, these elements MUST be 242 interpreted by parsers of messages in order to be conformant to this 243 specification. However, since items in this syntax have been 244 determined to be non-interoperable or to cause significant problems 245 for recipients of messages, they MUST NOT be generated by creators of 246 conformant messages. 248 | Note: The dictionary definition of "obsolete" is "no longer in 249 | use or no longer useful". While this specification mandates 250 | that these syntactic elements no longer be generated, it also 251 | mandates that conformant parsers be able to support them. One 252 | reason for this latter requirement is that there are long- 253 | established sites on the Internet with mail archives that go 254 | back decades, archives with messages containing these elements. 255 | Similarly, many people have decades-old messages in their 256 | personal message stores, and for various reasons it is 257 | occasionally useful to not only read such messages but also 258 | resend or forward them to others. While these archives may 259 | only be mined occasionally, and messages from these personal 260 | stores rarely resent, they are nonetheless still in use, making 261 | "obsolete" the incorrect term to describe these elements. 262 | 263 | Later efforts to revise this specification contemplated 264 | changing the term to "legacy" or something that would more 265 | accurately describe the elements, but such a change was 266 | rejected due to fears that it would result in unnecessary 267 | confusion, especially among long-time users and implementers of 268 | the specification. 270 Section 5 details security considerations to take into account when 271 implementing this specification. 273 Appendix A lists examples of different sorts of messages. These 274 examples are not exhaustive of the types of messages that appear on 275 the Internet, but give a broad overview of certain syntactic forms. 277 Appendix B lists the differences between this specification and 278 earlier specifications for Internet messages. 280 Appendix C contains acknowledgements. 282 2. Lexical Analysis of Messages 284 2.1. General Description 286 At the most basic level, a message is a series of characters. A 287 message that is conformant with this specification is composed of 288 characters with values in the range of 1 through 127 and interpreted 289 as US-ASCII [ANSI.X3-4.1986] characters. For brevity, this document 290 sometimes refers to this range of characters as simply "US-ASCII 291 characters". 293 | Note: This document specifies that messages are made up of 294 | characters in the US-ASCII range of 1 through 127. There are 295 | other documents, specifically the MIME document series 296 | ([RFC2045], [RFC2046], [RFC2047], [RFC2049], [BCP13]) and the 297 | Internationalized Email Headers specification ([RFC6532]), that 298 | extend this specification to allow for values outside of that 299 | range. Discussion of those mechanisms is not within the scope 300 | of this specification. 302 Messages are divided into lines of characters. A line is a series of 303 characters that is delimited with the two characters carriage-return 304 and line-feed; that is, the carriage return (CR) character (ASCII 305 value 13) followed immediately by the line feed (LF) character (ASCII 306 value 10). (The carriage return/line feed pair is usually written in 307 this document as "CRLF".) 309 A message consists of header fields (collectively called "the header 310 section of the message") followed, optionally, by a body. The header 311 section is a sequence of lines of characters with special syntax as 312 defined in this specification. The body is simply a sequence of 313 characters that follows the header section and is separated from the 314 header section by an empty line (i.e., a line with nothing preceding 315 the CRLF). 317 | Note: Common parlance and earlier versions of this 318 | specification use the term "header" to either refer to the 319 | entire header section or to refer to an individual header 320 | field. To avoid ambiguity, this document does not use the 321 | terms "header" or "headers" in isolation, but instead always 322 | uses "header field" to refer to the individual field and 323 | "header section" to refer to the entire collection. 325 2.1.1. Line Length Limits 327 There are two limits that this specification places on the number of 328 characters in a line. Each line of characters MUST be no more than 329 998 characters, and SHOULD be no more than 78 characters, excluding 330 the CRLF. 332 The 998 character limit is due to limitations in many implementations 333 that send, receive, or store IMF messages which simply cannot handle 334 more than 998 characters on a line. Receiving implementations would 335 do well to handle an arbitrarily large number of characters in a line 336 for robustness sake. However, there are so many implementations that 337 (in compliance with the transport requirements of 338 [I-D.ietf-emailcore-rfc5321bis]) do not accept messages containing 339 more than 1000 characters including the CR and LF per line, it is 340 important for implementations not to create such messages. 342 The more conservative 78 character recommendation is to accommodate 343 the many implementations of user interfaces that display these 344 messages which may truncate, or disastrously wrap, the display of 345 more than 78 characters per line, in spite of the fact that such 346 implementations are non-conformant to the intent of this 347 specification (and that of [I-D.ietf-emailcore-rfc5321bis] if they 348 actually cause information to be lost). Again, even though this 349 limitation is put on messages, it is incumbent upon implementations 350 that display messages to handle an arbitrarily large number of 351 characters in a line (certainly at least up to the 998 character 352 limit) for the sake of robustness. 354 2.2. Header Fields 356 Header fields are lines beginning with a field name, followed by a 357 colon (":", ASCII value 58), followed by a field body, and terminated 358 by CRLF. A field name MUST be composed of printable US-ASCII 359 characters except for space (SP, ASCII value 32) (i.e., characters 360 that have values between 33 and 126, inclusive) excluding colon. A 361 field body may be composed of printable US-ASCII characters, 362 including the space character, plus the horizontal tab (HTAB, ASCII 363 value 9) character. (Together, SP and HTAB are known as the white 364 space characters, WSP). A field body MUST NOT include CR and LF 365 except when used in "folding" and "unfolding", as described in 366 section 2.2.3. All field bodies MUST conform to the syntax described 367 in sections 3 and 4 of this specification. 369 2.2.1. Unstructured Header Field Bodies 371 Some field bodies in this specification are defined simply as 372 "unstructured" (which is specified in section 3.2.5 as any printable 373 US-ASCII characters, including the space character, plus the 374 horizontal tab character) with no further restrictions. These are 375 referred to as unstructured field bodies. Semantically, unstructured 376 field bodies are simply to be treated as a single line of characters 377 with no further processing (except for "folding" and "unfolding" as 378 described in section 2.2.3). 380 2.2.2. Structured Header Field Bodies 382 Some field bodies in this specification have a syntax that is more 383 restrictive than the unstructured field bodies described above. 384 These are referred to as "structured" field bodies. Structured field 385 bodies are sequences of specific lexical tokens as described in 386 sections 3 and 4 of this specification. Many of these tokens are 387 allowed (according to their syntax) to be introduced or end with 388 comments (as described in section 3.2.2) as well as the white space 389 characters, and those white space characters are subject to "folding" 390 and "unfolding" as described in section 2.2.3. Semantic analysis of 391 structured field bodies is given along with their syntax. 393 2.2.3. Long Header Fields 395 Each header field is logically a single line of characters comprising 396 the field name, the colon, and the field body. For convenience 397 however, and to deal with the 998/78 character limitations per line, 398 the field body portion of a header field can be split into a 399 multiple-line representation; this is called "folding". The general 400 rule is that wherever this specification allows for folding white 401 space (not simply WSP characters), a CRLF may be inserted before any 402 WSP. 404 For example, the header field: 406 Subject: This is a test 408 can be represented as: 410 Subject: This 411 is a test 413 | Note: Though structured field bodies are defined in such a way 414 | that folding can take place between many of the lexical tokens 415 | (and even within some of the lexical tokens), folding SHOULD be 416 | limited to placing the CRLF at higher-level syntactic breaks. 418 | For instance, if a field body is defined as comma-separated 419 | values, it is recommended that folding occur after the comma 420 | separating the structured items in preference to other places 421 | where the field could be folded, even if it is allowed 422 | elsewhere. 424 The process of moving from this folded multiple-line representation 425 of a header field to its single line representation is called 426 "unfolding". Unfolding is accomplished by simply removing any CRLF 427 that is immediately followed by WSP. Each header field should be 428 treated in its unfolded form for further syntactic and semantic 429 evaluation. An unfolded header field has no length restriction and 430 therefore may be indeterminately long. 432 2.3. Body 434 The body of a message is simply lines of US-ASCII characters. The 435 only two limitations on the body are as follows: 437 * CR and LF MUST only occur together as CRLF; they MUST NOT appear 438 independently in the body. 440 * Lines of characters in the body MUST be limited to 998 characters, 441 and SHOULD be limited to 78 characters, excluding the CRLF. 443 | Note: As was stated earlier, there are other documents, 444 | specifically the MIME documents ([RFC2045], [RFC2046], 445 | [RFC2049], [BCP13]), that extend (and limit) this specification 446 | to allow for different sorts of message bodies. Again, these 447 | mechanisms are beyond the scope of this document. 449 3. Syntax 451 3.1. Introduction 453 The syntax as given in this section defines the legal syntax of 454 Internet messages. Messages that are conformant to this 455 specification MUST conform to the syntax in this section. If there 456 are options in this section where one option SHOULD be generated, 457 that is indicated either in the prose or in a comment next to the 458 syntax. 460 For the defined expressions, a short description of the syntax and 461 use is given, followed by the syntax in ABNF, followed by a semantic 462 analysis. The following primitive tokens that are used but otherwise 463 unspecified are taken from the "Core Rules" of [STD68], Appendix B.1: 464 CR, LF, CRLF, HTAB, SP, WSP, DQUOTE, DIGIT, ALPHA, and VCHAR. 466 In some of the definitions, there will be non-terminals whose names 467 start with "obs-". These "obs-" elements refer to tokens defined in 468 the obsolete syntax in section 4. In all cases, these productions 469 are to be ignored for the purposes of generating legal Internet 470 messages and MUST NOT be used as part of such a message. However, 471 when interpreting messages, these tokens MUST be honored as part of 472 the legal syntax. In this sense, section 3 defines a grammar for the 473 generation of messages, with "obs-" elements that are to be ignored, 474 while section 4 adds grammar for the interpretation of messages. 476 3.2. Lexical Tokens 478 The following rules are used to define an underlying lexical 479 analyzer, which feeds tokens to the higher-level parsers. This 480 section defines the tokens used in structured header field bodies. 482 | Note: Readers of this specification need to pay special 483 | attention to how these lexical tokens are used in both the 484 | lower-level and higher-level syntax later in the document. 485 | Particularly, the white space tokens and the comment tokens 486 | defined in section 3.2.2 get used in the lower-level tokens 487 | defined here, and those lower-level tokens are in turn used as 488 | parts of the higher-level tokens defined later. Therefore, 489 | white space and comments may be allowed in the higher-level 490 | tokens even though they may not explicitly appear in a 491 | particular definition. 493 3.2.1. Quoted characters 495 Some characters are reserved for special interpretation, such as 496 delimiting lexical tokens. To permit use of these characters as 497 uninterpreted data, a quoting mechanism is provided. 499 quoted-pair = ("\" (VCHAR / WSP)) / obs-qp 501 Where any quoted-pair appears, it is to be interpreted as the 502 character alone. That is to say, the "\" character that appears as 503 part of a quoted-pair is semantically "invisible". 505 | Note: The "\" character may appear in a message where it is not 506 | part of a quoted-pair. A "\" character that does not appear in 507 | a quoted-pair is not semantically invisible. The only places 508 | in this specification where quoted-pair currently appears are 509 | ccontent, qcontent, and in obs-dtext in section 4. 511 3.2.2. Folding White Space and Comments 513 White space characters, including white space used in folding 514 (described in section 2.2.3), may appear between many elements in 515 header field bodies. Also, strings of characters that are treated as 516 comments may be included in structured field bodies as characters 517 enclosed in parentheses. The following defines the folding white 518 space (FWS) and comment constructs. 520 Strings of characters enclosed in parentheses are considered comments 521 so long as they do not appear within a "quoted-string", as defined in 522 section 3.2.4. Comments may nest. 524 There are several places in this specification where comments and FWS 525 may be freely inserted. To accommodate that syntax, an additional 526 token for "CFWS" is defined for places where comments and/or FWS can 527 occur. However, where CFWS occurs in this specification, it MUST NOT 528 be inserted in such a way that any line of a folded header field is 529 made up entirely of WSP characters and nothing else. 531 FWS = ([*WSP CRLF] 1*WSP) / obs-FWS 532 ; Folding white space 534 ctext = %d33-39 / ; VCHAR characters not including 535 %d42-91 / ; "(", ")", or "\" 536 %d93-126 / 537 obs-ctext 539 ccontent = ctext / quoted-pair / comment 541 comment = "(" *([FWS] ccontent) [FWS] ")" 543 CFWS = (1*([FWS] comment) [FWS]) / FWS 545 Throughout this specification, where FWS (the folding white space 546 token) appears, it indicates a place where folding, as discussed in 547 section 2.2.3, may take place. Wherever folding appears in a message 548 (that is, a header field body containing a CRLF followed by any WSP), 549 unfolding (removal of the CRLF) is performed before any further 550 semantic analysis is performed on that header field according to this 551 specification. That is to say, any CRLF that appears in FWS is 552 semantically "invisible". 554 A comment is normally used in a structured field body to provide some 555 human-readable informational text. Since a comment is allowed to 556 contain FWS, folding is permitted within the comment. Also note that 557 since quoted-pair is allowed in a comment, the parentheses and 558 backslash characters may appear in a comment, so long as they appear 559 as a quoted-pair. Semantically, the enclosing parentheses are not 560 part of the comment; the comment is what is contained between the two 561 parentheses. As stated earlier, the "\" in any quoted-pair and the 562 CRLF in any FWS that appears within the comment are semantically 563 "invisible" and therefore not part of the comment either. 565 Runs of FWS, comment, or CFWS that occur between lexical tokens in a 566 structured header field are semantically interpreted as a single 567 space character. 569 3.2.3. Atom 571 Several productions in structured header field bodies are simply 572 strings of certain basic characters. Such productions are called 573 atoms. 575 Some of the structured header field bodies also allow the period 576 character (".", ASCII value 46) within runs of atext. An additional 577 "dot-atom" token is defined for those purposes. 579 | Note: The "specials" token does not appear anywhere else in 580 | this specification. It is simply the VCHAR characters that do 581 | not appear in atext. It is provided only because it is useful 582 | for implementers who use tools that lexically analyze messages. 583 | Each of the characters in specials can be used to indicate a 584 | tokenization point in lexical analysis. 586 atext = ALPHA / DIGIT / ; VCHAR characters not including 587 "!" / "#" / ; specials. Used for atoms. 588 "$" / "%" / 589 "&" / "'" / 590 "*" / "+" / 591 "-" / "/" / 592 "=" / "?" / 593 "^" / "_" / 594 "`" / "{" / 595 "|" / "}" / 596 "~" 598 atom = [CFWS] 1*atext [CFWS] 600 dot-atom-text = 1*atext *("." 1*atext) 602 dot-atom = [CFWS] dot-atom-text [CFWS] 604 specials = "(" / ")" / ; Special characters that do 605 "<" / ">" / ; not appear in atext 606 "[" / "]" / 607 ":" / ";" / 608 "@" / "\" / 609 "," / "." / 610 DQUOTE 612 Both atom and dot-atom are interpreted as a single unit, comprising 613 the string of characters that make it up. Semantically, the optional 614 comments and FWS surrounding the rest of the characters are not part 615 of the atom; the atom is only the run of atext characters in an atom, 616 or the atext and "." characters in a dot-atom. 618 3.2.4. Quoted Strings 620 Strings of characters that include characters other than those 621 allowed in atoms can be represented in a quoted string format, where 622 the characters are surrounded by quote (DQUOTE, ASCII value 34) 623 characters. 625 qtext = %d33 / ; VCHAR characters not including 626 %d35-91 / ; "\" or the quote character 627 %d93-126 / 628 obs-qtext 630 qcontent = qtext / quoted-pair 632 quoted-string = [CFWS] 633 DQUOTE *([FWS] qcontent) [FWS] DQUOTE 634 [CFWS] 636 A quoted-string is treated as a unit. That is, quoted-string is 637 identical to atom, semantically. Since a quoted-string is allowed to 638 contain FWS, folding is permitted. Also note that since quoted-pair 639 is allowed in a quoted-string, the quote and backslash characters may 640 appear in a quoted-string so long as they appear as a quoted-pair. 642 Semantically, neither the optional CFWS outside of the quote 643 characters nor the quote characters themselves are part of the 644 quoted-string; the quoted-string is what is contained between the two 645 quote characters. As stated earlier, the "\" in any quoted-pair and 646 the CRLF in any FWS/CFWS that appears within the quoted-string are 647 semantically "invisible" and therefore not part of the quoted-string 648 either. 650 3.2.5. Miscellaneous Tokens 652 Three additional tokens are defined: word and phrase for combinations 653 of atoms and/or quoted-strings, and unstructured for use in 654 unstructured header fields and in some places within structured 655 header fields. 657 word = atom / quoted-string 659 phrase = 1*word / obs-phrase 661 unstructured = (*([FWS] VCHAR) *WSP) / obs-unstruct 663 3.3. Date and Time Specification 665 Date and time values occur in several header fields. This section 666 specifies the syntax for a full date and time specification. Though 667 folding white space is permitted throughout the date-time 668 specification, it is RECOMMENDED that a single space be used in each 669 place that FWS appears (whether it is required or optional); some 670 older implementations will not interpret longer sequences of folding 671 white space correctly. 673 date-time = [ day-of-week "," ] date time [CFWS] 675 day-of-week = ([FWS] day-name) / obs-day-of-week 677 day-name = "Mon" / "Tue" / "Wed" / "Thu" / 678 "Fri" / "Sat" / "Sun" 680 date = day month year 682 day = ([FWS] 1*2DIGIT FWS) / obs-day 684 month = "Jan" / "Feb" / "Mar" / "Apr" / 685 "May" / "Jun" / "Jul" / "Aug" / 686 "Sep" / "Oct" / "Nov" / "Dec" 688 year = (FWS 4*DIGIT FWS) / obs-year 690 time = time-of-day zone 692 time-of-day = hour ":" minute [ ":" second ] 694 hour = 2DIGIT / obs-hour 696 minute = 2DIGIT / obs-minute 698 second = 2DIGIT / obs-second 700 zone = (FWS ( "+" / "-" ) 4DIGIT) / obs-zone 702 The day is the numeric day of the month. The year is any numeric 703 year 1900 or later. 705 The time-of-day specifies the number of hours, minutes, and 706 optionally seconds since midnight of the date indicated (at the 707 offset specified by the zone). 709 The date and time-of-day SHOULD express local time. 711 The zone specifies the offset from Coordinated Universal Time (UTC) 712 that the date and time-of-day represent. The "+" or "-" indicates 713 whether the time-of-day is ahead of (i.e., east of) or behind (i.e., 714 west of) Universal Time. The first two digits indicate the number of 715 hours difference from Universal Time, and the last two digits 716 indicate the number of additional minutes difference from Universal 717 Time. (Hence, +hhmm means +(hh * 60 + mm) minutes, and -hhmm means 718 -(hh * 60 + mm) minutes). The form "+0000" SHOULD be used to 719 indicate a time zone at Universal Time. Though "-0000" also 720 indicates Universal Time, it is used to indicate that the time was 721 generated on a system that may be in a local time zone other than 722 Universal Time and that the date-time contains no information about 723 the local time zone. 725 A date-time specification MUST be semantically valid. That is, the 726 day-of-week (if included) MUST be the day implied by the date, the 727 numeric day-of-month MUST be between 1 and the number of days allowed 728 for the specified month (in the specified year), the time-of-day MUST 729 be in the range 00:00:00 through 23:59:60 (the number of seconds 730 allowing for a leap second; see [RFC3339]), and the last two digits 731 of the zone MUST be within the range 00 through 59. 733 3.4. Address Specification 735 Addresses occur in several message header fields to indicate senders 736 and recipients of messages. An address may either be an individual 737 mailbox, or a group of mailboxes. 739 address = mailbox / group 741 mailbox = name-addr / addr-spec 743 name-addr = [display-name] angle-addr 745 angle-addr = [CFWS] "<" addr-spec ">" [CFWS] / 746 obs-angle-addr 748 group = display-name ":" [group-list] ";" [CFWS] 750 display-name = phrase 752 mailbox-list = (mailbox *("," mailbox)) / obs-mbox-list 754 address-list = (address *("," address)) / obs-addr-list 756 group-list = mailbox-list / CFWS / obs-group-list 758 A mailbox receives mail. It is a conceptual entity that does not 759 necessarily pertain to file storage. For example, some sites may 760 choose to print mail on a printer and deliver the output to the 761 addressee's desk. 763 Normally, a mailbox is composed of two parts: (1) an optional display 764 name that indicates the name of the recipient (which can be a person 765 or a system) that could be displayed to the user of a mail 766 application, and (2) an addr-spec address enclosed in angle brackets 767 ("<" and ">"). There is an alternate simple form of a mailbox where 768 the addr-spec address appears alone, without the recipient's name or 769 the angle brackets. The Internet addr-spec address is described in 770 section 3.4.1. 772 | Note: Some legacy implementations used the simple form where 773 | the addr-spec appears without the angle brackets, but included 774 | the name of the recipient in parentheses as a comment following 775 | the addr-spec. Since the meaning of the information in a 776 | comment is unspecified, implementations SHOULD use the full 777 | name-addr form of the mailbox, instead of the legacy form, to 778 | specify the display name associated with a mailbox. Also, 779 | because some legacy implementations interpret the comment, 780 | comments generally SHOULD NOT be used in address fields to 781 | avoid confusing such implementations. 783 When it is desirable to treat several mailboxes as a single unit 784 (i.e., in a distribution list), the group construct can be used. The 785 group construct allows the sender to indicate a named group of 786 recipients. This is done by giving a display name for the group, 787 followed by a colon, followed by a comma-separated list of any number 788 of mailboxes (including zero and one), and ending with a semicolon. 789 Because the list of mailboxes can be empty, using the group construct 790 is also a simple way to communicate to recipients that the message 791 was sent to one or more named sets of recipients, without actually 792 providing the individual mailbox address for any of those recipients. 794 3.4.1. Addr-Spec Specification 796 An addr-spec is a specific Internet identifier that contains a 797 locally interpreted string followed by the at-sign character ("@", 798 ASCII value 64) followed by an Internet domain. The locally 799 interpreted string is either a quoted-string or a dot-atom. If the 800 string can be represented as a dot-atom (that is, it contains no 801 characters other than atext characters or one or more of "." 802 surrounded by atext characters), then the dot-atom form SHOULD be 803 used and the quoted-string form SHOULD NOT be used. Comments and 804 folding white space SHOULD NOT be used around the "@" in the addr- 805 spec. 807 | Note: A liberal syntax for the domain portion of addr-spec is 808 | given here. However, the domain portion contains addressing 809 | information specified by and used in other protocols (e.g., 810 | [STD13], [RFC1123], [I-D.ietf-emailcore-rfc5321bis]). It is 811 | therefore incumbent upon implementations to conform to the 812 | syntax of addresses for the context in which they are used. 814 addr-spec = local-part "@" domain 816 local-part = dot-atom / quoted-string / obs-local-part 818 domain = dot-atom / domain-literal / obs-domain 820 domain-literal = [CFWS] "[" *([FWS] dtext) [FWS] "]" [CFWS] 822 dtext = %d33-90 / ; VCHAR characters not including 823 %d94-126 / ; "[", "]", or "\" 824 obs-dtext 826 The domain portion identifies the point to which the mail is 827 delivered. In the dot-atom form, this is interpreted as an Internet 828 domain name (either a host name or a mail exchanger name) as 829 described in [STD13] and [RFC1123]. In the domain-literal form, the 830 domain is interpreted as the literal Internet address of the 831 particular host. In both cases, how addressing is used and how 832 messages are transported to a particular host is covered in separate 833 documents, such as [I-D.ietf-emailcore-rfc5321bis]. These mechanisms 834 are outside of the scope of this document. 836 The local-part portion is a domain-dependent string. In addresses, 837 it is simply interpreted on the particular host as a name of a 838 particular mailbox. 840 3.5. Overall Message Syntax 842 A message consists of header fields, optionally followed by a message 843 body. Lines in a message MUST be a maximum of 998 characters 844 excluding the CRLF, but it is RECOMMENDED that lines be limited to 78 845 characters excluding the CRLF. (See section 2.1.1 for explanation.) 846 In a message body, though all of the characters listed in the text 847 rule MAY be used, the use of US-ASCII control characters (values 1 848 through 8, 11, 12, and 14 through 31) is discouraged since their 849 interpretation by receivers for display is not guaranteed. 851 message = (fields / obs-fields) 852 [CRLF body] 854 body = (*(*998text CRLF) *998text) / obs-body 856 text = %d1-9 / ; Characters excluding CR 857 %d11 / ; and LF 858 %d12 / 859 %d14-127 861 The header fields carry most of the semantic information and are 862 defined in section 3.6. The body is simply a series of lines of text 863 that are uninterpreted for the purposes of this specification. 865 3.6. Field Definitions 867 The header fields of a message are defined here. All header fields 868 have the same general syntactic structure: a field name, followed by 869 a colon, followed by the field body. The specific syntax for each 870 header field is defined in the subsequent sections. 872 | Note: In the ABNF syntax for each field in subsequent sections, 873 | each field name is followed by the required colon. However, 874 | for brevity, sometimes the colon is not referred to in the 875 | textual description of the syntax. It is, nonetheless, 876 | required. 878 It is important to note that the header fields are not guaranteed to 879 be in a particular order. They may appear in any order, and they 880 have been known to be reordered occasionally when transported over 881 the Internet. However, for the purposes of this specification, 882 header fields SHOULD NOT be reordered when a message is transported 883 or transformed. More importantly, the trace header fields and resent 884 header fields MUST NOT be reordered, and SHOULD be kept in blocks 885 prepended to the message. See sections 3.6.6 and 3.6.7 for more 886 information. 888 The only required header fields are the origination date field and 889 the originator address field(s). All other header fields are 890 syntactically optional. More information is contained in the table 891 following this definition. 893 fields = *(trace 894 *optional-field / 895 *(resent-date / 896 resent-from / 897 resent-sender / 898 resent-to / 899 resent-cc / 900 resent-bcc / 901 resent-msg-id)) 902 *(orig-date / 903 from / 904 sender / 905 reply-to / 906 to / 907 cc / 908 bcc / 909 message-id / 910 in-reply-to / 911 references / 912 subject / 913 comments / 914 keywords / 915 optional-field) 917 The following table indicates limits on the number of times each 918 field may occur in the header section of a message as well as any 919 special limitations on the use of those fields. An asterisk ("*") 920 next to a value in the minimum or maximum column indicates that a 921 special restriction appears in the Notes column. 923 +================+========+============+==========================+ 924 | Field | Min | Max number | Notes | 925 | | number | | | 926 +================+========+============+==========================+ 927 | trace | 0 | unlimited | Block prepended - see | 928 | | | | 3.6.7 | 929 +----------------+--------+------------+--------------------------+ 930 | resent-date | 0* | unlimited* | One per block, required | 931 | | | | if other resent fields | 932 | | | | are present - see 3.6.6 | 933 +----------------+--------+------------+--------------------------+ 934 | resent-from | 0 | unlimited* | One per block - see | 935 | | | | 3.6.6 | 936 +----------------+--------+------------+--------------------------+ 937 | resent-sender | 0* | unlimited* | One per block, MUST | 938 | | | | occur with multi-address | 939 | | | | resent-from - see 3.6.6 | 940 +----------------+--------+------------+--------------------------+ 941 | resent-to | 0 | unlimited* | One per block - see | 942 | | | | 3.6.6 | 943 +----------------+--------+------------+--------------------------+ 944 | resent-cc | 0 | unlimited* | One per block - see | 945 | | | | 3.6.6 | 946 +----------------+--------+------------+--------------------------+ 947 | resent-bcc | 0 | unlimited* | One per block - see | 948 | | | | 3.6.6 | 949 +----------------+--------+------------+--------------------------+ 950 | resent-msg-id | 0 | unlimited* | One per block - see | 951 | | | | 3.6.6 | 952 +----------------+--------+------------+--------------------------+ 953 | orig-date | 1 | 1 | | 954 +----------------+--------+------------+--------------------------+ 955 | from | 1 | 1 | See sender and 3.6.2 | 956 +----------------+--------+------------+--------------------------+ 957 | sender | 0* | 1 | MUST occur with multi- | 958 | | | | address from - see 3.6.2 | 959 +----------------+--------+------------+--------------------------+ 960 | reply-to | 0 | 1 | | 961 +----------------+--------+------------+--------------------------+ 962 | to | 0 | 1 | | 963 +----------------+--------+------------+--------------------------+ 964 | cc | 0 | 1 | | 965 +----------------+--------+------------+--------------------------+ 966 | bcc | 0 | 1 | | 967 +----------------+--------+------------+--------------------------+ 968 | message-id | 0* | 1 | SHOULD be present - see | 969 | | | | 3.6.4 | 970 +----------------+--------+------------+--------------------------+ 971 | in-reply-to | 0* | 1 | SHOULD occur in some | 972 | | | | replies - see 3.6.4 | 973 +----------------+--------+------------+--------------------------+ 974 | references | 0* | 1 | SHOULD occur in some | 975 | | | | replies - see 3.6.4 | 976 +----------------+--------+------------+--------------------------+ 977 | subject | 0 | 1 | | 978 +----------------+--------+------------+--------------------------+ 979 | comments | 0 | unlimited | | 980 +----------------+--------+------------+--------------------------+ 981 | keywords | 0 | unlimited | | 982 +----------------+--------+------------+--------------------------+ 983 | optional-field | 0 | unlimited | | 984 +----------------+--------+------------+--------------------------+ 986 Table 1 988 The exact interpretation of each field is described in subsequent 989 sections. 991 3.6.1. The Origination Date Field 993 The origination date field consists of the field name "Date" followed 994 by a date-time specification. 996 orig-date = "Date:" date-time CRLF 998 The origination date specifies the date and time at which the creator 999 of the message indicated that the message was complete and ready to 1000 enter the mail delivery system. For instance, this might be the time 1001 that a user pushes the "send" or "submit" button in an application 1002 program. In any case, it is specifically not intended to convey the 1003 time that the message is actually transported, but rather the time at 1004 which the human or other creator of the message has put the message 1005 into its final form, ready for transport. (For example, a portable 1006 computer user who is not connected to a network might queue a message 1007 for delivery. The origination date is intended to contain the date 1008 and time that the user queued the message, not the time when the user 1009 connected to the network to send the message.) 1011 3.6.2. Originator Fields 1013 The originator fields of a message consist of the from field, the 1014 sender field (when applicable), and optionally the reply-to field. 1015 The from field consists of the field name "From" and a comma- 1016 separated list of one or more mailbox specifications. If the from 1017 field contains more than one mailbox specification in the mailbox- 1018 list, then the sender field, containing the field name "Sender" and a 1019 single mailbox specification, MUST appear in the message. In either 1020 case, an optional reply-to field MAY also be included, which contains 1021 the field name "Reply-To" and a comma-separated list of one or more 1022 addresses. 1024 from = "From:" mailbox-list CRLF 1026 sender = "Sender:" mailbox CRLF 1028 reply-to = "Reply-To:" address-list CRLF 1030 The originator fields indicate the mailbox(es) of the source of the 1031 message. The "From:" field specifies the author(s) of the message, 1032 that is, the mailbox(es) of the person(s) or system(s) responsible 1033 for the writing of the message. The "Sender:" field specifies the 1034 mailbox of the agent responsible for the actual transmission of the 1035 message. For example, if a secretary were to send a message for 1036 another person, the mailbox of the secretary would appear in the 1037 "Sender:" field and the mailbox of the actual author would appear in 1038 the "From:" field. If the originator of the message can be indicated 1039 by a single mailbox and the author and transmitter are identical, the 1040 "Sender:" field SHOULD NOT be used. Otherwise, both fields SHOULD 1041 appear. 1043 | Note: The transmitter information is always present. The 1044 | absence of the "Sender:" field is sometimes mistakenly taken to 1045 | mean that the agent responsible for transmission of the message 1046 | has not been specified. This absence merely means that the 1047 | transmitter is identical to the author and is therefore not 1048 | redundantly placed into the "Sender:" field. 1050 The originator fields also provide the information required when 1051 replying to a message. When the "Reply-To:" field is present, it 1052 indicates the address(es) to which the author of the message suggests 1053 that replies be sent. In the absence of the "Reply-To:" field, 1054 replies SHOULD by default be sent to the mailbox(es) specified in the 1055 "From:" field unless otherwise specified by the person composing the 1056 reply. 1058 In all cases, the "From:" field SHOULD NOT contain any mailbox that 1059 does not belong to the author(s) of the message. See also section 1060 3.6.3 for more information on forming the destination addresses for a 1061 reply. 1063 3.6.3. Destination Address Fields 1065 The destination fields of a message consist of three possible fields, 1066 each of the same form: the field name, which is either "To", "Cc", or 1067 "Bcc", followed by a comma-separated list of one or more addresses 1068 (either mailbox or group syntax). 1070 to = "To:" address-list CRLF 1072 cc = "Cc:" address-list CRLF 1074 bcc = "Bcc:" [address-list / CFWS] CRLF 1076 The destination fields specify the recipients of the message. Each 1077 destination field may have one or more addresses, and the addresses 1078 indicate the intended recipients of the message. The only difference 1079 between the three fields is how each is used. 1081 The "To:" field contains the address(es) of the primary recipient(s) 1082 of the message. 1084 The "Cc:" field (where the "Cc" means "Carbon Copy" in the sense of 1085 making a copy on a typewriter using carbon paper) contains the 1086 addresses of others who are to receive the message, though the 1087 content of the message may not be directed at them. 1089 The "Bcc:" field (where the "Bcc" means "Blind Carbon Copy") contains 1090 addresses of recipients of the message whose addresses are not to be 1091 revealed to other recipients of the message. There are three ways in 1092 which the "Bcc:" field is used. In the first case, when a message 1093 containing a "Bcc:" field is prepared to be sent, the "Bcc:" line is 1094 removed even though all of the recipients (including those specified 1095 in the "Bcc:" field) are sent a copy of the message. In the second 1096 case, recipients specified in the "To:" and "Cc:" lines each are sent 1097 a copy of the message with the "Bcc:" line removed as above, but the 1098 recipients on the "Bcc:" line get a separate copy of the message 1099 containing a "Bcc:" line. (When there are multiple recipient 1100 addresses in the "Bcc:" field, some implementations actually send a 1101 separate copy of the message to each recipient with a "Bcc:" 1102 containing only the address of that particular recipient.) Finally, 1103 since a "Bcc:" field may contain no addresses, a "Bcc:" field can be 1104 used without any addresses indicating to the recipients that blind 1105 copies were sent to someone. Which method to use with "Bcc:" fields 1106 is implementation dependent, but refer to the "Security 1107 Considerations" section of this document for a discussion of each. 1109 When a message is a reply to another message, the mailboxes of the 1110 authors of the original message (the mailboxes in the "From:" field) 1111 or mailboxes specified in the "Reply-To:" field (if it exists) MAY 1112 appear in the "To:" field of the reply since these would normally be 1113 the primary recipients of the reply. If a reply is sent to a message 1114 that has destination fields, it is often desirable to send a copy of 1115 the reply to all of the recipients of the message, in addition to the 1116 author. When such a reply is formed, addresses in the "To:" and 1117 "Cc:" fields of the original message MAY appear in the "Cc:" field of 1118 the reply, since these are normally secondary recipients of the 1119 reply. If a "Bcc:" field is present in the original message, 1120 addresses in that field MAY appear in the "Bcc:" field of the reply, 1121 but they SHOULD NOT appear in the "To:" or "Cc:" fields. 1123 | Note: Some mail applications have automatic reply commands that 1124 | include the destination addresses of the original message in 1125 | the destination addresses of the reply. How those reply 1126 | commands behave is implementation dependent and is beyond the 1127 | scope of this document. In particular, whether or not to 1128 | include the original destination addresses when the original 1129 | message had a "Reply-To:" field is not addressed here. 1131 3.6.4. Identification Fields 1133 Though listed as optional in the table (Table 1) in section 3.6, 1134 every message SHOULD have a "Message-ID:" field. Furthermore, reply 1135 messages SHOULD have "In-Reply-To:" and "References:" fields as 1136 appropriate and as described below. 1138 The "Message-ID:" field contains a single unique message identifier. 1139 The "References:" and "In-Reply-To:" fields each contain one or more 1140 unique message identifiers, optionally separated by CFWS. 1142 The message identifier (msg-id) syntax is a limited version of the 1143 addr-spec construct enclosed in the angle bracket characters, "<" and 1144 ">". Unlike addr-spec, this syntax only permits the dot-atom-text 1145 form on the left-hand side of the "@" and does not have internal CFWS 1146 anywhere in the message identifier. 1148 | Note: As with addr-spec, a liberal syntax is given for the 1149 | right-hand side of the "@" in a msg-id. However, later in this 1150 | section, the use of a domain for the right-hand side of the "@" 1151 | is RECOMMENDED. Again, the syntax of domain constructs is 1152 | specified by and used in other protocols (e.g., [STD13], 1153 | [RFC1123], [I-D.ietf-emailcore-rfc5321bis]). It is therefore 1154 | incumbent upon implementations to conform to the syntax of 1155 | addresses for the context in which they are used. 1157 message-id = "Message-ID:" msg-id CRLF 1159 in-reply-to = "In-Reply-To:" 1*msg-id CRLF 1161 references = "References:" 1*msg-id CRLF 1163 msg-id = [CFWS] "<" msg-id-internal ">" [CFWS] 1165 msg-id-internal = id-left "@" id-right 1167 id-left = dot-atom-text / obs-id-left 1169 id-right = dot-atom-text / no-fold-literal / obs-id-right 1171 no-fold-literal = "[" *dtext "]" 1172 The "Message-ID:" field provides a unique message identifier that 1173 refers to a particular version of a particular message. The 1174 uniqueness of the message identifier is guaranteed by the host that 1175 generates it (see below). This message identifier is intended to be 1176 machine readable and not necessarily meaningful to humans. A message 1177 identifier pertains to exactly one version of a particular message; 1178 subsequent revisions to the message each receive new message 1179 identifiers. 1181 | Note: There are many instances when messages are "changed", but 1182 | those changes do not constitute a new instantiation of that 1183 | message, and therefore the message would not get a new message 1184 | identifier. For example, when messages are introduced into the 1185 | transport system, they are often prepended with additional 1186 | header fields such as trace fields (described in section 3.6.7) 1187 | and resent fields (described in section 3.6.6). The addition 1188 | of such header fields does not change the identity of the 1189 | message and therefore the original "Message-ID:" field is 1190 | retained. In all cases, it is the meaning that the sender of 1191 | the message wishes to convey (i.e., whether this is the same 1192 | message or a different message) that determines whether or not 1193 | the "Message-ID:" field changes, not any particular syntactic 1194 | difference that appears (or does not appear) in the message. 1196 The "In-Reply-To:" and "References:" fields are used when creating a 1197 reply to a message. They hold the message identifier of the original 1198 message and the message identifiers of other messages (for example, 1199 in the case of a reply to a message that was itself a reply). The 1200 "In-Reply-To:" field may be used to identify the message (or 1201 messages) to which the new message is a reply, while the 1202 "References:" field may be used to identify a "thread" of 1203 conversation. 1205 When creating a reply to a message, the "In-Reply-To:" and 1206 "References:" fields of the resultant message are constructed as 1207 follows: 1209 The "In-Reply-To:" field will contain the contents of the "Message- 1210 ID:" field of the message to which this one is a reply (the "parent 1211 message"). If there is more than one parent message, then the "In- 1212 Reply-To:" field will contain the contents of all of the parents' 1213 "Message-ID:" fields. If there is no "Message-ID:" field in any of 1214 the parent messages, then the new message will have no "In-Reply-To:" 1215 field. 1217 The "References:" field will contain the contents of the parent's 1218 "References:" field (if any) followed by the contents of the parent's 1219 "Message-ID:" field (if any). If the parent message does not contain 1220 a "References:" field but does have an "In-Reply-To:" field 1221 containing a single message identifier, then the "References:" field 1222 will contain the contents of the parent's "In-Reply-To:" field 1223 followed by the contents of the parent's "Message-ID:" field (if 1224 any). If the parent has none of the "References:", "In-Reply-To:", 1225 or "Message-ID:" fields, then the new message will have no 1226 "References:" field. 1228 | Note: Some implementations parse the "References:" field to 1229 | display the "thread of the discussion". These implementations 1230 | assume that each new message is a reply to a single parent and 1231 | hence that they can walk backwards through the "References:" 1232 | field to find the parent of each message listed there. 1233 | Therefore, trying to form a "References:" field for a reply 1234 | that has multiple parents is discouraged; how to do so is not 1235 | defined in this document. 1237 The message identifier (msg-id) itself MUST be a globally unique 1238 identifier for a message. The generator of the message identifier 1239 MUST guarantee that the msg-id is unique. There are several 1240 algorithms that can be used to accomplish this. Since the msg-id has 1241 a similar syntax to addr-spec (identical except that quoted strings, 1242 comments, and folding white space are not allowed), a good method is 1243 to put the domain name (or a domain literal IP address) of the host 1244 on which the message identifier was created on the right-hand side of 1245 the "@" (since domain names and IP addresses are normally unique), 1246 and put a combination of the current absolute date and time along 1247 with some other currently unique (perhaps sequential) identifier 1248 available on the system (for example, a process id number) on the 1249 left-hand side. Though other algorithms will work, it is RECOMMENDED 1250 that the right-hand side contain some domain identifier (either of 1251 the host itself or otherwise) such that the generator of the message 1252 identifier can guarantee the uniqueness of the left-hand side within 1253 the scope of that domain. 1255 Semantically, the angle bracket characters are not part of the msg- 1256 id; the msg-id is what is contained between the two angle bracket 1257 characters. 1259 3.6.5. Informational Fields 1261 The informational fields are all optional. The "Subject:" and 1262 "Comments:" fields are unstructured fields as defined in section 1263 2.2.1, and therefore may contain text or folding white space. The 1264 "Keywords:" field contains a comma-separated list of one or more 1265 words or quoted-strings. 1267 subject = "Subject:" unstructured CRLF 1269 comments = "Comments:" unstructured CRLF 1271 keywords = "Keywords:" phrase *("," phrase) CRLF 1273 These three fields are intended to have only human-readable content 1274 with information about the message. The "Subject:" field is the most 1275 common and contains a short string identifying the topic of the 1276 message. When used in a reply, the field body MAY start with the 1277 string "Re: " (an abbreviation of the Latin "in re", meaning "in the 1278 matter of") followed by the contents of the "Subject:" field body of 1279 the original message. If this is done, only one instance of the 1280 literal string "Re: " ought to be used since use of other strings or 1281 more than one instance can lead to undesirable consequences. The 1282 "Comments:" field contains any additional comments on the text of the 1283 body of the message. The "Keywords:" field contains a comma- 1284 separated list of important words and phrases that might be useful 1285 for the recipient. 1287 3.6.6. Resent Fields 1289 Resent fields SHOULD be added to any message that is reintroduced by 1290 a user into the transport system. A separate set of resent fields 1291 SHOULD be added each time this is done. All of the resent fields 1292 corresponding to a particular resending of the message SHOULD be 1293 grouped together. Each new set of resent fields is prepended to the 1294 message; that is, the most recent set of resent fields appears 1295 earlier in the message. No other fields in the message are changed 1296 when resent fields are added. 1298 Each of the resent fields corresponds to a particular field elsewhere 1299 in the syntax. For instance, the "Resent-Date:" field corresponds to 1300 the "Date:" field and the "Resent-To:" field corresponds to the "To:" 1301 field. In each case, the syntax for the field body is identical to 1302 the syntax given previously for the corresponding field. 1304 When resent fields are used, the "Resent-From:" and "Resent-Date:" 1305 fields MUST be present. The "Resent-Message-ID:" field SHOULD be 1306 present. "Resent-Sender:" SHOULD NOT be used if "Resent-Sender:" 1307 would be identical to "Resent-From:". 1309 resent-date = "Resent-Date:" date-time CRLF 1311 resent-from = "Resent-From:" mailbox-list CRLF 1313 resent-sender = "Resent-Sender:" mailbox CRLF 1315 resent-to = "Resent-To:" address-list CRLF 1317 resent-cc = "Resent-Cc:" address-list CRLF 1319 resent-bcc = "Resent-Bcc:" [address-list / CFWS] CRLF 1321 resent-msg-id = "Resent-Message-ID:" msg-id CRLF 1323 Resent fields are used to identify a message as having been 1324 reintroduced into the transport system by a user. The purpose of 1325 using resent fields is to have the message appear to the final 1326 recipient as if it were sent directly by the original sender, with 1327 all of the original fields remaining the same. Each set of resent 1328 fields correspond to a particular resending event. That is, if a 1329 message is resent multiple times, each set of resent fields gives 1330 identifying information for each individual time. Resent fields are 1331 strictly informational. They MUST NOT be used in the normal 1332 processing of replies or other such automatic actions on messages. 1334 | Note: Reintroducing a message into the transport system and 1335 | using resent fields is a different operation from "forwarding". 1336 | "Forwarding" has two meanings: One sense of forwarding is that 1337 | a mail reading program can be told by a user to forward a copy 1338 | of a message to another person, making the forwarded message 1339 | the body of the new message. A forwarded message in this sense 1340 | does not appear to have come from the original sender, but is 1341 | an entirely new message from the forwarder of the message. 1342 | Forwarding may also mean that a mail transport program gets a 1343 | message and forwards it on to a different destination for final 1344 | delivery. Resent header fields are not intended for use with 1345 | either type of forwarding. 1347 The resent originator fields indicate the mailbox of the person(s) or 1348 system(s) that resent the message. As with the regular originator 1349 fields, there are two forms: a simple "Resent-From:" form, which 1350 contains the mailbox of the individual doing the resending, and the 1351 more complex form, when one individual (identified in the "Resent- 1352 Sender:" field) resends a message on behalf of one or more others 1353 (identified in the "Resent-From:" field). 1355 | Note: When replying to a resent message, replies behave just as 1356 | they would with any other message, using the original "From:", 1357 | "Reply-To:", "Message-ID:", and other fields. The resent 1358 | fields are only informational and MUST NOT be used in the 1359 | normal processing of replies. 1361 The "Resent-Date:" indicates the date and time at which the resent 1362 message is dispatched by the resender of the message. Like the 1363 "Date:" field, it is not the date and time that the message was 1364 actually transported. 1366 The "Resent-To:", "Resent-Cc:", and "Resent-Bcc:" fields function 1367 identically to the "To:", "Cc:", and "Bcc:" fields, respectively, 1368 except that they indicate the recipients of the resent message, not 1369 the recipients of the original message. 1371 The "Resent-Message-ID:" field provides a unique identifier for the 1372 resent message. 1374 3.6.7. Trace Fields 1376 The trace fields are a group of header fields consisting of an 1377 optional "Return-Path:" field, and/or one or more "Received:" fields 1378 or other fields (indicated by "optional-field" below) that are 1379 defined by other specifications as belonging within the trace fields 1380 grouping. The "Return-Path:" header field contains a pair of angle 1381 brackets that enclose an optional addr-spec. The "Received:" field 1382 contains a (possibly empty) list of tokens followed by a semicolon 1383 and a date-time specification. Each token must be a word, angle- 1384 addr, addr-spec, or a domain. Further restrictions are applied to 1385 the syntax of the trace fields by specifications that provide for 1386 their use, such as [I-D.ietf-emailcore-rfc5321bis]. 1388 trace = [return] 1389 *(received / optional-field) 1391 return = "Return-Path:" path CRLF 1393 path = angle-addr / ([CFWS] "<" [CFWS] ">" [CFWS]) 1395 received = "Received:" 1396 [1*received-token / CFWS] ";" date-time CRLF 1398 received-token = word / angle-addr / addr-spec / domain 1400 The trace fields document actions taken as a message moves through 1401 the transport system. A full discussion of the Internet mail use of 1402 the "Return-Path:" and "Received:" trace fields is contained in 1404 [I-D.ietf-emailcore-rfc5321bis]; other specifications describe the 1405 use of other fields that are to be interpreted as trace fields. For 1406 the purposes of this specification, the trace fields are strictly 1407 informational, and any formal interpretation of them is outside of 1408 the scope of this document. 1410 3.6.8. Optional Fields 1412 Fields may appear in messages that are otherwise unspecified in this 1413 document. They MUST conform to the syntax of an optional-field. 1414 This is a field name, made up of the VCHAR characters except colon, 1415 followed by a colon, followed by any text that conforms to the 1416 unstructured syntax. 1418 The field names of any optional field MUST NOT be identical to any 1419 field name specified elsewhere in this document. 1421 optional-field = field-name ":" unstructured CRLF 1423 field-name = 1*ftext ; Limit to 77 characters to 1424 ; stay within 78 char-per- 1425 ; line recommendation 1427 ftext = %d33-57 / ; VCHAR characters not including 1428 %d59-126 ; ":". 1430 For the purposes of this specification, any optional field is 1431 uninterpreted. 1433 4. Obsolete Syntax 1435 Earlier versions of this specification allowed for different (usually 1436 more liberal) syntax than is allowed in this version. Also, there 1437 have been syntactic elements used in messages on the Internet whose 1438 interpretations have never been documented. Though these syntactic 1439 forms MUST NOT be generated according to the grammar in section 3, 1440 they MUST be accepted and parsed by a conformant receiver. This 1441 section documents many of these syntactic elements. (See the note in 1442 Section 1.2.3 for an explanation of the term "obsolete".) Taking the 1443 grammar in section 3 and adding the definitions presented in this 1444 section will result in the grammar to use for the interpretation of 1445 messages. 1447 | Note: This section identifies syntactic forms that any 1448 | implementation MUST reasonably interpret. However, there are 1449 | certainly Internet messages that do not conform to even the 1450 | additional syntax given in this section. The fact that a 1451 | particular form does not appear in any section of this document 1452 | is not justification for computer programs to crash or for 1453 | malformed data to be irretrievably lost by any implementation. 1454 | It is up to the implementation to deal with messages robustly. 1456 One important difference between the obsolete (interpreting) and the 1457 current (generating) syntax is that in structured header field bodies 1458 (i.e., between the colon and the CRLF of any structured header 1459 field), white space characters, including folding white space, and 1460 comments could be freely inserted between any syntactic tokens. This 1461 allowed many complex forms that have proven difficult for some 1462 implementations to parse. 1464 Another key difference between the obsolete and the current syntax is 1465 that the rule in section 3.2.2 regarding lines composed entirely of 1466 white space in comments and folding white space does not apply. See 1467 the discussion of folding white space in section 4.2 below. 1469 Finally, certain characters that were formerly allowed in messages 1470 appear in this section. The NUL character (ASCII value 0) was once 1471 allowed, but is no longer for compatibility reasons. Similarly, US- 1472 ASCII control characters other than CR, LF, SP, and HTAB (ASCII 1473 values 1 through 8, 11, 12, 14 through 31, and 127) were allowed to 1474 appear in header field bodies. CR and LF were allowed to appear in 1475 messages other than as CRLF; this use is also shown here. 1477 Other differences in syntax and semantics are noted in the following 1478 sections. 1480 4.1. Miscellaneous Obsolete Tokens 1482 These syntactic elements are used elsewhere in the obsolete syntax or 1483 in the main syntax. Bare CR, bare LF, and NUL are added to obs-qp, 1484 obs-body, and obs-unstruct. US-ASCII control characters are added to 1485 obs-qp, obs-unstruct, obs-ctext, and obs-qtext. The period character 1486 is added to obs-phrase. The obs-phrase-list provides for a 1487 (potentially empty) comma-separated list of phrases that may include 1488 "null" elements. That is, there could be two or more commas in such 1489 a list with nothing in between them, or commas at the beginning or 1490 end of the list. 1492 | Note: The "period" (or "full stop") character (".") in obs- 1493 | phrase is not a form that was allowed in earlier versions of 1494 | this or any other specification. Period (nor any other 1495 | character from specials) was not allowed in phrase because it 1496 | introduced a parsing difficulty distinguishing between phrases 1497 | and portions of an addr-spec (see section 4.4). It appears 1498 | here because the period character is currently used in many 1499 | messages in the display-name portion of addresses, especially 1500 | for initials in names, and therefore must be interpreted 1501 | properly. 1503 obs-NO-WS-CTL = %d1-8 / ; US-ASCII control 1504 %d11 / ; characters that do not 1505 %d12 / ; include the carriage 1506 %d14-31 / ; return, line feed, and 1507 %d127 ; white space characters 1509 obs-ctext = obs-NO-WS-CTL 1511 obs-qtext = obs-NO-WS-CTL 1513 obs-utext = %d0 / obs-NO-WS-CTL / VCHAR 1515 obs-qp = "\" (%d0 / obs-NO-WS-CTL / LF / CR) 1517 obs-body = *(%d0 / LF / CR / text) 1519 obs-unstruct = *((*CR 1*(obs-utext / FWS)) / 1*LF) *CR 1521 obs-phrase = word *(word / "." / CFWS) 1523 obs-phrase-list = [phrase / CFWS] *("," [phrase / CFWS]) 1525 Bare CR and bare LF appear in messages with two different meanings. 1526 In many cases, bare CR or bare LF are used improperly instead of CRLF 1527 to indicate line separators. In other cases, bare CR and bare LF are 1528 used simply as US-ASCII control characters with their traditional 1529 ASCII meanings. 1531 4.2. Obsolete Folding White Space 1533 In the obsolete syntax, any amount of folding white space MAY be 1534 inserted where the obs-FWS rule is allowed. This creates the 1535 possibility of having two consecutive "folds" in a line, and 1536 therefore the possibility that a line which makes up a folded header 1537 field could be composed entirely of white space. 1539 obs-FWS = 1*([CRLF] WSP) 1541 4.3. Obsolete Date and Time 1543 The syntax for the obsolete date format allows a 2 digit year in the 1544 date field and allows for a list of alphabetic time zone specifiers 1545 that were used in earlier versions of this specification. It also 1546 permits comments and folding white space between many of the tokens. 1548 obs-day-of-week = [CFWS] day-name [CFWS] 1550 obs-day = [CFWS] 1*2DIGIT [CFWS] 1552 obs-year = [CFWS] 2*DIGIT [CFWS] 1554 obs-hour = [CFWS] 2DIGIT [CFWS] 1556 obs-minute = [CFWS] 2DIGIT [CFWS] 1558 obs-second = [CFWS] 2DIGIT [CFWS] 1560 obs-zone = "UT" / "GMT" / ; Universal Time 1561 ; North American UT 1562 ; offsets 1563 "EST" / "EDT" / ; Eastern: - 5/ - 4 1564 "CST" / "CDT" / ; Central: - 6/ - 5 1565 "MST" / "MDT" / ; Mountain: - 7/ - 6 1566 "PST" / "PDT" / ; Pacific: - 8/ - 7 1567 ; 1568 %d65-73 / ; Military zones - "A" 1569 %d75-90 / ; through "I" and "K" 1570 %d97-105 / ; through "Z", both 1571 %d107-122 ; upper and lower case 1573 Where a two or three digit year occurs in a date, the year is to be 1574 interpreted as follows: If a two digit year is encountered whose 1575 value is between 00 and 49, the year is interpreted by adding 2000, 1576 ending up with a value between 2000 and 2049. If a two digit year is 1577 encountered with a value between 50 and 99, or any three digit year 1578 is encountered, the year is interpreted by adding 1900. 1580 In the obsolete time zone, "UT" and "GMT" are indications of 1581 "Universal Time" and "Greenwich Mean Time", respectively, and are 1582 both semantically identical to "+0000". 1584 The remaining three character zones are the US time zones. The first 1585 letter, "E", "C", "M", or "P" stands for "Eastern", "Central", 1586 "Mountain", and "Pacific". The second letter is either "S" for 1587 "Standard" time, or "D" for "Daylight" (daylight saving or summer) 1588 time. Their interpretations are as follows: 1590 EDT is semantically equivalent to -0400 1591 EST is semantically equivalent to -0500 1592 CDT is semantically equivalent to -0500 1593 CST is semantically equivalent to -0600 1594 MDT is semantically equivalent to -0600 1595 MST is semantically equivalent to -0700 1596 PDT is semantically equivalent to -0700 1597 PST is semantically equivalent to -0800 1599 The 1 character military time zones were defined in a non-standard 1600 way in [RFC0822] and are therefore unpredictable in their meaning. 1601 The original definitions of the military zones "A" through "I" are 1602 equivalent to "+0100" through "+0900", respectively; "K", "L", and 1603 "M" are equivalent to "+1000", "+1100", and "+1200", respectively; 1604 "N" through "Y" are equivalent to "-0100" through "-1200". 1605 respectively; and "Z" is equivalent to "+0000". However, because of 1606 the error in [RFC0822], they SHOULD all be considered equivalent to 1607 "-0000" unless there is out-of-band information confirming their 1608 meaning. 1610 Other multi-character (usually between 3 and 5) alphabetic time zones 1611 have been used in Internet messages. Any such time zone whose 1612 meaning is not known SHOULD be considered equivalent to "-0000" 1613 unless there is out-of-band information confirming their meaning. 1615 4.4. Obsolete Addressing 1617 There are four primary differences in addressing. First, mailbox 1618 addresses were allowed to have a route portion before the addr-spec 1619 when enclosed in "<" and ">". The route is simply a comma-separated 1620 list of domain names, each preceded by "@", and the list terminated 1621 by a colon. Second, CFWS were allowed between the period-separated 1622 elements of local-part and domain (i.e., dot-atom was not used). In 1623 addition, local-part is allowed to contain quoted-string in addition 1624 to just atom. Third, mailbox-list and address-list were allowed to 1625 have "null" members. That is, there could be two or more commas in 1626 such a list with nothing in between them, or commas at the beginning 1627 or end of the list. Finally, US-ASCII control characters and quoted- 1628 pairs were allowed in domain literals and are added here. 1630 obs-angle-addr = [CFWS] "<" obs-route addr-spec ">" [CFWS] 1632 obs-route = obs-domain-list ":" 1634 obs-domain-list = *(CFWS / ",") "@" domain 1635 *("," [CFWS] ["@" domain]) 1637 obs-mbox-list = *([CFWS] ",") mailbox *("," [mailbox / CFWS]) 1639 obs-addr-list = *([CFWS] ",") address *("," [address / CFWS]) 1641 obs-group-list = 1*([CFWS] ",") [CFWS] 1643 obs-local-part = word *("." word) 1645 obs-domain = atom *("." atom) 1647 obs-dtext = obs-NO-WS-CTL / quoted-pair 1649 When interpreting addresses, the route portion SHOULD be ignored. 1651 4.5. Obsolete Header Fields 1653 Syntactically, the primary difference in the obsolete field syntax is 1654 that it allows multiple occurrences of any of the fields and they may 1655 occur in any order. Also, any amount of white space is allowed 1656 before the ":" at the end of the field name. 1658 obs-fields = *(obs-return / 1659 obs-received / 1660 obs-orig-date / 1661 obs-from / 1662 obs-sender / 1663 obs-reply-to / 1664 obs-to / 1665 obs-cc / 1666 obs-bcc / 1667 obs-message-id / 1668 obs-in-reply-to / 1669 obs-references / 1670 obs-subject / 1671 obs-comments / 1672 obs-keywords / 1673 obs-resent-date / 1674 obs-resent-from / 1675 obs-resent-send / 1676 obs-resent-rply / 1677 obs-resent-to / 1678 obs-resent-cc / 1679 obs-resent-bcc / 1680 obs-resent-mid / 1681 obs-optional) 1683 Except for destination address fields (described in section 4.5.3), 1684 the interpretation of multiple occurrences of fields is unspecified. 1685 Also, the interpretation of trace fields and resent fields that do 1686 not occur in blocks prepended to the message is unspecified as well. 1687 Unless otherwise noted in the following sections, interpretation of 1688 other fields is identical to the interpretation of their non-obsolete 1689 counterparts in section 3. 1691 4.5.1. Obsolete Origination Date Field 1693 obs-orig-date = "Date" *WSP ":" date-time CRLF 1695 4.5.2. Obsolete Originator Fields 1697 obs-from = "From" *WSP ":" mailbox-list CRLF 1699 obs-sender = "Sender" *WSP ":" mailbox CRLF 1701 obs-reply-to = "Reply-To" *WSP ":" address-list CRLF 1703 4.5.3. Obsolete Destination Address Fields 1704 obs-to = "To" *WSP ":" address-list CRLF 1706 obs-cc = "Cc" *WSP ":" address-list CRLF 1708 obs-bcc = "Bcc" *WSP ":" 1709 (address-list / (*([CFWS] ",") [CFWS])) CRLF 1711 When multiple occurrences of destination address fields occur in a 1712 message, they SHOULD be treated as if the address list in the first 1713 occurrence of the field is combined with the address lists of the 1714 subsequent occurrences by adding a comma and concatenating. 1716 4.5.4. Obsolete Identification Fields 1718 The obsolete "In-Reply-To:" and "References:" fields differ from the 1719 current syntax in that they allow phrase (words or quoted strings) to 1720 appear. The obsolete forms of the left and right sides of msg-id 1721 allow interspersed CFWS, making them syntactically identical to 1722 local-part and domain, respectively. 1724 obs-message-id = "Message-ID" *WSP ":" msg-id CRLF 1726 obs-in-reply-to = "In-Reply-To" *WSP ":" *(phrase / msg-id) CRLF 1728 obs-references = "References" *WSP ":" *(phrase / msg-id) CRLF 1730 obs-id-left = local-part 1732 obs-id-right = domain 1734 For purposes of interpretation, the phrases in the "In-Reply-To:" and 1735 "References:" fields are ignored. 1737 Semantically, none of the optional CFWS in the local-part and the 1738 domain is part of the obs-id-left and obs-id-right, respectively. 1740 4.5.5. Obsolete Informational Fields 1742 obs-subject = "Subject" *WSP ":" unstructured CRLF 1744 obs-comments = "Comments" *WSP ":" unstructured CRLF 1746 obs-keywords = "Keywords" *WSP ":" obs-phrase-list CRLF 1748 4.5.6. Obsolete Resent Fields 1750 The obsolete syntax adds a "Resent-Reply-To:" field, which consists 1751 of the field name, the optional comments and folding white space, the 1752 colon, and a comma separated list of addresses. 1754 obs-resent-from = "Resent-From" *WSP ":" mailbox-list CRLF 1756 obs-resent-send = "Resent-Sender" *WSP ":" mailbox CRLF 1758 obs-resent-date = "Resent-Date" *WSP ":" date-time CRLF 1760 obs-resent-to = "Resent-To" *WSP ":" address-list CRLF 1762 obs-resent-cc = "Resent-Cc" *WSP ":" address-list CRLF 1764 obs-resent-bcc = "Resent-Bcc" *WSP ":" 1765 (address-list / (*([CFWS] ",") [CFWS])) CRLF 1767 obs-resent-mid = "Resent-Message-ID" *WSP ":" msg-id CRLF 1769 obs-resent-rply = "Resent-Reply-To" *WSP ":" address-list CRLF 1771 As with other resent fields, the "Resent-Reply-To:" field is to be 1772 treated as informational only. 1774 4.5.7. Obsolete Trace Fields 1776 The obs-return and obs-received are again given here as template 1777 definitions, just as return and received are in section 3. Their 1778 full syntax is given in [I-D.ietf-emailcore-rfc5321bis]. 1780 obs-return = "Return-Path" *WSP ":" path CRLF 1782 obs-received = "Received" *WSP ":" 1783 [1*received-token / CFWS] [ ";" date-time CRLF ] 1785 4.5.8. Obsolete optional fields 1787 obs-optional = field-name *WSP ":" unstructured CRLF 1789 5. Security Considerations 1791 Care needs to be taken when displaying messages on a terminal or 1792 terminal emulator. Powerful terminals may act on escape sequences 1793 and other combinations of US-ASCII control characters with a variety 1794 of consequences. They can remap the keyboard or permit other 1795 modifications to the terminal that could lead to denial of service or 1796 even damaged data. They can trigger (sometimes programmable) 1797 answerback messages that can allow a message to cause commands to be 1798 issued on the recipient's behalf. They can also affect the operation 1799 of terminal attached devices such as printers. Message viewers may 1800 wish to strip potentially dangerous terminal escape sequences from 1801 the message prior to display. However, other escape sequences appear 1802 in messages for useful purposes (cf. [ISO.2022.1994], [RFC2045], 1803 [RFC2046], [RFC2047], [RFC2049], [BCP13]) and therefore should not be 1804 stripped indiscriminately. 1806 Transmission of non-text objects in messages raises additional 1807 security issues. These issues are discussed in [RFC2045], [RFC2046], 1808 [RFC2047], [RFC2049], [BCP13]. 1810 Many implementations use the "Bcc:" (blind carbon copy) field, 1811 described in section 3.6.3, to facilitate sending messages to 1812 recipients without revealing the addresses of one or more of the 1813 addressees to the other recipients. Mishandling this use of "Bcc:" 1814 may disclose confidential information that could eventually lead to 1815 security problems through knowledge of even the existence of a 1816 particular mail address. For example, if using the first method 1817 described in section 3.6.3, where the "Bcc:" line is removed from the 1818 message, blind recipients have no explicit indication that they have 1819 been sent a blind copy, except insofar as their address does not 1820 appear in the header section of a message. Because of this, one of 1821 the blind addressees could potentially send a reply to all of the 1822 shown recipients and accidentally reveal that the message went to the 1823 blind recipient. When the second method from section 3.6.3 is used, 1824 the blind recipient's address appears in the "Bcc:" field of a 1825 separate copy of the message. If the "Bcc:" field contains all of 1826 the blind addressees, all of the "Bcc:" recipients will be seen by 1827 each "Bcc:" recipient. Even if a separate message is sent to each 1828 "Bcc:" recipient with only the individual's address, implementations 1829 still need to be careful to process replies to the message as per 1830 section 3.6.3 so as not to accidentally reveal the blind recipient to 1831 other recipients. 1833 6. IANA Considerations 1835 This document updates the registrations that first appeared in 1836 [RFC4021] and were subsequently updated by [RFC5322]. IANA is 1837 requested to update the Permanent Message Header Field Repository 1838 with the following header fields, in accordance with the procedures 1839 set out in [RFC3864]. 1841 Header field name Date 1842 Applicable protocol Mail 1843 Status standard 1844 Author/Change controller IETF 1845 Specification document(s) This document (section 3.6.1) 1847 Header field name From 1848 Applicable protocol Mail 1849 Status standard 1850 Author/Change controller IETF 1851 Specification document(s) This document (section 3.6.2) 1853 Header field name Sender 1854 Applicable protocol Mail 1855 Status standard 1856 Author/Change controller IETF 1857 Specification document(s) This document (section 3.6.2) 1859 Header field name Reply-To 1860 Applicable protocol Mail 1861 Status standard 1862 Author/Change controller IETF 1863 Specification document(s) This document (section 3.6.2) 1865 Header field name To 1866 Applicable protocol Mail 1867 Status standard 1868 Author/Change controller IETF 1869 Specification document(s) This document (section 3.6.3) 1871 Header field name Cc 1872 Applicable protocol Mail 1873 Status standard 1874 Author/Change controller IETF 1875 Specification document(s) This document (section 3.6.3) 1877 Header field name Bcc 1878 Applicable protocol Mail 1879 Status standard 1880 Author/Change controller IETF 1881 Specification document(s) This document (section 3.6.3) 1883 Header field name Message-ID 1884 Applicable protocol Mail 1885 Status standard 1886 Author/Change controller IETF 1887 Specification document(s) This document (section 3.6.4) 1889 Header field name In-Reply-To 1890 Applicable protocol Mail 1891 Status standard 1892 Author/Change controller IETF 1893 Specification document(s) This document (section 3.6.4) 1895 Header field name References 1896 Applicable protocol Mail 1897 Status standard 1898 Author/Change controller IETF 1899 Specification document(s) This document (section 3.6.4) 1901 Header field name Subject 1902 Applicable protocol Mail 1903 Status standard 1904 Author/Change controller IETF 1905 Specification document(s) This document (section 3.6.5) 1907 Header field name Comments 1908 Applicable protocol Mail 1909 Status standard 1910 Author/Change controller IETF 1911 Specification document(s) This document (section 3.6.5) 1913 Header field name Keywords 1914 Applicable protocol Mail 1915 Status standard 1916 Author/Change controller IETF 1917 Specification document(s) This document (section 3.6.5) 1919 Header field name Resent-Date 1920 Applicable protocol Mail 1921 Status standard 1922 Author/Change controller IETF 1923 Specification document(s) This document (section 3.6.6) 1925 Header field name Resent-From 1926 Applicable protocol Mail 1927 Status standard 1928 Author/Change controller IETF 1929 Specification document(s) This document (section 3.6.6) 1931 Header field name Resent-Sender 1932 Applicable protocol Mail 1933 Status standard 1934 Author/Change controller IETF 1935 Specification document(s) This document (section 3.6.6) 1937 Header field name Resent-To 1938 Applicable protocol Mail 1939 Status standard 1940 Author/Change controller IETF 1941 Specification document(s) This document (section 3.6.6) 1943 Header field name Resent-Cc 1944 Applicable protocol Mail 1945 Status standard 1946 Author/Change controller IETF 1947 Specification document(s) This document (section 3.6.6) 1949 Header field name Resent-Bcc 1950 Applicable protocol Mail 1951 Status standard 1952 Author/Change controller IETF 1953 Specification document(s) This document (section 3.6.6) 1955 Header field name Resent-Reply-To 1956 Applicable protocol Mail 1957 Status obsolete 1958 Author/Change controller IETF 1959 Specification document(s) This document (section 4.5.6) 1961 Header field name Resent-Message-ID 1962 Applicable protocol Mail 1963 Status standard 1964 Author/Change controller IETF 1965 Specification document(s) This document (section 3.6.6) 1967 Header field name Return-Path 1968 Applicable protocol Mail 1969 Status standard 1970 Author/Change controller IETF 1971 Specification document(s) This document (section 3.6.7) 1973 Header field name Received 1974 Applicable protocol Mail 1975 Status standard 1976 Author/Change controller IETF 1977 Specification document(s) This document (section 3.6.7) 1978 Related information [I-D.ietf-emailcore-rfc5321bis] 1980 7. References 1982 7.1. Normative References 1984 [ANSI.X3-4.1986] 1985 American National Standards Institute, "Coded Character 1986 Set - 7-bit American Standard Code for Information 1987 Interchange", ANSI X3.4, 1986. 1989 [BCP14] Bradner, S., "Key words for use in RFCs to Indicate 1990 Requirement Levels", BCP 14, RFC 2119, March 1997. 1992 Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 1993 2119 Key Words", BCP 14, RFC 8174, May 2017. 1995 1997 [RFC1123] Braden, R., Ed., "Requirements for Internet Hosts - 1998 Application and Support", STD 3, RFC 1123, 1999 DOI 10.17487/RFC1123, October 1989, 2000 . 2002 [STD13] Mockapetris, P., "Domain names - concepts and facilities", 2003 STD 13, RFC 1034, November 1987. 2005 Mockapetris, P., "Domain names - implementation and 2006 specification", STD 13, RFC 1035, November 1987. 2008 2010 [STD68] Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax 2011 Specifications: ABNF", STD 68, RFC 5234, January 2008. 2013 2015 7.2. Informative References 2017 [BCP13] Freed, N. and J. Klensin, "Multipurpose Internet Mail 2018 Extensions (MIME) Part Four: Registration Procedures", 2019 BCP 13, RFC 4289, December 2005. 2021 Freed, N., Klensin, J., and T. Hansen, "Media Type 2022 Specifications and Registration Procedures", BCP 13, 2023 RFC 6838, January 2013. 2025 2027 [ISO.2022.1994] 2028 International Organization for Standardization, 2029 "Information technology - Character code structure and 2030 extension techniques", ISO Standard 2022, 1994. 2032 [RFC0822] Crocker, D., "STANDARD FOR THE FORMAT OF ARPA INTERNET 2033 TEXT MESSAGES", STD 11, RFC 822, DOI 10.17487/RFC0822, 2034 August 1982, . 2036 [RFC2045] Freed, N. and N. Borenstein, "Multipurpose Internet Mail 2037 Extensions (MIME) Part One: Format of Internet Message 2038 Bodies", RFC 2045, DOI 10.17487/RFC2045, November 1996, 2039 . 2041 [RFC2046] Freed, N. and N. Borenstein, "Multipurpose Internet Mail 2042 Extensions (MIME) Part Two: Media Types", RFC 2046, 2043 DOI 10.17487/RFC2046, November 1996, 2044 . 2046 [RFC2047] Moore, K., "MIME (Multipurpose Internet Mail Extensions) 2047 Part Three: Message Header Extensions for Non-ASCII Text", 2048 RFC 2047, DOI 10.17487/RFC2047, November 1996, 2049 . 2051 [RFC2049] Freed, N. and N. Borenstein, "Multipurpose Internet Mail 2052 Extensions (MIME) Part Five: Conformance Criteria and 2053 Examples", RFC 2049, DOI 10.17487/RFC2049, November 1996, 2054 . 2056 [RFC2822] Resnick, P., Ed., "Internet Message Format", RFC 2822, 2057 DOI 10.17487/RFC2822, April 2001, 2058 . 2060 [RFC3339] Klyne, G. and C. Newman, "Date and Time on the Internet: 2061 Timestamps", RFC 3339, DOI 10.17487/RFC3339, July 2002, 2062 . 2064 [RFC3864] Klyne, G., Nottingham, M., and J. Mogul, "Registration 2065 Procedures for Message Header Fields", BCP 90, RFC 3864, 2066 DOI 10.17487/RFC3864, September 2004, 2067 . 2069 [RFC4021] Klyne, G. and J. Palme, "Registration of Mail and MIME 2070 Header Fields", RFC 4021, DOI 10.17487/RFC4021, March 2071 2005, . 2073 [RFC5322] Resnick, P., Ed., "Internet Message Format", RFC 5322, 2074 DOI 10.17487/RFC5322, October 2008, 2075 . 2077 [RFC6532] Yang, A., Steele, S., and N. Freed, "Internationalized 2078 Email Headers", RFC 6532, DOI 10.17487/RFC6532, February 2079 2012, . 2081 [I-D.ietf-emailcore-rfc5321bis] 2082 Klensin, J., "Simple Mail Transfer Protocol", Work in 2083 Progress, Internet-Draft, draft-ietf-emailcore-rfc5321bis- 2084 01, 25 December 2020, 2085 . 2088 Appendix A. Example Messages 2090 This section presents a selection of messages. These are intended to 2091 assist in the implementation of this specification, but should not be 2092 taken as normative; that is to say, although the examples in this 2093 section were carefully reviewed, if there happens to be a conflict 2094 between these examples and the syntax described in sections 3 and 4 2095 of this document, the syntax in those sections is to be taken as 2096 correct. 2098 In the text version of this document, messages in this section are 2099 delimited between lines of "----". The "----" lines are not part of 2100 the message itself. 2102 A.1. Addressing Examples 2104 The following are examples of messages that might be sent between two 2105 individuals. 2107 A.1.1. A Message from One Person to Another with Simple Addressing 2109 This could be called a canonical message. It has a single author, 2110 John Doe, a single recipient, Mary Smith, a subject, the date, a 2111 message identifier, and a textual message in the body. 2113 From: John Doe 2114 To: Mary Smith 2115 Subject: Saying Hello 2116 Date: Fri, 21 Nov 1997 09:55:06 -0600 2117 Message-ID: <1234@local.machine.example> 2119 This is a message just to say hello. 2120 So, "Hello". 2122 If John's secretary Michael actually sent the message, even though 2123 John was the author and replies to this message should go back to 2124 him, the sender field would be used: 2126 From: John Doe 2127 Sender: Michael Jones 2128 To: Mary Smith 2129 Subject: Saying Hello 2130 Date: Fri, 21 Nov 1997 09:55:06 -0600 2131 Message-ID: <1234@local.machine.example> 2133 This is a message just to say hello. 2134 So, "Hello". 2136 A.1.2. Different Types of Mailboxes 2138 This message includes multiple addresses in the destination fields 2139 and also uses several different forms of addresses. 2141 From: "Joe Q. Public" 2142 To: Mary Smith , jdoe@example.org, Who? 2143 Cc: , "Giant; \"Big\" Box" 2144 Date: Tue, 1 Jul 2003 10:52:37 +0200 2145 Message-ID: <5678.21-Nov-1997@example.com> 2147 Hi everyone. 2149 Note that the display names for Joe Q. Public and Giant; "Big" Box 2150 needed to be enclosed in double-quotes because the former contains 2151 the period and the latter contains both semicolon and double-quote 2152 characters (the double-quote characters appearing as quoted-pair 2153 constructs). Conversely, the display name for Who? could appear 2154 without them because the question mark is legal in an atom. Notice 2155 also that jdoe@example.org and boss@nil.test have no display names 2156 associated with them at all, and jdoe@example.org uses the simpler 2157 address form without the angle brackets. 2159 A.1.3. Group Addresses 2161 From: Pete 2162 To: A Group:Ed Jones ,joe@where.test,John ; 2163 Cc: Undisclosed recipients:; 2164 Date: Thu, 13 Feb 1969 23:32:54 -0330 2165 Message-ID: 2167 Testing. 2169 In this message, the "To:" field has a single group recipient named 2170 "A Group", which contains 3 addresses, and a "Cc:" field with an 2171 empty group recipient named Undisclosed recipients. 2173 A.2. Reply Messages 2175 The following is a series of three messages that make up a 2176 conversation thread between John and Mary. John first sends a 2177 message to Mary, Mary then replies to John's message, and then John 2178 replies to Mary's reply message. 2180 Note especially the "Message-ID:", "References:", and "In-Reply-To:" 2181 fields in each message. 2183 From: John Doe 2184 To: Mary Smith 2185 Subject: Saying Hello 2186 Date: Fri, 21 Nov 1997 09:55:06 -0600 2187 Message-ID: <1234@local.machine.example> 2189 This is a message just to say hello. 2190 So, "Hello". 2192 When sending replies, the Subject field is often retained, though 2193 prepended with "Re: " as described in section 3.6.5. 2195 From: Mary Smith 2196 To: John Doe 2197 Reply-To: "Mary Smith: Personal Account" 2198 Subject: Re: Saying Hello 2199 Date: Fri, 21 Nov 1997 10:01:10 -0600 2200 Message-ID: <3456@example.net> 2201 In-Reply-To: <1234@local.machine.example> 2202 References: <1234@local.machine.example> 2204 This is a reply to your hello. 2206 Note the "Reply-To:" field in the above message. When John replies 2207 to Mary's message above, the reply should go to the address in the 2208 "Reply-To:" field instead of the address in the "From:" field. 2210 To: "Mary Smith: Personal Account" 2211 From: John Doe 2212 Subject: Re: Saying Hello 2213 Date: Fri, 21 Nov 1997 11:00:00 -0600 2214 Message-ID: 2215 In-Reply-To: <3456@example.net> 2216 References: <1234@local.machine.example> <3456@example.net> 2218 This is a reply to your reply. 2220 A.3. Resent Messages 2222 Start with the message that has been used as an example several 2223 times: 2225 From: John Doe 2226 To: Mary Smith 2227 Subject: Saying Hello 2228 Date: Fri, 21 Nov 1997 09:55:06 -0600 2229 Message-ID: <1234@local.machine.example> 2231 This is a message just to say hello. 2232 So, "Hello". 2234 Say that Mary, upon receiving this message, wishes to send a copy of 2235 the message to Jane such that (a) the message would appear to have 2236 come straight from John; (b) if Jane replies to the message, the 2237 reply should go back to John; and (c) all of the original 2238 information, like the date the message was originally sent to Mary, 2239 the message identifier, and the original addressee, is preserved. In 2240 this case, resent fields are prepended to the message: 2242 Resent-From: Mary Smith 2243 Resent-To: Jane Brown 2244 Resent-Date: Mon, 24 Nov 1997 14:22:01 -0800 2245 Resent-Message-ID: <78910@example.net> 2246 From: John Doe 2247 To: Mary Smith 2248 Subject: Saying Hello 2249 Date: Fri, 21 Nov 1997 09:55:06 -0600 2250 Message-ID: <1234@local.machine.example> 2252 This is a message just to say hello. 2253 So, "Hello". 2255 If Jane, in turn, wished to resend this message to another person, 2256 she would prepend her own set of resent header fields to the above 2257 and send that. (Note that for brevity, trace fields are not shown.) 2259 A.4. Messages with Trace Fields 2261 As messages are sent through the transport system as described in 2262 [I-D.ietf-emailcore-rfc5321bis], trace fields are prepended to the 2263 message. The following is an example of what those trace fields 2264 might look like. Note that there is some folding white space in the 2265 first one since these lines can be long. 2267 Received: from x.y.test 2268 by example.net 2269 via TCP 2270 with ESMTP 2271 id ABC12345 2272 for ; 21 Nov 1997 10:05:43 -0600 2273 Received: from node.example by x.y.test; 21 Nov 1997 10:01:22 -0600 2274 From: John Doe 2275 To: Mary Smith 2276 Subject: Saying Hello 2277 Date: Fri, 21 Nov 1997 09:55:06 -0600 2278 Message-ID: <1234@local.node.example> 2280 This is a message just to say hello. 2281 So, "Hello". 2283 A.5. White Space, Comments, and Other Oddities 2285 White space, including folding white space, and comments can be 2286 inserted between many of the tokens of fields. Taking the example 2287 from A.1.3, white space and comments can be inserted into all of the 2288 fields. 2290 From: Pete(A nice \) chap) 2291 To:A Group(Some people) 2292 :Chris Jones , 2293 joe@example.org, 2294 John (my dear friend); (the end of the group) 2295 Cc:(Empty list)(start)Hidden recipients :(nobody(that I know)) ; 2296 Date: Thu, 2297 13 2298 Feb 2299 1969 2300 23:32 2301 -0330 (Newfoundland Time) 2302 Message-ID: 2304 Testing. 2306 The above example is aesthetically displeasing, but perfectly legal. 2307 Note particularly (1) the comments in the "From:" field (including 2308 one that has a ")" character appearing as part of a quoted-pair); (2) 2309 the white space absent after the ":" in the "To:" field as well as 2310 the comment and folding white space after the group name, the special 2311 character (".") in the comment in Chris Jones's address, and the 2312 folding white space before and after "joe@example.org,"; (3) the 2313 multiple and nested comments in the "Cc:" field as well as the 2314 comment immediately following the ":" after "Cc"; (4) the folding 2315 white space (but no comments except at the end) and the missing 2316 seconds in the time of the date field; and (5) the white space before 2317 (but not within) the identifier in the "Message-ID:" field. 2319 A.6. Obsoleted Forms 2321 The following are examples of obsolete (that is, the "MUST NOT 2322 generate") syntactic elements described in section 4 of this 2323 document. 2325 A.6.1. Obsolete Addressing 2327 Note in the example below the lack of quotes around Joe Q. Public, 2328 the route that appears in the address for Mary Smith, the two commas 2329 that appear in the "To:" field, and the spaces that appear around the 2330 "." in the jdoe address. 2332 From: Joe Q. Public 2333 To: Mary Smith <@node.test:mary@example.net>, , jdoe@test . example 2334 Date: Tue, 1 Jul 2003 10:52:37 +0200 2335 Message-ID: <5678.21-Nov-1997@example.com> 2337 Hi everyone. 2339 A.6.2. Obsolete Dates 2341 The following message uses an obsolete date format, including a non- 2342 numeric time zone and a two digit year. Note that although the day- 2343 of-week is missing, that is not specific to the obsolete syntax; it 2344 is optional in the current syntax as well. 2346 From: John Doe 2347 To: Mary Smith 2348 Subject: Saying Hello 2349 Date: 21 Nov 97 09:55:06 GMT 2350 Message-ID: <1234@local.machine.example> 2352 This is a message just to say hello. 2353 So, "Hello". 2355 A.6.3. Obsolete White Space and Comments 2357 White space and comments can appear between many more elements than 2358 in the current syntax. Also, folding lines that are made up entirely 2359 of white space are legal. 2361 From : John Doe 2362 To : Mary Smith 2363 __ 2364 2365 Subject : Saying Hello 2366 Date : Fri, 21 Nov 1997 09(comment): 55 : 06 -0600 2367 Message-ID : <1234 @ local(blah) .machine .example> 2369 This is a message just to say hello. 2370 So, "Hello". 2372 Note especially the second line of the "To:" field. It starts with 2373 two space characters. (Note that "__" represent blank spaces.) 2374 Therefore, it is considered part of the folding, as described in 2375 section 4.2. Also, the comments and white space throughout 2376 addresses, dates, and message identifiers are all part of the 2377 obsolete syntax. 2379 Appendix B. Differences from Earlier Specifications 2381 This appendix contains a list of changes that have been made in the 2382 Internet Message Format from earlier specifications, specifically 2383 [RFC0822], [RFC1123], [RFC2822], and [RFC5322]. Items marked with an 2384 asterisk (*) below are items which appear in section 4 of this 2385 document and therefore can no longer be generated. 2387 The following are the changes made from [RFC0822] and [RFC1123] to 2388 [RFC2822]t: 2390 1. Period allowed in obsolete form of phrase. 2391 2. ABNF moved out of document, now in [STD68]. 2392 3. Four or more digits allowed for year. 2393 4. Header field ordering (and lack thereof) made explicit. 2394 5. Encrypted header field removed. 2395 6. Specifically allow and give meaning to "-0000" time zone. 2396 7. Folding white space is not allowed between every token. 2397 8. Requirement for destinations removed. 2398 9. Forwarding and resending redefined. 2399 10. Extension header fields no longer specifically called out. 2400 11. ASCII 0 (null) removed.* 2401 12. Folding continuation lines cannot contain only white space.* 2402 13. Free insertion of comments not allowed in date.* 2403 14. Non-numeric time zones not allowed.* 2404 15. Two digit years not allowed.* 2405 16. Three digit years interpreted, but not allowed for generation.* 2406 17. Routes in addresses not allowed.* 2407 18. CFWS within local-parts and domains not allowed.* 2408 19. Empty members of address lists not allowed.* 2409 20. Folding white space between field name and colon not allowed.* 2410 21. Comments between field name and colon not allowed. 2411 22. Tightened syntax of in-reply-to and references.* 2412 23. CFWS within msg-id not allowed.* 2413 24. Tightened semantics of resent fields as informational only. 2414 25. Resent-Reply-To not allowed.* 2415 26. No multiple occurrences of fields (except resent and received).* 2416 27. Free CR and LF not allowed.* 2417 28. Line length limits specified. 2418 29. Bcc more clearly specified. 2420 The following are changes from [RFC2822] to [RFC5322]: 2422 1. Assorted typographical/grammatical errors fixed and 2423 clarifications made. 2424 2. Changed "standard" to "document" or "specification" throughout. 2425 3. Made distinction between "header field" and "header section". 2426 4. Removed NO-WS-CTL from ctext, qtext, dtext, and unstructured.* 2427 5. Moved discussion of specials to the "Atom" section. Moved text 2428 to "Overall message syntax" section. 2429 6. Simplified CFWS syntax. 2430 7. Fixed unstructured syntax (erratum 373 (https://www.rfc- 2431 editor.org/errata/eid373)). 2432 8. Changed date and time syntax to deal with white space in 2433 obsolete date syntax. 2434 9. Removed quoted-pair from domain literals and message 2435 identifiers.* 2436 10. Clarified that other specifications limit domain syntax. 2437 11. Simplified "Bcc:" and "Resent-Bcc:" syntax. 2438 12. Allowed optional-field to appear within trace information. 2439 13. Removed no-fold-quote from msg-id. Clarified syntax 2440 limitations. 2441 14. Generalized "Received:" syntax to fix bugs and move definition 2442 out of this document. 2443 15. Simplified obs-qp. Fixed and simplified obs-utext (which now 2444 only appears in the obsolete syntax). Removed obs-text and obs- 2445 char, adding obs-body. 2446 16. Fixed obsolete date syntax to allow for more (or less) comments 2447 and white space. 2448 17. Fixed all obsolete list syntax (obs-domain-list, obs-mbox-list, 2449 obs-addr-list, obs-phrase-list, and the newly added obs-group- 2450 list). 2452 18. Fixed obs-reply-to syntax. 2453 19. Fixed obs-bcc and obs-resent-bcc to allow empty lists. 2454 20. Removed obs-path. 2456 The following are changes from [RFC5322]. 2458 1. Clarified addr-spec description (erratum 1766 (https://www.rfc- 2459 editor.org/errata/eid1766)). 2460 2. Fixed obs-unstruct to be more limited (erratum 1905 2461 (https://www.rfc-editor.org/errata/eid1905)).* 2462 3. Simplified obs-body (erratum 1906 (https://www.rfc- 2463 editor.org/errata/eid1906)).* 2464 4. Fixed obs-FWS to allow for a leading CRLF (erratum 1908 2465 (https://www.rfc-editor.org/errata/eid1908)).* 2466 5. Fixed comments within addresses in A.5 (errata 2515 2467 (https://www.rfc-editor.org/errata/eid2515) and 2579 2468 (https://www.rfc-editor.org/errata/eid2579)). 2469 6. Fixed time zone description (erratum 2726 (https://www.rfc- 2470 editor.org/errata/eid2726)). 2471 7. Removed inappropriate uses of "sent" in 3.6.3, 3.6.6, and 5 2472 (erratum 3048 (https://www.rfc-editor.org/errata/eid3048)). 2473 8. Allow for CFWS in otherwise empty list of "Received:" field 2474 tokens (erratum 3979 (https://www.rfc-editor.org/errata/ 2475 eid3979)). 2476 9. Clarified that "printable" includes space, and replaced 2477 "printable" with "VCHAR" in ABNF comments to clarify that it 2478 doesn't include the space character (erratum 4692 2479 (https://www.rfc-editor.org/errata/eid4692)). 2480 10. Clarify midnight in time-of-day (erratum 5905 (https://www.rfc- 2481 editor.org/errata/eid5905)). 2482 11. Allow for date-time in obs-received (erratum 5867 2483 (https://www.rfc-editor.org/errata/eid5867)).* 2484 12. Separated out "msg-id-internal" in "msg-id". 2485 13. Updated references to STD 13, STD 68, BCP 13, and BCP 14, and 2486 reference for leap seconds to RFC 3339. 2487 14. Fixed typo in daylight saving time in description of obs-zone.* 2488 15. Added comment to field-name ABNF to remind that length can't be 2489 greater than 77 (erratum 5918 (https://www.rfc- 2490 editor.org/errata/eid5918)). 2491 16. Clarified description in 4.5.6 as "trace information"". 2492 17. Explained the use of the term "obsolete" in Section 1.2.3. 2493 18. Updated syntactic and semantic descriptions of trace in 3.6.7 2494 that there can be other fields that are treated as trace, and 2495 allow return without any received. Moved optional-field syntax 2496 into this section and out of 3.6 to accommodate this. 2498 // This last part to be removed before publication. 2500 There are also 2 errata that were "Held For Document Update" that 2501 have not been addressed: 2503 1. Erratum 2950 (https://www.rfc-editor.org/errata/eid2950): As per 2504 ticket #39 (https://trac.ietf.org/trac/emailcore/ticket/39), 2505 there is no need to change the resent fields from "*" to "1*" in 2506 3.6 as it doesn't really affect the syntax. 2507 2. Erratum 3135 (https://www.rfc-editor.org/errata/eid3135): As per 2508 ticket #35 (https://trac.ietf.org/trac/emailcore/ticket/35), 2509 discussion of empty quoted-string will appear in 2510 https://datatracker.ietf.org/doc/draft-ietf-emailcore-as/ 2512 Appendix C. Acknowledgements 2514 Many people contributed to this document. They included participants 2515 in and chairs of the Detailed Revision and Update of Messaging 2516 Standards (DRUMS) and Revision of Core Email Specifications 2517 (EMAILCORE) Working Groups of the Internet Engineering Task Force 2518 (IETF), the Area Directors of the IETF, reporters of errata on 2519 earlier versions of this document, and people who simply sent their 2520 comments in via email. The editor is deeply indebted to them all and 2521 thanks them sincerely. (The list of these people has been 2522 temporarily removed to try to bring it up to date.) 2524 Author's Address 2526 Peter W. Resnick (editor) 2527 Episteme Technology Consulting LLC 2528 503 West Indiana Avenue 2529 Urbana, IL 61801-4941 2530 United States of America 2531 Phone: +1 217 337 1905 2532 Email: resnick@episteme.net 2533 URI: https://www.episteme.net/