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