idnits 2.17.00 (12 Aug 2021) /tmp/idnits3516/draft-ietf-emailcore-rfc5322bis-01.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: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == Line 1837 has weird spacing: '... Status stand...' == 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...' == (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 (29 March 2021) is 417 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 731, 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 (~~), 9 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) 29 March 2021 5 Updates: 4021 (if approved) 6 Intended status: Standards Track 7 Expires: 30 September 2021 9 Internet Message Format 10 draft-ietf-emailcore-rfc5322bis-01 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 30 September 2021. 40 Copyright Notice 42 Copyright (c) 2021 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 Simplified BSD License text 51 as described in Section 4.e of the Trust Legal Provisions and are 52 provided without warranty as described in the Simplified 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 . . . . . . . . . . . . . . . . 6 75 2.1. General Description . . . . . . . . . . . . . . . . . . . 6 76 2.1.1. Line Length Limits . . . . . . . . . . . . . . . . . 7 77 2.2. Header Fields . . . . . . . . . . . . . . . . . . . . . . 8 78 2.2.1. Unstructured Header Field Bodies . . . . . . . . . . 8 79 2.2.2. Structured Header Field Bodies . . . . . . . . . . . 8 80 2.2.3. Long Header Fields . . . . . . . . . . . . . . . . . 9 81 2.3. Body . . . . . . . . . . . . . . . . . . . . . . . . . . 9 82 3. Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 83 3.1. Introduction . . . . . . . . . . . . . . . . . . . . . . 10 84 3.2. Lexical Tokens . . . . . . . . . . . . . . . . . . . . . 10 85 3.2.1. Quoted characters . . . . . . . . . . . . . . . . . . 11 86 3.2.2. Folding White Space and Comments . . . . . . . . . . 11 87 3.2.3. Atom . . . . . . . . . . . . . . . . . . . . . . . . 12 88 3.2.4. Quoted Strings . . . . . . . . . . . . . . . . . . . 13 89 3.2.5. Miscellaneous Tokens . . . . . . . . . . . . . . . . 14 90 3.3. Date and Time Specification . . . . . . . . . . . . . . . 15 91 3.4. Address Specification . . . . . . . . . . . . . . . . . . 16 92 3.4.1. Addr-Spec Specification . . . . . . . . . . . . . . . 17 93 3.5. Overall Message Syntax . . . . . . . . . . . . . . . . . 18 94 3.6. Field Definitions . . . . . . . . . . . . . . . . . . . . 19 95 3.6.1. The Origination Date Field . . . . . . . . . . . . . 22 96 3.6.2. Originator Fields . . . . . . . . . . . . . . . . . . 22 97 3.6.3. Destination Address Fields . . . . . . . . . . . . . 23 98 3.6.4. Identification Fields . . . . . . . . . . . . . . . . 25 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 . . . . . . . . . . . . . . . . . . . . . . . 33 104 4.1. Miscellaneous Obsolete Tokens . . . . . . . . . . . . . . 34 105 4.2. Obsolete Folding White Space . . . . . . . . . . . . . . 35 106 4.3. Obsolete Date and Time . . . . . . . . . . . . . . . . . 35 107 4.4. Obsolete Addressing . . . . . . . . . . . . . . . . . . . 37 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 Section 5 details security considerations to take into account when 249 implementing this specification. 251 Appendix A lists examples of different sorts of messages. These 252 examples are not exhaustive of the types of messages that appear on 253 the Internet, but give a broad overview of certain syntactic forms. 255 Appendix B lists the differences between this specification and 256 earlier specifications for Internet messages. 258 Appendix C contains acknowledgements. 260 2. Lexical Analysis of Messages 262 2.1. General Description 264 At the most basic level, a message is a series of characters. A 265 message that is conformant with this specification is composed of 266 characters with values in the range of 1 through 127 and interpreted 267 as US-ASCII [ANSI.X3-4.1986] characters. For brevity, this document 268 sometimes refers to this range of characters as simply "US-ASCII 269 characters". 271 | Note: This document specifies that messages are made up of 272 | characters in the US-ASCII range of 1 through 127. There are 273 | other documents, specifically the MIME document series 274 | ([RFC2045], [RFC2046], [RFC2047], [RFC2049], [BCP13]) and the 275 | Internationalized Email Headers specification ([RFC6532]), that 276 | extend this specification to allow for values outside of that 277 | range. Discussion of those mechanisms is not within the scope 278 | of this specification. 280 Messages are divided into lines of characters. A line is a series of 281 characters that is delimited with the two characters carriage-return 282 and line-feed; that is, the carriage return (CR) character (ASCII 283 value 13) followed immediately by the line feed (LF) character (ASCII 284 value 10). (The carriage return/line feed pair is usually written in 285 this document as "CRLF".) 287 A message consists of header fields (collectively called "the header 288 section of the message") followed, optionally, by a body. The header 289 section is a sequence of lines of characters with special syntax as 290 defined in this specification. The body is simply a sequence of 291 characters that follows the header section and is separated from the 292 header section by an empty line (i.e., a line with nothing preceding 293 the CRLF). 295 | Note: Common parlance and earlier versions of this 296 | specification use the term "header" to either refer to the 297 | entire header section or to refer to an individual header 298 | field. To avoid ambiguity, this document does not use the 299 | terms "header" or "headers" in isolation, but instead always 300 | uses "header field" to refer to the individual field and 301 | "header section" to refer to the entire collection. 303 2.1.1. Line Length Limits 305 There are two limits that this specification places on the number of 306 characters in a line. Each line of characters MUST be no more than 307 998 characters, and SHOULD be no more than 78 characters, excluding 308 the CRLF. 310 The 998 character limit is due to limitations in many implementations 311 that send, receive, or store IMF messages which simply cannot handle 312 more than 998 characters on a line. Receiving implementations would 313 do well to handle an arbitrarily large number of characters in a line 314 for robustness sake. However, there are so many implementations that 315 (in compliance with the transport requirements of 316 [I-D.ietf-emailcore-rfc5321bis]) do not accept messages containing 317 more than 1000 characters including the CR and LF per line, it is 318 important for implementations not to create such messages. 320 The more conservative 78 character recommendation is to accommodate 321 the many implementations of user interfaces that display these 322 messages which may truncate, or disastrously wrap, the display of 323 more than 78 characters per line, in spite of the fact that such 324 implementations are non-conformant to the intent of this 325 specification (and that of [I-D.ietf-emailcore-rfc5321bis] if they 326 actually cause information to be lost). Again, even though this 327 limitation is put on messages, it is incumbent upon implementations 328 that display messages to handle an arbitrarily large number of 329 characters in a line (certainly at least up to the 998 character 330 limit) for the sake of robustness. 332 2.2. Header Fields 334 Header fields are lines beginning with a field name, followed by a 335 colon (":"), followed by a field body, and terminated by CRLF. A 336 field name MUST be composed of visible US-ASCII characters (i.e., 337 characters that have values between 33 and 126, inclusive), except 338 colon. A field body may be composed of visible US-ASCII characters 339 as well as the space (SP, ASCII value 32) and horizontal tab (HTAB, 340 ASCII value 9) characters (together known as the white space 341 characters, WSP). A field body MUST NOT include CR and LF except 342 when used in "folding" and "unfolding", as described in section 343 2.2.3. All field bodies MUST conform to the syntax described in 344 sections 3 and 4 of this specification. 346 2.2.1. Unstructured Header Field Bodies 348 Some field bodies in this specification are defined simply as 349 "unstructured" (which is specified in section 3.2.5 as any visible 350 US-ASCII characters plus white space characters) with no further 351 restrictions. These are referred to as unstructured field bodies. 352 Semantically, unstructured field bodies are simply to be treated as a 353 single line of characters with no further processing (except for 354 "folding" and "unfolding" as described in section 2.2.3). 356 2.2.2. Structured Header Field Bodies 358 Some field bodies in this specification have a syntax that is more 359 restrictive than the unstructured field bodies described above. 360 These are referred to as "structured" field bodies. Structured field 361 bodies are sequences of specific lexical tokens as described in 362 sections 3 and 4 of this specification. Many of these tokens are 363 allowed (according to their syntax) to be introduced or end with 364 comments (as described in section 3.2.2) as well as the white space 365 characters, and those white space characters are subject to "folding" 366 and "unfolding" as described in section 2.2.3. Semantic analysis of 367 structured field bodies is given along with their syntax. 369 2.2.3. Long Header Fields 371 Each header field is logically a single line of characters comprising 372 the field name, the colon, and the field body. For convenience 373 however, and to deal with the 998/78 character limitations per line, 374 the field body portion of a header field can be split into a 375 multiple-line representation; this is called "folding". The general 376 rule is that wherever this specification allows for folding white 377 space (not simply WSP characters), a CRLF may be inserted before any 378 WSP. 380 For example, the header field: 382 Subject: This is a test 384 can be represented as: 386 Subject: This 387 is a test 389 | Note: Though structured field bodies are defined in such a way 390 | that folding can take place between many of the lexical tokens 391 | (and even within some of the lexical tokens), folding SHOULD be 392 | limited to placing the CRLF at higher-level syntactic breaks. 393 | For instance, if a field body is defined as comma-separated 394 | values, it is recommended that folding occur after the comma 395 | separating the structured items in preference to other places 396 | where the field could be folded, even if it is allowed 397 | elsewhere. 399 The process of moving from this folded multiple-line representation 400 of a header field to its single line representation is called 401 "unfolding". Unfolding is accomplished by simply removing any CRLF 402 that is immediately followed by WSP. Each header field should be 403 treated in its unfolded form for further syntactic and semantic 404 evaluation. An unfolded header field has no length restriction and 405 therefore may be indeterminately long. 407 2.3. Body 409 The body of a message is simply lines of US-ASCII characters. The 410 only two limitations on the body are as follows: 412 * CR and LF MUST only occur together as CRLF; they MUST NOT appear 413 independently in the body. 415 * Lines of characters in the body MUST be limited to 998 characters, 416 and SHOULD be limited to 78 characters, excluding the CRLF. 418 | Note: As was stated earlier, there are other documents, 419 | specifically the MIME documents ([RFC2045], [RFC2046], 420 | [RFC2049], [BCP13]), that extend (and limit) this specification 421 | to allow for different sorts of message bodies. Again, these 422 | mechanisms are beyond the scope of this document. 424 3. Syntax 426 3.1. Introduction 428 The syntax as given in this section defines the legal syntax of 429 Internet messages. Messages that are conformant to this 430 specification MUST conform to the syntax in this section. If there 431 are options in this section where one option SHOULD be generated, 432 that is indicated either in the prose or in a comment next to the 433 syntax. 435 For the defined expressions, a short description of the syntax and 436 use is given, followed by the syntax in ABNF, followed by a semantic 437 analysis. The following primitive tokens that are used but otherwise 438 unspecified are taken from the "Core Rules" of [STD68], Appendix B.1: 439 CR, LF, CRLF, HTAB, SP, WSP, DQUOTE, DIGIT, ALPHA, and VCHAR. 441 In some of the definitions, there will be non-terminals whose names 442 start with "obs-". These "obs-" elements refer to tokens defined in 443 the obsolete syntax in section 4. In all cases, these productions 444 are to be ignored for the purposes of generating legal Internet 445 messages and MUST NOT be used as part of such a message. However, 446 when interpreting messages, these tokens MUST be honored as part of 447 the legal syntax. In this sense, section 3 defines a grammar for the 448 generation of messages, with "obs-" elements that are to be ignored, 449 while section 4 adds grammar for the interpretation of messages. 451 3.2. Lexical Tokens 453 The following rules are used to define an underlying lexical 454 analyzer, which feeds tokens to the higher-level parsers. This 455 section defines the tokens used in structured header field bodies. 457 | Note: Readers of this specification need to pay special 458 | attention to how these lexical tokens are used in both the 459 | lower-level and higher-level syntax later in the document. 460 | Particularly, the white space tokens and the comment tokens 461 | defined in section 3.2.2 get used in the lower-level tokens 462 | defined here, and those lower-level tokens are in turn used as 463 | parts of the higher-level tokens defined later. Therefore, 464 | white space and comments may be allowed in the higher-level 465 | tokens even though they may not explicitly appear in a 466 | particular definition. 468 3.2.1. Quoted characters 470 Some characters are reserved for special interpretation, such as 471 delimiting lexical tokens. To permit use of these characters as 472 uninterpreted data, a quoting mechanism is provided. 474 quoted-pair = ("\" (VCHAR / WSP)) / obs-qp 476 Where any quoted-pair appears, it is to be interpreted as the 477 character alone. That is to say, the "\" character that appears as 478 part of a quoted-pair is semantically "invisible". 480 | Note: The "\" character may appear in a message where it is not 481 | part of a quoted-pair. A "\" character that does not appear in 482 | a quoted-pair is not semantically invisible. The only places 483 | in this specification where quoted-pair currently appears are 484 | ccontent, qcontent, and in obs-dtext in section 4. 486 3.2.2. Folding White Space and Comments 488 White space characters, including white space used in folding 489 (described in section 2.2.3), may appear between many elements in 490 header field bodies. Also, strings of characters that are treated as 491 comments may be included in structured field bodies as characters 492 enclosed in parentheses. The following defines the folding white 493 space (FWS) and comment constructs. 495 Strings of characters enclosed in parentheses are considered comments 496 so long as they do not appear within a "quoted-string", as defined in 497 section 3.2.4. Comments may nest. 499 There are several places in this specification where comments and FWS 500 may be freely inserted. To accommodate that syntax, an additional 501 token for "CFWS" is defined for places where comments and/or FWS can 502 occur. However, where CFWS occurs in this specification, it MUST NOT 503 be inserted in such a way that any line of a folded header field is 504 made up entirely of WSP characters and nothing else. 506 FWS = ([*WSP CRLF] 1*WSP) / obs-FWS 507 ; Folding white space 509 ctext = %d33-39 / ; Visible US-ASCII 510 %d42-91 / ; characters not including 511 %d93-126 / ; "(", ")", or "\" 512 obs-ctext 514 ccontent = ctext / quoted-pair / comment 516 comment = "(" *([FWS] ccontent) [FWS] ")" 518 CFWS = (1*([FWS] comment) [FWS]) / FWS 520 Throughout this specification, where FWS (the folding white space 521 token) appears, it indicates a place where folding, as discussed in 522 section 2.2.3, may take place. Wherever folding appears in a message 523 (that is, a header field body containing a CRLF followed by any WSP), 524 unfolding (removal of the CRLF) is performed before any further 525 semantic analysis is performed on that header field according to this 526 specification. That is to say, any CRLF that appears in FWS is 527 semantically "invisible". 529 A comment is normally used in a structured field body to provide some 530 human-readable informational text. Since a comment is allowed to 531 contain FWS, folding is permitted within the comment. Also note that 532 since quoted-pair is allowed in a comment, the parentheses and 533 backslash characters may appear in a comment, so long as they appear 534 as a quoted-pair. Semantically, the enclosing parentheses are not 535 part of the comment; the comment is what is contained between the two 536 parentheses. As stated earlier, the "\" in any quoted-pair and the 537 CRLF in any FWS that appears within the comment are semantically 538 "invisible" and therefore not part of the comment either. 540 Runs of FWS, comment, or CFWS that occur between lexical tokens in a 541 structured header field are semantically interpreted as a single 542 space character. 544 3.2.3. Atom 546 Several productions in structured header field bodies are simply 547 strings of certain basic characters. Such productions are called 548 atoms. 550 Some of the structured header field bodies also allow the period 551 character (".", ASCII value 46) within runs of atext. An additional 552 "dot-atom" token is defined for those purposes. 554 | Note: The "specials" token does not appear anywhere else in 555 | this specification. It is simply the visible (i.e., non- 556 | control, non-white space) characters that do not appear in 557 | atext. It is provided only because it is useful for 558 | implementers who use tools that lexically analyze messages. 559 | Each of the characters in specials can be used to indicate a 560 | tokenization point in lexical analysis. 562 atext = ALPHA / DIGIT / ; Visible US-ASCII 563 "!" / "#" / ; characters not including 564 "$" / "%" / ; specials. Used for atoms. 565 "&" / "'" / 566 "*" / "+" / 567 "-" / "/" / 568 "=" / "?" / 569 "^" / "_" / 570 "`" / "{" / 571 "|" / "}" / 572 "~" 574 atom = [CFWS] 1*atext [CFWS] 576 dot-atom-text = 1*atext *("." 1*atext) 578 dot-atom = [CFWS] dot-atom-text [CFWS] 580 specials = "(" / ")" / ; Special characters that do 581 "<" / ">" / ; not appear in atext 582 "[" / "]" / 583 ":" / ";" / 584 "@" / "\" / 585 "," / "." / 586 DQUOTE 588 Both atom and dot-atom are interpreted as a single unit, comprising 589 the string of characters that make it up. Semantically, the optional 590 comments and FWS surrounding the rest of the characters are not part 591 of the atom; the atom is only the run of atext characters in an atom, 592 or the atext and "." characters in a dot-atom. 594 3.2.4. Quoted Strings 596 Strings of characters that include characters other than those 597 allowed in atoms can be represented in a quoted string format, where 598 the characters are surrounded by quote (DQUOTE, ASCII value 34) 599 characters. 601 qtext = %d33 / ; Visible US-ASCII 602 %d35-91 / ; characters not including 603 %d93-126 / ; "\" or the quote character 604 obs-qtext 606 qcontent = qtext / quoted-pair 608 quoted-string = [CFWS] 609 DQUOTE *([FWS] qcontent) [FWS] DQUOTE 610 [CFWS] 612 // Erratum 3135 (https://www.rfc-editor.org/errata/eid3135) wanted to 613 // disallow empty quoted strings. There doesn't appear to be 614 // consensus for that (e.g., see discussion starting at 615 // https://mailarchive.ietf.org/arch/msg/ietf- 616 // 822/9NByCGWq7_dOLRNhrPkZR24074g) and therefore this erratum 617 // probably should have been rejected. 619 A quoted-string is treated as a unit. That is, quoted-string is 620 identical to atom, semantically. Since a quoted-string is allowed to 621 contain FWS, folding is permitted. Also note that since quoted-pair 622 is allowed in a quoted-string, the quote and backslash characters may 623 appear in a quoted-string so long as they appear as a quoted-pair. 625 Semantically, neither the optional CFWS outside of the quote 626 characters nor the quote characters themselves are part of the 627 quoted-string; the quoted-string is what is contained between the two 628 quote characters. As stated earlier, the "\" in any quoted-pair and 629 the CRLF in any FWS/CFWS that appears within the quoted-string are 630 semantically "invisible" and therefore not part of the quoted-string 631 either. 633 3.2.5. Miscellaneous Tokens 635 Three additional tokens are defined: word and phrase for combinations 636 of atoms and/or quoted-strings, and unstructured for use in 637 unstructured header fields and in some places within structured 638 header fields. 640 word = atom / quoted-string 642 phrase = 1*word / obs-phrase 644 unstructured = (*([FWS] VCHAR) *WSP) / obs-unstruct 646 3.3. Date and Time Specification 648 Date and time values occur in several header fields. This section 649 specifies the syntax for a full date and time specification. Though 650 folding white space is permitted throughout the date-time 651 specification, it is RECOMMENDED that a single space be used in each 652 place that FWS appears (whether it is required or optional); some 653 older implementations will not interpret longer sequences of folding 654 white space correctly. 656 date-time = [ day-of-week "," ] date time [CFWS] 658 day-of-week = ([FWS] day-name) / obs-day-of-week 660 day-name = "Mon" / "Tue" / "Wed" / "Thu" / 661 "Fri" / "Sat" / "Sun" 663 date = day month year 665 day = ([FWS] 1*2DIGIT FWS) / obs-day 667 month = "Jan" / "Feb" / "Mar" / "Apr" / 668 "May" / "Jun" / "Jul" / "Aug" / 669 "Sep" / "Oct" / "Nov" / "Dec" 671 year = (FWS 4*DIGIT FWS) / obs-year 673 time = time-of-day zone 675 time-of-day = hour ":" minute [ ":" second ] 677 hour = 2DIGIT / obs-hour 679 minute = 2DIGIT / obs-minute 681 second = 2DIGIT / obs-second 683 zone = (FWS ( "+" / "-" ) 4DIGIT) / obs-zone 685 The day is the numeric day of the month. The year is any numeric 686 year 1900 or later. 688 The time-of-day specifies the number of hours, minutes, and 689 optionally seconds since midnight of the date indicated (at the 690 offset specified by the zone). 692 The date and time-of-day SHOULD express local time. 694 The zone specifies the offset from Coordinated Universal Time (UTC) 695 that the date and time-of-day represent. The "+" or "-" indicates 696 whether the time-of-day is ahead of (i.e., east of) or behind (i.e., 697 west of) Universal Time. The first two digits indicate the number of 698 hours difference from Universal Time, and the last two digits 699 indicate the number of additional minutes difference from Universal 700 Time. (Hence, +hhmm means +(hh * 60 + mm) minutes, and -hhmm means 701 -(hh * 60 + mm) minutes). The form "+0000" SHOULD be used to 702 indicate a time zone at Universal Time. Though "-0000" also 703 indicates Universal Time, it is used to indicate that the time was 704 generated on a system that may be in a local time zone other than 705 Universal Time and that the date-time contains no information about 706 the local time zone. 708 A date-time specification MUST be semantically valid. That is, the 709 day-of-week (if included) MUST be the day implied by the date, the 710 numeric day-of-month MUST be between 1 and the number of days allowed 711 for the specified month (in the specified year), the time-of-day MUST 712 be in the range 00:00:00 through 23:59:60 (the number of seconds 713 allowing for a leap second; see [RFC3339]), and the last two digits 714 of the zone MUST be within the range 00 through 59. 716 3.4. Address Specification 718 Addresses occur in several message header fields to indicate senders 719 and recipients of messages. An address may either be an individual 720 mailbox, or a group of mailboxes. 722 address = mailbox / group 724 mailbox = name-addr / addr-spec 726 name-addr = [display-name] angle-addr 728 angle-addr = [CFWS] "<" addr-spec ">" [CFWS] / 729 obs-angle-addr 731 group = display-name ":" [group-list] ";" [CFWS] 733 display-name = phrase 735 mailbox-list = (mailbox *("," mailbox)) / obs-mbox-list 737 address-list = (address *("," address)) / obs-addr-list 739 group-list = mailbox-list / CFWS / obs-group-list 740 A mailbox receives mail. It is a conceptual entity that does not 741 necessarily pertain to file storage. For example, some sites may 742 choose to print mail on a printer and deliver the output to the 743 addressee's desk. 745 Normally, a mailbox is composed of two parts: (1) an optional display 746 name that indicates the name of the recipient (which can be a person 747 or a system) that could be displayed to the user of a mail 748 application, and (2) an addr-spec address enclosed in angle brackets 749 ("<" and ">"). There is an alternate simple form of a mailbox where 750 the addr-spec address appears alone, without the recipient's name or 751 the angle brackets. The Internet addr-spec address is described in 752 section 3.4.1. 754 | Note: Some legacy implementations used the simple form where 755 | the addr-spec appears without the angle brackets, but included 756 | the name of the recipient in parentheses as a comment following 757 | the addr-spec. Since the meaning of the information in a 758 | comment is unspecified, implementations SHOULD use the full 759 | name-addr form of the mailbox, instead of the legacy form, to 760 | specify the display name associated with a mailbox. Also, 761 | because some legacy implementations interpret the comment, 762 | comments generally SHOULD NOT be used in address fields to 763 | avoid confusing such implementations. 765 When it is desirable to treat several mailboxes as a single unit 766 (i.e., in a distribution list), the group construct can be used. The 767 group construct allows the sender to indicate a named group of 768 recipients. This is done by giving a display name for the group, 769 followed by a colon, followed by a comma-separated list of any number 770 of mailboxes (including zero and one), and ending with a semicolon. 771 Because the list of mailboxes can be empty, using the group construct 772 is also a simple way to communicate to recipients that the message 773 was sent to one or more named sets of recipients, without actually 774 providing the individual mailbox address for any of those recipients. 776 3.4.1. Addr-Spec Specification 778 An addr-spec is a specific Internet identifier that contains a 779 locally interpreted string followed by the at-sign character ("@", 780 ASCII value 64) followed by an Internet domain. The locally 781 interpreted string is either a quoted-string or a dot-atom. If the 782 string can be represented as a dot-atom (that is, it contains no 783 characters other than atext characters or one or more of "." 784 surrounded by atext characters), then the dot-atom form SHOULD be 785 used and the quoted-string form SHOULD NOT be used. Comments and 786 folding white space SHOULD NOT be used around the "@" in the addr- 787 spec. 789 | Note: A liberal syntax for the domain portion of addr-spec is 790 | given here. However, the domain portion contains addressing 791 | information specified by and used in other protocols (e.g., 792 | [STD13], [RFC1123], [I-D.ietf-emailcore-rfc5321bis]). It is 793 | therefore incumbent upon implementations to conform to the 794 | syntax of addresses for the context in which they are used. 796 addr-spec = local-part "@" domain 798 local-part = dot-atom / quoted-string / obs-local-part 800 domain = dot-atom / domain-literal / obs-domain 802 domain-literal = [CFWS] "[" *([FWS] dtext) [FWS] "]" [CFWS] 804 dtext = %d33-90 / ; Visible US-ASCII 805 %d94-126 / ; characters not including 806 obs-dtext ; "[", "]", or "\" 808 The domain portion identifies the point to which the mail is 809 delivered. In the dot-atom form, this is interpreted as an Internet 810 domain name (either a host name or a mail exchanger name) as 811 described in [STD13] and [RFC1123]. In the domain-literal form, the 812 domain is interpreted as the literal Internet address of the 813 particular host. In both cases, how addressing is used and how 814 messages are transported to a particular host is covered in separate 815 documents, such as [I-D.ietf-emailcore-rfc5321bis]. These mechanisms 816 are outside of the scope of this document. 818 The local-part portion is a domain-dependent string. In addresses, 819 it is simply interpreted on the particular host as a name of a 820 particular mailbox. 822 3.5. Overall Message Syntax 824 A message consists of header fields, optionally followed by a message 825 body. Lines in a message MUST be a maximum of 998 characters 826 excluding the CRLF, but it is RECOMMENDED that lines be limited to 78 827 characters excluding the CRLF. (See section 2.1.1 for explanation.) 828 In a message body, though all of the characters listed in the text 829 rule MAY be used, the use of US-ASCII control characters (values 1 830 through 8, 11, 12, and 14 through 31) is discouraged since their 831 interpretation by receivers for display is not guaranteed. 833 message = (fields / obs-fields) 834 [CRLF body] 836 body = (*(*998text CRLF) *998text) / obs-body 838 text = %d1-9 / ; Characters excluding CR 839 %d11 / ; and LF 840 %d12 / 841 %d14-127 843 The header fields carry most of the semantic information and are 844 defined in section 3.6. The body is simply a series of lines of text 845 that are uninterpreted for the purposes of this specification. 847 3.6. Field Definitions 849 The header fields of a message are defined here. All header fields 850 have the same general syntactic structure: a field name, followed by 851 a colon, followed by the field body. The specific syntax for each 852 header field is defined in the subsequent sections. 854 | Note: In the ABNF syntax for each field in subsequent sections, 855 | each field name is followed by the required colon. However, 856 | for brevity, sometimes the colon is not referred to in the 857 | textual description of the syntax. It is, nonetheless, 858 | required. 860 It is important to note that the header fields are not guaranteed to 861 be in a particular order. They may appear in any order, and they 862 have been known to be reordered occasionally when transported over 863 the Internet. However, for the purposes of this specification, 864 header fields SHOULD NOT be reordered when a message is transported 865 or transformed. More importantly, the trace header fields and resent 866 header fields MUST NOT be reordered, and SHOULD be kept in blocks 867 prepended to the message. See sections 3.6.6 and 3.6.7 for more 868 information. 870 The only required header fields are the origination date field and 871 the originator address field(s). All other header fields are 872 syntactically optional. More information is contained in the table 873 following this definition. 875 fields = *(trace 876 *optional-field / 877 *(resent-date / 878 resent-from / 879 resent-sender / 880 resent-to / 881 resent-cc / 882 resent-bcc / 883 resent-msg-id)) 884 *(orig-date / 885 from / 886 sender / 887 reply-to / 888 to / 889 cc / 890 bcc / 891 message-id / 892 in-reply-to / 893 references / 894 subject / 895 comments / 896 keywords / 897 optional-field) 899 // Ticket #7 (https://trac.ietf.org/trac/emailcore/ticket/7) 900 // regarding the definition of trace might require updating ABNF at 901 // top. See also 3.6.7. 903 // Should there be a 1 in front of the resent fields as per erratum 904 // 2950 (https://www.rfc-editor.org/errata/eid2950), ticket #39 905 // (https://trac.ietf.org/trac/emailcore/ticket/39)? 907 The following table indicates limits on the number of times each 908 field may occur in the header section of a message as well as any 909 special limitations on the use of those fields. An asterisk ("*") 910 next to a value in the minimum or maximum column indicates that a 911 special restriction appears in the Notes column. 913 +================+========+============+==========================+ 914 | Field | Min | Max number | Notes | 915 | | number | | | 916 +================+========+============+==========================+ 917 | trace | 0 | unlimited | Block prepended - see | 918 | | | | 3.6.7 | 919 +----------------+--------+------------+--------------------------+ 920 | resent-date | 0* | unlimited* | One per block, required | 921 | | | | if other resent fields | 922 | | | | are present - see 3.6.6 | 923 +----------------+--------+------------+--------------------------+ 924 | resent-from | 0 | unlimited* | One per block - see | 925 | | | | 3.6.6 | 926 +----------------+--------+------------+--------------------------+ 927 | resent-sender | 0* | unlimited* | One per block, MUST | 928 | | | | occur with multi-address | 929 | | | | resent-from - see 3.6.6 | 930 +----------------+--------+------------+--------------------------+ 931 | resent-to | 0 | unlimited* | One per block - see | 932 | | | | 3.6.6 | 933 +----------------+--------+------------+--------------------------+ 934 | resent-cc | 0 | unlimited* | One per block - see | 935 | | | | 3.6.6 | 936 +----------------+--------+------------+--------------------------+ 937 | resent-bcc | 0 | unlimited* | One per block - see | 938 | | | | 3.6.6 | 939 +----------------+--------+------------+--------------------------+ 940 | resent-msg-id | 0 | unlimited* | One per block - see | 941 | | | | 3.6.6 | 942 +----------------+--------+------------+--------------------------+ 943 | orig-date | 1 | 1 | | 944 +----------------+--------+------------+--------------------------+ 945 | from | 1 | 1 | See sender and 3.6.2 | 946 +----------------+--------+------------+--------------------------+ 947 | sender | 0* | 1 | MUST occur with multi- | 948 | | | | address from - see 3.6.2 | 949 +----------------+--------+------------+--------------------------+ 950 | reply-to | 0 | 1 | | 951 +----------------+--------+------------+--------------------------+ 952 | to | 0 | 1 | | 953 +----------------+--------+------------+--------------------------+ 954 | cc | 0 | 1 | | 955 +----------------+--------+------------+--------------------------+ 956 | bcc | 0 | 1 | | 957 +----------------+--------+------------+--------------------------+ 958 | message-id | 0* | 1 | SHOULD be present - see | 959 | | | | 3.6.4 | 960 +----------------+--------+------------+--------------------------+ 961 | in-reply-to | 0* | 1 | SHOULD occur in some | 962 | | | | replies - see 3.6.4 | 963 +----------------+--------+------------+--------------------------+ 964 | references | 0* | 1 | SHOULD occur in some | 965 | | | | replies - see 3.6.4 | 966 +----------------+--------+------------+--------------------------+ 967 | subject | 0 | 1 | | 968 +----------------+--------+------------+--------------------------+ 969 | comments | 0 | unlimited | | 970 +----------------+--------+------------+--------------------------+ 971 | keywords | 0 | unlimited | | 972 +----------------+--------+------------+--------------------------+ 973 | optional-field | 0 | unlimited | | 974 +----------------+--------+------------+--------------------------+ 976 Table 1 978 The exact interpretation of each field is described in subsequent 979 sections. 981 3.6.1. The Origination Date Field 983 The origination date field consists of the field name "Date" followed 984 by a date-time specification. 986 orig-date = "Date:" date-time CRLF 988 The origination date specifies the date and time at which the creator 989 of the message indicated that the message was complete and ready to 990 enter the mail delivery system. For instance, this might be the time 991 that a user pushes the "send" or "submit" button in an application 992 program. In any case, it is specifically not intended to convey the 993 time that the message is actually transported, but rather the time at 994 which the human or other creator of the message has put the message 995 into its final form, ready for transport. (For example, a portable 996 computer user who is not connected to a network might queue a message 997 for delivery. The origination date is intended to contain the date 998 and time that the user queued the message, not the time when the user 999 connected to the network to send the message.) 1001 3.6.2. Originator Fields 1003 The originator fields of a message consist of the from field, the 1004 sender field (when applicable), and optionally the reply-to field. 1005 The from field consists of the field name "From" and a comma- 1006 separated list of one or more mailbox specifications. If the from 1007 field contains more than one mailbox specification in the mailbox- 1008 list, then the sender field, containing the field name "Sender" and a 1009 single mailbox specification, MUST appear in the message. In either 1010 case, an optional reply-to field MAY also be included, which contains 1011 the field name "Reply-To" and a comma-separated list of one or more 1012 addresses. 1014 from = "From:" mailbox-list CRLF 1016 sender = "Sender:" mailbox CRLF 1018 reply-to = "Reply-To:" address-list CRLF 1020 The originator fields indicate the mailbox(es) of the source of the 1021 message. The "From:" field specifies the author(s) of the message, 1022 that is, the mailbox(es) of the person(s) or system(s) responsible 1023 for the writing of the message. The "Sender:" field specifies the 1024 mailbox of the agent responsible for the actual transmission of the 1025 message. For example, if a secretary were to send a message for 1026 another person, the mailbox of the secretary would appear in the 1027 "Sender:" field and the mailbox of the actual author would appear in 1028 the "From:" field. If the originator of the message can be indicated 1029 by a single mailbox and the author and transmitter are identical, the 1030 "Sender:" field SHOULD NOT be used. Otherwise, both fields SHOULD 1031 appear. 1033 | Note: The transmitter information is always present. The 1034 | absence of the "Sender:" field is sometimes mistakenly taken to 1035 | mean that the agent responsible for transmission of the message 1036 | has not been specified. This absence merely means that the 1037 | transmitter is identical to the author and is therefore not 1038 | redundantly placed into the "Sender:" field. 1040 The originator fields also provide the information required when 1041 replying to a message. When the "Reply-To:" field is present, it 1042 indicates the address(es) to which the author of the message suggests 1043 that replies be sent. In the absence of the "Reply-To:" field, 1044 replies SHOULD by default be sent to the mailbox(es) specified in the 1045 "From:" field unless otherwise specified by the person composing the 1046 reply. 1048 In all cases, the "From:" field SHOULD NOT contain any mailbox that 1049 does not belong to the author(s) of the message. See also section 1050 3.6.3 for more information on forming the destination addresses for a 1051 reply. 1053 3.6.3. Destination Address Fields 1055 The destination fields of a message consist of three possible fields, 1056 each of the same form: the field name, which is either "To", "Cc", or 1057 "Bcc", followed by a comma-separated list of one or more addresses 1058 (either mailbox or group syntax). 1060 to = "To:" address-list CRLF 1062 cc = "Cc:" address-list CRLF 1064 bcc = "Bcc:" [address-list / CFWS] CRLF 1066 The destination fields specify the recipients of the message. Each 1067 destination field may have one or more addresses, and the addresses 1068 indicate the intended recipients of the message. The only difference 1069 between the three fields is how each is used. 1071 The "To:" field contains the address(es) of the primary recipient(s) 1072 of the message. 1074 The "Cc:" field (where the "Cc" means "Carbon Copy" in the sense of 1075 making a copy on a typewriter using carbon paper) contains the 1076 addresses of others who are to receive the message, though the 1077 content of the message may not be directed at them. 1079 The "Bcc:" field (where the "Bcc" means "Blind Carbon Copy") contains 1080 addresses of recipients of the message whose addresses are not to be 1081 revealed to other recipients of the message. There are three ways in 1082 which the "Bcc:" field is used. In the first case, when a message 1083 containing a "Bcc:" field is prepared to be sent, the "Bcc:" line is 1084 removed even though all of the recipients (including those specified 1085 in the "Bcc:" field) are sent a copy of the message. In the second 1086 case, recipients specified in the "To:" and "Cc:" lines each are sent 1087 a copy of the message with the "Bcc:" line removed as above, but the 1088 recipients on the "Bcc:" line get a separate copy of the message 1089 containing a "Bcc:" line. (When there are multiple recipient 1090 addresses in the "Bcc:" field, some implementations actually send a 1091 separate copy of the message to each recipient with a "Bcc:" 1092 containing only the address of that particular recipient.) Finally, 1093 since a "Bcc:" field may contain no addresses, a "Bcc:" field can be 1094 used without any addresses indicating to the recipients that blind 1095 copies were sent to someone. Which method to use with "Bcc:" fields 1096 is implementation dependent, but refer to the "Security 1097 Considerations" section of this document for a discussion of each. 1099 When a message is a reply to another message, the mailboxes of the 1100 authors of the original message (the mailboxes in the "From:" field) 1101 or mailboxes specified in the "Reply-To:" field (if it exists) MAY 1102 appear in the "To:" field of the reply since these would normally be 1103 the primary recipients of the reply. If a reply is sent to a message 1104 that has destination fields, it is often desirable to send a copy of 1105 the reply to all of the recipients of the message, in addition to the 1106 author. When such a reply is formed, addresses in the "To:" and 1107 "Cc:" fields of the original message MAY appear in the "Cc:" field of 1108 the reply, since these are normally secondary recipients of the 1109 reply. If a "Bcc:" field is present in the original message, 1110 addresses in that field MAY appear in the "Bcc:" field of the reply, 1111 but they SHOULD NOT appear in the "To:" or "Cc:" fields. 1113 | Note: Some mail applications have automatic reply commands that 1114 | include the destination addresses of the original message in 1115 | the destination addresses of the reply. How those reply 1116 | commands behave is implementation dependent and is beyond the 1117 | scope of this document. In particular, whether or not to 1118 | include the original destination addresses when the original 1119 | message had a "Reply-To:" field is not addressed here. 1121 3.6.4. Identification Fields 1123 Though listed as optional in the table (Table 1) in section 3.6, 1124 every message SHOULD have a "Message-ID:" field. Furthermore, reply 1125 messages SHOULD have "In-Reply-To:" and "References:" fields as 1126 appropriate and as described below. 1128 The "Message-ID:" field contains a single unique message identifier. 1129 The "References:" and "In-Reply-To:" fields each contain one or more 1130 unique message identifiers, optionally separated by CFWS. 1132 The message identifier (msg-id) syntax is a limited version of the 1133 addr-spec construct enclosed in the angle bracket characters, "<" and 1134 ">". Unlike addr-spec, this syntax only permits the dot-atom-text 1135 form on the left-hand side of the "@" and does not have internal CFWS 1136 anywhere in the message identifier. 1138 | Note: As with addr-spec, a liberal syntax is given for the 1139 | right-hand side of the "@" in a msg-id. However, later in this 1140 | section, the use of a domain for the right-hand side of the "@" 1141 | is RECOMMENDED. Again, the syntax of domain constructs is 1142 | specified by and used in other protocols (e.g., [STD13], 1143 | [RFC1123], [I-D.ietf-emailcore-rfc5321bis]). It is therefore 1144 | incumbent upon implementations to conform to the syntax of 1145 | addresses for the context in which they are used. 1147 message-id = "Message-ID:" msg-id CRLF 1149 in-reply-to = "In-Reply-To:" 1*msg-id CRLF 1151 references = "References:" 1*msg-id CRLF 1153 msg-id = [CFWS] "<" msg-id-internal ">" [CFWS] 1155 msg-id-internal = id-left "@" id-right 1157 id-left = dot-atom-text / obs-id-left 1159 id-right = dot-atom-text / no-fold-literal / obs-id-right 1161 no-fold-literal = "[" *dtext "]" 1163 The "Message-ID:" field provides a unique message identifier that 1164 refers to a particular version of a particular message. The 1165 uniqueness of the message identifier is guaranteed by the host that 1166 generates it (see below). This message identifier is intended to be 1167 machine readable and not necessarily meaningful to humans. A message 1168 identifier pertains to exactly one version of a particular message; 1169 subsequent revisions to the message each receive new message 1170 identifiers. 1172 | Note: There are many instances when messages are "changed", but 1173 | those changes do not constitute a new instantiation of that 1174 | message, and therefore the message would not get a new message 1175 | identifier. For example, when messages are introduced into the 1176 | transport system, they are often prepended with additional 1177 | header fields such as trace fields (described in section 3.6.7) 1178 | and resent fields (described in section 3.6.6). The addition 1179 | of such header fields does not change the identity of the 1180 | message and therefore the original "Message-ID:" field is 1181 | retained. In all cases, it is the meaning that the sender of 1182 | the message wishes to convey (i.e., whether this is the same 1183 | message or a different message) that determines whether or not 1184 | the "Message-ID:" field changes, not any particular syntactic 1185 | difference that appears (or does not appear) in the message. 1187 The "In-Reply-To:" and "References:" fields are used when creating a 1188 reply to a message. They hold the message identifier of the original 1189 message and the message identifiers of other messages (for example, 1190 in the case of a reply to a message that was itself a reply). The 1191 "In-Reply-To:" field may be used to identify the message (or 1192 messages) to which the new message is a reply, while the 1193 "References:" field may be used to identify a "thread" of 1194 conversation. 1196 When creating a reply to a message, the "In-Reply-To:" and 1197 "References:" fields of the resultant message are constructed as 1198 follows: 1200 The "In-Reply-To:" field will contain the contents of the "Message- 1201 ID:" field of the message to which this one is a reply (the "parent 1202 message"). If there is more than one parent message, then the "In- 1203 Reply-To:" field will contain the contents of all of the parents' 1204 "Message-ID:" fields. If there is no "Message-ID:" field in any of 1205 the parent messages, then the new message will have no "In-Reply-To:" 1206 field. 1208 The "References:" field will contain the contents of the parent's 1209 "References:" field (if any) followed by the contents of the parent's 1210 "Message-ID:" field (if any). If the parent message does not contain 1211 a "References:" field but does have an "In-Reply-To:" field 1212 containing a single message identifier, then the "References:" field 1213 will contain the contents of the parent's "In-Reply-To:" field 1214 followed by the contents of the parent's "Message-ID:" field (if 1215 any). If the parent has none of the "References:", "In-Reply-To:", 1216 or "Message-ID:" fields, then the new message will have no 1217 "References:" field. 1219 | Note: Some implementations parse the "References:" field to 1220 | display the "thread of the discussion". These implementations 1221 | assume that each new message is a reply to a single parent and 1222 | hence that they can walk backwards through the "References:" 1223 | field to find the parent of each message listed there. 1224 | Therefore, trying to form a "References:" field for a reply 1225 | that has multiple parents is discouraged; how to do so is not 1226 | defined in this document. 1228 The message identifier (msg-id) itself MUST be a globally unique 1229 identifier for a message. The generator of the message identifier 1230 MUST guarantee that the msg-id is unique. There are several 1231 algorithms that can be used to accomplish this. Since the msg-id has 1232 a similar syntax to addr-spec (identical except that quoted strings, 1233 comments, and folding white space are not allowed), a good method is 1234 to put the domain name (or a domain literal IP address) of the host 1235 on which the message identifier was created on the right-hand side of 1236 the "@" (since domain names and IP addresses are normally unique), 1237 and put a combination of the current absolute date and time along 1238 with some other currently unique (perhaps sequential) identifier 1239 available on the system (for example, a process id number) on the 1240 left-hand side. Though other algorithms will work, it is RECOMMENDED 1241 that the right-hand side contain some domain identifier (either of 1242 the host itself or otherwise) such that the generator of the message 1243 identifier can guarantee the uniqueness of the left-hand side within 1244 the scope of that domain. 1246 Semantically, the angle bracket characters are not part of the msg- 1247 id; the msg-id is what is contained between the two angle bracket 1248 characters. 1250 3.6.5. Informational Fields 1252 The informational fields are all optional. The "Subject:" and 1253 "Comments:" fields are unstructured fields as defined in section 1254 2.2.1, and therefore may contain text or folding white space. The 1255 "Keywords:" field contains a comma-separated list of one or more 1256 words or quoted-strings. 1258 subject = "Subject:" unstructured CRLF 1260 comments = "Comments:" unstructured CRLF 1262 keywords = "Keywords:" phrase *("," phrase) CRLF 1263 These three fields are intended to have only human-readable content 1264 with information about the message. The "Subject:" field is the most 1265 common and contains a short string identifying the topic of the 1266 message. When used in a reply, the field body MAY start with the 1267 string "Re: " (an abbreviation of the Latin "in re", meaning "in the 1268 matter of") followed by the contents of the "Subject:" field body of 1269 the original message. If this is done, only one instance of the 1270 literal string "Re: " ought to be used since use of other strings or 1271 more than one instance can lead to undesirable consequences. The 1272 "Comments:" field contains any additional comments on the text of the 1273 body of the message. The "Keywords:" field contains a comma- 1274 separated list of important words and phrases that might be useful 1275 for the recipient. 1277 3.6.6. Resent Fields 1279 Resent fields SHOULD be added to any message that is reintroduced by 1280 a user into the transport system. A separate set of resent fields 1281 SHOULD be added each time this is done. All of the resent fields 1282 corresponding to a particular resending of the message SHOULD be 1283 grouped together. Each new set of resent fields is prepended to the 1284 message; that is, the most recent set of resent fields appears 1285 earlier in the message. No other fields in the message are changed 1286 when resent fields are added. 1288 Each of the resent fields corresponds to a particular field elsewhere 1289 in the syntax. For instance, the "Resent-Date:" field corresponds to 1290 the "Date:" field and the "Resent-To:" field corresponds to the "To:" 1291 field. In each case, the syntax for the field body is identical to 1292 the syntax given previously for the corresponding field. 1294 When resent fields are used, the "Resent-From:" and "Resent-Date:" 1295 fields MUST be present. The "Resent-Message-ID:" field SHOULD be 1296 present. "Resent-Sender:" SHOULD NOT be used if "Resent-Sender:" 1297 would be identical to "Resent-From:". 1299 resent-date = "Resent-Date:" date-time CRLF 1301 resent-from = "Resent-From:" mailbox-list CRLF 1303 resent-sender = "Resent-Sender:" mailbox CRLF 1305 resent-to = "Resent-To:" address-list CRLF 1307 resent-cc = "Resent-Cc:" address-list CRLF 1309 resent-bcc = "Resent-Bcc:" [address-list / CFWS] CRLF 1311 resent-msg-id = "Resent-Message-ID:" msg-id CRLF 1313 Resent fields are used to identify a message as having been 1314 reintroduced into the transport system by a user. The purpose of 1315 using resent fields is to have the message appear to the final 1316 recipient as if it were sent directly by the original sender, with 1317 all of the original fields remaining the same. Each set of resent 1318 fields correspond to a particular resending event. That is, if a 1319 message is resent multiple times, each set of resent fields gives 1320 identifying information for each individual time. Resent fields are 1321 strictly informational. They MUST NOT be used in the normal 1322 processing of replies or other such automatic actions on messages. 1324 | Note: Reintroducing a message into the transport system and 1325 | using resent fields is a different operation from "forwarding". 1326 | "Forwarding" has two meanings: One sense of forwarding is that 1327 | a mail reading program can be told by a user to forward a copy 1328 | of a message to another person, making the forwarded message 1329 | the body of the new message. A forwarded message in this sense 1330 | does not appear to have come from the original sender, but is 1331 | an entirely new message from the forwarder of the message. 1332 | Forwarding may also mean that a mail transport program gets a 1333 | message and forwards it on to a different destination for final 1334 | delivery. Resent header fields are not intended for use with 1335 | either type of forwarding. 1337 The resent originator fields indicate the mailbox of the person(s) or 1338 system(s) that resent the message. As with the regular originator 1339 fields, there are two forms: a simple "Resent-From:" form, which 1340 contains the mailbox of the individual doing the resending, and the 1341 more complex form, when one individual (identified in the "Resent- 1342 Sender:" field) resends a message on behalf of one or more others 1343 (identified in the "Resent-From:" field). 1345 | Note: When replying to a resent message, replies behave just as 1346 | they would with any other message, using the original "From:", 1347 | "Reply-To:", "Message-ID:", and other fields. The resent 1348 | fields are only informational and MUST NOT be used in the 1349 | normal processing of replies. 1351 The "Resent-Date:" indicates the date and time at which the resent 1352 message is dispatched by the resender of the message. Like the 1353 "Date:" field, it is not the date and time that the message was 1354 actually transported. 1356 The "Resent-To:", "Resent-Cc:", and "Resent-Bcc:" fields function 1357 identically to the "To:", "Cc:", and "Bcc:" fields, respectively, 1358 except that they indicate the recipients of the resent message, not 1359 the recipients of the original message. 1361 The "Resent-Message-ID:" field provides a unique identifier for the 1362 resent message. 1364 3.6.7. Trace Fields 1366 // The syntactic description in the first paragraph and the semantic 1367 // description in the last paragraph have been updated to indicate 1368 // that there can be other fields that are treated as trace, as per 1369 // ticket #7 (https://trac.ietf.org/trac/emailcore/ticket/7). 1370 // However, the ABNF has not yet been updated pending list consensus. 1372 The trace fields are a group of header fields consisting of an 1373 optional "Return-Path:" field, and one or more "Received:" fields or 1374 other fields (indicated by "optional-field" below) that are defined 1375 by other specifications as belonging within the trace fields 1376 grouping. The "Return-Path:" header field contains a pair of angle 1377 brackets that enclose an optional addr-spec. The "Received:" field 1378 contains a (possibly empty) list of tokens followed by a semicolon 1379 and a date- time specification. Each token must be a word, angle- 1380 addr, addr- spec, or a domain. Further restrictions are applied to 1381 the syntax of the trace fields by specifications that provide for 1382 their use, such as [I-D.ietf-emailcore-rfc5321bis]. 1384 trace = [return] 1385 1*received 1387 return = "Return-Path:" path CRLF 1389 path = angle-addr / ([CFWS] "<" [CFWS] ">" [CFWS]) 1391 received = "Received:" 1392 [1*received-token / CFWS] ";" date-time CRLF 1394 received-token = word / angle-addr / addr-spec / domain 1396 The trace fields document actions taken as a message moves through 1397 the transport system. A full discussion of the Internet mail use of 1398 the "Return-Path:" and "Received:" trace fields is contained in 1399 [I-D.ietf-emailcore-rfc5321bis]; other specifications describe the 1400 use of other fields that are to be interpreted as trace fields. For 1401 the purposes of this specification, the trace fields are strictly 1402 informational, and any formal interpretation of them is outside of 1403 the scope of this document. 1405 3.6.8. Optional Fields 1407 Fields may appear in messages that are otherwise unspecified in this 1408 document. They MUST conform to the syntax of an optional-field. 1409 This is a field name, made up of the visible US-ASCII characters 1410 except colon, followed by a colon, followed by any text that conforms 1411 to the unstructured syntax. 1413 The field names of any optional field MUST NOT be identical to any 1414 field name specified elsewhere in this document. 1416 optional-field = field-name ":" unstructured CRLF 1418 field-name = 1*ftext ; Limit to 77 characters to 1419 ; stay within 78 char-per- 1420 ; line recommendation 1422 ftext = %d33-57 / ; Visible US-ASCII 1423 %d59-126 ; characters not including 1424 ; ":". 1426 For the purposes of this specification, any optional field is 1427 uninterpreted. 1429 4. Obsolete Syntax 1431 Earlier versions of this specification allowed for different (usually 1432 more liberal) syntax than is allowed in this version. Also, there 1433 have been syntactic elements used in messages on the Internet whose 1434 interpretations have never been documented. Though these syntactic 1435 forms MUST NOT be generated according to the grammar in section 3, 1436 they MUST be accepted and parsed by a conformant receiver. This 1437 section documents many of these syntactic elements. Taking the 1438 grammar in section 3 and adding the definitions presented in this 1439 section will result in the grammar to use for the interpretation of 1440 messages. 1442 | Note: This section identifies syntactic forms that any 1443 | implementation MUST reasonably interpret. However, there are 1444 | certainly Internet messages that do not conform to even the 1445 | additional syntax given in this section. The fact that a 1446 | particular form does not appear in any section of this document 1447 | is not justification for computer programs to crash or for 1448 | malformed data to be irretrievably lost by any implementation. 1449 | It is up to the implementation to deal with messages robustly. 1451 One important difference between the obsolete (interpreting) and the 1452 current (generating) syntax is that in structured header field bodies 1453 (i.e., between the colon and the CRLF of any structured header 1454 field), white space characters, including folding white space, and 1455 comments could be freely inserted between any syntactic tokens. This 1456 allowed many complex forms that have proven difficult for some 1457 implementations to parse. 1459 Another key difference between the obsolete and the current syntax is 1460 that the rule in section 3.2.2 regarding lines composed entirely of 1461 white space in comments and folding white space does not apply. See 1462 the discussion of folding white space in section 4.2 below. 1464 Finally, certain characters that were formerly allowed in messages 1465 appear in this section. The NUL character (ASCII value 0) was once 1466 allowed, but is no longer for compatibility reasons. Similarly, US- 1467 ASCII control characters other than CR, LF, SP, and HTAB (ASCII 1468 values 1 through 8, 11, 12, 14 through 31, and 127) were allowed to 1469 appear in header field bodies. CR and LF were allowed to appear in 1470 messages other than as CRLF; this use is also shown here. 1472 Other differences in syntax and semantics are noted in the following 1473 sections. 1475 4.1. Miscellaneous Obsolete Tokens 1477 These syntactic elements are used elsewhere in the obsolete syntax or 1478 in the main syntax. Bare CR, bare LF, and NUL are added to obs-qp, 1479 obs-body, and obs-unstruct. US-ASCII control characters are added to 1480 obs-qp, obs-unstruct, obs-ctext, and obs-qtext. The period character 1481 is added to obs-phrase. The obs-phrase-list provides for a 1482 (potentially empty) comma-separated list of phrases that may include 1483 "null" elements. That is, there could be two or more commas in such 1484 a list with nothing in between them, or commas at the beginning or 1485 end of the list. 1487 | Note: The "period" (or "full stop") character (".") in obs- 1488 | phrase is not a form that was allowed in earlier versions of 1489 | this or any other specification. Period (nor any other 1490 | character from specials) was not allowed in phrase because it 1491 | introduced a parsing difficulty distinguishing between phrases 1492 | and portions of an addr-spec (see section 4.4). It appears 1493 | here because the period character is currently used in many 1494 | messages in the display-name portion of addresses, especially 1495 | for initials in names, and therefore must be interpreted 1496 | properly. 1498 obs-NO-WS-CTL = %d1-8 / ; US-ASCII control 1499 %d11 / ; characters that do not 1500 %d12 / ; include the carriage 1501 %d14-31 / ; return, line feed, and 1502 %d127 ; white space characters 1504 obs-ctext = obs-NO-WS-CTL 1506 obs-qtext = obs-NO-WS-CTL 1508 obs-utext = %d0 / obs-NO-WS-CTL / VCHAR 1510 obs-qp = "\" (%d0 / obs-NO-WS-CTL / LF / CR) 1512 obs-body = *(%d0 / LF / CR / text) 1514 obs-unstruct = *((*CR 1*(obs-utext / FWS)) / 1*LF) *CR 1516 obs-phrase = word *(word / "." / CFWS) 1518 obs-phrase-list = [phrase / CFWS] *("," [phrase / CFWS]) 1519 Bare CR and bare LF appear in messages with two different meanings. 1520 In many cases, bare CR or bare LF are used improperly instead of CRLF 1521 to indicate line separators. In other cases, bare CR and bare LF are 1522 used simply as US-ASCII control characters with their traditional 1523 ASCII meanings. 1525 4.2. Obsolete Folding White Space 1527 In the obsolete syntax, any amount of folding white space MAY be 1528 inserted where the obs-FWS rule is allowed. This creates the 1529 possibility of having two consecutive "folds" in a line, and 1530 therefore the possibility that a line which makes up a folded header 1531 field could be composed entirely of white space. 1533 obs-FWS = 1*([CRLF] WSP) 1535 4.3. Obsolete Date and Time 1537 The syntax for the obsolete date format allows a 2 digit year in the 1538 date field and allows for a list of alphabetic time zone specifiers 1539 that were used in earlier versions of this specification. It also 1540 permits comments and folding white space between many of the tokens. 1542 obs-day-of-week = [CFWS] day-name [CFWS] 1544 obs-day = [CFWS] 1*2DIGIT [CFWS] 1546 obs-year = [CFWS] 2*DIGIT [CFWS] 1548 obs-hour = [CFWS] 2DIGIT [CFWS] 1550 obs-minute = [CFWS] 2DIGIT [CFWS] 1552 obs-second = [CFWS] 2DIGIT [CFWS] 1554 obs-zone = "UT" / "GMT" / ; Universal Time 1555 ; North American UT 1556 ; offsets 1557 "EST" / "EDT" / ; Eastern: - 5/ - 4 1558 "CST" / "CDT" / ; Central: - 6/ - 5 1559 "MST" / "MDT" / ; Mountain: - 7/ - 6 1560 "PST" / "PDT" / ; Pacific: - 8/ - 7 1561 ; 1562 %d65-73 / ; Military zones - "A" 1563 %d75-90 / ; through "I" and "K" 1564 %d97-105 / ; through "Z", both 1565 %d107-122 ; upper and lower case 1567 Where a two or three digit year occurs in a date, the year is to be 1568 interpreted as follows: If a two digit year is encountered whose 1569 value is between 00 and 49, the year is interpreted by adding 2000, 1570 ending up with a value between 2000 and 2049. If a two digit year is 1571 encountered with a value between 50 and 99, or any three digit year 1572 is encountered, the year is interpreted by adding 1900. 1574 In the obsolete time zone, "UT" and "GMT" are indications of 1575 "Universal Time" and "Greenwich Mean Time", respectively, and are 1576 both semantically identical to "+0000". 1578 The remaining three character zones are the US time zones. The first 1579 letter, "E", "C", "M", or "P" stands for "Eastern", "Central", 1580 "Mountain", and "Pacific". The second letter is either "S" for 1581 "Standard" time, or "D" for "Daylight" (daylight saving or summer) 1582 time. Their interpretations are as follows: 1584 EDT is semantically equivalent to -0400 1585 EST is semantically equivalent to -0500 1586 CDT is semantically equivalent to -0500 1587 CST is semantically equivalent to -0600 1588 MDT is semantically equivalent to -0600 1589 MST is semantically equivalent to -0700 1590 PDT is semantically equivalent to -0700 1591 PST is semantically equivalent to -0800 1593 The 1 character military time zones were defined in a non-standard 1594 way in [RFC0822] and are therefore unpredictable in their meaning. 1595 The original definitions of the military zones "A" through "I" are 1596 equivalent to "+0100" through "+0900", respectively; "K", "L", and 1597 "M" are equivalent to "+1000", "+1100", and "+1200", respectively; 1598 "N" through "Y" are equivalent to "-0100" through "-1200". 1599 respectively; and "Z" is equivalent to "+0000". However, because of 1600 the error in [RFC0822], they SHOULD all be considered equivalent to 1601 "-0000" unless there is out-of-band information confirming their 1602 meaning. 1604 Other multi-character (usually between 3 and 5) alphabetic time zones 1605 have been used in Internet messages. Any such time zone whose 1606 meaning is not known SHOULD be considered equivalent to "-0000" 1607 unless there is out-of-band information confirming their meaning. 1609 4.4. Obsolete Addressing 1611 There are four primary differences in addressing. First, mailbox 1612 addresses were allowed to have a route portion before the addr-spec 1613 when enclosed in "<" and ">". The route is simply a comma-separated 1614 list of domain names, each preceded by "@", and the list terminated 1615 by a colon. Second, CFWS were allowed between the period-separated 1616 elements of local-part and domain (i.e., dot-atom was not used). In 1617 addition, local-part is allowed to contain quoted-string in addition 1618 to just atom. Third, mailbox-list and address-list were allowed to 1619 have "null" members. That is, there could be two or more commas in 1620 such a list with nothing in between them, or commas at the beginning 1621 or end of the list. Finally, US-ASCII control characters and quoted- 1622 pairs were allowed in domain literals and are added here. 1624 obs-angle-addr = [CFWS] "<" obs-route addr-spec ">" [CFWS] 1626 obs-route = obs-domain-list ":" 1628 obs-domain-list = *(CFWS / ",") "@" domain 1629 *("," [CFWS] ["@" domain]) 1631 obs-mbox-list = *([CFWS] ",") mailbox *("," [mailbox / CFWS]) 1633 obs-addr-list = *([CFWS] ",") address *("," [address / CFWS]) 1635 obs-group-list = 1*([CFWS] ",") [CFWS] 1637 obs-local-part = word *("." word) 1639 obs-domain = atom *("." atom) 1641 obs-dtext = obs-NO-WS-CTL / quoted-pair 1643 When interpreting addresses, the route portion SHOULD be ignored. 1645 4.5. Obsolete Header Fields 1647 Syntactically, the primary difference in the obsolete field syntax is 1648 that it allows multiple occurrences of any of the fields and they may 1649 occur in any order. Also, any amount of white space is allowed 1650 before the ":" at the end of the field name. 1652 obs-fields = *(obs-return / 1653 obs-received / 1654 obs-orig-date / 1655 obs-from / 1656 obs-sender / 1657 obs-reply-to / 1658 obs-to / 1659 obs-cc / 1660 obs-bcc / 1661 obs-message-id / 1662 obs-in-reply-to / 1663 obs-references / 1664 obs-subject / 1665 obs-comments / 1666 obs-keywords / 1667 obs-resent-date / 1668 obs-resent-from / 1669 obs-resent-send / 1670 obs-resent-rply / 1671 obs-resent-to / 1672 obs-resent-cc / 1673 obs-resent-bcc / 1674 obs-resent-mid / 1675 obs-optional) 1677 Except for destination address fields (described in section 4.5.3), 1678 the interpretation of multiple occurrences of fields is unspecified. 1679 Also, the interpretation of trace fields and resent fields that do 1680 not occur in blocks prepended to the message is unspecified as well. 1681 Unless otherwise noted in the following sections, interpretation of 1682 other fields is identical to the interpretation of their non-obsolete 1683 counterparts in section 3. 1685 4.5.1. Obsolete Origination Date Field 1687 obs-orig-date = "Date" *WSP ":" date-time CRLF 1689 4.5.2. Obsolete Originator Fields 1691 obs-from = "From" *WSP ":" mailbox-list CRLF 1693 obs-sender = "Sender" *WSP ":" mailbox CRLF 1695 obs-reply-to = "Reply-To" *WSP ":" address-list CRLF 1697 4.5.3. Obsolete Destination Address Fields 1698 obs-to = "To" *WSP ":" address-list CRLF 1700 obs-cc = "Cc" *WSP ":" address-list CRLF 1702 obs-bcc = "Bcc" *WSP ":" 1703 (address-list / (*([CFWS] ",") [CFWS])) CRLF 1705 When multiple occurrences of destination address fields occur in a 1706 message, they SHOULD be treated as if the address list in the first 1707 occurrence of the field is combined with the address lists of the 1708 subsequent occurrences by adding a comma and concatenating. 1710 4.5.4. Obsolete Identification Fields 1712 The obsolete "In-Reply-To:" and "References:" fields differ from the 1713 current syntax in that they allow phrase (words or quoted strings) to 1714 appear. The obsolete forms of the left and right sides of msg-id 1715 allow interspersed CFWS, making them syntactically identical to 1716 local-part and domain, respectively. 1718 obs-message-id = "Message-ID" *WSP ":" msg-id CRLF 1720 obs-in-reply-to = "In-Reply-To" *WSP ":" *(phrase / msg-id) CRLF 1722 obs-references = "References" *WSP ":" *(phrase / msg-id) CRLF 1724 obs-id-left = local-part 1726 obs-id-right = domain 1728 For purposes of interpretation, the phrases in the "In-Reply-To:" and 1729 "References:" fields are ignored. 1731 Semantically, none of the optional CFWS in the local-part and the 1732 domain is part of the obs-id-left and obs-id-right, respectively. 1734 4.5.5. Obsolete Informational Fields 1736 obs-subject = "Subject" *WSP ":" unstructured CRLF 1738 obs-comments = "Comments" *WSP ":" unstructured CRLF 1740 obs-keywords = "Keywords" *WSP ":" obs-phrase-list CRLF 1742 4.5.6. Obsolete Resent Fields 1744 The obsolete syntax adds a "Resent-Reply-To:" field, which consists 1745 of the field name, the optional comments and folding white space, the 1746 colon, and a comma separated list of addresses. 1748 obs-resent-from = "Resent-From" *WSP ":" mailbox-list CRLF 1750 obs-resent-send = "Resent-Sender" *WSP ":" mailbox CRLF 1752 obs-resent-date = "Resent-Date" *WSP ":" date-time CRLF 1754 obs-resent-to = "Resent-To" *WSP ":" address-list CRLF 1756 obs-resent-cc = "Resent-Cc" *WSP ":" address-list CRLF 1758 obs-resent-bcc = "Resent-Bcc" *WSP ":" 1759 (address-list / (*([CFWS] ",") [CFWS])) CRLF 1761 obs-resent-mid = "Resent-Message-ID" *WSP ":" msg-id CRLF 1763 obs-resent-rply = "Resent-Reply-To" *WSP ":" address-list CRLF 1765 As with other resent fields, the "Resent-Reply-To:" field is to be 1766 treated as informational only. 1768 4.5.7. Obsolete Trace Fields 1770 The obs-return and obs-received are again given here as template 1771 definitions, just as return and received are in section 3. Their 1772 full syntax is given in [I-D.ietf-emailcore-rfc5321bis]. 1774 obs-return = "Return-Path" *WSP ":" path CRLF 1776 obs-received = "Received" *WSP ":" 1777 [1*received-token / CFWS] [ ";" date-time CRLF ] 1779 4.5.8. Obsolete optional fields 1781 obs-optional = field-name *WSP ":" unstructured CRLF 1783 5. Security Considerations 1785 Care needs to be taken when displaying messages on a terminal or 1786 terminal emulator. Powerful terminals may act on escape sequences 1787 and other combinations of US-ASCII control characters with a variety 1788 of consequences. They can remap the keyboard or permit other 1789 modifications to the terminal that could lead to denial of service or 1790 even damaged data. They can trigger (sometimes programmable) 1791 answerback messages that can allow a message to cause commands to be 1792 issued on the recipient's behalf. They can also affect the operation 1793 of terminal attached devices such as printers. Message viewers may 1794 wish to strip potentially dangerous terminal escape sequences from 1795 the message prior to display. However, other escape sequences appear 1796 in messages for useful purposes (cf. [ISO.2022.1994], [RFC2045], 1797 [RFC2046], [RFC2047], [RFC2049], [BCP13]) and therefore should not be 1798 stripped indiscriminately. 1800 Transmission of non-text objects in messages raises additional 1801 security issues. These issues are discussed in [RFC2045], [RFC2046], 1802 [RFC2047], [RFC2049], [BCP13]. 1804 Many implementations use the "Bcc:" (blind carbon copy) field, 1805 described in section 3.6.3, to facilitate sending messages to 1806 recipients without revealing the addresses of one or more of the 1807 addressees to the other recipients. Mishandling this use of "Bcc:" 1808 may disclose confidential information that could eventually lead to 1809 security problems through knowledge of even the existence of a 1810 particular mail address. For example, if using the first method 1811 described in section 3.6.3, where the "Bcc:" line is removed from the 1812 message, blind recipients have no explicit indication that they have 1813 been sent a blind copy, except insofar as their address does not 1814 appear in the header section of a message. Because of this, one of 1815 the blind addressees could potentially send a reply to all of the 1816 shown recipients and accidentally reveal that the message went to the 1817 blind recipient. When the second method from section 3.6.3 is used, 1818 the blind recipient's address appears in the "Bcc:" field of a 1819 separate copy of the message. If the "Bcc:" field contains all of 1820 the blind addressees, all of the "Bcc:" recipients will be seen by 1821 each "Bcc:" recipient. Even if a separate message is sent to each 1822 "Bcc:" recipient with only the individual's address, implementations 1823 still need to be careful to process replies to the message as per 1824 section 3.6.3 so as not to accidentally reveal the blind recipient to 1825 other recipients. 1827 6. IANA Considerations 1829 This document updates the registrations that appeared in [RFC4021] 1830 that referred to the definitions in [RFC2822]. IANA is requested to 1831 update the Permanent Message Header Field Repository with the 1832 following header fields, in accordance with the procedures set out in 1833 [RFC3864]. 1835 Header field name Date 1836 Applicable protocol Mail 1837 Status standard 1838 Author/Change controller IETF 1839 Specification document(s) This document (section 3.6.1) 1841 Header field name From 1842 Applicable protocol Mail 1843 Status standard 1844 Author/Change controller IETF 1845 Specification document(s) This document (section 3.6.2) 1847 Header field name Sender 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 Reply-To 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 To 1860 Applicable protocol Mail 1861 Status standard 1862 Author/Change controller IETF 1863 Specification document(s) This document (section 3.6.3) 1865 Header field name Cc 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 Bcc 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 Message-ID 1878 Applicable protocol Mail 1879 Status standard 1880 Author/Change controller IETF 1881 Specification document(s) This document (section 3.6.4) 1883 Header field name In-Reply-To 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 References 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 Subject 1896 Applicable protocol Mail 1897 Status standard 1898 Author/Change controller IETF 1899 Specification document(s) This document (section 3.6.5) 1901 Header field name Comments 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 Keywords 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 Resent-Date 1914 Applicable protocol Mail 1915 Status standard 1916 Author/Change controller IETF 1917 Specification document(s) This document (section 3.6.6) 1919 Header field name Resent-From 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-Sender 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-To 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-Cc 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-Bcc 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-Reply-To 1950 Applicable protocol Mail 1951 Status obsolete 1952 Author/Change controller IETF 1953 Specification document(s) This document (section 4.5.6) 1955 Header field name Resent-Message-ID 1956 Applicable protocol Mail 1957 Status standard 1958 Author/Change controller IETF 1959 Specification document(s) This document (section 3.6.6) 1961 Header field name Return-Path 1962 Applicable protocol Mail 1963 Status standard 1964 Author/Change controller IETF 1965 Specification document(s) This document (section 3.6.7) 1967 Header field name Received 1968 Applicable protocol Mail 1969 Status standard 1970 Author/Change controller IETF 1971 Specification document(s) This document (section 3.6.7) 1972 Related information [I-D.ietf-emailcore-rfc5321bis] 1974 7. References 1976 7.1. Normative References 1978 [ANSI.X3-4.1986] 1979 American National Standards Institute, "Coded Character 1980 Set - 7-bit American Standard Code for Information 1981 Interchange", ANSI X3.4, 1986. 1983 [BCP14] Bradner, S., "Key words for use in RFCs to Indicate 1984 Requirement Levels", BCP 14, RFC 2119, March 1997. 1986 Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 1987 2119 Key Words", BCP 14, RFC 8174, May 2017. 1989 1991 [RFC1123] Braden, R., Ed., "Requirements for Internet Hosts - 1992 Application and Support", STD 3, RFC 1123, 1993 DOI 10.17487/RFC1123, October 1989, 1994 . 1996 [STD13] Mockapetris, P., "Domain names - concepts and facilities", 1997 STD 13, RFC 1034, November 1987. 1999 Mockapetris, P., "Domain names - implementation and 2000 specification", STD 13, RFC 1035, November 1987. 2002 2004 [STD68] Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax 2005 Specifications: ABNF", STD 68, RFC 5234, January 2008. 2007 2009 7.2. Informative References 2011 [BCP13] Freed, N. and J. Klensin, "Multipurpose Internet Mail 2012 Extensions (MIME) Part Four: Registration Procedures", 2013 BCP 13, RFC 4289, December 2005. 2015 Freed, N., Klensin, J., and T. Hansen, "Media Type 2016 Specifications and Registration Procedures", BCP 13, 2017 RFC 6838, January 2013. 2019 2021 [ISO.2022.1994] 2022 International Organization for Standardization, 2023 "Information technology - Character code structure and 2024 extension techniques", ISO Standard 2022, 1994. 2026 [RFC0822] Crocker, D., "STANDARD FOR THE FORMAT OF ARPA INTERNET 2027 TEXT MESSAGES", STD 11, RFC 822, DOI 10.17487/RFC0822, 2028 August 1982, . 2030 [RFC2045] Freed, N. and N. Borenstein, "Multipurpose Internet Mail 2031 Extensions (MIME) Part One: Format of Internet Message 2032 Bodies", RFC 2045, DOI 10.17487/RFC2045, November 1996, 2033 . 2035 [RFC2046] Freed, N. and N. Borenstein, "Multipurpose Internet Mail 2036 Extensions (MIME) Part Two: Media Types", RFC 2046, 2037 DOI 10.17487/RFC2046, November 1996, 2038 . 2040 [RFC2047] Moore, K., "MIME (Multipurpose Internet Mail Extensions) 2041 Part Three: Message Header Extensions for Non-ASCII Text", 2042 RFC 2047, DOI 10.17487/RFC2047, November 1996, 2043 . 2045 [RFC2049] Freed, N. and N. Borenstein, "Multipurpose Internet Mail 2046 Extensions (MIME) Part Five: Conformance Criteria and 2047 Examples", RFC 2049, DOI 10.17487/RFC2049, November 1996, 2048 . 2050 [RFC2822] Resnick, P., Ed., "Internet Message Format", RFC 2822, 2051 DOI 10.17487/RFC2822, April 2001, 2052 . 2054 [RFC3339] Klyne, G. and C. Newman, "Date and Time on the Internet: 2055 Timestamps", RFC 3339, DOI 10.17487/RFC3339, July 2002, 2056 . 2058 [RFC3864] Klyne, G., Nottingham, M., and J. Mogul, "Registration 2059 Procedures for Message Header Fields", BCP 90, RFC 3864, 2060 DOI 10.17487/RFC3864, September 2004, 2061 . 2063 [RFC4021] Klyne, G. and J. Palme, "Registration of Mail and MIME 2064 Header Fields", RFC 4021, DOI 10.17487/RFC4021, March 2065 2005, . 2067 [RFC5322] Resnick, P., Ed., "Internet Message Format", RFC 5322, 2068 DOI 10.17487/RFC5322, October 2008, 2069 . 2071 [RFC6532] Yang, A., Steele, S., and N. Freed, "Internationalized 2072 Email Headers", RFC 6532, DOI 10.17487/RFC6532, February 2073 2012, . 2075 [I-D.ietf-emailcore-rfc5321bis] 2076 Klensin, J., "Simple Mail Transfer Protocol", Work in 2077 Progress, Internet-Draft, draft-ietf-emailcore-rfc5321bis- 2078 01, 25 December 2020, . 2081 Appendix A. Example Messages 2083 This section presents a selection of messages. These are intended to 2084 assist in the implementation of this specification, but should not be 2085 taken as normative; that is to say, although the examples in this 2086 section were carefully reviewed, if there happens to be a conflict 2087 between these examples and the syntax described in sections 3 and 4 2088 of this document, the syntax in those sections is to be taken as 2089 correct. 2091 In the text version of this document, messages in this section are 2092 delimited between lines of "----". The "----" lines are not part of 2093 the message itself. 2095 A.1. Addressing Examples 2097 The following are examples of messages that might be sent between two 2098 individuals. 2100 A.1.1. A Message from One Person to Another with Simple Addressing 2102 This could be called a canonical message. It has a single author, 2103 John Doe, a single recipient, Mary Smith, a subject, the date, a 2104 message identifier, and a textual message in the body. 2106 From: John Doe 2107 To: Mary Smith 2108 Subject: Saying Hello 2109 Date: Fri, 21 Nov 1997 09:55:06 -0600 2110 Message-ID: <1234@local.machine.example> 2112 This is a message just to say hello. 2113 So, "Hello". 2115 If John's secretary Michael actually sent the message, even though 2116 John was the author and replies to this message should go back to 2117 him, the sender field would be used: 2119 From: John Doe 2120 Sender: Michael Jones 2121 To: Mary Smith 2122 Subject: Saying Hello 2123 Date: Fri, 21 Nov 1997 09:55:06 -0600 2124 Message-ID: <1234@local.machine.example> 2126 This is a message just to say hello. 2127 So, "Hello". 2129 A.1.2. Different Types of Mailboxes 2131 This message includes multiple addresses in the destination fields 2132 and also uses several different forms of addresses. 2134 From: "Joe Q. Public" 2135 To: Mary Smith , jdoe@example.org, Who? 2136 Cc: , "Giant; \"Big\" Box" 2137 Date: Tue, 1 Jul 2003 10:52:37 +0200 2138 Message-ID: <5678.21-Nov-1997@example.com> 2140 Hi everyone. 2142 Note that the display names for Joe Q. Public and Giant; "Big" Box 2143 needed to be enclosed in double-quotes because the former contains 2144 the period and the latter contains both semicolon and double-quote 2145 characters (the double-quote characters appearing as quoted-pair 2146 constructs). Conversely, the display name for Who? could appear 2147 without them because the question mark is legal in an atom. Notice 2148 also that jdoe@example.org and boss@nil.test have no display names 2149 associated with them at all, and jdoe@example.org uses the simpler 2150 address form without the angle brackets. 2152 A.1.3. Group Addresses 2154 From: Pete 2155 To: A Group:Ed Jones ,joe@where.test,John ; 2156 Cc: Undisclosed recipients:; 2157 Date: Thu, 13 Feb 1969 23:32:54 -0330 2158 Message-ID: 2160 Testing. 2162 In this message, the "To:" field has a single group recipient named 2163 "A Group", which contains 3 addresses, and a "Cc:" field with an 2164 empty group recipient named Undisclosed recipients. 2166 A.2. Reply Messages 2168 The following is a series of three messages that make up a 2169 conversation thread between John and Mary. John first sends a 2170 message to Mary, Mary then replies to John's message, and then John 2171 replies to Mary's reply message. 2173 Note especially the "Message-ID:", "References:", and "In-Reply-To:" 2174 fields in each message. 2176 From: John Doe 2177 To: Mary Smith 2178 Subject: Saying Hello 2179 Date: Fri, 21 Nov 1997 09:55:06 -0600 2180 Message-ID: <1234@local.machine.example> 2182 This is a message just to say hello. 2183 So, "Hello". 2185 When sending replies, the Subject field is often retained, though 2186 prepended with "Re: " as described in section 3.6.5. 2188 From: Mary Smith 2189 To: John Doe 2190 Reply-To: "Mary Smith: Personal Account" 2191 Subject: Re: Saying Hello 2192 Date: Fri, 21 Nov 1997 10:01:10 -0600 2193 Message-ID: <3456@example.net> 2194 In-Reply-To: <1234@local.machine.example> 2195 References: <1234@local.machine.example> 2197 This is a reply to your hello. 2199 Note the "Reply-To:" field in the above message. When John replies 2200 to Mary's message above, the reply should go to the address in the 2201 "Reply-To:" field instead of the address in the "From:" field. 2203 To: "Mary Smith: Personal Account" 2204 From: John Doe 2205 Subject: Re: Saying Hello 2206 Date: Fri, 21 Nov 1997 11:00:00 -0600 2207 Message-ID: 2208 In-Reply-To: <3456@example.net> 2209 References: <1234@local.machine.example> <3456@example.net> 2211 This is a reply to your reply. 2213 A.3. Resent Messages 2215 Start with the message that has been used as an example several 2216 times: 2218 From: John Doe 2219 To: Mary Smith 2220 Subject: Saying Hello 2221 Date: Fri, 21 Nov 1997 09:55:06 -0600 2222 Message-ID: <1234@local.machine.example> 2224 This is a message just to say hello. 2225 So, "Hello". 2227 Say that Mary, upon receiving this message, wishes to send a copy of 2228 the message to Jane such that (a) the message would appear to have 2229 come straight from John; (b) if Jane replies to the message, the 2230 reply should go back to John; and (c) all of the original 2231 information, like the date the message was originally sent to Mary, 2232 the message identifier, and the original addressee, is preserved. In 2233 this case, resent fields are prepended to the message: 2235 Resent-From: Mary Smith 2236 Resent-To: Jane Brown 2237 Resent-Date: Mon, 24 Nov 1997 14:22:01 -0800 2238 Resent-Message-ID: <78910@example.net> 2239 From: John Doe 2240 To: Mary Smith 2241 Subject: Saying Hello 2242 Date: Fri, 21 Nov 1997 09:55:06 -0600 2243 Message-ID: <1234@local.machine.example> 2245 This is a message just to say hello. 2246 So, "Hello". 2248 If Jane, in turn, wished to resend this message to another person, 2249 she would prepend her own set of resent header fields to the above 2250 and send that. (Note that for brevity, trace fields are not shown.) 2252 A.4. Messages with Trace Fields 2254 As messages are sent through the transport system as described in 2255 [I-D.ietf-emailcore-rfc5321bis], trace fields are prepended to the 2256 message. The following is an example of what those trace fields 2257 might look like. Note that there is some folding white space in the 2258 first one since these lines can be long. 2260 Received: from x.y.test 2261 by example.net 2262 via TCP 2263 with ESMTP 2264 id ABC12345 2265 for ; 21 Nov 1997 10:05:43 -0600 2266 Received: from node.example by x.y.test; 21 Nov 1997 10:01:22 -0600 2267 From: John Doe 2268 To: Mary Smith 2269 Subject: Saying Hello 2270 Date: Fri, 21 Nov 1997 09:55:06 -0600 2271 Message-ID: <1234@local.node.example> 2273 This is a message just to say hello. 2274 So, "Hello". 2276 A.5. White Space, Comments, and Other Oddities 2278 White space, including folding white space, and comments can be 2279 inserted between many of the tokens of fields. Taking the example 2280 from A.1.3, white space and comments can be inserted into all of the 2281 fields. 2283 From: Pete(A nice \) chap) 2284 To:A Group(Some people) 2285 :Chris Jones , 2286 joe@example.org, 2287 John (my dear friend); (the end of the group) 2288 Cc:(Empty list)(start)Hidden recipients :(nobody(that I know)) ; 2289 Date: Thu, 2290 13 2291 Feb 2292 1969 2293 23:32 2294 -0330 (Newfoundland Time) 2295 Message-ID: 2297 Testing. 2299 The above example is aesthetically displeasing, but perfectly legal. 2300 Note particularly (1) the comments in the "From:" field (including 2301 one that has a ")" character appearing as part of a quoted-pair); (2) 2302 the white space absent after the ":" in the "To:" field as well as 2303 the comment and folding white space after the group name, the special 2304 character (".") in the comment in Chris Jones's address, and the 2305 folding white space before and after "joe@example.org,"; (3) the 2306 multiple and nested comments in the "Cc:" field as well as the 2307 comment immediately following the ":" after "Cc"; (4) the folding 2308 white space (but no comments except at the end) and the missing 2309 seconds in the time of the date field; and (5) the white space before 2310 (but not within) the identifier in the "Message-ID:" field. 2312 A.6. Obsoleted Forms 2314 The following are examples of obsolete (that is, the "MUST NOT 2315 generate") syntactic elements described in section 4 of this 2316 document. 2318 A.6.1. Obsolete Addressing 2320 Note in the example below the lack of quotes around Joe Q. Public, 2321 the route that appears in the address for Mary Smith, the two commas 2322 that appear in the "To:" field, and the spaces that appear around the 2323 "." in the jdoe address. 2325 From: Joe Q. Public 2326 To: Mary Smith <@node.test:mary@example.net>, , jdoe@test . example 2327 Date: Tue, 1 Jul 2003 10:52:37 +0200 2328 Message-ID: <5678.21-Nov-1997@example.com> 2330 Hi everyone. 2332 A.6.2. Obsolete Dates 2334 The following message uses an obsolete date format, including a non- 2335 numeric time zone and a two digit year. Note that although the day- 2336 of-week is missing, that is not specific to the obsolete syntax; it 2337 is optional in the current syntax as well. 2339 From: John Doe 2340 To: Mary Smith 2341 Subject: Saying Hello 2342 Date: 21 Nov 97 09:55:06 GMT 2343 Message-ID: <1234@local.machine.example> 2345 This is a message just to say hello. 2346 So, "Hello". 2348 A.6.3. Obsolete White Space and Comments 2350 White space and comments can appear between many more elements than 2351 in the current syntax. Also, folding lines that are made up entirely 2352 of white space are legal. 2354 From : John Doe 2355 To : Mary Smith 2356 __ 2357 2358 Subject : Saying Hello 2359 Date : Fri, 21 Nov 1997 09(comment): 55 : 06 -0600 2360 Message-ID : <1234 @ local(blah) .machine .example> 2362 This is a message just to say hello. 2363 So, "Hello". 2365 Note especially the second line of the "To:" field. It starts with 2366 two space characters. (Note that "__" represent blank spaces.) 2367 Therefore, it is considered part of the folding, as described in 2368 section 4.2. Also, the comments and white space throughout 2369 addresses, dates, and message identifiers are all part of the 2370 obsolete syntax. 2372 Appendix B. Differences from Earlier Specifications 2374 This appendix contains a list of changes that have been made in the 2375 Internet Message Format from earlier specifications, specifically 2376 [RFC0822], [RFC1123], [RFC2822], and [RFC5322]. Items marked with an 2377 asterisk (*) below are items which appear in section 4 of this 2378 document and therefore can no longer be generated. 2380 The following are the changes made from [RFC0822] and [RFC1123] to 2381 [RFC2822] that remain in this document: 2383 1. Period allowed in obsolete form of phrase. 2384 2. ABNF moved out of document, now in [STD68]. 2385 3. Four or more digits allowed for year. 2386 4. Header field ordering (and lack thereof) made explicit. 2387 5. Encrypted header field removed. 2388 6. Specifically allow and give meaning to "-0000" time zone. 2389 7. Folding white space is not allowed between every token. 2390 8. Requirement for destinations removed. 2391 9. Forwarding and resending redefined. 2392 10. Extension header fields no longer specifically called out. 2393 11. ASCII 0 (null) removed.* 2394 12. Folding continuation lines cannot contain only white space.* 2395 13. Free insertion of comments not allowed in date.* 2396 14. Non-numeric time zones not allowed.* 2397 15. Two digit years not allowed.* 2398 16. Three digit years interpreted, but not allowed for generation.* 2399 17. Routes in addresses not allowed.* 2400 18. CFWS within local-parts and domains not allowed.* 2401 19. Empty members of address lists not allowed.* 2402 20. Folding white space between field name and colon not allowed.* 2403 21. Comments between field name and colon not allowed. 2404 22. Tightened syntax of in-reply-to and references.* 2405 23. CFWS within msg-id not allowed.* 2406 24. Tightened semantics of resent fields as informational only. 2407 25. Resent-Reply-To not allowed.* 2408 26. No multiple occurrences of fields (except resent and received).* 2409 27. Free CR and LF not allowed.* 2410 28. Line length limits specified. 2411 29. Bcc more clearly specified. 2413 The following are changes from [RFC2822]. 2415 1. Assorted typographical/grammatical errors fixed and 2416 clarifications made. 2417 2. Changed "standard" to "document" or "specification" throughout. 2418 3. Made distinction between "header field" and "header section". 2419 4. Removed NO-WS-CTL from ctext, qtext, dtext, and unstructured.* 2420 5. Moved discussion of specials to the "Atom" section. Moved text 2421 to "Overall message syntax" section. 2422 6. Simplified CFWS syntax. 2423 7. Fixed unstructured syntax (erratum 373 (https://www.rfc- 2424 editor.org/errata/eid373)). 2425 8. Changed date and time syntax to deal with white space in 2426 obsolete date syntax. 2427 9. Removed quoted-pair from domain literals and message 2428 identifiers.* 2429 10. Clarified that other specifications limit domain syntax. 2430 11. Simplified "Bcc:" and "Resent-Bcc:" syntax. 2431 12. Allowed optional-field to appear within trace information. 2432 13. Removed no-fold-quote from msg-id. Clarified syntax 2433 limitations. 2434 14. Generalized "Received:" syntax to fix bugs and move definition 2435 out of this document. 2436 15. Simplified obs-qp. Fixed and simplified obs-utext (which now 2437 only appears in the obsolete syntax). Removed obs-text and obs- 2438 char, adding obs-body. 2439 16. Fixed obsolete date syntax to allow for more (or less) comments 2440 and white space. 2441 17. Fixed all obsolete list syntax (obs-domain-list, obs-mbox-list, 2442 obs-addr-list, obs-phrase-list, and the newly added obs-group- 2443 list). 2445 18. Fixed obs-reply-to syntax. 2446 19. Fixed obs-bcc and obs-resent-bcc to allow empty lists. 2447 20. Removed obs-path. 2449 The following are changes from [RFC5322]. 2451 1. Clarified addr-spec description (erratum 1766 (https://www.rfc- 2452 editor.org/errata/eid1766)). 2453 2. Fixed obs-unstruct to be more limited (erratum 1905 2454 (https://www.rfc-editor.org/errata/eid1905)).* 2455 3. Simplified obs-body (erratum 1906 (https://www.rfc- 2456 editor.org/errata/eid1906)).* 2457 4. Fixed obs-FWS to allow for a leading CRLF (erratum 1908 2458 (https://www.rfc-editor.org/errata/eid1908)).* 2459 5. Fixed comments within addresses in A.5 (errata 2515 2460 (https://www.rfc-editor.org/errata/eid2515) and 2579 2461 (https://www.rfc-editor.org/errata/eid2579)). 2462 6. Fixed time zone description (erratum 2726 (https://www.rfc- 2463 editor.org/errata/eid2726)). 2464 7. Removed inappropriate uses of "sent" in 3.6.3, 3.6.6, and 5 2465 (erratum 3048 (https://www.rfc-editor.org/errata/eid3048)). 2466 8. Allow for CFWS in otherwise empty list of "Received:" field 2467 tokens (erratum 3979 (https://www.rfc-editor.org/errata/ 2468 eid3979)). 2469 9. Changed "printable" to "visible" to clarify that it doesn't 2470 include the space character (erratum 4692 (https://www.rfc- 2471 editor.org/errata/eid4692)). 2472 10. Clarify midnight in time-of-day (erratum 5905 (https://www.rfc- 2473 editor.org/errata/eid5905)). 2474 11. Allow for date-time in obs-received (erratum 5867 2475 (https://www.rfc-editor.org/errata/eid5867)).* 2476 12. Separated out "msg-id-internal" in "msg-id". 2477 13. Updated references to STD 13, STD 68, BCP 13, and BCP 14, and 2478 reference for leap seconds to RFC 3339. 2479 14. Fixed typo in daylight saving time in description of obs-zone.* 2480 15. Added comment to field-name ABNF to remind that length can't be 2481 greater than 77 (erratum 5918 (https://www.rfc- 2482 editor.org/errata/eid5918)). 2483 16. Clarified description in 4.5.6. 2485 There are also 2 errata that were "Held For Document Update" that 2486 have not been addressed. See the comments in the following document 2487 sections: 2489 1. Erratum 2950: Section 3.6 2490 2. Erratum 3135: Section 3.2.4 2492 Appendix C. Acknowledgements 2494 Many people contributed to this document. They included folks who 2495 participated in the Detailed Revision and Update of Messaging 2496 Standards (DRUMS) Working Group of the Internet Engineering Task 2497 Force (IETF), the chair of DRUMS, the Area Directors of the IETF, 2498 reporters of errata on earlier versions of this document, and people 2499 who simply sent their comments in via email. The editor is deeply 2500 indebted to them all and thanks them sincerely. (The list of these 2501 people has been temporarily removed to try to bring it up to date.) 2503 Author's Address 2505 Peter W. Resnick (editor) 2506 Episteme Technology Consulting LLC 2507 503 West Indiana Avenue 2508 Urbana, IL 61801-4941 2509 United States of America 2511 Phone: +1 217 337 1905 2512 Email: resnick@episteme.net 2513 URI: https://www.episteme.net/