rfc2822.txt 108KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860
  1. Network Working Group P. Resnick, Editor
  2. Request for Comments: 2822 QUALCOMM Incorporated
  3. Obsoletes: 822 April 2001
  4. Category: Standards Track
  5. Internet Message Format
  6. Status of this Memo
  7. This document specifies an Internet standards track protocol for the
  8. Internet community, and requests discussion and suggestions for
  9. improvements. Please refer to the current edition of the "Internet
  10. Official Protocol Standards" (STD 1) for the standardization state
  11. and status of this protocol. Distribution of this memo is unlimited.
  12. Copyright Notice
  13. Copyright (C) The Internet Society (2001). All Rights Reserved.
  14. Abstract
  15. This standard specifies a syntax for text messages that are sent
  16. between computer users, within the framework of "electronic mail"
  17. messages. This standard supersedes the one specified in Request For
  18. Comments (RFC) 822, "Standard for the Format of ARPA Internet Text
  19. Messages", updating it to reflect current practice and incorporating
  20. incremental changes that were specified in other RFCs.
  21. Table of Contents
  22. 1. Introduction ............................................... 3
  23. 1.1. Scope .................................................... 3
  24. 1.2. Notational conventions ................................... 4
  25. 1.2.1. Requirements notation .................................. 4
  26. 1.2.2. Syntactic notation ..................................... 4
  27. 1.3. Structure of this document ............................... 4
  28. 2. Lexical Analysis of Messages ............................... 5
  29. 2.1. General Description ...................................... 5
  30. 2.1.1. Line Length Limits ..................................... 6
  31. 2.2. Header Fields ............................................ 7
  32. 2.2.1. Unstructured Header Field Bodies ....................... 7
  33. 2.2.2. Structured Header Field Bodies ......................... 7
  34. 2.2.3. Long Header Fields ..................................... 7
  35. 2.3. Body ..................................................... 8
  36. 3. Syntax ..................................................... 9
  37. 3.1. Introduction ............................................. 9
  38. 3.2. Lexical Tokens ........................................... 9
  39. Resnick Standards Track [Page 1]
  40. RFC 2822 Internet Message Format April 2001
  41. 3.2.1. Primitive Tokens ....................................... 9
  42. 3.2.2. Quoted characters ......................................10
  43. 3.2.3. Folding white space and comments .......................11
  44. 3.2.4. Atom ...................................................12
  45. 3.2.5. Quoted strings .........................................13
  46. 3.2.6. Miscellaneous tokens ...................................13
  47. 3.3. Date and Time Specification ..............................14
  48. 3.4. Address Specification ....................................15
  49. 3.4.1. Addr-spec specification ................................16
  50. 3.5 Overall message syntax ....................................17
  51. 3.6. Field definitions ........................................18
  52. 3.6.1. The origination date field .............................20
  53. 3.6.2. Originator fields ......................................21
  54. 3.6.3. Destination address fields .............................22
  55. 3.6.4. Identification fields ..................................23
  56. 3.6.5. Informational fields ...................................26
  57. 3.6.6. Resent fields ..........................................26
  58. 3.6.7. Trace fields ...........................................28
  59. 3.6.8. Optional fields ........................................29
  60. 4. Obsolete Syntax ............................................29
  61. 4.1. Miscellaneous obsolete tokens ............................30
  62. 4.2. Obsolete folding white space .............................31
  63. 4.3. Obsolete Date and Time ...................................31
  64. 4.4. Obsolete Addressing ......................................33
  65. 4.5. Obsolete header fields ...................................33
  66. 4.5.1. Obsolete origination date field ........................34
  67. 4.5.2. Obsolete originator fields .............................34
  68. 4.5.3. Obsolete destination address fields ....................34
  69. 4.5.4. Obsolete identification fields .........................35
  70. 4.5.5. Obsolete informational fields ..........................35
  71. 4.5.6. Obsolete resent fields .................................35
  72. 4.5.7. Obsolete trace fields ..................................36
  73. 4.5.8. Obsolete optional fields ...............................36
  74. 5. Security Considerations ....................................36
  75. 6. Bibliography ...............................................37
  76. 7. Editor's Address ...........................................38
  77. 8. Acknowledgements ...........................................39
  78. Appendix A. Example messages ..................................41
  79. A.1. Addressing examples ......................................41
  80. A.1.1. A message from one person to another with simple
  81. addressing .............................................41
  82. A.1.2. Different types of mailboxes ...........................42
  83. A.1.3. Group addresses ........................................43
  84. A.2. Reply messages ...........................................43
  85. A.3. Resent messages ..........................................44
  86. A.4. Messages with trace fields ...............................46
  87. A.5. White space, comments, and other oddities ................47
  88. A.6. Obsoleted forms ..........................................47
  89. Resnick Standards Track [Page 2]
  90. RFC 2822 Internet Message Format April 2001
  91. A.6.1. Obsolete addressing ....................................48
  92. A.6.2. Obsolete dates .........................................48
  93. A.6.3. Obsolete white space and comments ......................48
  94. Appendix B. Differences from earlier standards ................49
  95. Appendix C. Notices ...........................................50
  96. Full Copyright Statement ......................................51
  97. 1. Introduction
  98. 1.1. Scope
  99. This standard specifies a syntax for text messages that are sent
  100. between computer users, within the framework of "electronic mail"
  101. messages. This standard supersedes the one specified in Request For
  102. Comments (RFC) 822, "Standard for the Format of ARPA Internet Text
  103. Messages" [RFC822], updating it to reflect current practice and
  104. incorporating incremental changes that were specified in other RFCs
  105. [STD3].
  106. This standard specifies a syntax only for text messages. In
  107. particular, it makes no provision for the transmission of images,
  108. audio, or other sorts of structured data in electronic mail messages.
  109. There are several extensions published, such as the MIME document
  110. series [RFC2045, RFC2046, RFC2049], which describe mechanisms for the
  111. transmission of such data through electronic mail, either by
  112. extending the syntax provided here or by structuring such messages to
  113. conform to this syntax. Those mechanisms are outside of the scope of
  114. this standard.
  115. In the context of electronic mail, messages are viewed as having an
  116. envelope and contents. The envelope contains whatever information is
  117. needed to accomplish transmission and delivery. (See [RFC2821] for a
  118. discussion of the envelope.) The contents comprise the object to be
  119. delivered to the recipient. This standard applies only to the format
  120. and some of the semantics of message contents. It contains no
  121. specification of the information in the envelope.
  122. However, some message systems may use information from the contents
  123. to create the envelope. It is intended that this standard facilitate
  124. the acquisition of such information by programs.
  125. This specification is intended as a definition of what message
  126. content format is to be passed between systems. Though some message
  127. systems locally store messages in this format (which eliminates the
  128. need for translation between formats) and others use formats that
  129. differ from the one specified in this standard, local storage is
  130. outside of the scope of this standard.
  131. Resnick Standards Track [Page 3]
  132. RFC 2822 Internet Message Format April 2001
  133. Note: This standard is not intended to dictate the internal formats
  134. used by sites, the specific message system features that they are
  135. expected to support, or any of the characteristics of user interface
  136. programs that create or read messages. In addition, this standard
  137. does not specify an encoding of the characters for either transport
  138. or storage; that is, it does not specify the number of bits used or
  139. how those bits are specifically transferred over the wire or stored
  140. on disk.
  141. 1.2. Notational conventions
  142. 1.2.1. Requirements notation
  143. This document occasionally uses terms that appear in capital letters.
  144. When the terms "MUST", "SHOULD", "RECOMMENDED", "MUST NOT", "SHOULD
  145. NOT", and "MAY" appear capitalized, they are being used to indicate
  146. particular requirements of this specification. A discussion of the
  147. meanings of these terms appears in [RFC2119].
  148. 1.2.2. Syntactic notation
  149. This standard uses the Augmented Backus-Naur Form (ABNF) notation
  150. specified in [RFC2234] for the formal definitions of the syntax of
  151. messages. Characters will be specified either by a decimal value
  152. (e.g., the value %d65 for uppercase A and %d97 for lowercase A) or by
  153. a case-insensitive literal value enclosed in quotation marks (e.g.,
  154. "A" for either uppercase or lowercase A). See [RFC2234] for the full
  155. description of the notation.
  156. 1.3. Structure of this document
  157. This document is divided into several sections.
  158. This section, section 1, is a short introduction to the document.
  159. Section 2 lays out the general description of a message and its
  160. constituent parts. This is an overview to help the reader understand
  161. some of the general principles used in the later portions of this
  162. document. Any examples in this section MUST NOT be taken as
  163. specification of the formal syntax of any part of a message.
  164. Section 3 specifies formal ABNF rules for the structure of each part
  165. of a message (the syntax) and describes the relationship between
  166. those parts and their meaning in the context of a message (the
  167. semantics). That is, it describes the actual rules for the structure
  168. of each part of a message (the syntax) as well as a description of
  169. the parts and instructions on how they ought to be interpreted (the
  170. semantics). This includes analysis of the syntax and semantics of
  171. Resnick Standards Track [Page 4]
  172. RFC 2822 Internet Message Format April 2001
  173. subparts of messages that have specific structure. The syntax
  174. included in section 3 represents messages as they MUST be created.
  175. There are also notes in section 3 to indicate if any of the options
  176. specified in the syntax SHOULD be used over any of the others.
  177. Both sections 2 and 3 describe messages that are legal to generate
  178. for purposes of this standard.
  179. Section 4 of this document specifies an "obsolete" syntax. There are
  180. references in section 3 to these obsolete syntactic elements. The
  181. rules of the obsolete syntax are elements that have appeared in
  182. earlier revisions of this standard or have previously been widely
  183. used in Internet messages. As such, these elements MUST be
  184. interpreted by parsers of messages in order to be conformant to this
  185. standard. However, since items in this syntax have been determined
  186. to be non-interoperable or to cause significant problems for
  187. recipients of messages, they MUST NOT be generated by creators of
  188. conformant messages.
  189. Section 5 details security considerations to take into account when
  190. implementing this standard.
  191. Section 6 is a bibliography of references in this document.
  192. Section 7 contains the editor's address.
  193. Section 8 contains acknowledgements.
  194. Appendix A lists examples of different sorts of messages. These
  195. examples are not exhaustive of the types of messages that appear on
  196. the Internet, but give a broad overview of certain syntactic forms.
  197. Appendix B lists the differences between this standard and earlier
  198. standards for Internet messages.
  199. Appendix C has copyright and intellectual property notices.
  200. 2. Lexical Analysis of Messages
  201. 2.1. General Description
  202. At the most basic level, a message is a series of characters. A
  203. message that is conformant with this standard is comprised of
  204. characters with values in the range 1 through 127 and interpreted as
  205. US-ASCII characters [ASCII]. For brevity, this document sometimes
  206. refers to this range of characters as simply "US-ASCII characters".
  207. Resnick Standards Track [Page 5]
  208. RFC 2822 Internet Message Format April 2001
  209. Note: This standard specifies that messages are made up of characters
  210. in the US-ASCII range of 1 through 127. There are other documents,
  211. specifically the MIME document series [RFC2045, RFC2046, RFC2047,
  212. RFC2048, RFC2049], that extend this standard to allow for values
  213. outside of that range. Discussion of those mechanisms is not within
  214. the scope of this standard.
  215. Messages are divided into lines of characters. A line is a series of
  216. characters that is delimited with the two characters carriage-return
  217. and line-feed; that is, the carriage return (CR) character (ASCII
  218. value 13) followed immediately by the line feed (LF) character (ASCII
  219. value 10). (The carriage-return/line-feed pair is usually written in
  220. this document as "CRLF".)
  221. A message consists of header fields (collectively called "the header
  222. of the message") followed, optionally, by a body. The header is a
  223. sequence of lines of characters with special syntax as defined in
  224. this standard. The body is simply a sequence of characters that
  225. follows the header and is separated from the header by an empty line
  226. (i.e., a line with nothing preceding the CRLF).
  227. 2.1.1. Line Length Limits
  228. There are two limits that this standard places on the number of
  229. characters in a line. Each line of characters MUST be no more than
  230. 998 characters, and SHOULD be no more than 78 characters, excluding
  231. the CRLF.
  232. The 998 character limit is due to limitations in many implementations
  233. which send, receive, or store Internet Message Format messages that
  234. simply cannot handle more than 998 characters on a line. Receiving
  235. implementations would do well to handle an arbitrarily large number
  236. of characters in a line for robustness sake. However, there are so
  237. many implementations which (in compliance with the transport
  238. requirements of [RFC2821]) do not accept messages containing more
  239. than 1000 character including the CR and LF per line, it is important
  240. for implementations not to create such messages.
  241. The more conservative 78 character recommendation is to accommodate
  242. the many implementations of user interfaces that display these
  243. messages which may truncate, or disastrously wrap, the display of
  244. more than 78 characters per line, in spite of the fact that such
  245. implementations are non-conformant to the intent of this
  246. specification (and that of [RFC2821] if they actually cause
  247. information to be lost). Again, even though this limitation is put on
  248. messages, it is encumbant upon implementations which display messages
  249. Resnick Standards Track [Page 6]
  250. RFC 2822 Internet Message Format April 2001
  251. to handle an arbitrarily large number of characters in a line
  252. (certainly at least up to the 998 character limit) for the sake of
  253. robustness.
  254. 2.2. Header Fields
  255. Header fields are lines composed of a field name, followed by a colon
  256. (":"), followed by a field body, and terminated by CRLF. A field
  257. name MUST be composed of printable US-ASCII characters (i.e.,
  258. characters that have values between 33 and 126, inclusive), except
  259. colon. A field body may be composed of any US-ASCII characters,
  260. except for CR and LF. However, a field body may contain CRLF when
  261. used in header "folding" and "unfolding" as described in section
  262. 2.2.3. All field bodies MUST conform to the syntax described in
  263. sections 3 and 4 of this standard.
  264. 2.2.1. Unstructured Header Field Bodies
  265. Some field bodies in this standard are defined simply as
  266. "unstructured" (which is specified below as any US-ASCII characters,
  267. except for CR and LF) with no further restrictions. These are
  268. referred to as unstructured field bodies. Semantically, unstructured
  269. field bodies are simply to be treated as a single line of characters
  270. with no further processing (except for header "folding" and
  271. "unfolding" as described in section 2.2.3).
  272. 2.2.2. Structured Header Field Bodies
  273. Some field bodies in this standard have specific syntactical
  274. structure more restrictive than the unstructured field bodies
  275. described above. These are referred to as "structured" field bodies.
  276. Structured field bodies are sequences of specific lexical tokens as
  277. described in sections 3 and 4 of this standard. Many of these tokens
  278. are allowed (according to their syntax) to be introduced or end with
  279. comments (as described in section 3.2.3) as well as the space (SP,
  280. ASCII value 32) and horizontal tab (HTAB, ASCII value 9) characters
  281. (together known as the white space characters, WSP), and those WSP
  282. characters are subject to header "folding" and "unfolding" as
  283. described in section 2.2.3. Semantic analysis of structured field
  284. bodies is given along with their syntax.
  285. 2.2.3. Long Header Fields
  286. Each header field is logically a single line of characters comprising
  287. the field name, the colon, and the field body. For convenience
  288. however, and to deal with the 998/78 character limitations per line,
  289. the field body portion of a header field can be split into a multiple
  290. line representation; this is called "folding". The general rule is
  291. Resnick Standards Track [Page 7]
  292. RFC 2822 Internet Message Format April 2001
  293. that wherever this standard allows for folding white space (not
  294. simply WSP characters), a CRLF may be inserted before any WSP. For
  295. example, the header field:
  296. Subject: This is a test
  297. can be represented as:
  298. Subject: This
  299. is a test
  300. Note: Though structured field bodies are defined in such a way that
  301. folding can take place between many of the lexical tokens (and even
  302. within some of the lexical tokens), folding SHOULD be limited to
  303. placing the CRLF at higher-level syntactic breaks. For instance, if
  304. a field body is defined as comma-separated values, it is recommended
  305. that folding occur after the comma separating the structured items in
  306. preference to other places where the field could be folded, even if
  307. it is allowed elsewhere.
  308. The process of moving from this folded multiple-line representation
  309. of a header field to its single line representation is called
  310. "unfolding". Unfolding is accomplished by simply removing any CRLF
  311. that is immediately followed by WSP. Each header field should be
  312. treated in its unfolded form for further syntactic and semantic
  313. evaluation.
  314. 2.3. Body
  315. The body of a message is simply lines of US-ASCII characters. The
  316. only two limitations on the body are as follows:
  317. - CR and LF MUST only occur together as CRLF; they MUST NOT appear
  318. independently in the body.
  319. - Lines of characters in the body MUST be limited to 998 characters,
  320. and SHOULD be limited to 78 characters, excluding the CRLF.
  321. Note: As was stated earlier, there are other standards documents,
  322. specifically the MIME documents [RFC2045, RFC2046, RFC2048, RFC2049]
  323. that extend this standard to allow for different sorts of message
  324. bodies. Again, these mechanisms are beyond the scope of this
  325. document.
  326. Resnick Standards Track [Page 8]
  327. RFC 2822 Internet Message Format April 2001
  328. 3. Syntax
  329. 3.1. Introduction
  330. The syntax as given in this section defines the legal syntax of
  331. Internet messages. Messages that are conformant to this standard
  332. MUST conform to the syntax in this section. If there are options in
  333. this section where one option SHOULD be generated, that is indicated
  334. either in the prose or in a comment next to the syntax.
  335. For the defined expressions, a short description of the syntax and
  336. use is given, followed by the syntax in ABNF, followed by a semantic
  337. analysis. Primitive tokens that are used but otherwise unspecified
  338. come from [RFC2234].
  339. In some of the definitions, there will be nonterminals whose names
  340. start with "obs-". These "obs-" elements refer to tokens defined in
  341. the obsolete syntax in section 4. In all cases, these productions
  342. are to be ignored for the purposes of generating legal Internet
  343. messages and MUST NOT be used as part of such a message. However,
  344. when interpreting messages, these tokens MUST be honored as part of
  345. the legal syntax. In this sense, section 3 defines a grammar for
  346. generation of messages, with "obs-" elements that are to be ignored,
  347. while section 4 adds grammar for interpretation of messages.
  348. 3.2. Lexical Tokens
  349. The following rules are used to define an underlying lexical
  350. analyzer, which feeds tokens to the higher-level parsers. This
  351. section defines the tokens used in structured header field bodies.
  352. Note: Readers of this standard need to pay special attention to how
  353. these lexical tokens are used in both the lower-level and
  354. higher-level syntax later in the document. Particularly, the white
  355. space tokens and the comment tokens defined in section 3.2.3 get used
  356. in the lower-level tokens defined here, and those lower-level tokens
  357. are in turn used as parts of the higher-level tokens defined later.
  358. Therefore, the white space and comments may be allowed in the
  359. higher-level tokens even though they may not explicitly appear in a
  360. particular definition.
  361. 3.2.1. Primitive Tokens
  362. The following are primitive tokens referred to elsewhere in this
  363. standard, but not otherwise defined in [RFC2234]. Some of them will
  364. not appear anywhere else in the syntax, but they are convenient to
  365. refer to in other parts of this document.
  366. Resnick Standards Track [Page 9]
  367. RFC 2822 Internet Message Format April 2001
  368. Note: The "specials" below are just such an example. Though the
  369. specials token does not appear anywhere else in this standard, it is
  370. useful for implementers who use tools that lexically analyze
  371. messages. Each of the characters in specials can be used to indicate
  372. a tokenization point in lexical analysis.
  373. NO-WS-CTL = %d1-8 / ; US-ASCII control characters
  374. %d11 / ; that do not include the
  375. %d12 / ; carriage return, line feed,
  376. %d14-31 / ; and white space characters
  377. %d127
  378. text = %d1-9 / ; Characters excluding CR and LF
  379. %d11 /
  380. %d12 /
  381. %d14-127 /
  382. obs-text
  383. specials = "(" / ")" / ; Special characters used in
  384. "<" / ">" / ; other parts of the syntax
  385. "[" / "]" /
  386. ":" / ";" /
  387. "@" / "\" /
  388. "," / "." /
  389. DQUOTE
  390. No special semantics are attached to these tokens. They are simply
  391. single characters.
  392. 3.2.2. Quoted characters
  393. Some characters are reserved for special interpretation, such as
  394. delimiting lexical tokens. To permit use of these characters as
  395. uninterpreted data, a quoting mechanism is provided.
  396. quoted-pair = ("\" text) / obs-qp
  397. Where any quoted-pair appears, it is to be interpreted as the text
  398. character alone. That is to say, the "\" character that appears as
  399. part of a quoted-pair is semantically "invisible".
  400. Note: The "\" character may appear in a message where it is not part
  401. of a quoted-pair. A "\" character that does not appear in a
  402. quoted-pair is not semantically invisible. The only places in this
  403. standard where quoted-pair currently appears are ccontent, qcontent,
  404. dcontent, no-fold-quote, and no-fold-literal.
  405. Resnick Standards Track [Page 10]
  406. RFC 2822 Internet Message Format April 2001
  407. 3.2.3. Folding white space and comments
  408. White space characters, including white space used in folding
  409. (described in section 2.2.3), may appear between many elements in
  410. header field bodies. Also, strings of characters that are treated as
  411. comments may be included in structured field bodies as characters
  412. enclosed in parentheses. The following defines the folding white
  413. space (FWS) and comment constructs.
  414. Strings of characters enclosed in parentheses are considered comments
  415. so long as they do not appear within a "quoted-string", as defined in
  416. section 3.2.5. Comments may nest.
  417. There are several places in this standard where comments and FWS may
  418. be freely inserted. To accommodate that syntax, an additional token
  419. for "CFWS" is defined for places where comments and/or FWS can occur.
  420. However, where CFWS occurs in this standard, it MUST NOT be inserted
  421. in such a way that any line of a folded header field is made up
  422. entirely of WSP characters and nothing else.
  423. FWS = ([*WSP CRLF] 1*WSP) / ; Folding white space
  424. obs-FWS
  425. ctext = NO-WS-CTL / ; Non white space controls
  426. %d33-39 / ; The rest of the US-ASCII
  427. %d42-91 / ; characters not including "(",
  428. %d93-126 ; ")", or "\"
  429. ccontent = ctext / quoted-pair / comment
  430. comment = "(" *([FWS] ccontent) [FWS] ")"
  431. CFWS = *([FWS] comment) (([FWS] comment) / FWS)
  432. Throughout this standard, where FWS (the folding white space token)
  433. appears, it indicates a place where header folding, as discussed in
  434. section 2.2.3, may take place. Wherever header folding appears in a
  435. message (that is, a header field body containing a CRLF followed by
  436. any WSP), header unfolding (removal of the CRLF) is performed before
  437. any further lexical analysis is performed on that header field
  438. according to this standard. That is to say, any CRLF that appears in
  439. FWS is semantically "invisible."
  440. A comment is normally used in a structured field body to provide some
  441. human readable informational text. Since a comment is allowed to
  442. contain FWS, folding is permitted within the comment. Also note that
  443. since quoted-pair is allowed in a comment, the parentheses and
  444. Resnick Standards Track [Page 11]
  445. RFC 2822 Internet Message Format April 2001
  446. backslash characters may appear in a comment so long as they appear
  447. as a quoted-pair. Semantically, the enclosing parentheses are not
  448. part of the comment; the comment is what is contained between the two
  449. parentheses. As stated earlier, the "\" in any quoted-pair and the
  450. CRLF in any FWS that appears within the comment are semantically
  451. "invisible" and therefore not part of the comment either.
  452. Runs of FWS, comment or CFWS that occur between lexical tokens in a
  453. structured field header are semantically interpreted as a single
  454. space character.
  455. 3.2.4. Atom
  456. Several productions in structured header field bodies are simply
  457. strings of certain basic characters. Such productions are called
  458. atoms.
  459. Some of the structured header field bodies also allow the period
  460. character (".", ASCII value 46) within runs of atext. An additional
  461. "dot-atom" token is defined for those purposes.
  462. atext = ALPHA / DIGIT / ; Any character except controls,
  463. "!" / "#" / ; SP, and specials.
  464. "$" / "%" / ; Used for atoms
  465. "&" / "'" /
  466. "*" / "+" /
  467. "-" / "/" /
  468. "=" / "?" /
  469. "^" / "_" /
  470. "`" / "{" /
  471. "|" / "}" /
  472. "~"
  473. atom = [CFWS] 1*atext [CFWS]
  474. dot-atom = [CFWS] dot-atom-text [CFWS]
  475. dot-atom-text = 1*atext *("." 1*atext)
  476. Both atom and dot-atom are interpreted as a single unit, comprised of
  477. the string of characters that make it up. Semantically, the optional
  478. comments and FWS surrounding the rest of the characters are not part
  479. of the atom; the atom is only the run of atext characters in an atom,
  480. or the atext and "." characters in a dot-atom.
  481. Resnick Standards Track [Page 12]
  482. RFC 2822 Internet Message Format April 2001
  483. 3.2.5. Quoted strings
  484. Strings of characters that include characters other than those
  485. allowed in atoms may be represented in a quoted string format, where
  486. the characters are surrounded by quote (DQUOTE, ASCII value 34)
  487. characters.
  488. qtext = NO-WS-CTL / ; Non white space controls
  489. %d33 / ; The rest of the US-ASCII
  490. %d35-91 / ; characters not including "\"
  491. %d93-126 ; or the quote character
  492. qcontent = qtext / quoted-pair
  493. quoted-string = [CFWS]
  494. DQUOTE *([FWS] qcontent) [FWS] DQUOTE
  495. [CFWS]
  496. A quoted-string is treated as a unit. That is, quoted-string is
  497. identical to atom, semantically. Since a quoted-string is allowed to
  498. contain FWS, folding is permitted. Also note that since quoted-pair
  499. is allowed in a quoted-string, the quote and backslash characters may
  500. appear in a quoted-string so long as they appear as a quoted-pair.
  501. Semantically, neither the optional CFWS outside of the quote
  502. characters nor the quote characters themselves are part of the
  503. quoted-string; the quoted-string is what is contained between the two
  504. quote characters. As stated earlier, the "\" in any quoted-pair and
  505. the CRLF in any FWS/CFWS that appears within the quoted-string are
  506. semantically "invisible" and therefore not part of the quoted-string
  507. either.
  508. 3.2.6. Miscellaneous tokens
  509. Three additional tokens are defined, word and phrase for combinations
  510. of atoms and/or quoted-strings, and unstructured for use in
  511. unstructured header fields and in some places within structured
  512. header fields.
  513. word = atom / quoted-string
  514. phrase = 1*word / obs-phrase
  515. Resnick Standards Track [Page 13]
  516. RFC 2822 Internet Message Format April 2001
  517. utext = NO-WS-CTL / ; Non white space controls
  518. %d33-126 / ; The rest of US-ASCII
  519. obs-utext
  520. unstructured = *([FWS] utext) [FWS]
  521. 3.3. Date and Time Specification
  522. Date and time occur in several header fields. This section specifies
  523. the syntax for a full date and time specification. Though folding
  524. white space is permitted throughout the date-time specification, it
  525. is RECOMMENDED that a single space be used in each place that FWS
  526. appears (whether it is required or optional); some older
  527. implementations may not interpret other occurrences of folding white
  528. space correctly.
  529. date-time = [ day-of-week "," ] date FWS time [CFWS]
  530. day-of-week = ([FWS] day-name) / obs-day-of-week
  531. day-name = "Mon" / "Tue" / "Wed" / "Thu" /
  532. "Fri" / "Sat" / "Sun"
  533. date = day month year
  534. year = 4*DIGIT / obs-year
  535. month = (FWS month-name FWS) / obs-month
  536. month-name = "Jan" / "Feb" / "Mar" / "Apr" /
  537. "May" / "Jun" / "Jul" / "Aug" /
  538. "Sep" / "Oct" / "Nov" / "Dec"
  539. day = ([FWS] 1*2DIGIT) / obs-day
  540. time = time-of-day FWS zone
  541. time-of-day = hour ":" minute [ ":" second ]
  542. hour = 2DIGIT / obs-hour
  543. minute = 2DIGIT / obs-minute
  544. second = 2DIGIT / obs-second
  545. zone = (( "+" / "-" ) 4DIGIT) / obs-zone
  546. Resnick Standards Track [Page 14]
  547. RFC 2822 Internet Message Format April 2001
  548. The day is the numeric day of the month. The year is any numeric
  549. year 1900 or later.
  550. The time-of-day specifies the number of hours, minutes, and
  551. optionally seconds since midnight of the date indicated.
  552. The date and time-of-day SHOULD express local time.
  553. The zone specifies the offset from Coordinated Universal Time (UTC,
  554. formerly referred to as "Greenwich Mean Time") that the date and
  555. time-of-day represent. The "+" or "-" indicates whether the
  556. time-of-day is ahead of (i.e., east of) or behind (i.e., west of)
  557. Universal Time. The first two digits indicate the number of hours
  558. difference from Universal Time, and the last two digits indicate the
  559. number of minutes difference from Universal Time. (Hence, +hhmm
  560. means +(hh * 60 + mm) minutes, and -hhmm means -(hh * 60 + mm)
  561. minutes). The form "+0000" SHOULD be used to indicate a time zone at
  562. Universal Time. Though "-0000" also indicates Universal Time, it is
  563. used to indicate that the time was generated on a system that may be
  564. in a local time zone other than Universal Time and therefore
  565. indicates that the date-time contains no information about the local
  566. time zone.
  567. A date-time specification MUST be semantically valid. That is, the
  568. day-of-the-week (if included) MUST be the day implied by the date,
  569. the numeric day-of-month MUST be between 1 and the number of days
  570. allowed for the specified month (in the specified year), the
  571. time-of-day MUST be in the range 00:00:00 through 23:59:60 (the
  572. number of seconds allowing for a leap second; see [STD12]), and the
  573. zone MUST be within the range -9959 through +9959.
  574. 3.4. Address Specification
  575. Addresses occur in several message header fields to indicate senders
  576. and recipients of messages. An address may either be an individual
  577. mailbox, or a group of mailboxes.
  578. address = mailbox / group
  579. mailbox = name-addr / addr-spec
  580. name-addr = [display-name] angle-addr
  581. angle-addr = [CFWS] "<" addr-spec ">" [CFWS] / obs-angle-addr
  582. group = display-name ":" [mailbox-list / CFWS] ";"
  583. [CFWS]
  584. Resnick Standards Track [Page 15]
  585. RFC 2822 Internet Message Format April 2001
  586. display-name = phrase
  587. mailbox-list = (mailbox *("," mailbox)) / obs-mbox-list
  588. address-list = (address *("," address)) / obs-addr-list
  589. A mailbox receives mail. It is a conceptual entity which does not
  590. necessarily pertain to file storage. For example, some sites may
  591. choose to print mail on a printer and deliver the output to the
  592. addressee's desk. Normally, a mailbox is comprised of two parts: (1)
  593. an optional display name that indicates the name of the recipient
  594. (which could be a person or a system) that could be displayed to the
  595. user of a mail application, and (2) an addr-spec address enclosed in
  596. angle brackets ("<" and ">"). There is also an alternate simple form
  597. of a mailbox where the addr-spec address appears alone, without the
  598. recipient's name or the angle brackets. The Internet addr-spec
  599. address is described in section 3.4.1.
  600. Note: Some legacy implementations used the simple form where the
  601. addr-spec appears without the angle brackets, but included the name
  602. of the recipient in parentheses as a comment following the addr-spec.
  603. Since the meaning of the information in a comment is unspecified,
  604. implementations SHOULD use the full name-addr form of the mailbox,
  605. instead of the legacy form, to specify the display name associated
  606. with a mailbox. Also, because some legacy implementations interpret
  607. the comment, comments generally SHOULD NOT be used in address fields
  608. to avoid confusing such implementations.
  609. When it is desirable to treat several mailboxes as a single unit
  610. (i.e., in a distribution list), the group construct can be used. The
  611. group construct allows the sender to indicate a named group of
  612. recipients. This is done by giving a display name for the group,
  613. followed by a colon, followed by a comma separated list of any number
  614. of mailboxes (including zero and one), and ending with a semicolon.
  615. Because the list of mailboxes can be empty, using the group construct
  616. is also a simple way to communicate to recipients that the message
  617. was sent to one or more named sets of recipients, without actually
  618. providing the individual mailbox address for each of those
  619. recipients.
  620. 3.4.1. Addr-spec specification
  621. An addr-spec is a specific Internet identifier that contains a
  622. locally interpreted string followed by the at-sign character ("@",
  623. ASCII value 64) followed by an Internet domain. The locally
  624. interpreted string is either a quoted-string or a dot-atom. If the
  625. string can be represented as a dot-atom (that is, it contains no
  626. characters other than atext characters or "." surrounded by atext
  627. Resnick Standards Track [Page 16]
  628. RFC 2822 Internet Message Format April 2001
  629. characters), then the dot-atom form SHOULD be used and the
  630. quoted-string form SHOULD NOT be used. Comments and folding white
  631. space SHOULD NOT be used around the "@" in the addr-spec.
  632. addr-spec = local-part "@" domain
  633. local-part = dot-atom / quoted-string / obs-local-part
  634. domain = dot-atom / domain-literal / obs-domain
  635. domain-literal = [CFWS] "[" *([FWS] dcontent) [FWS] "]" [CFWS]
  636. dcontent = dtext / quoted-pair
  637. dtext = NO-WS-CTL / ; Non white space controls
  638. %d33-90 / ; The rest of the US-ASCII
  639. %d94-126 ; characters not including "[",
  640. ; "]", or "\"
  641. The domain portion identifies the point to which the mail is
  642. delivered. In the dot-atom form, this is interpreted as an Internet
  643. domain name (either a host name or a mail exchanger name) as
  644. described in [STD3, STD13, STD14]. In the domain-literal form, the
  645. domain is interpreted as the literal Internet address of the
  646. particular host. In both cases, how addressing is used and how
  647. messages are transported to a particular host is covered in the mail
  648. transport document [RFC2821]. These mechanisms are outside of the
  649. scope of this document.
  650. The local-part portion is a domain dependent string. In addresses,
  651. it is simply interpreted on the particular host as a name of a
  652. particular mailbox.
  653. 3.5 Overall message syntax
  654. A message consists of header fields, optionally followed by a message
  655. body. Lines in a message MUST be a maximum of 998 characters
  656. excluding the CRLF, but it is RECOMMENDED that lines be limited to 78
  657. characters excluding the CRLF. (See section 2.1.1 for explanation.)
  658. In a message body, though all of the characters listed in the text
  659. rule MAY be used, the use of US-ASCII control characters (values 1
  660. through 8, 11, 12, and 14 through 31) is discouraged since their
  661. interpretation by receivers for display is not guaranteed.
  662. Resnick Standards Track [Page 17]
  663. RFC 2822 Internet Message Format April 2001
  664. message = (fields / obs-fields)
  665. [CRLF body]
  666. body = *(*998text CRLF) *998text
  667. The header fields carry most of the semantic information and are
  668. defined in section 3.6. The body is simply a series of lines of text
  669. which are uninterpreted for the purposes of this standard.
  670. 3.6. Field definitions
  671. The header fields of a message are defined here. All header fields
  672. have the same general syntactic structure: A field name, followed by
  673. a colon, followed by the field body. The specific syntax for each
  674. header field is defined in the subsequent sections.
  675. Note: In the ABNF syntax for each field in subsequent sections, each
  676. field name is followed by the required colon. However, for brevity
  677. sometimes the colon is not referred to in the textual description of
  678. the syntax. It is, nonetheless, required.
  679. It is important to note that the header fields are not guaranteed to
  680. be in a particular order. They may appear in any order, and they
  681. have been known to be reordered occasionally when transported over
  682. the Internet. However, for the purposes of this standard, header
  683. fields SHOULD NOT be reordered when a message is transported or
  684. transformed. More importantly, the trace header fields and resent
  685. header fields MUST NOT be reordered, and SHOULD be kept in blocks
  686. prepended to the message. See sections 3.6.6 and 3.6.7 for more
  687. information.
  688. The only required header fields are the origination date field and
  689. the originator address field(s). All other header fields are
  690. syntactically optional. More information is contained in the table
  691. following this definition.
  692. fields = *(trace
  693. *(resent-date /
  694. resent-from /
  695. resent-sender /
  696. resent-to /
  697. resent-cc /
  698. resent-bcc /
  699. resent-msg-id))
  700. *(orig-date /
  701. from /
  702. sender /
  703. reply-to /
  704. Resnick Standards Track [Page 18]
  705. RFC 2822 Internet Message Format April 2001
  706. to /
  707. cc /
  708. bcc /
  709. message-id /
  710. in-reply-to /
  711. references /
  712. subject /
  713. comments /
  714. keywords /
  715. optional-field)
  716. The following table indicates limits on the number of times each
  717. field may occur in a message header as well as any special
  718. limitations on the use of those fields. An asterisk next to a value
  719. in the minimum or maximum column indicates that a special restriction
  720. appears in the Notes column.
  721. Field Min number Max number Notes
  722. trace 0 unlimited Block prepended - see
  723. 3.6.7
  724. resent-date 0* unlimited* One per block, required
  725. if other resent fields
  726. present - see 3.6.6
  727. resent-from 0 unlimited* One per block - see
  728. 3.6.6
  729. resent-sender 0* unlimited* One per block, MUST
  730. occur with multi-address
  731. resent-from - see 3.6.6
  732. resent-to 0 unlimited* One per block - see
  733. 3.6.6
  734. resent-cc 0 unlimited* One per block - see
  735. 3.6.6
  736. resent-bcc 0 unlimited* One per block - see
  737. 3.6.6
  738. resent-msg-id 0 unlimited* One per block - see
  739. 3.6.6
  740. orig-date 1 1
  741. from 1 1 See sender and 3.6.2
  742. Resnick Standards Track [Page 19]
  743. RFC 2822 Internet Message Format April 2001
  744. sender 0* 1 MUST occur with multi-
  745. address from - see 3.6.2
  746. reply-to 0 1
  747. to 0 1
  748. cc 0 1
  749. bcc 0 1
  750. message-id 0* 1 SHOULD be present - see
  751. 3.6.4
  752. in-reply-to 0* 1 SHOULD occur in some
  753. replies - see 3.6.4
  754. references 0* 1 SHOULD occur in some
  755. replies - see 3.6.4
  756. subject 0 1
  757. comments 0 unlimited
  758. keywords 0 unlimited
  759. optional-field 0 unlimited
  760. The exact interpretation of each field is described in subsequent
  761. sections.
  762. 3.6.1. The origination date field
  763. The origination date field consists of the field name "Date" followed
  764. by a date-time specification.
  765. orig-date = "Date:" date-time CRLF
  766. The origination date specifies the date and time at which the creator
  767. of the message indicated that the message was complete and ready to
  768. enter the mail delivery system. For instance, this might be the time
  769. that a user pushes the "send" or "submit" button in an application
  770. program. In any case, it is specifically not intended to convey the
  771. time that the message is actually transported, but rather the time at
  772. which the human or other creator of the message has put the message
  773. into its final form, ready for transport. (For example, a portable
  774. computer user who is not connected to a network might queue a message
  775. Resnick Standards Track [Page 20]
  776. RFC 2822 Internet Message Format April 2001
  777. for delivery. The origination date is intended to contain the date
  778. and time that the user queued the message, not the time when the user
  779. connected to the network to send the message.)
  780. 3.6.2. Originator fields
  781. The originator fields of a message consist of the from field, the
  782. sender field (when applicable), and optionally the reply-to field.
  783. The from field consists of the field name "From" and a
  784. comma-separated list of one or more mailbox specifications. If the
  785. from field contains more than one mailbox specification in the
  786. mailbox-list, then the sender field, containing the field name
  787. "Sender" and a single mailbox specification, MUST appear in the
  788. message. In either case, an optional reply-to field MAY also be
  789. included, which contains the field name "Reply-To" and a
  790. comma-separated list of one or more addresses.
  791. from = "From:" mailbox-list CRLF
  792. sender = "Sender:" mailbox CRLF
  793. reply-to = "Reply-To:" address-list CRLF
  794. The originator fields indicate the mailbox(es) of the source of the
  795. message. The "From:" field specifies the author(s) of the message,
  796. that is, the mailbox(es) of the person(s) or system(s) responsible
  797. for the writing of the message. The "Sender:" field specifies the
  798. mailbox of the agent responsible for the actual transmission of the
  799. message. For example, if a secretary were to send a message for
  800. another person, the mailbox of the secretary would appear in the
  801. "Sender:" field and the mailbox of the actual author would appear in
  802. the "From:" field. If the originator of the message can be indicated
  803. by a single mailbox and the author and transmitter are identical, the
  804. "Sender:" field SHOULD NOT be used. Otherwise, both fields SHOULD
  805. appear.
  806. The originator fields also provide the information required when
  807. replying to a message. When the "Reply-To:" field is present, it
  808. indicates the mailbox(es) to which the author of the message suggests
  809. that replies be sent. In the absence of the "Reply-To:" field,
  810. replies SHOULD by default be sent to the mailbox(es) specified in the
  811. "From:" field unless otherwise specified by the person composing the
  812. reply.
  813. In all cases, the "From:" field SHOULD NOT contain any mailbox that
  814. does not belong to the author(s) of the message. See also section
  815. 3.6.3 for more information on forming the destination addresses for a
  816. reply.
  817. Resnick Standards Track [Page 21]
  818. RFC 2822 Internet Message Format April 2001
  819. 3.6.3. Destination address fields
  820. The destination fields of a message consist of three possible fields,
  821. each of the same form: The field name, which is either "To", "Cc", or
  822. "Bcc", followed by a comma-separated list of one or more addresses
  823. (either mailbox or group syntax).
  824. to = "To:" address-list CRLF
  825. cc = "Cc:" address-list CRLF
  826. bcc = "Bcc:" (address-list / [CFWS]) CRLF
  827. The destination fields specify the recipients of the message. Each
  828. destination field may have one or more addresses, and each of the
  829. addresses indicate the intended recipients of the message. The only
  830. difference between the three fields is how each is used.
  831. The "To:" field contains the address(es) of the primary recipient(s)
  832. of the message.
  833. The "Cc:" field (where the "Cc" means "Carbon Copy" in the sense of
  834. making a copy on a typewriter using carbon paper) contains the
  835. addresses of others who are to receive the message, though the
  836. content of the message may not be directed at them.
  837. The "Bcc:" field (where the "Bcc" means "Blind Carbon Copy") contains
  838. addresses of recipients of the message whose addresses are not to be
  839. revealed to other recipients of the message. There are three ways in
  840. which the "Bcc:" field is used. In the first case, when a message
  841. containing a "Bcc:" field is prepared to be sent, the "Bcc:" line is
  842. removed even though all of the recipients (including those specified
  843. in the "Bcc:" field) are sent a copy of the message. In the second
  844. case, recipients specified in the "To:" and "Cc:" lines each are sent
  845. a copy of the message with the "Bcc:" line removed as above, but the
  846. recipients on the "Bcc:" line get a separate copy of the message
  847. containing a "Bcc:" line. (When there are multiple recipient
  848. addresses in the "Bcc:" field, some implementations actually send a
  849. separate copy of the message to each recipient with a "Bcc:"
  850. containing only the address of that particular recipient.) Finally,
  851. since a "Bcc:" field may contain no addresses, a "Bcc:" field can be
  852. sent without any addresses indicating to the recipients that blind
  853. copies were sent to someone. Which method to use with "Bcc:" fields
  854. is implementation dependent, but refer to the "Security
  855. Considerations" section of this document for a discussion of each.
  856. Resnick Standards Track [Page 22]
  857. RFC 2822 Internet Message Format April 2001
  858. When a message is a reply to another message, the mailboxes of the
  859. authors of the original message (the mailboxes in the "From:" field)
  860. or mailboxes specified in the "Reply-To:" field (if it exists) MAY
  861. appear in the "To:" field of the reply since these would normally be
  862. the primary recipients of the reply. If a reply is sent to a message
  863. that has destination fields, it is often desirable to send a copy of
  864. the reply to all of the recipients of the message, in addition to the
  865. author. When such a reply is formed, addresses in the "To:" and
  866. "Cc:" fields of the original message MAY appear in the "Cc:" field of
  867. the reply, since these are normally secondary recipients of the
  868. reply. If a "Bcc:" field is present in the original message,
  869. addresses in that field MAY appear in the "Bcc:" field of the reply,
  870. but SHOULD NOT appear in the "To:" or "Cc:" fields.
  871. Note: Some mail applications have automatic reply commands that
  872. include the destination addresses of the original message in the
  873. destination addresses of the reply. How those reply commands behave
  874. is implementation dependent and is beyond the scope of this document.
  875. In particular, whether or not to include the original destination
  876. addresses when the original message had a "Reply-To:" field is not
  877. addressed here.
  878. 3.6.4. Identification fields
  879. Though optional, every message SHOULD have a "Message-ID:" field.
  880. Furthermore, reply messages SHOULD have "In-Reply-To:" and
  881. "References:" fields as appropriate, as described below.
  882. The "Message-ID:" field contains a single unique message identifier.
  883. The "References:" and "In-Reply-To:" field each contain one or more
  884. unique message identifiers, optionally separated by CFWS.
  885. The message identifier (msg-id) is similar in syntax to an angle-addr
  886. construct without the internal CFWS.
  887. message-id = "Message-ID:" msg-id CRLF
  888. in-reply-to = "In-Reply-To:" 1*msg-id CRLF
  889. references = "References:" 1*msg-id CRLF
  890. msg-id = [CFWS] "<" id-left "@" id-right ">" [CFWS]
  891. id-left = dot-atom-text / no-fold-quote / obs-id-left
  892. id-right = dot-atom-text / no-fold-literal / obs-id-right
  893. no-fold-quote = DQUOTE *(qtext / quoted-pair) DQUOTE
  894. Resnick Standards Track [Page 23]
  895. RFC 2822 Internet Message Format April 2001
  896. no-fold-literal = "[" *(dtext / quoted-pair) "]"
  897. The "Message-ID:" field provides a unique message identifier that
  898. refers to a particular version of a particular message. The
  899. uniqueness of the message identifier is guaranteed by the host that
  900. generates it (see below). This message identifier is intended to be
  901. machine readable and not necessarily meaningful to humans. A message
  902. identifier pertains to exactly one instantiation of a particular
  903. message; subsequent revisions to the message each receive new message
  904. identifiers.
  905. Note: There are many instances when messages are "changed", but those
  906. changes do not constitute a new instantiation of that message, and
  907. therefore the message would not get a new message identifier. For
  908. example, when messages are introduced into the transport system, they
  909. are often prepended with additional header fields such as trace
  910. fields (described in section 3.6.7) and resent fields (described in
  911. section 3.6.6). The addition of such header fields does not change
  912. the identity of the message and therefore the original "Message-ID:"
  913. field is retained. In all cases, it is the meaning that the sender
  914. of the message wishes to convey (i.e., whether this is the same
  915. message or a different message) that determines whether or not the
  916. "Message-ID:" field changes, not any particular syntactic difference
  917. that appears (or does not appear) in the message.
  918. The "In-Reply-To:" and "References:" fields are used when creating a
  919. reply to a message. They hold the message identifier of the original
  920. message and the message identifiers of other messages (for example,
  921. in the case of a reply to a message which was itself a reply). The
  922. "In-Reply-To:" field may be used to identify the message (or
  923. messages) to which the new message is a reply, while the
  924. "References:" field may be used to identify a "thread" of
  925. conversation.
  926. When creating a reply to a message, the "In-Reply-To:" and
  927. "References:" fields of the resultant message are constructed as
  928. follows:
  929. The "In-Reply-To:" field will contain the contents of the "Message-
  930. ID:" field of the message to which this one is a reply (the "parent
  931. message"). If there is more than one parent message, then the "In-
  932. Reply-To:" field will contain the contents of all of the parents'
  933. "Message-ID:" fields. If there is no "Message-ID:" field in any of
  934. the parent messages, then the new message will have no "In-Reply-To:"
  935. field.
  936. Resnick Standards Track [Page 24]
  937. RFC 2822 Internet Message Format April 2001
  938. The "References:" field will contain the contents of the parent's
  939. "References:" field (if any) followed by the contents of the parent's
  940. "Message-ID:" field (if any). If the parent message does not contain
  941. a "References:" field but does have an "In-Reply-To:" field
  942. containing a single message identifier, then the "References:" field
  943. will contain the contents of the parent's "In-Reply-To:" field
  944. followed by the contents of the parent's "Message-ID:" field (if
  945. any). If the parent has none of the "References:", "In-Reply-To:",
  946. or "Message-ID:" fields, then the new message will have no
  947. "References:" field.
  948. Note: Some implementations parse the "References:" field to display
  949. the "thread of the discussion". These implementations assume that
  950. each new message is a reply to a single parent and hence that they
  951. can walk backwards through the "References:" field to find the parent
  952. of each message listed there. Therefore, trying to form a
  953. "References:" field for a reply that has multiple parents is
  954. discouraged and how to do so is not defined in this document.
  955. The message identifier (msg-id) itself MUST be a globally unique
  956. identifier for a message. The generator of the message identifier
  957. MUST guarantee that the msg-id is unique. There are several
  958. algorithms that can be used to accomplish this. Since the msg-id has
  959. a similar syntax to angle-addr (identical except that comments and
  960. folding white space are not allowed), a good method is to put the
  961. domain name (or a domain literal IP address) of the host on which the
  962. message identifier was created on the right hand side of the "@", and
  963. put a combination of the current absolute date and time along with
  964. some other currently unique (perhaps sequential) identifier available
  965. on the system (for example, a process id number) on the left hand
  966. side. Using a date on the left hand side and a domain name or domain
  967. literal on the right hand side makes it possible to guarantee
  968. uniqueness since no two hosts use the same domain name or IP address
  969. at the same time. Though other algorithms will work, it is
  970. RECOMMENDED that the right hand side contain some domain identifier
  971. (either of the host itself or otherwise) such that the generator of
  972. the message identifier can guarantee the uniqueness of the left hand
  973. side within the scope of that domain.
  974. Semantically, the angle bracket characters are not part of the
  975. msg-id; the msg-id is what is contained between the two angle bracket
  976. characters.
  977. Resnick Standards Track [Page 25]
  978. RFC 2822 Internet Message Format April 2001
  979. 3.6.5. Informational fields
  980. The informational fields are all optional. The "Keywords:" field
  981. contains a comma-separated list of one or more words or
  982. quoted-strings. The "Subject:" and "Comments:" fields are
  983. unstructured fields as defined in section 2.2.1, and therefore may
  984. contain text or folding white space.
  985. subject = "Subject:" unstructured CRLF
  986. comments = "Comments:" unstructured CRLF
  987. keywords = "Keywords:" phrase *("," phrase) CRLF
  988. These three fields are intended to have only human-readable content
  989. with information about the message. The "Subject:" field is the most
  990. common and contains a short string identifying the topic of the
  991. message. When used in a reply, the field body MAY start with the
  992. string "Re: " (from the Latin "res", in the matter of) followed by
  993. the contents of the "Subject:" field body of the original message.
  994. If this is done, only one instance of the literal string "Re: " ought
  995. to be used since use of other strings or more than one instance can
  996. lead to undesirable consequences. The "Comments:" field contains any
  997. additional comments on the text of the body of the message. The
  998. "Keywords:" field contains a comma-separated list of important words
  999. and phrases that might be useful for the recipient.
  1000. 3.6.6. Resent fields
  1001. Resent fields SHOULD be added to any message that is reintroduced by
  1002. a user into the transport system. A separate set of resent fields
  1003. SHOULD be added each time this is done. All of the resent fields
  1004. corresponding to a particular resending of the message SHOULD be
  1005. together. Each new set of resent fields is prepended to the message;
  1006. that is, the most recent set of resent fields appear earlier in the
  1007. message. No other fields in the message are changed when resent
  1008. fields are added.
  1009. Each of the resent fields corresponds to a particular field elsewhere
  1010. in the syntax. For instance, the "Resent-Date:" field corresponds to
  1011. the "Date:" field and the "Resent-To:" field corresponds to the "To:"
  1012. field. In each case, the syntax for the field body is identical to
  1013. the syntax given previously for the corresponding field.
  1014. When resent fields are used, the "Resent-From:" and "Resent-Date:"
  1015. fields MUST be sent. The "Resent-Message-ID:" field SHOULD be sent.
  1016. "Resent-Sender:" SHOULD NOT be used if "Resent-Sender:" would be
  1017. identical to "Resent-From:".
  1018. Resnick Standards Track [Page 26]
  1019. RFC 2822 Internet Message Format April 2001
  1020. resent-date = "Resent-Date:" date-time CRLF
  1021. resent-from = "Resent-From:" mailbox-list CRLF
  1022. resent-sender = "Resent-Sender:" mailbox CRLF
  1023. resent-to = "Resent-To:" address-list CRLF
  1024. resent-cc = "Resent-Cc:" address-list CRLF
  1025. resent-bcc = "Resent-Bcc:" (address-list / [CFWS]) CRLF
  1026. resent-msg-id = "Resent-Message-ID:" msg-id CRLF
  1027. Resent fields are used to identify a message as having been
  1028. reintroduced into the transport system by a user. The purpose of
  1029. using resent fields is to have the message appear to the final
  1030. recipient as if it were sent directly by the original sender, with
  1031. all of the original fields remaining the same. Each set of resent
  1032. fields correspond to a particular resending event. That is, if a
  1033. message is resent multiple times, each set of resent fields gives
  1034. identifying information for each individual time. Resent fields are
  1035. strictly informational. They MUST NOT be used in the normal
  1036. processing of replies or other such automatic actions on messages.
  1037. Note: Reintroducing a message into the transport system and using
  1038. resent fields is a different operation from "forwarding".
  1039. "Forwarding" has two meanings: One sense of forwarding is that a mail
  1040. reading program can be told by a user to forward a copy of a message
  1041. to another person, making the forwarded message the body of the new
  1042. message. A forwarded message in this sense does not appear to have
  1043. come from the original sender, but is an entirely new message from
  1044. the forwarder of the message. On the other hand, forwarding is also
  1045. used to mean when a mail transport program gets a message and
  1046. forwards it on to a different destination for final delivery. Resent
  1047. header fields are not intended for use with either type of
  1048. forwarding.
  1049. The resent originator fields indicate the mailbox of the person(s) or
  1050. system(s) that resent the message. As with the regular originator
  1051. fields, there are two forms: a simple "Resent-From:" form which
  1052. contains the mailbox of the individual doing the resending, and the
  1053. more complex form, when one individual (identified in the
  1054. "Resent-Sender:" field) resends a message on behalf of one or more
  1055. others (identified in the "Resent-From:" field).
  1056. Note: When replying to a resent message, replies behave just as they
  1057. would with any other message, using the original "From:",
  1058. Resnick Standards Track [Page 27]
  1059. RFC 2822 Internet Message Format April 2001
  1060. "Reply-To:", "Message-ID:", and other fields. The resent fields are
  1061. only informational and MUST NOT be used in the normal processing of
  1062. replies.
  1063. The "Resent-Date:" indicates the date and time at which the resent
  1064. message is dispatched by the resender of the message. Like the
  1065. "Date:" field, it is not the date and time that the message was
  1066. actually transported.
  1067. The "Resent-To:", "Resent-Cc:", and "Resent-Bcc:" fields function
  1068. identically to the "To:", "Cc:", and "Bcc:" fields respectively,
  1069. except that they indicate the recipients of the resent message, not
  1070. the recipients of the original message.
  1071. The "Resent-Message-ID:" field provides a unique identifier for the
  1072. resent message.
  1073. 3.6.7. Trace fields
  1074. The trace fields are a group of header fields consisting of an
  1075. optional "Return-Path:" field, and one or more "Received:" fields.
  1076. The "Return-Path:" header field contains a pair of angle brackets
  1077. that enclose an optional addr-spec. The "Received:" field contains a
  1078. (possibly empty) list of name/value pairs followed by a semicolon and
  1079. a date-time specification. The first item of the name/value pair is
  1080. defined by item-name, and the second item is either an addr-spec, an
  1081. atom, a domain, or a msg-id. Further restrictions may be applied to
  1082. the syntax of the trace fields by standards that provide for their
  1083. use, such as [RFC2821].
  1084. trace = [return]
  1085. 1*received
  1086. return = "Return-Path:" path CRLF
  1087. path = ([CFWS] "<" ([CFWS] / addr-spec) ">" [CFWS]) /
  1088. obs-path
  1089. received = "Received:" name-val-list ";" date-time CRLF
  1090. name-val-list = [CFWS] [name-val-pair *(CFWS name-val-pair)]
  1091. name-val-pair = item-name CFWS item-value
  1092. item-name = ALPHA *(["-"] (ALPHA / DIGIT))
  1093. item-value = 1*angle-addr / addr-spec /
  1094. atom / domain / msg-id
  1095. Resnick Standards Track [Page 28]
  1096. RFC 2822 Internet Message Format April 2001
  1097. A full discussion of the Internet mail use of trace fields is
  1098. contained in [RFC2821]. For the purposes of this standard, the trace
  1099. fields are strictly informational, and any formal interpretation of
  1100. them is outside of the scope of this document.
  1101. 3.6.8. Optional fields
  1102. Fields may appear in messages that are otherwise unspecified in this
  1103. standard. They MUST conform to the syntax of an optional-field.
  1104. This is a field name, made up of the printable US-ASCII characters
  1105. except SP and colon, followed by a colon, followed by any text which
  1106. conforms to unstructured.
  1107. The field names of any optional-field MUST NOT be identical to any
  1108. field name specified elsewhere in this standard.
  1109. optional-field = field-name ":" unstructured CRLF
  1110. field-name = 1*ftext
  1111. ftext = %d33-57 / ; Any character except
  1112. %d59-126 ; controls, SP, and
  1113. ; ":".
  1114. For the purposes of this standard, any optional field is
  1115. uninterpreted.
  1116. 4. Obsolete Syntax
  1117. Earlier versions of this standard allowed for different (usually more
  1118. liberal) syntax than is allowed in this version. Also, there have
  1119. been syntactic elements used in messages on the Internet whose
  1120. interpretation have never been documented. Though some of these
  1121. syntactic forms MUST NOT be generated according to the grammar in
  1122. section 3, they MUST be accepted and parsed by a conformant receiver.
  1123. This section documents many of these syntactic elements. Taking the
  1124. grammar in section 3 and adding the definitions presented in this
  1125. section will result in the grammar to use for interpretation of
  1126. messages.
  1127. Note: This section identifies syntactic forms that any implementation
  1128. MUST reasonably interpret. However, there are certainly Internet
  1129. messages which do not conform to even the additional syntax given in
  1130. this section. The fact that a particular form does not appear in any
  1131. section of this document is not justification for computer programs
  1132. to crash or for malformed data to be irretrievably lost by any
  1133. implementation. To repeat an example, though this document requires
  1134. lines in messages to be no longer than 998 characters, silently
  1135. Resnick Standards Track [Page 29]
  1136. RFC 2822 Internet Message Format April 2001
  1137. discarding the 999th and subsequent characters in a line without
  1138. warning would still be bad behavior for an implementation. It is up
  1139. to the implementation to deal with messages robustly.
  1140. One important difference between the obsolete (interpreting) and the
  1141. current (generating) syntax is that in structured header field bodies
  1142. (i.e., between the colon and the CRLF of any structured header
  1143. field), white space characters, including folding white space, and
  1144. comments can be freely inserted between any syntactic tokens. This
  1145. allows many complex forms that have proven difficult for some
  1146. implementations to parse.
  1147. Another key difference between the obsolete and the current syntax is
  1148. that the rule in section 3.2.3 regarding lines composed entirely of
  1149. white space in comments and folding white space does not apply. See
  1150. the discussion of folding white space in section 4.2 below.
  1151. Finally, certain characters that were formerly allowed in messages
  1152. appear in this section. The NUL character (ASCII value 0) was once
  1153. allowed, but is no longer for compatibility reasons. CR and LF were
  1154. allowed to appear in messages other than as CRLF; this use is also
  1155. shown here.
  1156. Other differences in syntax and semantics are noted in the following
  1157. sections.
  1158. 4.1. Miscellaneous obsolete tokens
  1159. These syntactic elements are used elsewhere in the obsolete syntax or
  1160. in the main syntax. The obs-char and obs-qp elements each add ASCII
  1161. value 0. Bare CR and bare LF are added to obs-text and obs-utext.
  1162. The period character is added to obs-phrase. The obs-phrase-list
  1163. provides for "empty" elements in a comma-separated list of phrases.
  1164. Note: The "period" (or "full stop") character (".") in obs-phrase is
  1165. not a form that was allowed in earlier versions of this or any other
  1166. standard. Period (nor any other character from specials) was not
  1167. allowed in phrase because it introduced a parsing difficulty
  1168. distinguishing between phrases and portions of an addr-spec (see
  1169. section 4.4). It appears here because the period character is
  1170. currently used in many messages in the display-name portion of
  1171. addresses, especially for initials in names, and therefore must be
  1172. interpreted properly. In the future, period may appear in the
  1173. regular syntax of phrase.
  1174. obs-qp = "\" (%d0-127)
  1175. obs-text = *LF *CR *(obs-char *LF *CR)
  1176. Resnick Standards Track [Page 30]
  1177. RFC 2822 Internet Message Format April 2001
  1178. obs-char = %d0-9 / %d11 / ; %d0-127 except CR and
  1179. %d12 / %d14-127 ; LF
  1180. obs-utext = obs-text
  1181. obs-phrase = word *(word / "." / CFWS)
  1182. obs-phrase-list = phrase / 1*([phrase] [CFWS] "," [CFWS]) [phrase]
  1183. Bare CR and bare LF appear in messages with two different meanings.
  1184. In many cases, bare CR or bare LF are used improperly instead of CRLF
  1185. to indicate line separators. In other cases, bare CR and bare LF are
  1186. used simply as ASCII control characters with their traditional ASCII
  1187. meanings.
  1188. 4.2. Obsolete folding white space
  1189. In the obsolete syntax, any amount of folding white space MAY be
  1190. inserted where the obs-FWS rule is allowed. This creates the
  1191. possibility of having two consecutive "folds" in a line, and
  1192. therefore the possibility that a line which makes up a folded header
  1193. field could be composed entirely of white space.
  1194. obs-FWS = 1*WSP *(CRLF 1*WSP)
  1195. 4.3. Obsolete Date and Time
  1196. The syntax for the obsolete date format allows a 2 digit year in the
  1197. date field and allows for a list of alphabetic time zone
  1198. specifications that were used in earlier versions of this standard.
  1199. It also permits comments and folding white space between many of the
  1200. tokens.
  1201. obs-day-of-week = [CFWS] day-name [CFWS]
  1202. obs-year = [CFWS] 2*DIGIT [CFWS]
  1203. obs-month = CFWS month-name CFWS
  1204. obs-day = [CFWS] 1*2DIGIT [CFWS]
  1205. obs-hour = [CFWS] 2DIGIT [CFWS]
  1206. obs-minute = [CFWS] 2DIGIT [CFWS]
  1207. obs-second = [CFWS] 2DIGIT [CFWS]
  1208. obs-zone = "UT" / "GMT" / ; Universal Time
  1209. Resnick Standards Track [Page 31]
  1210. RFC 2822 Internet Message Format April 2001
  1211. ; North American UT
  1212. ; offsets
  1213. "EST" / "EDT" / ; Eastern: - 5/ - 4
  1214. "CST" / "CDT" / ; Central: - 6/ - 5
  1215. "MST" / "MDT" / ; Mountain: - 7/ - 6
  1216. "PST" / "PDT" / ; Pacific: - 8/ - 7
  1217. %d65-73 / ; Military zones - "A"
  1218. %d75-90 / ; through "I" and "K"
  1219. %d97-105 / ; through "Z", both
  1220. %d107-122 ; upper and lower case
  1221. Where a two or three digit year occurs in a date, the year is to be
  1222. interpreted as follows: If a two digit year is encountered whose
  1223. value is between 00 and 49, the year is interpreted by adding 2000,
  1224. ending up with a value between 2000 and 2049. If a two digit year is
  1225. encountered with a value between 50 and 99, or any three digit year
  1226. is encountered, the year is interpreted by adding 1900.
  1227. In the obsolete time zone, "UT" and "GMT" are indications of
  1228. "Universal Time" and "Greenwich Mean Time" respectively and are both
  1229. semantically identical to "+0000".
  1230. The remaining three character zones are the US time zones. The first
  1231. letter, "E", "C", "M", or "P" stands for "Eastern", "Central",
  1232. "Mountain" and "Pacific". The second letter is either "S" for
  1233. "Standard" time, or "D" for "Daylight" (or summer) time. Their
  1234. interpretations are as follows:
  1235. EDT is semantically equivalent to -0400
  1236. EST is semantically equivalent to -0500
  1237. CDT is semantically equivalent to -0500
  1238. CST is semantically equivalent to -0600
  1239. MDT is semantically equivalent to -0600
  1240. MST is semantically equivalent to -0700
  1241. PDT is semantically equivalent to -0700
  1242. PST is semantically equivalent to -0800
  1243. The 1 character military time zones were defined in a non-standard
  1244. way in [RFC822] and are therefore unpredictable in their meaning.
  1245. The original definitions of the military zones "A" through "I" are
  1246. equivalent to "+0100" through "+0900" respectively; "K", "L", and "M"
  1247. are equivalent to "+1000", "+1100", and "+1200" respectively; "N"
  1248. through "Y" are equivalent to "-0100" through "-1200" respectively;
  1249. and "Z" is equivalent to "+0000". However, because of the error in
  1250. [RFC822], they SHOULD all be considered equivalent to "-0000" unless
  1251. there is out-of-band information confirming their meaning.
  1252. Resnick Standards Track [Page 32]
  1253. RFC 2822 Internet Message Format April 2001
  1254. Other multi-character (usually between 3 and 5) alphabetic time zones
  1255. have been used in Internet messages. Any such time zone whose
  1256. meaning is not known SHOULD be considered equivalent to "-0000"
  1257. unless there is out-of-band information confirming their meaning.
  1258. 4.4. Obsolete Addressing
  1259. There are three primary differences in addressing. First, mailbox
  1260. addresses were allowed to have a route portion before the addr-spec
  1261. when enclosed in "<" and ">". The route is simply a comma-separated
  1262. list of domain names, each preceded by "@", and the list terminated
  1263. by a colon. Second, CFWS were allowed between the period-separated
  1264. elements of local-part and domain (i.e., dot-atom was not used). In
  1265. addition, local-part is allowed to contain quoted-string in addition
  1266. to just atom. Finally, mailbox-list and address-list were allowed to
  1267. have "null" members. That is, there could be two or more commas in
  1268. such a list with nothing in between them.
  1269. obs-angle-addr = [CFWS] "<" [obs-route] addr-spec ">" [CFWS]
  1270. obs-route = [CFWS] obs-domain-list ":" [CFWS]
  1271. obs-domain-list = "@" domain *(*(CFWS / "," ) [CFWS] "@" domain)
  1272. obs-local-part = word *("." word)
  1273. obs-domain = atom *("." atom)
  1274. obs-mbox-list = 1*([mailbox] [CFWS] "," [CFWS]) [mailbox]
  1275. obs-addr-list = 1*([address] [CFWS] "," [CFWS]) [address]
  1276. When interpreting addresses, the route portion SHOULD be ignored.
  1277. 4.5. Obsolete header fields
  1278. Syntactically, the primary difference in the obsolete field syntax is
  1279. that it allows multiple occurrences of any of the fields and they may
  1280. occur in any order. Also, any amount of white space is allowed
  1281. before the ":" at the end of the field name.
  1282. obs-fields = *(obs-return /
  1283. obs-received /
  1284. obs-orig-date /
  1285. obs-from /
  1286. obs-sender /
  1287. obs-reply-to /
  1288. obs-to /
  1289. Resnick Standards Track [Page 33]
  1290. RFC 2822 Internet Message Format April 2001
  1291. obs-cc /
  1292. obs-bcc /
  1293. obs-message-id /
  1294. obs-in-reply-to /
  1295. obs-references /
  1296. obs-subject /
  1297. obs-comments /
  1298. obs-keywords /
  1299. obs-resent-date /
  1300. obs-resent-from /
  1301. obs-resent-send /
  1302. obs-resent-rply /
  1303. obs-resent-to /
  1304. obs-resent-cc /
  1305. obs-resent-bcc /
  1306. obs-resent-mid /
  1307. obs-optional)
  1308. Except for destination address fields (described in section 4.5.3),
  1309. the interpretation of multiple occurrences of fields is unspecified.
  1310. Also, the interpretation of trace fields and resent fields which do
  1311. not occur in blocks prepended to the message is unspecified as well.
  1312. Unless otherwise noted in the following sections, interpretation of
  1313. other fields is identical to the interpretation of their non-obsolete
  1314. counterparts in section 3.
  1315. 4.5.1. Obsolete origination date field
  1316. obs-orig-date = "Date" *WSP ":" date-time CRLF
  1317. 4.5.2. Obsolete originator fields
  1318. obs-from = "From" *WSP ":" mailbox-list CRLF
  1319. obs-sender = "Sender" *WSP ":" mailbox CRLF
  1320. obs-reply-to = "Reply-To" *WSP ":" mailbox-list CRLF
  1321. 4.5.3. Obsolete destination address fields
  1322. obs-to = "To" *WSP ":" address-list CRLF
  1323. obs-cc = "Cc" *WSP ":" address-list CRLF
  1324. obs-bcc = "Bcc" *WSP ":" (address-list / [CFWS]) CRLF
  1325. Resnick Standards Track [Page 34]
  1326. RFC 2822 Internet Message Format April 2001
  1327. When multiple occurrences of destination address fields occur in a
  1328. message, they SHOULD be treated as if the address-list in the first
  1329. occurrence of the field is combined with the address lists of the
  1330. subsequent occurrences by adding a comma and concatenating.
  1331. 4.5.4. Obsolete identification fields
  1332. The obsolete "In-Reply-To:" and "References:" fields differ from the
  1333. current syntax in that they allow phrase (words or quoted strings) to
  1334. appear. The obsolete forms of the left and right sides of msg-id
  1335. allow interspersed CFWS, making them syntactically identical to
  1336. local-part and domain respectively.
  1337. obs-message-id = "Message-ID" *WSP ":" msg-id CRLF
  1338. obs-in-reply-to = "In-Reply-To" *WSP ":" *(phrase / msg-id) CRLF
  1339. obs-references = "References" *WSP ":" *(phrase / msg-id) CRLF
  1340. obs-id-left = local-part
  1341. obs-id-right = domain
  1342. For purposes of interpretation, the phrases in the "In-Reply-To:" and
  1343. "References:" fields are ignored.
  1344. Semantically, none of the optional CFWS surrounding the local-part
  1345. and the domain are part of the obs-id-left and obs-id-right
  1346. respectively.
  1347. 4.5.5. Obsolete informational fields
  1348. obs-subject = "Subject" *WSP ":" unstructured CRLF
  1349. obs-comments = "Comments" *WSP ":" unstructured CRLF
  1350. obs-keywords = "Keywords" *WSP ":" obs-phrase-list CRLF
  1351. 4.5.6. Obsolete resent fields
  1352. The obsolete syntax adds a "Resent-Reply-To:" field, which consists
  1353. of the field name, the optional comments and folding white space, the
  1354. colon, and a comma separated list of addresses.
  1355. obs-resent-from = "Resent-From" *WSP ":" mailbox-list CRLF
  1356. obs-resent-send = "Resent-Sender" *WSP ":" mailbox CRLF
  1357. Resnick Standards Track [Page 35]
  1358. RFC 2822 Internet Message Format April 2001
  1359. obs-resent-date = "Resent-Date" *WSP ":" date-time CRLF
  1360. obs-resent-to = "Resent-To" *WSP ":" address-list CRLF
  1361. obs-resent-cc = "Resent-Cc" *WSP ":" address-list CRLF
  1362. obs-resent-bcc = "Resent-Bcc" *WSP ":"
  1363. (address-list / [CFWS]) CRLF
  1364. obs-resent-mid = "Resent-Message-ID" *WSP ":" msg-id CRLF
  1365. obs-resent-rply = "Resent-Reply-To" *WSP ":" address-list CRLF
  1366. As with other resent fields, the "Resent-Reply-To:" field is to be
  1367. treated as trace information only.
  1368. 4.5.7. Obsolete trace fields
  1369. The obs-return and obs-received are again given here as template
  1370. definitions, just as return and received are in section 3. Their
  1371. full syntax is given in [RFC2821].
  1372. obs-return = "Return-Path" *WSP ":" path CRLF
  1373. obs-received = "Received" *WSP ":" name-val-list CRLF
  1374. obs-path = obs-angle-addr
  1375. 4.5.8. Obsolete optional fields
  1376. obs-optional = field-name *WSP ":" unstructured CRLF
  1377. 5. Security Considerations
  1378. Care needs to be taken when displaying messages on a terminal or
  1379. terminal emulator. Powerful terminals may act on escape sequences
  1380. and other combinations of ASCII control characters with a variety of
  1381. consequences. They can remap the keyboard or permit other
  1382. modifications to the terminal which could lead to denial of service
  1383. or even damaged data. They can trigger (sometimes programmable)
  1384. answerback messages which can allow a message to cause commands to be
  1385. issued on the recipient's behalf. They can also effect the operation
  1386. of terminal attached devices such as printers. Message viewers may
  1387. wish to strip potentially dangerous terminal escape sequences from
  1388. the message prior to display. However, other escape sequences appear
  1389. in messages for useful purposes (cf. [RFC2045, RFC2046, RFC2047,
  1390. RFC2048, RFC2049, ISO2022]) and therefore should not be stripped
  1391. indiscriminately.
  1392. Resnick Standards Track [Page 36]
  1393. RFC 2822 Internet Message Format April 2001
  1394. Transmission of non-text objects in messages raises additional
  1395. security issues. These issues are discussed in [RFC2045, RFC2046,
  1396. RFC2047, RFC2048, RFC2049].
  1397. Many implementations use the "Bcc:" (blind carbon copy) field
  1398. described in section 3.6.3 to facilitate sending messages to
  1399. recipients without revealing the addresses of one or more of the
  1400. addressees to the other recipients. Mishandling this use of "Bcc:"
  1401. has implications for confidential information that might be revealed,
  1402. which could eventually lead to security problems through knowledge of
  1403. even the existence of a particular mail address. For example, if
  1404. using the first method described in section 3.6.3, where the "Bcc:"
  1405. line is removed from the message, blind recipients have no explicit
  1406. indication that they have been sent a blind copy, except insofar as
  1407. their address does not appear in the message header. Because of
  1408. this, one of the blind addressees could potentially send a reply to
  1409. all of the shown recipients and accidentally reveal that the message
  1410. went to the blind recipient. When the second method from section
  1411. 3.6.3 is used, the blind recipient's address appears in the "Bcc:"
  1412. field of a separate copy of the message. If the "Bcc:" field sent
  1413. contains all of the blind addressees, all of the "Bcc:" recipients
  1414. will be seen by each "Bcc:" recipient. Even if a separate message is
  1415. sent to each "Bcc:" recipient with only the individual's address,
  1416. implementations still need to be careful to process replies to the
  1417. message as per section 3.6.3 so as not to accidentally reveal the
  1418. blind recipient to other recipients.
  1419. 6. Bibliography
  1420. [ASCII] American National Standards Institute (ANSI), Coded
  1421. Character Set - 7-Bit American National Standard Code for
  1422. Information Interchange, ANSI X3.4, 1986.
  1423. [ISO2022] International Organization for Standardization (ISO),
  1424. Information processing - ISO 7-bit and 8-bit coded
  1425. character sets - Code extension techniques, Third edition
  1426. - 1986-05-01, ISO 2022, 1986.
  1427. [RFC822] Crocker, D., "Standard for the Format of ARPA Internet
  1428. Text Messages", RFC 822, August 1982.
  1429. [RFC2045] Freed, N. and N. Borenstein, "Multipurpose Internet Mail
  1430. Extensions (MIME) Part One: Format of Internet Message
  1431. Bodies", RFC 2045, November 1996.
  1432. [RFC2046] Freed, N. and N. Borenstein, "Multipurpose Internet Mail
  1433. Extensions (MIME) Part Two: Media Types", RFC 2046,
  1434. November 1996.
  1435. Resnick Standards Track [Page 37]
  1436. RFC 2822 Internet Message Format April 2001
  1437. [RFC2047] Moore, K., "Multipurpose Internet Mail Extensions (MIME)
  1438. Part Three: Message Header Extensions for Non-ASCII Text",
  1439. RFC 2047, November 1996.
  1440. [RFC2048] Freed, N., Klensin, J. and J. Postel, "Multipurpose
  1441. Internet Mail Extensions (MIME) Part Four: Format of
  1442. Internet Message Bodies", RFC 2048, November 1996.
  1443. [RFC2049] Freed, N. and N. Borenstein, "Multipurpose Internet Mail
  1444. Extensions (MIME) Part Five: Conformance Criteria and
  1445. Examples", RFC 2049, November 1996.
  1446. [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
  1447. Requirement Levels", BCP 14, RFC 2119, March 1997.
  1448. [RFC2234] Crocker, D., Editor, and P. Overell, "Augmented BNF for
  1449. Syntax Specifications: ABNF", RFC 2234, November 1997.
  1450. [RFC2821] Klensin, J., Editor, "Simple Mail Transfer Protocol", RFC
  1451. 2821, March 2001.
  1452. [STD3] Braden, R., "Host Requirements", STD 3, RFC 1122 and RFC
  1453. 1123, October 1989.
  1454. [STD12] Mills, D., "Network Time Protocol", STD 12, RFC 1119,
  1455. September 1989.
  1456. [STD13] Mockapetris, P., "Domain Name System", STD 13, RFC 1034
  1457. and RFC 1035, November 1987.
  1458. [STD14] Partridge, C., "Mail Routing and the Domain System", STD
  1459. 14, RFC 974, January 1986.
  1460. 7. Editor's Address
  1461. Peter W. Resnick
  1462. QUALCOMM Incorporated
  1463. 5775 Morehouse Drive
  1464. San Diego, CA 92121-1714
  1465. USA
  1466. Phone: +1 858 651 4478
  1467. Fax: +1 858 651 1102
  1468. EMail: presnick@qualcomm.com
  1469. Resnick Standards Track [Page 38]
  1470. RFC 2822 Internet Message Format April 2001
  1471. 8. Acknowledgements
  1472. Many people contributed to this document. They included folks who
  1473. participated in the Detailed Revision and Update of Messaging
  1474. Standards (DRUMS) Working Group of the Internet Engineering Task
  1475. Force (IETF), the chair of DRUMS, the Area Directors of the IETF, and
  1476. people who simply sent their comments in via e-mail. The editor is
  1477. deeply indebted to them all and thanks them sincerely. The below
  1478. list includes everyone who sent e-mail concerning this document.
  1479. Hopefully, everyone who contributed is named here:
  1480. Matti Aarnio Barry Finkel Larry Masinter
  1481. Tanaka Akira Erik Forsberg Denis McKeon
  1482. Russ Allbery Chuck Foster William P McQuillan
  1483. Eric Allman Paul Fox Alexey Melnikov
  1484. Harald Tveit Alvestrand Klaus M. Frank Perry E. Metzger
  1485. Ran Atkinson Ned Freed Steven Miller
  1486. Jos Backus Jochen Friedrich Keith Moore
  1487. Bruce Balden Randall C. Gellens John Gardiner Myers
  1488. Dave Barr Sukvinder Singh Gill Chris Newman
  1489. Alan Barrett Tim Goodwin John W. Noerenberg
  1490. John Beck Philip Guenther Eric Norman
  1491. J. Robert von Behren Tony Hansen Mike O'Dell
  1492. Jos den Bekker John Hawkinson Larry Osterman
  1493. D. J. Bernstein Philip Hazel Paul Overell
  1494. James Berriman Kai Henningsen Jacob Palme
  1495. Norbert Bollow Robert Herriot Michael A. Patton
  1496. Raj Bose Paul Hethmon Uzi Paz
  1497. Antony Bowesman Jim Hill Michael A. Quinlan
  1498. Scott Bradner Paul E. Hoffman Eric S. Raymond
  1499. Randy Bush Steve Hole Sam Roberts
  1500. Tom Byrer Kari Hurtta Hugh Sasse
  1501. Bruce Campbell Marco S. Hyman Bart Schaefer
  1502. Larry Campbell Ofer Inbar Tom Scola
  1503. W. J. Carpenter Olle Jarnefors Wolfgang Segmuller
  1504. Michael Chapman Kevin Johnson Nick Shelness
  1505. Richard Clayton Sudish Joseph John Stanley
  1506. Maurizio Codogno Maynard Kang Einar Stefferud
  1507. Jim Conklin Prabhat Keni Jeff Stephenson
  1508. R. Kelley Cook John C. Klensin Bernard Stern
  1509. Steve Coya Graham Klyne Peter Sylvester
  1510. Mark Crispin Brad Knowles Mark Symons
  1511. Dave Crocker Shuhei Kobayashi Eric Thomas
  1512. Matt Curtin Peter Koch Lee Thompson
  1513. Michael D'Errico Dan Kohn Karel De Vriendt
  1514. Cyrus Daboo Christian Kuhtz Matthew Wall
  1515. Jutta Degener Anand Kumria Rolf Weber
  1516. Mark Delany Steen Larsen Brent B. Welch
  1517. Resnick Standards Track [Page 39]
  1518. RFC 2822 Internet Message Format April 2001
  1519. Steve Dorner Eliot Lear Dan Wing
  1520. Harold A. Driscoll Barry Leiba Jack De Winter
  1521. Michael Elkins Jay Levitt Gregory J. Woodhouse
  1522. Robert Elz Lars-Johan Liman Greg A. Woods
  1523. Johnny Eriksson Charles Lindsey Kazu Yamamoto
  1524. Erik E. Fair Pete Loshin Alain Zahm
  1525. Roger Fajman Simon Lyall Jamie Zawinski
  1526. Patrik Faltstrom Bill Manning Timothy S. Zurcher
  1527. Claus Andre Farber John Martin
  1528. Resnick Standards Track [Page 40]
  1529. RFC 2822 Internet Message Format April 2001
  1530. Appendix A. Example messages
  1531. This section presents a selection of messages. These are intended to
  1532. assist in the implementation of this standard, but should not be
  1533. taken as normative; that is to say, although the examples in this
  1534. section were carefully reviewed, if there happens to be a conflict
  1535. between these examples and the syntax described in sections 3 and 4
  1536. of this document, the syntax in those sections is to be taken as
  1537. correct.
  1538. Messages are delimited in this section between lines of "----". The
  1539. "----" lines are not part of the message itself.
  1540. A.1. Addressing examples
  1541. The following are examples of messages that might be sent between two
  1542. individuals.
  1543. A.1.1. A message from one person to another with simple addressing
  1544. This could be called a canonical message. It has a single author,
  1545. John Doe, a single recipient, Mary Smith, a subject, the date, a
  1546. message identifier, and a textual message in the body.
  1547. ----
  1548. From: John Doe <jdoe@machine.example>
  1549. To: Mary Smith <mary@example.net>
  1550. Subject: Saying Hello
  1551. Date: Fri, 21 Nov 1997 09:55:06 -0600
  1552. Message-ID: <1234@local.machine.example>
  1553. This is a message just to say hello.
  1554. So, "Hello".
  1555. ----
  1556. Resnick Standards Track [Page 41]
  1557. RFC 2822 Internet Message Format April 2001
  1558. If John's secretary Michael actually sent the message, though John
  1559. was the author and replies to this message should go back to him, the
  1560. sender field would be used:
  1561. ----
  1562. From: John Doe <jdoe@machine.example>
  1563. Sender: Michael Jones <mjones@machine.example>
  1564. To: Mary Smith <mary@example.net>
  1565. Subject: Saying Hello
  1566. Date: Fri, 21 Nov 1997 09:55:06 -0600
  1567. Message-ID: <1234@local.machine.example>
  1568. This is a message just to say hello.
  1569. So, "Hello".
  1570. ----
  1571. A.1.2. Different types of mailboxes
  1572. This message includes multiple addresses in the destination fields
  1573. and also uses several different forms of addresses.
  1574. ----
  1575. From: "Joe Q. Public" <john.q.public@example.com>
  1576. To: Mary Smith <mary@x.test>, jdoe@example.org, Who? <one@y.test>
  1577. Cc: <boss@nil.test>, "Giant; \"Big\" Box" <sysservices@example.net>
  1578. Date: Tue, 1 Jul 2003 10:52:37 +0200
  1579. Message-ID: <5678.21-Nov-1997@example.com>
  1580. Hi everyone.
  1581. ----
  1582. Note that the display names for Joe Q. Public and Giant; "Big" Box
  1583. needed to be enclosed in double-quotes because the former contains
  1584. the period and the latter contains both semicolon and double-quote
  1585. characters (the double-quote characters appearing as quoted-pair
  1586. construct). Conversely, the display name for Who? could appear
  1587. without them because the question mark is legal in an atom. Notice
  1588. also that jdoe@example.org and boss@nil.test have no display names
  1589. associated with them at all, and jdoe@example.org uses the simpler
  1590. address form without the angle brackets.
  1591. Resnick Standards Track [Page 42]
  1592. RFC 2822 Internet Message Format April 2001
  1593. A.1.3. Group addresses
  1594. ----
  1595. From: Pete <pete@silly.example>
  1596. To: A Group:Chris Jones <c@a.test>,joe@where.test,John <jdoe@one.test>;
  1597. Cc: Undisclosed recipients:;
  1598. Date: Thu, 13 Feb 1969 23:32:54 -0330
  1599. Message-ID: <testabcd.1234@silly.example>
  1600. Testing.
  1601. ----
  1602. In this message, the "To:" field has a single group recipient named A
  1603. Group which contains 3 addresses, and a "Cc:" field with an empty
  1604. group recipient named Undisclosed recipients.
  1605. A.2. Reply messages
  1606. The following is a series of three messages that make up a
  1607. conversation thread between John and Mary. John firsts sends a
  1608. message to Mary, Mary then replies to John's message, and then John
  1609. replies to Mary's reply message.
  1610. Note especially the "Message-ID:", "References:", and "In-Reply-To:"
  1611. fields in each message.
  1612. ----
  1613. From: John Doe <jdoe@machine.example>
  1614. To: Mary Smith <mary@example.net>
  1615. Subject: Saying Hello
  1616. Date: Fri, 21 Nov 1997 09:55:06 -0600
  1617. Message-ID: <1234@local.machine.example>
  1618. This is a message just to say hello.
  1619. So, "Hello".
  1620. ----
  1621. Resnick Standards Track [Page 43]
  1622. RFC 2822 Internet Message Format April 2001
  1623. When sending replies, the Subject field is often retained, though
  1624. prepended with "Re: " as described in section 3.6.5.
  1625. ----
  1626. From: Mary Smith <mary@example.net>
  1627. To: John Doe <jdoe@machine.example>
  1628. Reply-To: "Mary Smith: Personal Account" <smith@home.example>
  1629. Subject: Re: Saying Hello
  1630. Date: Fri, 21 Nov 1997 10:01:10 -0600
  1631. Message-ID: <3456@example.net>
  1632. In-Reply-To: <1234@local.machine.example>
  1633. References: <1234@local.machine.example>
  1634. This is a reply to your hello.
  1635. ----
  1636. Note the "Reply-To:" field in the above message. When John replies
  1637. to Mary's message above, the reply should go to the address in the
  1638. "Reply-To:" field instead of the address in the "From:" field.
  1639. ----
  1640. To: "Mary Smith: Personal Account" <smith@home.example>
  1641. From: John Doe <jdoe@machine.example>
  1642. Subject: Re: Saying Hello
  1643. Date: Fri, 21 Nov 1997 11:00:00 -0600
  1644. Message-ID: <abcd.1234@local.machine.tld>
  1645. In-Reply-To: <3456@example.net>
  1646. References: <1234@local.machine.example> <3456@example.net>
  1647. This is a reply to your reply.
  1648. ----
  1649. A.3. Resent messages
  1650. Start with the message that has been used as an example several
  1651. times:
  1652. ----
  1653. From: John Doe <jdoe@machine.example>
  1654. To: Mary Smith <mary@example.net>
  1655. Subject: Saying Hello
  1656. Date: Fri, 21 Nov 1997 09:55:06 -0600
  1657. Message-ID: <1234@local.machine.example>
  1658. This is a message just to say hello.
  1659. So, "Hello".
  1660. ----
  1661. Resnick Standards Track [Page 44]
  1662. RFC 2822 Internet Message Format April 2001
  1663. Say that Mary, upon receiving this message, wishes to send a copy of
  1664. the message to Jane such that (a) the message would appear to have
  1665. come straight from John; (b) if Jane replies to the message, the
  1666. reply should go back to John; and (c) all of the original
  1667. information, like the date the message was originally sent to Mary,
  1668. the message identifier, and the original addressee, is preserved. In
  1669. this case, resent fields are prepended to the message:
  1670. ----
  1671. Resent-From: Mary Smith <mary@example.net>
  1672. Resent-To: Jane Brown <j-brown@other.example>
  1673. Resent-Date: Mon, 24 Nov 1997 14:22:01 -0800
  1674. Resent-Message-ID: <78910@example.net>
  1675. From: John Doe <jdoe@machine.example>
  1676. To: Mary Smith <mary@example.net>
  1677. Subject: Saying Hello
  1678. Date: Fri, 21 Nov 1997 09:55:06 -0600
  1679. Message-ID: <1234@local.machine.example>
  1680. This is a message just to say hello.
  1681. So, "Hello".
  1682. ----
  1683. If Jane, in turn, wished to resend this message to another person,
  1684. she would prepend her own set of resent header fields to the above
  1685. and send that.
  1686. Resnick Standards Track [Page 45]
  1687. RFC 2822 Internet Message Format April 2001
  1688. A.4. Messages with trace fields
  1689. As messages are sent through the transport system as described in
  1690. [RFC2821], trace fields are prepended to the message. The following
  1691. is an example of what those trace fields might look like. Note that
  1692. there is some folding white space in the first one since these lines
  1693. can be long.
  1694. ----
  1695. Received: from x.y.test
  1696. by example.net
  1697. via TCP
  1698. with ESMTP
  1699. id ABC12345
  1700. for <mary@example.net>; 21 Nov 1997 10:05:43 -0600
  1701. Received: from machine.example by x.y.test; 21 Nov 1997 10:01:22 -0600
  1702. From: John Doe <jdoe@machine.example>
  1703. To: Mary Smith <mary@example.net>
  1704. Subject: Saying Hello
  1705. Date: Fri, 21 Nov 1997 09:55:06 -0600
  1706. Message-ID: <1234@local.machine.example>
  1707. This is a message just to say hello.
  1708. So, "Hello".
  1709. ----
  1710. Resnick Standards Track [Page 46]
  1711. RFC 2822 Internet Message Format April 2001
  1712. A.5. White space, comments, and other oddities
  1713. White space, including folding white space, and comments can be
  1714. inserted between many of the tokens of fields. Taking the example
  1715. from A.1.3, white space and comments can be inserted into all of the
  1716. fields.
  1717. ----
  1718. From: Pete(A wonderful \) chap) <pete(his account)@silly.test(his host)>
  1719. To:A Group(Some people)
  1720. :Chris Jones <c@(Chris's host.)public.example>,
  1721. joe@example.org,
  1722. John <jdoe@one.test> (my dear friend); (the end of the group)
  1723. Cc:(Empty list)(start)Undisclosed recipients :(nobody(that I know)) ;
  1724. Date: Thu,
  1725. 13
  1726. Feb
  1727. 1969
  1728. 23:32
  1729. -0330 (Newfoundland Time)
  1730. Message-ID: <testabcd.1234@silly.test>
  1731. Testing.
  1732. ----
  1733. The above example is aesthetically displeasing, but perfectly legal.
  1734. Note particularly (1) the comments in the "From:" field (including
  1735. one that has a ")" character appearing as part of a quoted-pair); (2)
  1736. the white space absent after the ":" in the "To:" field as well as
  1737. the comment and folding white space after the group name, the special
  1738. character (".") in the comment in Chris Jones's address, and the
  1739. folding white space before and after "joe@example.org,"; (3) the
  1740. multiple and nested comments in the "Cc:" field as well as the
  1741. comment immediately following the ":" after "Cc"; (4) the folding
  1742. white space (but no comments except at the end) and the missing
  1743. seconds in the time of the date field; and (5) the white space before
  1744. (but not within) the identifier in the "Message-ID:" field.
  1745. A.6. Obsoleted forms
  1746. The following are examples of obsolete (that is, the "MUST NOT
  1747. generate") syntactic elements described in section 4 of this
  1748. document.
  1749. Resnick Standards Track [Page 47]
  1750. RFC 2822 Internet Message Format April 2001
  1751. A.6.1. Obsolete addressing
  1752. Note in the below example the lack of quotes around Joe Q. Public,
  1753. the route that appears in the address for Mary Smith, the two commas
  1754. that appear in the "To:" field, and the spaces that appear around the
  1755. "." in the jdoe address.
  1756. ----
  1757. From: Joe Q. Public <john.q.public@example.com>
  1758. To: Mary Smith <@machine.tld:mary@example.net>, , jdoe@test . example
  1759. Date: Tue, 1 Jul 2003 10:52:37 +0200
  1760. Message-ID: <5678.21-Nov-1997@example.com>
  1761. Hi everyone.
  1762. ----
  1763. A.6.2. Obsolete dates
  1764. The following message uses an obsolete date format, including a non-
  1765. numeric time zone and a two digit year. Note that although the
  1766. day-of-week is missing, that is not specific to the obsolete syntax;
  1767. it is optional in the current syntax as well.
  1768. ----
  1769. From: John Doe <jdoe@machine.example>
  1770. To: Mary Smith <mary@example.net>
  1771. Subject: Saying Hello
  1772. Date: 21 Nov 97 09:55:06 GMT
  1773. Message-ID: <1234@local.machine.example>
  1774. This is a message just to say hello.
  1775. So, "Hello".
  1776. ----
  1777. A.6.3. Obsolete white space and comments
  1778. White space and comments can appear between many more elements than
  1779. in the current syntax. Also, folding lines that are made up entirely
  1780. of white space are legal.
  1781. Resnick Standards Track [Page 48]
  1782. RFC 2822 Internet Message Format April 2001
  1783. ----
  1784. From : John Doe <jdoe@machine(comment). example>
  1785. To : Mary Smith
  1786. __
  1787. <mary@example.net>
  1788. Subject : Saying Hello
  1789. Date : Fri, 21 Nov 1997 09(comment): 55 : 06 -0600
  1790. Message-ID : <1234 @ local(blah) .machine .example>
  1791. This is a message just to say hello.
  1792. So, "Hello".
  1793. ----
  1794. Note especially the second line of the "To:" field. It starts with
  1795. two space characters. (Note that "__" represent blank spaces.)
  1796. Therefore, it is considered part of the folding as described in
  1797. section 4.2. Also, the comments and white space throughout
  1798. addresses, dates, and message identifiers are all part of the
  1799. obsolete syntax.
  1800. Appendix B. Differences from earlier standards
  1801. This appendix contains a list of changes that have been made in the
  1802. Internet Message Format from earlier standards, specifically [RFC822]
  1803. and [STD3]. Items marked with an asterisk (*) below are items which
  1804. appear in section 4 of this document and therefore can no longer be
  1805. generated.
  1806. 1. Period allowed in obsolete form of phrase.
  1807. 2. ABNF moved out of document to [RFC2234].
  1808. 3. Four or more digits allowed for year.
  1809. 4. Header field ordering (and lack thereof) made explicit.
  1810. 5. Encrypted header field removed.
  1811. 6. Received syntax loosened to allow any token/value pair.
  1812. 7. Specifically allow and give meaning to "-0000" time zone.
  1813. 8. Folding white space is not allowed between every token.
  1814. 9. Requirement for destinations removed.
  1815. 10. Forwarding and resending redefined.
  1816. 11. Extension header fields no longer specifically called out.
  1817. 12. ASCII 0 (null) removed.*
  1818. 13. Folding continuation lines cannot contain only white space.*
  1819. 14. Free insertion of comments not allowed in date.*
  1820. 15. Non-numeric time zones not allowed.*
  1821. 16. Two digit years not allowed.*
  1822. 17. Three digit years interpreted, but not allowed for generation.
  1823. 18. Routes in addresses not allowed.*
  1824. 19. CFWS within local-parts and domains not allowed.*
  1825. 20. Empty members of address lists not allowed.*
  1826. Resnick Standards Track [Page 49]
  1827. RFC 2822 Internet Message Format April 2001
  1828. 21. Folding white space between field name and colon not allowed.*
  1829. 22. Comments between field name and colon not allowed.
  1830. 23. Tightened syntax of in-reply-to and references.*
  1831. 24. CFWS within msg-id not allowed.*
  1832. 25. Tightened semantics of resent fields as informational only.
  1833. 26. Resent-Reply-To not allowed.*
  1834. 27. No multiple occurrences of fields (except resent and received).*
  1835. 28. Free CR and LF not allowed.*
  1836. 29. Routes in return path not allowed.*
  1837. 30. Line length limits specified.
  1838. 31. Bcc more clearly specified.
  1839. Appendix C. Notices
  1840. Intellectual Property
  1841. The IETF takes no position regarding the validity or scope of any
  1842. intellectual property or other rights that might be claimed to
  1843. pertain to the implementation or use of the technology described in
  1844. this document or the extent to which any license under such rights
  1845. might or might not be available; neither does it represent that it
  1846. has made any effort to identify any such rights. Information on the
  1847. IETF's procedures with respect to rights in standards-track and
  1848. standards-related documentation can be found in BCP-11. Copies of
  1849. claims of rights made available for publication and any assurances of
  1850. licenses to be made available, or the result of an attempt made to
  1851. obtain a general license or permission for the use of such
  1852. proprietary rights by implementors or users of this specification can
  1853. be obtained from the IETF Secretariat.
  1854. Resnick Standards Track [Page 50]
  1855. RFC 2822 Internet Message Format April 2001
  1856. Full Copyright Statement
  1857. Copyright (C) The Internet Society (2001). All Rights Reserved.
  1858. This document and translations of it may be copied and furnished to
  1859. others, and derivative works that comment on or otherwise explain it
  1860. or assist in its implementation may be prepared, copied, published
  1861. and distributed, in whole or in part, without restriction of any
  1862. kind, provided that the above copyright notice and this paragraph are
  1863. included on all such copies and derivative works. However, this
  1864. document itself may not be modified in any way, such as by removing
  1865. the copyright notice or references to the Internet Society or other
  1866. Internet organizations, except as needed for the purpose of
  1867. developing Internet standards in which case the procedures for
  1868. copyrights defined in the Internet Standards process must be
  1869. followed, or as required to translate it into languages other than
  1870. English.
  1871. The limited permissions granted above are perpetual and will not be
  1872. revoked by the Internet Society or its successors or assigns.
  1873. This document and the information contained herein is provided on an
  1874. "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
  1875. TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
  1876. BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
  1877. HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
  1878. MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
  1879. Acknowledgement
  1880. Funding for the RFC Editor function is currently provided by the
  1881. Internet Society.
  1882. Resnick Standards Track [Page 51]