arpa-internet-text-messages-rfc822.txt 104 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901
  1. RFC # 822
  2. Obsoletes: RFC #733 (NIC #41952)
  3. STANDARD FOR THE FORMAT OF
  4. ARPA INTERNET TEXT MESSAGES
  5. August 13, 1982
  6. Revised by
  7. David H. Crocker
  8. Dept. of Electrical Engineering
  9. University of Delaware, Newark, DE 19711
  10. Network: DCrocker @ UDel-Relay
  11. Standard for ARPA Internet Text Messages
  12. TABLE OF CONTENTS
  13. PREFACE .................................................... ii
  14. 1. INTRODUCTION ........................................... 1
  15. 1.1. Scope ............................................ 1
  16. 1.2. Communication Framework .......................... 2
  17. 2. NOTATIONAL CONVENTIONS ................................. 3
  18. 3. LEXICAL ANALYSIS OF MESSAGES ........................... 5
  19. 3.1. General Description .............................. 5
  20. 3.2. Header Field Definitions ......................... 9
  21. 3.3. Lexical Tokens ................................... 10
  22. 3.4. Clarifications ................................... 11
  23. 4. MESSAGE SPECIFICATION .................................. 17
  24. 4.1. Syntax ........................................... 17
  25. 4.2. Forwarding ....................................... 19
  26. 4.3. Trace Fields ..................................... 20
  27. 4.4. Originator Fields ................................ 21
  28. 4.5. Receiver Fields .................................. 23
  29. 4.6. Reference Fields ................................. 23
  30. 4.7. Other Fields ..................................... 24
  31. 5. DATE AND TIME SPECIFICATION ............................ 26
  32. 5.1. Syntax ........................................... 26
  33. 5.2. Semantics ........................................ 26
  34. 6. ADDRESS SPECIFICATION .................................. 27
  35. 6.1. Syntax ........................................... 27
  36. 6.2. Semantics ........................................ 27
  37. 6.3. Reserved Address ................................. 33
  38. 7. BIBLIOGRAPHY ........................................... 34
  39. APPENDIX
  40. A. EXAMPLES ............................................... 36
  41. B. SIMPLE FIELD PARSING ................................... 40
  42. C. DIFFERENCES FROM RFC #733 .............................. 41
  43. D. ALPHABETICAL LISTING OF SYNTAX RULES ................... 44
  44. August 13, 1982 - i - RFC #822
  45. Standard for ARPA Internet Text Messages
  46. PREFACE
  47. By 1977, the Arpanet employed several informal standards for
  48. the text messages (mail) sent among its host computers. It was
  49. felt necessary to codify these practices and provide for those
  50. features that seemed imminent. The result of that effort was
  51. Request for Comments (RFC) #733, "Standard for the Format of ARPA
  52. Network Text Message", by Crocker, Vittal, Pogran, and Henderson.
  53. The specification attempted to avoid major changes in existing
  54. software, while permitting several new features.
  55. This document revises the specifications in RFC #733, in
  56. order to serve the needs of the larger and more complex ARPA
  57. Internet. Some of RFC #733's features failed to gain adequate
  58. acceptance. In order to simplify the standard and the software
  59. that follows it, these features have been removed. A different
  60. addressing scheme is used, to handle the case of inter-network
  61. mail; and the concept of re-transmission has been introduced.
  62. This specification is intended for use in the ARPA Internet.
  63. However, an attempt has been made to free it of any dependence on
  64. that environment, so that it can be applied to other network text
  65. message systems.
  66. The specification of RFC #733 took place over the course of
  67. one year, using the ARPANET mail environment, itself, to provide
  68. an on-going forum for discussing the capabilities to be included.
  69. More than twenty individuals, from across the country, partici-
  70. pated in the original discussion. The development of this
  71. revised specification has, similarly, utilized network mail-based
  72. group discussion. Both specification efforts greatly benefited
  73. from the comments and ideas of the participants.
  74. The syntax of the standard, in RFC #733, was originally
  75. specified in the Backus-Naur Form (BNF) meta-language. Ken L.
  76. Harrenstien, of SRI International, was responsible for re-coding
  77. the BNF into an augmented BNF that makes the representation
  78. smaller and easier to understand.
  79. August 13, 1982 - ii - RFC #822
  80. Standard for ARPA Internet Text Messages
  81. 1. INTRODUCTION
  82. 1.1. SCOPE
  83. This standard specifies a syntax for text messages that are
  84. sent among computer users, within the framework of "electronic
  85. mail". The standard supersedes the one specified in ARPANET
  86. Request for Comments #733, "Standard for the Format of ARPA Net-
  87. work Text Messages".
  88. In this context, messages are viewed as having an envelope
  89. and contents. The envelope contains whatever information is
  90. needed to accomplish transmission and delivery. The contents
  91. compose the object to be delivered to the recipient. This stan-
  92. dard applies only to the format and some of the semantics of mes-
  93. sage contents. It contains no specification of the information
  94. in the envelope.
  95. However, some message systems may use information from the
  96. contents to create the envelope. It is intended that this stan-
  97. dard facilitate the acquisition of such information by programs.
  98. Some message systems may store messages in formats that
  99. differ from the one specified in this standard. This specifica-
  100. tion is intended strictly as a definition of what message content
  101. format is to be passed BETWEEN hosts.
  102. Note: This standard is NOT intended to dictate the internal for-
  103. mats used by sites, the specific message system features
  104. that they are expected to support, or any of the charac-
  105. teristics of user interface programs that create or read
  106. messages.
  107. A distinction should be made between what the specification
  108. REQUIRES and what it ALLOWS. Messages can be made complex and
  109. rich with formally-structured components of information or can be
  110. kept small and simple, with a minimum of such information. Also,
  111. the standard simplifies the interpretation of differing visual
  112. formats in messages; only the visual aspect of a message is
  113. affected and not the interpretation of information within it.
  114. Implementors may choose to retain such visual distinctions.
  115. The formal definition is divided into four levels. The bot-
  116. tom level describes the meta-notation used in this document. The
  117. second level describes basic lexical analyzers that feed tokens
  118. to higher-level parsers. Next is an overall specification for
  119. messages; it permits distinguishing individual fields. Finally,
  120. there is definition of the contents of several structured fields.
  121. August 13, 1982 - 1 - RFC #822
  122. Standard for ARPA Internet Text Messages
  123. 1.2. COMMUNICATION FRAMEWORK
  124. Messages consist of lines of text. No special provisions
  125. are made for encoding drawings, facsimile, speech, or structured
  126. text. No significant consideration has been given to questions
  127. of data compression or to transmission and storage efficiency,
  128. and the standard tends to be free with the number of bits con-
  129. sumed. For example, field names are specified as free text,
  130. rather than special terse codes.
  131. A general "memo" framework is used. That is, a message con-
  132. sists of some information in a rigid format, followed by the main
  133. part of the message, with a format that is not specified in this
  134. document. The syntax of several fields of the rigidly-formated
  135. ("headers") section is defined in this specification; some of
  136. these fields must be included in all messages.
  137. The syntax that distinguishes between header fields is
  138. specified separately from the internal syntax for particular
  139. fields. This separation is intended to allow simple parsers to
  140. operate on the general structure of messages, without concern for
  141. the detailed structure of individual header fields. Appendix B
  142. is provided to facilitate construction of these parsers.
  143. In addition to the fields specified in this document, it is
  144. expected that other fields will gain common use. As necessary,
  145. the specifications for these "extension-fields" will be published
  146. through the same mechanism used to publish this document. Users
  147. may also wish to extend the set of fields that they use
  148. privately. Such "user-defined fields" are permitted.
  149. The framework severely constrains document tone and appear-
  150. ance and is primarily useful for most intra-organization communi-
  151. cations and well-structured inter-organization communication.
  152. It also can be used for some types of inter-process communica-
  153. tion, such as simple file transfer and remote job entry. A more
  154. robust framework might allow for multi-font, multi-color, multi-
  155. dimension encoding of information. A less robust one, as is
  156. present in most single-machine message systems, would more
  157. severely constrain the ability to add fields and the decision to
  158. include specific fields. In contrast with paper-based communica-
  159. tion, it is interesting to note that the RECEIVER of a message
  160. can exercise an extraordinary amount of control over the
  161. message's appearance. The amount of actual control available to
  162. message receivers is contingent upon the capabilities of their
  163. individual message systems.
  164. August 13, 1982 - 2 - RFC #822
  165. Standard for ARPA Internet Text Messages
  166. 2. NOTATIONAL CONVENTIONS
  167. This specification uses an augmented Backus-Naur Form (BNF)
  168. notation. The differences from standard BNF involve naming rules
  169. and indicating repetition and "local" alternatives.
  170. 2.1. RULE NAMING
  171. Angle brackets ("<", ">") are not used, in general. The
  172. name of a rule is simply the name itself, rather than "<name>".
  173. Quotation-marks enclose literal text (which may be upper and/or
  174. lower case). Certain basic rules are in uppercase, such as
  175. SPACE, TAB, CRLF, DIGIT, ALPHA, etc. Angle brackets are used in
  176. rule definitions, and in the rest of this document, whenever
  177. their presence will facilitate discerning the use of rule names.
  178. 2.2. RULE1 / RULE2: ALTERNATIVES
  179. Elements separated by slash ("/") are alternatives. There-
  180. fore "foo / bar" will accept foo or bar.
  181. 2.3. (RULE1 RULE2): LOCAL ALTERNATIVES
  182. Elements enclosed in parentheses are treated as a single
  183. element. Thus, "(elem (foo / bar) elem)" allows the token
  184. sequences "elem foo elem" and "elem bar elem".
  185. 2.4. *RULE: REPETITION
  186. The character "*" preceding an element indicates repetition.
  187. The full form is:
  188. <l>*<m>element
  189. indicating at least <l> and at most <m> occurrences of element.
  190. Default values are 0 and infinity so that "*(element)" allows any
  191. number, including zero; "1*element" requires at least one; and
  192. "1*2element" allows one or two.
  193. 2.5. [RULE]: OPTIONAL
  194. Square brackets enclose optional elements; "[foo bar]" is
  195. equivalent to "*1(foo bar)".
  196. 2.6. NRULE: SPECIFIC REPETITION
  197. "<n>(element)" is equivalent to "<n>*<n>(element)"; that is,
  198. exactly <n> occurrences of (element). Thus 2DIGIT is a 2-digit
  199. number, and 3ALPHA is a string of three alphabetic characters.
  200. August 13, 1982 - 3 - RFC #822
  201. Standard for ARPA Internet Text Messages
  202. 2.7. #RULE: LISTS
  203. A construct "#" is defined, similar to "*", as follows:
  204. <l>#<m>element
  205. indicating at least <l> and at most <m> elements, each separated
  206. by one or more commas (","). This makes the usual form of lists
  207. very easy; a rule such as '(element *("," element))' can be shown
  208. as "1#element". Wherever this construct is used, null elements
  209. are allowed, but do not contribute to the count of elements
  210. present. That is, "(element),,(element)" is permitted, but
  211. counts as only two elements. Therefore, where at least one ele-
  212. ment is required, at least one non-null element must be present.
  213. Default values are 0 and infinity so that "#(element)" allows any
  214. number, including zero; "1#element" requires at least one; and
  215. "1#2element" allows one or two.
  216. 2.8. ; COMMENTS
  217. A semi-colon, set off some distance to the right of rule
  218. text, starts a comment that continues to the end of line. This
  219. is a simple way of including useful notes in parallel with the
  220. specifications.
  221. August 13, 1982 - 4 - RFC #822
  222. Standard for ARPA Internet Text Messages
  223. 3. LEXICAL ANALYSIS OF MESSAGES
  224. 3.1. GENERAL DESCRIPTION
  225. A message consists of header fields and, optionally, a body.
  226. The body is simply a sequence of lines containing ASCII charac-
  227. ters. It is separated from the headers by a null line (i.e., a
  228. line with nothing preceding the CRLF).
  229. 3.1.1. LONG HEADER FIELDS
  230. Each header field can be viewed as a single, logical line of
  231. ASCII characters, comprising a field-name and a field-body.
  232. For convenience, the field-body portion of this conceptual
  233. entity can be split into a multiple-line representation; this
  234. is called "folding". The general rule is that wherever there
  235. may be linear-white-space (NOT simply LWSP-chars), a CRLF
  236. immediately followed by AT LEAST one LWSP-char may instead be
  237. inserted. Thus, the single line
  238. To: "Joe & J. Harvey" <ddd @Org>, JJV @ BBN
  239. can be represented as:
  240. To: "Joe & J. Harvey" <ddd @ Org>,
  241. JJV@BBN
  242. and
  243. To: "Joe & J. Harvey"
  244. <ddd@ Org>, JJV
  245. @BBN
  246. and
  247. To: "Joe &
  248. J. Harvey" <ddd @ Org>, JJV @ BBN
  249. The process of moving from this folded multiple-line
  250. representation of a header field to its single line represen-
  251. tation is called "unfolding". Unfolding is accomplished by
  252. regarding CRLF immediately followed by a LWSP-char as
  253. equivalent to the LWSP-char.
  254. Note: While the standard permits folding wherever linear-
  255. white-space is permitted, it is recommended that struc-
  256. tured fields, such as those containing addresses, limit
  257. folding to higher-level syntactic breaks. For address
  258. fields, it is recommended that such folding occur
  259. August 13, 1982 - 5 - RFC #822
  260. Standard for ARPA Internet Text Messages
  261. between addresses, after the separating comma.
  262. 3.1.2. STRUCTURE OF HEADER FIELDS
  263. Once a field has been unfolded, it may be viewed as being com-
  264. posed of a field-name followed by a colon (":"), followed by a
  265. field-body, and terminated by a carriage-return/line-feed.
  266. The field-name must be composed of printable ASCII characters
  267. (i.e., characters that have values between 33. and 126.,
  268. decimal, except colon). The field-body may be composed of any
  269. ASCII characters, except CR or LF. (While CR and/or LF may be
  270. present in the actual text, they are removed by the action of
  271. unfolding the field.)
  272. Certain field-bodies of headers may be interpreted according
  273. to an internal syntax that some systems may wish to parse.
  274. These fields are called "structured fields". Examples
  275. include fields containing dates and addresses. Other fields,
  276. such as "Subject" and "Comments", are regarded simply as
  277. strings of text.
  278. Note: Any field which has a field-body that is defined as
  279. other than simply <text> is to be treated as a struc-
  280. tured field.
  281. Field-names, unstructured field bodies and structured
  282. field bodies each are scanned by their own, independent
  283. "lexical" analyzers.
  284. 3.1.3. UNSTRUCTURED FIELD BODIES
  285. For some fields, such as "Subject" and "Comments", no struc-
  286. turing is assumed, and they are treated simply as <text>s, as
  287. in the message body. Rules of folding apply to these fields,
  288. so that such field bodies which occupy several lines must
  289. therefore have the second and successive lines indented by at
  290. least one LWSP-char.
  291. 3.1.4. STRUCTURED FIELD BODIES
  292. To aid in the creation and reading of structured fields, the
  293. free insertion of linear-white-space (which permits folding
  294. by inclusion of CRLFs) is allowed between lexical tokens.
  295. Rather than obscuring the syntax specifications for these
  296. structured fields with explicit syntax for this linear-white-
  297. space, the existence of another "lexical" analyzer is assumed.
  298. This analyzer does not apply for unstructured field bodies
  299. that are simply strings of text, as described above. The
  300. analyzer provides an interpretation of the unfolded text
  301. August 13, 1982 - 6 - RFC #822
  302. Standard for ARPA Internet Text Messages
  303. composing the body of the field as a sequence of lexical sym-
  304. bols.
  305. These symbols are:
  306. - individual special characters
  307. - quoted-strings
  308. - domain-literals
  309. - comments
  310. - atoms
  311. The first four of these symbols are self-delimiting. Atoms
  312. are not; they are delimited by the self-delimiting symbols and
  313. by linear-white-space. For the purposes of regenerating
  314. sequences of atoms and quoted-strings, exactly one SPACE is
  315. assumed to exist, and should be used, between them. (Also, in
  316. the "Clarifications" section on "White Space", below, note the
  317. rules about treatment of multiple contiguous LWSP-chars.)
  318. So, for example, the folded body of an address field
  319. ":sysmail"@ Some-Group. Some-Org,
  320. Muhammed.(I am the greatest) Ali @(the)Vegas.WBA
  321. August 13, 1982 - 7 - RFC #822
  322. Standard for ARPA Internet Text Messages
  323. is analyzed into the following lexical symbols and types:
  324. :sysmail quoted string
  325. @ special
  326. Some-Group atom
  327. . special
  328. Some-Org atom
  329. , special
  330. Muhammed atom
  331. . special
  332. (I am the greatest) comment
  333. Ali atom
  334. @ atom
  335. (the) comment
  336. Vegas atom
  337. . special
  338. WBA atom
  339. The canonical representations for the data in these addresses
  340. are the following strings:
  341. ":sysmail"@Some-Group.Some-Org
  342. and
  343. Muhammed.Ali@Vegas.WBA
  344. Note: For purposes of display, and when passing such struc-
  345. tured information to other systems, such as mail proto-
  346. col services, there must be NO linear-white-space
  347. between <word>s that are separated by period (".") or
  348. at-sign ("@") and exactly one SPACE between all other
  349. <word>s. Also, headers should be in a folded form.
  350. August 13, 1982 - 8 - RFC #822
  351. Standard for ARPA Internet Text Messages
  352. 3.2. HEADER FIELD DEFINITIONS
  353. These rules show a field meta-syntax, without regard for the
  354. particular type or internal syntax. Their purpose is to permit
  355. detection of fields; also, they present to higher-level parsers
  356. an image of each field as fitting on one line.
  357. field = field-name ":" [ field-body ] CRLF
  358. field-name = 1*<any CHAR, excluding CTLs, SPACE, and ":">
  359. field-body = field-body-contents
  360. [CRLF LWSP-char field-body]
  361. field-body-contents =
  362. <the ASCII characters making up the field-body, as
  363. defined in the following sections, and consisting
  364. of combinations of atom, quoted-string, and
  365. specials tokens, or else consisting of texts>
  366. August 13, 1982 - 9 - RFC #822
  367. Standard for ARPA Internet Text Messages
  368. 3.3. LEXICAL TOKENS
  369. The following rules are used to define an underlying lexical
  370. analyzer, which feeds tokens to higher level parsers. See the
  371. ANSI references, in the Bibliography.
  372. ; ( Octal, Decimal.)
  373. CHAR = <any ASCII character> ; ( 0-177, 0.-127.)
  374. ALPHA = <any ASCII alphabetic character>
  375. ; (101-132, 65.- 90.)
  376. ; (141-172, 97.-122.)
  377. DIGIT = <any ASCII decimal digit> ; ( 60- 71, 48.- 57.)
  378. CTL = <any ASCII control ; ( 0- 37, 0.- 31.)
  379. character and DEL> ; ( 177, 127.)
  380. CR = <ASCII CR, carriage return> ; ( 15, 13.)
  381. LF = <ASCII LF, linefeed> ; ( 12, 10.)
  382. SPACE = <ASCII SP, space> ; ( 40, 32.)
  383. HTAB = <ASCII HT, horizontal-tab> ; ( 11, 9.)
  384. <"> = <ASCII quote mark> ; ( 42, 34.)
  385. CRLF = CR LF
  386. LWSP-char = SPACE / HTAB ; semantics = SPACE
  387. linear-white-space = 1*([CRLF] LWSP-char) ; semantics = SPACE
  388. ; CRLF => folding
  389. specials = "(" / ")" / "<" / ">" / "@" ; Must be in quoted-
  390. / "," / ";" / ":" / "\" / <"> ; string, to use
  391. / "." / "[" / "]" ; within a word.
  392. delimiters = specials / linear-white-space / comment
  393. text = <any CHAR, including bare ; => atoms, specials,
  394. CR & bare LF, but NOT ; comments and
  395. including CRLF> ; quoted-strings are
  396. ; NOT recognized.
  397. atom = 1*<any CHAR except specials, SPACE and CTLs>
  398. quoted-string = <"> *(qtext/quoted-pair) <">; Regular qtext or
  399. ; quoted chars.
  400. qtext = <any CHAR excepting <">, ; => may be folded
  401. "\" & CR, and including
  402. linear-white-space>
  403. domain-literal = "[" *(dtext / quoted-pair) "]"
  404. August 13, 1982 - 10 - RFC #822
  405. Standard for ARPA Internet Text Messages
  406. dtext = <any CHAR excluding "[", ; => may be folded
  407. "]", "\" & CR, & including
  408. linear-white-space>
  409. comment = "(" *(ctext / quoted-pair / comment) ")"
  410. ctext = <any CHAR excluding "(", ; => may be folded
  411. ")", "\" & CR, & including
  412. linear-white-space>
  413. quoted-pair = "\" CHAR ; may quote any char
  414. phrase = 1*word ; Sequence of words
  415. word = atom / quoted-string
  416. 3.4. CLARIFICATIONS
  417. 3.4.1. QUOTING
  418. Some characters are reserved for special interpretation, such
  419. as delimiting lexical tokens. To permit use of these charac-
  420. ters as uninterpreted data, a quoting mechanism is provided.
  421. To quote a character, precede it with a backslash ("\").
  422. This mechanism is not fully general. Characters may be quoted
  423. only within a subset of the lexical constructs. In particu-
  424. lar, quoting is limited to use within:
  425. - quoted-string
  426. - domain-literal
  427. - comment
  428. Within these constructs, quoting is REQUIRED for CR and "\"
  429. and for the character(s) that delimit the token (e.g., "(" and
  430. ")" for a comment). However, quoting is PERMITTED for any
  431. character.
  432. Note: In particular, quoting is NOT permitted within atoms.
  433. For example when the local-part of an addr-spec must
  434. contain a special character, a quoted string must be
  435. used. Therefore, a specification such as:
  436. Full\ Name@Domain
  437. is not legal and must be specified as:
  438. "Full Name"@Domain
  439. August 13, 1982 - 11 - RFC #822
  440. Standard for ARPA Internet Text Messages
  441. 3.4.2. WHITE SPACE
  442. Note: In structured field bodies, multiple linear space ASCII
  443. characters (namely HTABs and SPACEs) are treated as
  444. single spaces and may freely surround any symbol. In
  445. all header fields, the only place in which at least one
  446. LWSP-char is REQUIRED is at the beginning of continua-
  447. tion lines in a folded field.
  448. When passing text to processes that do not interpret text
  449. according to this standard (e.g., mail protocol servers), then
  450. NO linear-white-space characters should occur between a period
  451. (".") or at-sign ("@") and a <word>. Exactly ONE SPACE should
  452. be used in place of arbitrary linear-white-space and comment
  453. sequences.
  454. Note: Within systems conforming to this standard, wherever a
  455. member of the list of delimiters is allowed, LWSP-chars
  456. may also occur before and/or after it.
  457. Writers of mail-sending (i.e., header-generating) programs
  458. should realize that there is no network-wide definition of the
  459. effect of ASCII HT (horizontal-tab) characters on the appear-
  460. ance of text at another network host; therefore, the use of
  461. tabs in message headers, though permitted, is discouraged.
  462. 3.4.3. COMMENTS
  463. A comment is a set of ASCII characters, which is enclosed in
  464. matching parentheses and which is not within a quoted-string
  465. The comment construct permits message originators to add text
  466. which will be useful for human readers, but which will be
  467. ignored by the formal semantics. Comments should be retained
  468. while the message is subject to interpretation according to
  469. this standard. However, comments must NOT be included in
  470. other cases, such as during protocol exchanges with mail
  471. servers.
  472. Comments nest, so that if an unquoted left parenthesis occurs
  473. in a comment string, there must also be a matching right
  474. parenthesis. When a comment acts as the delimiter between a
  475. sequence of two lexical symbols, such as two atoms, it is lex-
  476. ically equivalent with a single SPACE, for the purposes of
  477. regenerating the sequence, such as when passing the sequence
  478. onto a mail protocol server. Comments are detected as such
  479. only within field-bodies of structured fields.
  480. If a comment is to be "folded" onto multiple lines, then the
  481. syntax for folding must be adhered to. (See the "Lexical
  482. August 13, 1982 - 12 - RFC #822
  483. Standard for ARPA Internet Text Messages
  484. Analysis of Messages" section on "Folding Long Header Fields"
  485. above, and the section on "Case Independence" below.) Note
  486. that the official semantics therefore do not "see" any
  487. unquoted CRLFs that are in comments, although particular pars-
  488. ing programs may wish to note their presence. For these pro-
  489. grams, it would be reasonable to interpret a "CRLF LWSP-char"
  490. as being a CRLF that is part of the comment; i.e., the CRLF is
  491. kept and the LWSP-char is discarded. Quoted CRLFs (i.e., a
  492. backslash followed by a CR followed by a LF) still must be
  493. followed by at least one LWSP-char.
  494. 3.4.4. DELIMITING AND QUOTING CHARACTERS
  495. The quote character (backslash) and characters that delimit
  496. syntactic units are not, generally, to be taken as data that
  497. are part of the delimited or quoted unit(s). In particular,
  498. the quotation-marks that define a quoted-string, the
  499. parentheses that define a comment and the backslash that
  500. quotes a following character are NOT part of the quoted-
  501. string, comment or quoted character. A quotation-mark that is
  502. to be part of a quoted-string, a parenthesis that is to be
  503. part of a comment and a backslash that is to be part of either
  504. must each be preceded by the quote-character backslash ("\").
  505. Note that the syntax allows any character to be quoted within
  506. a quoted-string or comment; however only certain characters
  507. MUST be quoted to be included as data. These characters are
  508. the ones that are not part of the alternate text group (i.e.,
  509. ctext or qtext).
  510. The one exception to this rule is that a single SPACE is
  511. assumed to exist between contiguous words in a phrase, and
  512. this interpretation is independent of the actual number of
  513. LWSP-chars that the creator places between the words. To
  514. include more than one SPACE, the creator must make the LWSP-
  515. chars be part of a quoted-string.
  516. Quotation marks that delimit a quoted string and backslashes
  517. that quote the following character should NOT accompany the
  518. quoted-string when the string is passed to processes that do
  519. not interpret data according to this specification (e.g., mail
  520. protocol servers).
  521. 3.4.5. QUOTED-STRINGS
  522. Where permitted (i.e., in words in structured fields) quoted-
  523. strings are treated as a single symbol. That is, a quoted-
  524. string is equivalent to an atom, syntactically. If a quoted-
  525. string is to be "folded" onto multiple lines, then the syntax
  526. for folding must be adhered to. (See the "Lexical Analysis of
  527. August 13, 1982 - 13 - RFC #822
  528. Standard for ARPA Internet Text Messages
  529. Messages" section on "Folding Long Header Fields" above, and
  530. the section on "Case Independence" below.) Therefore, the
  531. official semantics do not "see" any bare CRLFs that are in
  532. quoted-strings; however particular parsing programs may wish
  533. to note their presence. For such programs, it would be rea-
  534. sonable to interpret a "CRLF LWSP-char" as being a CRLF which
  535. is part of the quoted-string; i.e., the CRLF is kept and the
  536. LWSP-char is discarded. Quoted CRLFs (i.e., a backslash fol-
  537. lowed by a CR followed by a LF) are also subject to rules of
  538. folding, but the presence of the quoting character (backslash)
  539. explicitly indicates that the CRLF is data to the quoted
  540. string. Stripping off the first following LWSP-char is also
  541. appropriate when parsing quoted CRLFs.
  542. 3.4.6. BRACKETING CHARACTERS
  543. There is one type of bracket which must occur in matched pairs
  544. and may have pairs nested within each other:
  545. o Parentheses ("(" and ")") are used to indicate com-
  546. ments.
  547. There are three types of brackets which must occur in matched
  548. pairs, and which may NOT be nested:
  549. o Colon/semi-colon (":" and ";") are used in address
  550. specifications to indicate that the included list of
  551. addresses are to be treated as a group.
  552. o Angle brackets ("<" and ">") are generally used to
  553. indicate the presence of a one machine-usable refer-
  554. ence (e.g., delimiting mailboxes), possibly including
  555. source-routing to the machine.
  556. o Square brackets ("[" and "]") are used to indicate the
  557. presence of a domain-literal, which the appropriate
  558. name-domain is to use directly, bypassing normal
  559. name-resolution mechanisms.
  560. 3.4.7. CASE INDEPENDENCE
  561. Except as noted, alphabetic strings may be represented in any
  562. combination of upper and lower case. The only syntactic units
  563. August 13, 1982 - 14 - RFC #822
  564. Standard for ARPA Internet Text Messages
  565. which requires preservation of case information are:
  566. - text
  567. - qtext
  568. - dtext
  569. - ctext
  570. - quoted-pair
  571. - local-part, except "Postmaster"
  572. When matching any other syntactic unit, case is to be ignored.
  573. For example, the field-names "From", "FROM", "from", and even
  574. "FroM" are semantically equal and should all be treated ident-
  575. ically.
  576. When generating these units, any mix of upper and lower case
  577. alphabetic characters may be used. The case shown in this
  578. specification is suggested for message-creating processes.
  579. Note: The reserved local-part address unit, "Postmaster", is
  580. an exception. When the value "Postmaster" is being
  581. interpreted, it must be accepted in any mixture of
  582. case, including "POSTMASTER", and "postmaster".
  583. 3.4.8. FOLDING LONG HEADER FIELDS
  584. Each header field may be represented on exactly one line con-
  585. sisting of the name of the field and its body, and terminated
  586. by a CRLF; this is what the parser sees. For readability, the
  587. field-body portion of long header fields may be "folded" onto
  588. multiple lines of the actual field. "Long" is commonly inter-
  589. preted to mean greater than 65 or 72 characters. The former
  590. length serves as a limit, when the message is to be viewed on
  591. most simple terminals which use simple display software; how-
  592. ever, the limit is not imposed by this standard.
  593. Note: Some display software often can selectively fold lines,
  594. to suit the display terminal. In such cases, sender-
  595. provided folding can interfere with the display
  596. software.
  597. 3.4.9. BACKSPACE CHARACTERS
  598. ASCII BS characters (Backspace, decimal 8) may be included in
  599. texts and quoted-strings to effect overstriking. However, any
  600. use of backspaces which effects an overstrike to the left of
  601. the beginning of the text or quoted-string is prohibited.
  602. August 13, 1982 - 15 - RFC #822
  603. Standard for ARPA Internet Text Messages
  604. 3.4.10. NETWORK-SPECIFIC TRANSFORMATIONS
  605. During transmission through heterogeneous networks, it may be
  606. necessary to force data to conform to a network's local con-
  607. ventions. For example, it may be required that a CR be fol-
  608. lowed either by LF, making a CRLF, or by <null>, if the CR is
  609. to stand alone). Such transformations are reversed, when the
  610. message exits that network.
  611. When crossing network boundaries, the message should be
  612. treated as passing through two modules. It will enter the
  613. first module containing whatever network-specific transforma-
  614. tions that were necessary to permit migration through the
  615. "current" network. It then passes through the modules:
  616. o Transformation Reversal
  617. The "current" network's idiosyncracies are removed and
  618. the message is returned to the canonical form speci-
  619. fied in this standard.
  620. o Transformation
  621. The "next" network's local idiosyncracies are imposed
  622. on the message.
  623. ------------------
  624. From ==> | Remove Net-A |
  625. Net-A | idiosyncracies |
  626. ------------------
  627. ||
  628. \/
  629. Conformance
  630. with standard
  631. ||
  632. \/
  633. ------------------
  634. | Impose Net-B | ==> To
  635. | idiosyncracies | Net-B
  636. ------------------
  637. August 13, 1982 - 16 - RFC #822
  638. Standard for ARPA Internet Text Messages
  639. 4. MESSAGE SPECIFICATION
  640. 4.1. SYNTAX
  641. Note: Due to an artifact of the notational conventions, the syn-
  642. tax indicates that, when present, some fields, must be in
  643. a particular order. Header fields are NOT required to
  644. occur in any particular order, except that the message
  645. body must occur AFTER the headers. It is recommended
  646. that, if present, headers be sent in the order "Return-
  647. Path", "Received", "Date", "From", "Subject", "Sender",
  648. "To", "cc", etc.
  649. This specification permits multiple occurrences of most
  650. fields. Except as noted, their interpretation is not
  651. specified here, and their use is discouraged.
  652. The following syntax for the bodies of various fields should
  653. be thought of as describing each field body as a single long
  654. string (or line). The "Lexical Analysis of Message" section on
  655. "Long Header Fields", above, indicates how such long strings can
  656. be represented on more than one line in the actual transmitted
  657. message.
  658. message = fields *( CRLF *text ) ; Everything after
  659. ; first null line
  660. ; is message body
  661. fields = dates ; Creation time,
  662. source ; author id & one
  663. 1*destination ; address required
  664. *optional-field ; others optional
  665. source = [ trace ] ; net traversals
  666. originator ; original mail
  667. [ resent ] ; forwarded
  668. trace = return ; path to sender
  669. 1*received ; receipt tags
  670. return = "Return-path" ":" route-addr ; return address
  671. received = "Received" ":" ; one per relay
  672. ["from" domain] ; sending host
  673. ["by" domain] ; receiving host
  674. ["via" atom] ; physical path
  675. *("with" atom) ; link/mail protocol
  676. ["id" msg-id] ; receiver msg id
  677. ["for" addr-spec] ; initial form
  678. August 13, 1982 - 17 - RFC #822
  679. Standard for ARPA Internet Text Messages
  680. ";" date-time ; time received
  681. originator = authentic ; authenticated addr
  682. [ "Reply-To" ":" 1#address] )
  683. authentic = "From" ":" mailbox ; Single author
  684. / ( "Sender" ":" mailbox ; Actual submittor
  685. "From" ":" 1#mailbox) ; Multiple authors
  686. ; or not sender
  687. resent = resent-authentic
  688. [ "Resent-Reply-To" ":" 1#address] )
  689. resent-authentic =
  690. = "Resent-From" ":" mailbox
  691. / ( "Resent-Sender" ":" mailbox
  692. "Resent-From" ":" 1#mailbox )
  693. dates = orig-date ; Original
  694. [ resent-date ] ; Forwarded
  695. orig-date = "Date" ":" date-time
  696. resent-date = "Resent-Date" ":" date-time
  697. destination = "To" ":" 1#address ; Primary
  698. / "Resent-To" ":" 1#address
  699. / "cc" ":" 1#address ; Secondary
  700. / "Resent-cc" ":" 1#address
  701. / "bcc" ":" #address ; Blind carbon
  702. / "Resent-bcc" ":" #address
  703. optional-field =
  704. / "Message-ID" ":" msg-id
  705. / "Resent-Message-ID" ":" msg-id
  706. / "In-Reply-To" ":" *(phrase / msg-id)
  707. / "References" ":" *(phrase / msg-id)
  708. / "Keywords" ":" #phrase
  709. / "Subject" ":" *text
  710. / "Comments" ":" *text
  711. / "Encrypted" ":" 1#2word
  712. / extension-field ; To be defined
  713. / user-defined-field ; May be pre-empted
  714. msg-id = "<" addr-spec ">" ; Unique message id
  715. August 13, 1982 - 18 - RFC #822
  716. Standard for ARPA Internet Text Messages
  717. extension-field =
  718. <Any field which is defined in a document
  719. published as a formal extension to this
  720. specification; none will have names beginning
  721. with the string "X-">
  722. user-defined-field =
  723. <Any field which has not been defined
  724. in this specification or published as an
  725. extension to this specification; names for
  726. such fields must be unique and may be
  727. pre-empted by published extensions>
  728. 4.2. FORWARDING
  729. Some systems permit mail recipients to forward a message,
  730. retaining the original headers, by adding some new fields. This
  731. standard supports such a service, through the "Resent-" prefix to
  732. field names.
  733. Whenever the string "Resent-" begins a field name, the field
  734. has the same semantics as a field whose name does not have the
  735. prefix. However, the message is assumed to have been forwarded
  736. by an original recipient who attached the "Resent-" field. This
  737. new field is treated as being more recent than the equivalent,
  738. original field. For example, the "Resent-From", indicates the
  739. person that forwarded the message, whereas the "From" field indi-
  740. cates the original author.
  741. Use of such precedence information depends upon partici-
  742. pants' communication needs. For example, this standard does not
  743. dictate when a "Resent-From:" address should receive replies, in
  744. lieu of sending them to the "From:" address.
  745. Note: In general, the "Resent-" fields should be treated as con-
  746. taining a set of information that is independent of the
  747. set of original fields. Information for one set should
  748. not automatically be taken from the other. The interpre-
  749. tation of multiple "Resent-" fields, of the same type, is
  750. undefined.
  751. In the remainder of this specification, occurrence of legal
  752. "Resent-" fields are treated identically with the occurrence of
  753. August 13, 1982 - 19 - RFC #822
  754. Standard for ARPA Internet Text Messages
  755. fields whose names do not contain this prefix.
  756. 4.3. TRACE FIELDS
  757. Trace information is used to provide an audit trail of mes-
  758. sage handling. In addition, it indicates a route back to the
  759. sender of the message.
  760. The list of known "via" and "with" values are registered
  761. with the Network Information Center, SRI International, Menlo
  762. Park, California.
  763. 4.3.1. RETURN-PATH
  764. This field is added by the final transport system that
  765. delivers the message to its recipient. The field is intended
  766. to contain definitive information about the address and route
  767. back to the message's originator.
  768. Note: The "Reply-To" field is added by the originator and
  769. serves to direct replies, whereas the "Return-Path"
  770. field is used to identify a path back to the origina-
  771. tor.
  772. While the syntax indicates that a route specification is
  773. optional, every attempt should be made to provide that infor-
  774. mation in this field.
  775. 4.3.2. RECEIVED
  776. A copy of this field is added by each transport service that
  777. relays the message. The information in the field can be quite
  778. useful for tracing transport problems.
  779. The names of the sending and receiving hosts and time-of-
  780. receipt may be specified. The "via" parameter may be used, to
  781. indicate what physical mechanism the message was sent over,
  782. such as Arpanet or Phonenet, and the "with" parameter may be
  783. used to indicate the mail-, or connection-, level protocol
  784. that was used, such as the SMTP mail protocol, or X.25 tran-
  785. sport protocol.
  786. Note: Several "with" parameters may be included, to fully
  787. specify the set of protocols that were used.
  788. Some transport services queue mail; the internal message iden-
  789. tifier that is assigned to the message may be noted, using the
  790. "id" parameter. When the sending host uses a destination
  791. address specification that the receiving host reinterprets, by
  792. August 13, 1982 - 20 - RFC #822
  793. Standard for ARPA Internet Text Messages
  794. expansion or transformation, the receiving host may wish to
  795. record the original specification, using the "for" parameter.
  796. For example, when a copy of mail is sent to the member of a
  797. distribution list, this parameter may be used to record the
  798. original address that was used to specify the list.
  799. 4.4. ORIGINATOR FIELDS
  800. The standard allows only a subset of the combinations possi-
  801. ble with the From, Sender, Reply-To, Resent-From, Resent-Sender,
  802. and Resent-Reply-To fields. The limitation is intentional.
  803. 4.4.1. FROM / RESENT-FROM
  804. This field contains the identity of the person(s) who wished
  805. this message to be sent. The message-creation process should
  806. default this field to be a single, authenticated machine
  807. address, indicating the AGENT (person, system or process)
  808. entering the message. If this is not done, the "Sender" field
  809. MUST be present. If the "From" field IS defaulted this way,
  810. the "Sender" field is optional and is redundant with the
  811. "From" field. In all cases, addresses in the "From" field
  812. must be machine-usable (addr-specs) and may not contain named
  813. lists (groups).
  814. 4.4.2. SENDER / RESENT-SENDER
  815. This field contains the authenticated identity of the AGENT
  816. (person, system or process) that sends the message. It is
  817. intended for use when the sender is not the author of the mes-
  818. sage, or to indicate who among a group of authors actually
  819. sent the message. If the contents of the "Sender" field would
  820. be completely redundant with the "From" field, then the
  821. "Sender" field need not be present and its use is discouraged
  822. (though still legal). In particular, the "Sender" field MUST
  823. be present if it is NOT the same as the "From" Field.
  824. The Sender mailbox specification includes a word sequence
  825. which must correspond to a specific agent (i.e., a human user
  826. or a computer program) rather than a standard address. This
  827. indicates the expectation that the field will identify the
  828. single AGENT (person, system, or process) responsible for
  829. sending the mail and not simply include the name of a mailbox
  830. from which the mail was sent. For example in the case of a
  831. shared login name, the name, by itself, would not be adequate.
  832. The local-part address unit, which refers to this agent, is
  833. expected to be a computer system term, and not (for example) a
  834. generalized person reference which can be used outside the
  835. network text message context.
  836. August 13, 1982 - 21 - RFC #822
  837. Standard for ARPA Internet Text Messages
  838. Since the critical function served by the "Sender" field is
  839. identification of the agent responsible for sending mail and
  840. since computer programs cannot be held accountable for their
  841. behavior, it is strongly recommended that when a computer pro-
  842. gram generates a message, the HUMAN who is responsible for
  843. that program be referenced as part of the "Sender" field mail-
  844. box specification.
  845. 4.4.3. REPLY-TO / RESENT-REPLY-TO
  846. This field provides a general mechanism for indicating any
  847. mailbox(es) to which responses are to be sent. Three typical
  848. uses for this feature can be distinguished. In the first
  849. case, the author(s) may not have regular machine-based mail-
  850. boxes and therefore wish(es) to indicate an alternate machine
  851. address. In the second case, an author may wish additional
  852. persons to be made aware of, or responsible for, replies. A
  853. somewhat different use may be of some help to "text message
  854. teleconferencing" groups equipped with automatic distribution
  855. services: include the address of that service in the "Reply-
  856. To" field of all messages submitted to the teleconference;
  857. then participants can "reply" to conference submissions to
  858. guarantee the correct distribution of any submission of their
  859. own.
  860. Note: The "Return-Path" field is added by the mail transport
  861. service, at the time of final deliver. It is intended
  862. to identify a path back to the orginator of the mes-
  863. sage. The "Reply-To" field is added by the message
  864. originator and is intended to direct replies.
  865. 4.4.4. AUTOMATIC USE OF FROM / SENDER / REPLY-TO
  866. For systems which automatically generate address lists for
  867. replies to messages, the following recommendations are made:
  868. o The "Sender" field mailbox should be sent notices of
  869. any problems in transport or delivery of the original
  870. messages. If there is no "Sender" field, then the
  871. "From" field mailbox should be used.
  872. o The "Sender" field mailbox should NEVER be used
  873. automatically, in a recipient's reply message.
  874. o If the "Reply-To" field exists, then the reply should
  875. go to the addresses indicated in that field and not to
  876. the address(es) indicated in the "From" field.
  877. August 13, 1982 - 22 - RFC #822
  878. Standard for ARPA Internet Text Messages
  879. o If there is a "From" field, but no "Reply-To" field,
  880. the reply should be sent to the address(es) indicated
  881. in the "From" field.
  882. Sometimes, a recipient may actually wish to communicate with
  883. the person that initiated the message transfer. In such
  884. cases, it is reasonable to use the "Sender" address.
  885. This recommendation is intended only for automated use of
  886. originator-fields and is not intended to suggest that replies
  887. may not also be sent to other recipients of messages. It is
  888. up to the respective mail-handling programs to decide what
  889. additional facilities will be provided.
  890. Examples are provided in Appendix A.
  891. 4.5. RECEIVER FIELDS
  892. 4.5.1. TO / RESENT-TO
  893. This field contains the identity of the primary recipients of
  894. the message.
  895. 4.5.2. CC / RESENT-CC
  896. This field contains the identity of the secondary (informa-
  897. tional) recipients of the message.
  898. 4.5.3. BCC / RESENT-BCC
  899. This field contains the identity of additional recipients of
  900. the message. The contents of this field are not included in
  901. copies of the message sent to the primary and secondary reci-
  902. pients. Some systems may choose to include the text of the
  903. "Bcc" field only in the author(s)'s copy, while others may
  904. also include it in the text sent to all those indicated in the
  905. "Bcc" list.
  906. 4.6. REFERENCE FIELDS
  907. 4.6.1. MESSAGE-ID / RESENT-MESSAGE-ID
  908. This field contains a unique identifier (the local-part
  909. address unit) which refers to THIS version of THIS message.
  910. The uniqueness of the message identifier is guaranteed by the
  911. host which generates it. This identifier is intended to be
  912. machine readable and not necessarily meaningful to humans. A
  913. message identifier pertains to exactly one instantiation of a
  914. particular message; subsequent revisions to the message should
  915. August 13, 1982 - 23 - RFC #822
  916. Standard for ARPA Internet Text Messages
  917. each receive new message identifiers.
  918. 4.6.2. IN-REPLY-TO
  919. The contents of this field identify previous correspon-
  920. dence which this message answers. Note that if message iden-
  921. tifiers are used in this field, they must use the msg-id
  922. specification format.
  923. 4.6.3. REFERENCES
  924. The contents of this field identify other correspondence
  925. which this message references. Note that if message identif-
  926. iers are used, they must use the msg-id specification format.
  927. 4.6.4. KEYWORDS
  928. This field contains keywords or phrases, separated by
  929. commas.
  930. 4.7. OTHER FIELDS
  931. 4.7.1. SUBJECT
  932. This is intended to provide a summary, or indicate the
  933. nature, of the message.
  934. 4.7.2. COMMENTS
  935. Permits adding text comments onto the message without
  936. disturbing the contents of the message's body.
  937. 4.7.3. ENCRYPTED
  938. Sometimes, data encryption is used to increase the
  939. privacy of message contents. If the body of a message has
  940. been encrypted, to keep its contents private, the "Encrypted"
  941. field can be used to note the fact and to indicate the nature
  942. of the encryption. The first <word> parameter indicates the
  943. software used to encrypt the body, and the second, optional
  944. <word> is intended to aid the recipient in selecting the
  945. proper decryption key. This code word may be viewed as an
  946. index to a table of keys held by the recipient.
  947. Note: Unfortunately, headers must contain envelope, as well
  948. as contents, information. Consequently, it is neces-
  949. sary that they remain unencrypted, so that mail tran-
  950. sport services may access them. Since names,
  951. addresses, and "Subject" field contents may contain
  952. August 13, 1982 - 24 - RFC #822
  953. Standard for ARPA Internet Text Messages
  954. sensitive information, this requirement limits total
  955. message privacy.
  956. Names of encryption software are registered with the Net-
  957. work Information Center, SRI International, Menlo Park, Cali-
  958. fornia.
  959. 4.7.4. EXTENSION-FIELD
  960. A limited number of common fields have been defined in
  961. this document. As network mail requirements dictate, addi-
  962. tional fields may be standardized. To provide user-defined
  963. fields with a measure of safety, in name selection, such
  964. extension-fields will never have names that begin with the
  965. string "X-".
  966. Names of Extension-fields are registered with the Network
  967. Information Center, SRI International, Menlo Park, California.
  968. 4.7.5. USER-DEFINED-FIELD
  969. Individual users of network mail are free to define and
  970. use additional header fields. Such fields must have names
  971. which are not already used in the current specification or in
  972. any definitions of extension-fields, and the overall syntax of
  973. these user-defined-fields must conform to this specification's
  974. rules for delimiting and folding fields. Due to the
  975. extension-field publishing process, the name of a user-
  976. defined-field may be pre-empted
  977. Note: The prefatory string "X-" will never be used in the
  978. names of Extension-fields. This provides user-defined
  979. fields with a protected set of names.
  980. August 13, 1982 - 25 - RFC #822
  981. Standard for ARPA Internet Text Messages
  982. 5. DATE AND TIME SPECIFICATION
  983. 5.1. SYNTAX
  984. date-time = [ day "," ] date time ; dd mm yy
  985. ; hh:mm:ss zzz
  986. day = "Mon" / "Tue" / "Wed" / "Thu"
  987. / "Fri" / "Sat" / "Sun"
  988. date = 1*2DIGIT month 2DIGIT ; day month year
  989. ; e.g. 20 Jun 82
  990. month = "Jan" / "Feb" / "Mar" / "Apr"
  991. / "May" / "Jun" / "Jul" / "Aug"
  992. / "Sep" / "Oct" / "Nov" / "Dec"
  993. time = hour zone ; ANSI and Military
  994. hour = 2DIGIT ":" 2DIGIT [":" 2DIGIT]
  995. ; 00:00:00 - 23:59:59
  996. zone = "UT" / "GMT" ; Universal Time
  997. ; North American : UT
  998. / "EST" / "EDT" ; Eastern: - 5/ - 4
  999. / "CST" / "CDT" ; Central: - 6/ - 5
  1000. / "MST" / "MDT" ; Mountain: - 7/ - 6
  1001. / "PST" / "PDT" ; Pacific: - 8/ - 7
  1002. / 1ALPHA ; Military: Z = UT;
  1003. ; A:-1; (J not used)
  1004. ; M:-12; N:+1; Y:+12
  1005. / ( ("+" / "-") 4DIGIT ) ; Local differential
  1006. ; hours+min. (HHMM)
  1007. 5.2. SEMANTICS
  1008. If included, day-of-week must be the day implied by the date
  1009. specification.
  1010. Time zone may be indicated in several ways. "UT" is Univer-
  1011. sal Time (formerly called "Greenwich Mean Time"); "GMT" is per-
  1012. mitted as a reference to Universal Time. The military standard
  1013. uses a single character for each zone. "Z" is Universal Time.
  1014. "A" indicates one hour earlier, and "M" indicates 12 hours ear-
  1015. lier; "N" is one hour later, and "Y" is 12 hours later. The
  1016. letter "J" is not used. The other remaining two forms are taken
  1017. from ANSI standard X3.51-1975. One allows explicit indication of
  1018. the amount of offset from UT; the other uses common 3-character
  1019. strings for indicating time zones in North America.
  1020. August 13, 1982 - 26 - RFC #822
  1021. Standard for ARPA Internet Text Messages
  1022. 6. ADDRESS SPECIFICATION
  1023. 6.1. SYNTAX
  1024. address = mailbox ; one addressee
  1025. / group ; named list
  1026. group = phrase ":" [#mailbox] ";"
  1027. mailbox = addr-spec ; simple address
  1028. / phrase route-addr ; name & addr-spec
  1029. route-addr = "<" [route] addr-spec ">"
  1030. route = 1#("@" domain) ":" ; path-relative
  1031. addr-spec = local-part "@" domain ; global address
  1032. local-part = word *("." word) ; uninterpreted
  1033. ; case-preserved
  1034. domain = sub-domain *("." sub-domain)
  1035. sub-domain = domain-ref / domain-literal
  1036. domain-ref = atom ; symbolic reference
  1037. 6.2. SEMANTICS
  1038. A mailbox receives mail. It is a conceptual entity which
  1039. does not necessarily pertain to file storage. For example, some
  1040. sites may choose to print mail on their line printer and deliver
  1041. the output to the addressee's desk.
  1042. A mailbox specification comprises a person, system or pro-
  1043. cess name reference, a domain-dependent string, and a name-domain
  1044. reference. The name reference is optional and is usually used to
  1045. indicate the human name of a recipient. The name-domain refer-
  1046. ence specifies a sequence of sub-domains. The domain-dependent
  1047. string is uninterpreted, except by the final sub-domain; the rest
  1048. of the mail service merely transmits it as a literal string.
  1049. 6.2.1. DOMAINS
  1050. A name-domain is a set of registered (mail) names. A name-
  1051. domain specification resolves to a subordinate name-domain
  1052. specification or to a terminal domain-dependent string.
  1053. Hence, domain specification is extensible, permitting any
  1054. number of registration levels.
  1055. August 13, 1982 - 27 - RFC #822
  1056. Standard for ARPA Internet Text Messages
  1057. Name-domains model a global, logical, hierarchical addressing
  1058. scheme. The model is logical, in that an address specifica-
  1059. tion is related to name registration and is not necessarily
  1060. tied to transmission path. The model's hierarchy is a
  1061. directed graph, called an in-tree, such that there is a single
  1062. path from the root of the tree to any node in the hierarchy.
  1063. If more than one path actually exists, they are considered to
  1064. be different addresses.
  1065. The root node is common to all addresses; consequently, it is
  1066. not referenced. Its children constitute "top-level" name-
  1067. domains. Usually, a service has access to its own full domain
  1068. specification and to the names of all top-level name-domains.
  1069. The "top" of the domain addressing hierarchy -- a child of the
  1070. root -- is indicated by the right-most field, in a domain
  1071. specification. Its child is specified to the left, its child
  1072. to the left, and so on.
  1073. Some groups provide formal registration services; these con-
  1074. stitute name-domains that are independent logically of
  1075. specific machines. In addition, networks and machines impli-
  1076. citly compose name-domains, since their membership usually is
  1077. registered in name tables.
  1078. In the case of formal registration, an organization implements
  1079. a (distributed) data base which provides an address-to-route
  1080. mapping service for addresses of the form:
  1081. person@registry.organization
  1082. Note that "organization" is a logical entity, separate from
  1083. any particular communication network.
  1084. A mechanism for accessing "organization" is universally avail-
  1085. able. That mechanism, in turn, seeks an instantiation of the
  1086. registry; its location is not indicated in the address specif-
  1087. ication. It is assumed that the system which operates under
  1088. the name "organization" knows how to find a subordinate regis-
  1089. try. The registry will then use the "person" string to deter-
  1090. mine where to send the mail specification.
  1091. The latter, network-oriented case permits simple, direct,
  1092. attachment-related address specification, such as:
  1093. user@host.network
  1094. Once the network is accessed, it is expected that a message
  1095. will go directly to the host and that the host will resolve
  1096. August 13, 1982 - 28 - RFC #822
  1097. Standard for ARPA Internet Text Messages
  1098. the user name, placing the message in the user's mailbox.
  1099. 6.2.2. ABBREVIATED DOMAIN SPECIFICATION
  1100. Since any number of levels is possible within the domain
  1101. hierarchy, specification of a fully qualified address can
  1102. become inconvenient. This standard permits abbreviated domain
  1103. specification, in a special case:
  1104. For the address of the sender, call the left-most
  1105. sub-domain Level N. In a header address, if all of
  1106. the sub-domains above (i.e., to the right of) Level N
  1107. are the same as those of the sender, then they do not
  1108. have to appear in the specification. Otherwise, the
  1109. address must be fully qualified.
  1110. This feature is subject to approval by local sub-
  1111. domains. Individual sub-domains may require their
  1112. member systems, which originate mail, to provide full
  1113. domain specification only. When permitted, abbrevia-
  1114. tions may be present only while the message stays
  1115. within the sub-domain of the sender.
  1116. Use of this mechanism requires the sender's sub-domain
  1117. to reserve the names of all top-level domains, so that
  1118. full specifications can be distinguished from abbrevi-
  1119. ated specifications.
  1120. For example, if a sender's address is:
  1121. sender@registry-A.registry-1.organization-X
  1122. and one recipient's address is:
  1123. recipient@registry-B.registry-1.organization-X
  1124. and another's is:
  1125. recipient@registry-C.registry-2.organization-X
  1126. then ".registry-1.organization-X" need not be specified in the
  1127. the message, but "registry-C.registry-2" DOES have to be
  1128. specified. That is, the first two addresses may be abbrevi-
  1129. ated, but the third address must be fully specified.
  1130. When a message crosses a domain boundary, all addresses must
  1131. be specified in the full format, ending with the top-level
  1132. name-domain in the right-most field. It is the responsibility
  1133. of mail forwarding services to ensure that addresses conform
  1134. August 13, 1982 - 29 - RFC #822
  1135. Standard for ARPA Internet Text Messages
  1136. with this requirement. In the case of abbreviated addresses,
  1137. the relaying service must make the necessary expansions. It
  1138. should be noted that it often is difficult for such a service
  1139. to locate all occurrences of address abbreviations. For exam-
  1140. ple, it will not be possible to find such abbreviations within
  1141. the body of the message. The "Return-Path" field can aid
  1142. recipients in recovering from these errors.
  1143. Note: When passing any portion of an addr-spec onto a process
  1144. which does not interpret data according to this stan-
  1145. dard (e.g., mail protocol servers). There must be NO
  1146. LWSP-chars preceding or following the at-sign or any
  1147. delimiting period ("."), such as shown in the above
  1148. examples, and only ONE SPACE between contiguous
  1149. <word>s.
  1150. 6.2.3. DOMAIN TERMS
  1151. A domain-ref must be THE official name of a registry, network,
  1152. or host. It is a symbolic reference, within a name sub-
  1153. domain. At times, it is necessary to bypass standard mechan-
  1154. isms for resolving such references, using more primitive
  1155. information, such as a network host address rather than its
  1156. associated host name.
  1157. To permit such references, this standard provides the domain-
  1158. literal construct. Its contents must conform with the needs
  1159. of the sub-domain in which it is interpreted.
  1160. Domain-literals which refer to domains within the ARPA Inter-
  1161. net specify 32-bit Internet addresses, in four 8-bit fields
  1162. noted in decimal, as described in Request for Comments #820,
  1163. "Assigned Numbers." For example:
  1164. [10.0.3.19]
  1165. Note: THE USE OF DOMAIN-LITERALS IS STRONGLY DISCOURAGED. It
  1166. is permitted only as a means of bypassing temporary
  1167. system limitations, such as name tables which are not
  1168. complete.
  1169. The names of "top-level" domains, and the names of domains
  1170. under in the ARPA Internet, are registered with the Network
  1171. Information Center, SRI International, Menlo Park, California.
  1172. 6.2.4. DOMAIN-DEPENDENT LOCAL STRING
  1173. The local-part of an addr-spec in a mailbox specification
  1174. (i.e., the host's name for the mailbox) is understood to be
  1175. August 13, 1982 - 30 - RFC #822
  1176. Standard for ARPA Internet Text Messages
  1177. whatever the receiving mail protocol server allows. For exam-
  1178. ple, some systems do not understand mailbox references of the
  1179. form "P. D. Q. Bach", but others do.
  1180. This specification treats periods (".") as lexical separators.
  1181. Hence, their presence in local-parts which are not quoted-
  1182. strings, is detected. However, such occurrences carry NO
  1183. semantics. That is, if a local-part has periods within it, an
  1184. address parser will divide the local-part into several tokens,
  1185. but the sequence of tokens will be treated as one uninter-
  1186. preted unit. The sequence will be re-assembled, when the
  1187. address is passed outside of the system such as to a mail pro-
  1188. tocol service.
  1189. For example, the address:
  1190. First.Last@Registry.Org
  1191. is legal and does not require the local-part to be surrounded
  1192. with quotation-marks. (However, "First Last" DOES require
  1193. quoting.) The local-part of the address, when passed outside
  1194. of the mail system, within the Registry.Org domain, is
  1195. "First.Last", again without quotation marks.
  1196. 6.2.5. BALANCING LOCAL-PART AND DOMAIN
  1197. In some cases, the boundary between local-part and domain can
  1198. be flexible. The local-part may be a simple string, which is
  1199. used for the final determination of the recipient's mailbox.
  1200. All other levels of reference are, therefore, part of the
  1201. domain.
  1202. For some systems, in the case of abbreviated reference to the
  1203. local and subordinate sub-domains, it may be possible to
  1204. specify only one reference within the domain part and place
  1205. the other, subordinate name-domain references within the
  1206. local-part. This would appear as:
  1207. mailbox.sub1.sub2@this-domain
  1208. Such a specification would be acceptable to address parsers
  1209. which conform to RFC #733, but do not support this newer
  1210. Internet standard. While contrary to the intent of this stan-
  1211. dard, the form is legal.
  1212. Also, some sub-domains have a specification syntax which does
  1213. not conform to this standard. For example:
  1214. sub-net.mailbox@sub-domain.domain
  1215. August 13, 1982 - 31 - RFC #822
  1216. Standard for ARPA Internet Text Messages
  1217. uses a different parsing sequence for local-part than for
  1218. domain.
  1219. Note: As a rule, the domain specification should contain
  1220. fields which are encoded according to the syntax of
  1221. this standard and which contain generally-standardized
  1222. information. The local-part specification should con-
  1223. tain only that portion of the address which deviates
  1224. from the form or intention of the domain field.
  1225. 6.2.6. MULTIPLE MAILBOXES
  1226. An individual may have several mailboxes and wish to receive
  1227. mail at whatever mailbox is convenient for the sender to
  1228. access. This standard does not provide a means of specifying
  1229. "any member of" a list of mailboxes.
  1230. A set of individuals may wish to receive mail as a single unit
  1231. (i.e., a distribution list). The <group> construct permits
  1232. specification of such a list. Recipient mailboxes are speci-
  1233. fied within the bracketed part (":" - ";"). A copy of the
  1234. transmitted message is to be sent to each mailbox listed.
  1235. This standard does not permit recursive specification of
  1236. groups within groups.
  1237. While a list must be named, it is not required that the con-
  1238. tents of the list be included. In this case, the <address>
  1239. serves only as an indication of group distribution and would
  1240. appear in the form:
  1241. name:;
  1242. Some mail services may provide a group-list distribution
  1243. facility, accepting a single mailbox reference, expanding it
  1244. to the full distribution list, and relaying the mail to the
  1245. list's members. This standard provides no additional syntax
  1246. for indicating such a service. Using the <group> address
  1247. alternative, while listing one mailbox in it, can mean either
  1248. that the mailbox reference will be expanded to a list or that
  1249. there is a group with one member.
  1250. 6.2.7. EXPLICIT PATH SPECIFICATION
  1251. At times, a message originator may wish to indicate the
  1252. transmission path that a message should follow. This is
  1253. called source routing. The normal addressing scheme, used in
  1254. an addr-spec, is carefully separated from such information;
  1255. the <route> portion of a route-addr is provided for such occa-
  1256. sions. It specifies the sequence of hosts and/or transmission
  1257. August 13, 1982 - 32 - RFC #822
  1258. Standard for ARPA Internet Text Messages
  1259. services that are to be traversed. Both domain-refs and
  1260. domain-literals may be used.
  1261. Note: The use of source routing is discouraged. Unless the
  1262. sender has special need of path restriction, the choice
  1263. of transmission route should be left to the mail tran-
  1264. sport service.
  1265. 6.3. RESERVED ADDRESS
  1266. It often is necessary to send mail to a site, without know-
  1267. ing any of its valid addresses. For example, there may be mail
  1268. system dysfunctions, or a user may wish to find out a person's
  1269. correct address, at that site.
  1270. This standard specifies a single, reserved mailbox address
  1271. (local-part) which is to be valid at each site. Mail sent to
  1272. that address is to be routed to a person responsible for the
  1273. site's mail system or to a person with responsibility for general
  1274. site operation. The name of the reserved local-part address is:
  1275. Postmaster
  1276. so that "Postmaster@domain" is required to be valid.
  1277. Note: This reserved local-part must be matched without sensi-
  1278. tivity to alphabetic case, so that "POSTMASTER", "postmas-
  1279. ter", and even "poStmASteR" is to be accepted.
  1280. August 13, 1982 - 33 - RFC #822
  1281. Standard for ARPA Internet Text Messages
  1282. 7. BIBLIOGRAPHY
  1283. ANSI. "USA Standard Code for Information Interchange," X3.4.
  1284. American National Standards Institute: New York (1968). Also
  1285. in: Feinler, E. and J. Postel, eds., "ARPANET Protocol Hand-
  1286. book", NIC 7104.
  1287. ANSI. "Representations of Universal Time, Local Time Differen-
  1288. tials, and United States Time Zone References for Information
  1289. Interchange," X3.51-1975. American National Standards Insti-
  1290. tute: New York (1975).
  1291. Bemer, R.W., "Time and the Computer." In: Interface Age (Feb.
  1292. 1979).
  1293. Bennett, C.J. "JNT Mail Protocol". Joint Network Team, Ruther-
  1294. ford and Appleton Laboratory: Didcot, England.
  1295. Bhushan, A.K., Pogran, K.T., Tomlinson, R.S., and White, J.E.
  1296. "Standardizing Network Mail Headers," ARPANET Request for
  1297. Comments No. 561, Network Information Center No. 18516; SRI
  1298. International: Menlo Park (September 1973).
  1299. Birrell, A.D., Levin, R., Needham, R.M., and Schroeder, M.D.
  1300. "Grapevine: An Exercise in Distributed Computing," Communica-
  1301. tions of the ACM 25, 4 (April 1982), 260-274.
  1302. Crocker, D.H., Vittal, J.J., Pogran, K.T., Henderson, D.A.
  1303. "Standard for the Format of ARPA Network Text Message,"
  1304. ARPANET Request for Comments No. 733, Network Information
  1305. Center No. 41952. SRI International: Menlo Park (November
  1306. 1977).
  1307. Feinler, E.J. and Postel, J.B. ARPANET Protocol Handbook, Net-
  1308. work Information Center No. 7104 (NTIS AD A003890). SRI
  1309. International: Menlo Park (April 1976).
  1310. Harary, F. "Graph Theory". Addison-Wesley: Reading, Mass.
  1311. (1969).
  1312. Levin, R. and Schroeder, M. "Transport of Electronic Messages
  1313. through a Network," TeleInformatics 79, pp. 29-33. North
  1314. Holland (1979). Also as Xerox Palo Alto Research Center
  1315. Technical Report CSL-79-4.
  1316. Myer, T.H. and Henderson, D.A. "Message Transmission Protocol,"
  1317. ARPANET Request for Comments, No. 680, Network Information
  1318. Center No. 32116. SRI International: Menlo Park (1975).
  1319. August 13, 1982 - 34 - RFC #822
  1320. Standard for ARPA Internet Text Messages
  1321. NBS. "Specification of Message Format for Computer Based Message
  1322. Systems, Recommended Federal Information Processing Standard."
  1323. National Bureau of Standards: Gaithersburg, Maryland
  1324. (October 1981).
  1325. NIC. Internet Protocol Transition Workbook. Network Information
  1326. Center, SRI-International, Menlo Park, California (March
  1327. 1982).
  1328. Oppen, D.C. and Dalal, Y.K. "The Clearinghouse: A Decentralized
  1329. Agent for Locating Named Objects in a Distributed Environ-
  1330. ment," OPD-T8103. Xerox Office Products Division: Palo Alto,
  1331. CA. (October 1981).
  1332. Postel, J.B. "Assigned Numbers," ARPANET Request for Comments,
  1333. No. 820. SRI International: Menlo Park (August 1982).
  1334. Postel, J.B. "Simple Mail Transfer Protocol," ARPANET Request
  1335. for Comments, No. 821. SRI International: Menlo Park (August
  1336. 1982).
  1337. Shoch, J.F. "Internetwork naming, addressing and routing," in
  1338. Proc. 17th IEEE Computer Society International Conference, pp.
  1339. 72-79, Sept. 1978, IEEE Cat. No. 78 CH 1388-8C.
  1340. Su, Z. and Postel, J. "The Domain Naming Convention for Internet
  1341. User Applications," ARPANET Request for Comments, No. 819.
  1342. SRI International: Menlo Park (August 1982).
  1343. August 13, 1982 - 35 - RFC #822
  1344. Standard for ARPA Internet Text Messages
  1345. APPENDIX
  1346. A. EXAMPLES
  1347. A.1. ADDRESSES
  1348. A.1.1. Alfred Neuman <Neuman@BBN-TENEXA>
  1349. A.1.2. Neuman@BBN-TENEXA
  1350. These two "Alfred Neuman" examples have identical seman-
  1351. tics, as far as the operation of the local host's mail sending
  1352. (distribution) program (also sometimes called its "mailer")
  1353. and the remote host's mail protocol server are concerned. In
  1354. the first example, the "Alfred Neuman" is ignored by the
  1355. mailer, as "Neuman@BBN-TENEXA" completely specifies the reci-
  1356. pient. The second example contains no superfluous informa-
  1357. tion, and, again, "Neuman@BBN-TENEXA" is the intended reci-
  1358. pient.
  1359. Note: When the message crosses name-domain boundaries, then
  1360. these specifications must be changed, so as to indicate
  1361. the remainder of the hierarchy, starting with the top
  1362. level.
  1363. A.1.3. "George, Ted" <Shared@Group.Arpanet>
  1364. This form might be used to indicate that a single mailbox
  1365. is shared by several users. The quoted string is ignored by
  1366. the originating host's mailer, because "Shared@Group.Arpanet"
  1367. completely specifies the destination mailbox.
  1368. A.1.4. Wilt . (the Stilt) Chamberlain@NBA.US
  1369. The "(the Stilt)" is a comment, which is NOT included in
  1370. the destination mailbox address handed to the originating
  1371. system's mailer. The local-part of the address is the string
  1372. "Wilt.Chamberlain", with NO space between the first and second
  1373. words.
  1374. A.1.5. Address Lists
  1375. Gourmets: Pompous Person <WhoZiWhatZit@Cordon-Bleu>,
  1376. Childs@WGBH.Boston, Galloping Gourmet@
  1377. ANT.Down-Under (Australian National Television),
  1378. Cheapie@Discount-Liquors;,
  1379. Cruisers: Port@Portugal, Jones@SEA;,
  1380. Another@Somewhere.SomeOrg
  1381. August 13, 1982 - 36 - RFC #822
  1382. Standard for ARPA Internet Text Messages
  1383. This group list example points out the use of comments and the
  1384. mixing of addresses and groups.
  1385. A.2. ORIGINATOR ITEMS
  1386. A.2.1. Author-sent
  1387. George Jones logs into his host as "Jones". He sends
  1388. mail himself.
  1389. From: Jones@Group.Org
  1390. or
  1391. From: George Jones <Jones@Group.Org>
  1392. A.2.2. Secretary-sent
  1393. George Jones logs in as Jones on his host. His secre-
  1394. tary, who logs in as Secy sends mail for him. Replies to the
  1395. mail should go to George.
  1396. From: George Jones <Jones@Group>
  1397. Sender: Secy@Other-Group
  1398. A.2.3. Secretary-sent, for user of shared directory
  1399. George Jones' secretary sends mail for George. Replies
  1400. should go to George.
  1401. From: George Jones<Shared@Group.Org>
  1402. Sender: Secy@Other-Group
  1403. Note that there need not be a space between "Jones" and the
  1404. "<", but adding a space enhances readability (as is the case
  1405. in other examples.
  1406. A.2.4. Committee activity, with one author
  1407. George is a member of a committee. He wishes to have any
  1408. replies to his message go to all committee members.
  1409. From: George Jones <Jones@Host.Net>
  1410. Sender: Jones@Host
  1411. Reply-To: The Committee: Jones@Host.Net,
  1412. Smith@Other.Org,
  1413. Doe@Somewhere-Else;
  1414. Note that if George had not included himself in the
  1415. August 13, 1982 - 37 - RFC #822
  1416. Standard for ARPA Internet Text Messages
  1417. enumeration of The Committee, he would not have gotten an
  1418. implicit reply; the presence of the "Reply-to" field SUPER-
  1419. SEDES the sending of a reply to the person named in the "From"
  1420. field.
  1421. A.2.5. Secretary acting as full agent of author
  1422. George Jones asks his secretary (Secy@Host) to send a
  1423. message for him in his capacity as Group. He wants his secre-
  1424. tary to handle all replies.
  1425. From: George Jones <Group@Host>
  1426. Sender: Secy@Host
  1427. Reply-To: Secy@Host
  1428. A.2.6. Agent for user without online mailbox
  1429. A friend of George's, Sarah, is visiting. George's
  1430. secretary sends some mail to a friend of Sarah in computer-
  1431. land. Replies should go to George, whose mailbox is Jones at
  1432. Registry.
  1433. From: Sarah Friendly <Secy@Registry>
  1434. Sender: Secy-Name <Secy@Registry>
  1435. Reply-To: Jones@Registry.
  1436. A.2.7. Agent for member of a committee
  1437. George's secretary sends out a message which was authored
  1438. jointly by all the members of a committee. Note that the name
  1439. of the committee cannot be specified, since <group> names are
  1440. not permitted in the From field.
  1441. From: Jones@Host,
  1442. Smith@Other-Host,
  1443. Doe@Somewhere-Else
  1444. Sender: Secy@SHost
  1445. August 13, 1982 - 38 - RFC #822
  1446. Standard for ARPA Internet Text Messages
  1447. A.3. COMPLETE HEADERS
  1448. A.3.1. Minimum required
  1449. Date: 26 Aug 76 1429 EDT Date: 26 Aug 76 1429 EDT
  1450. From: Jones@Registry.Org or From: Jones@Registry.Org
  1451. Bcc: To: Smith@Registry.Org
  1452. Note that the "Bcc" field may be empty, while the "To" field
  1453. is required to have at least one address.
  1454. A.3.2. Using some of the additional fields
  1455. Date: 26 Aug 76 1430 EDT
  1456. From: George Jones<Group@Host>
  1457. Sender: Secy@SHOST
  1458. To: "Al Neuman"@Mad-Host,
  1459. Sam.Irving@Other-Host
  1460. Message-ID: <some.string@SHOST>
  1461. A.3.3. About as complex as you're going to get
  1462. Date : 27 Aug 76 0932 PDT
  1463. From : Ken Davis <KDavis@This-Host.This-net>
  1464. Subject : Re: The Syntax in the RFC
  1465. Sender : KSecy@Other-Host
  1466. Reply-To : Sam.Irving@Reg.Organization
  1467. To : George Jones <Group@Some-Reg.An-Org>,
  1468. Al.Neuman@MAD.Publisher
  1469. cc : Important folk:
  1470. Tom Softwood <Balsa@Tree.Root>,
  1471. "Sam Irving"@Other-Host;,
  1472. Standard Distribution:
  1473. /main/davis/people/standard@Other-Host,
  1474. "<Jones>standard.dist.3"@Tops-20-Host>;
  1475. Comment : Sam is away on business. He asked me to handle
  1476. his mail for him. He'll be able to provide a
  1477. more accurate explanation when he returns
  1478. next week.
  1479. In-Reply-To: <some.string@DBM.Group>, George's message
  1480. X-Special-action: This is a sample of user-defined field-
  1481. names. There could also be a field-name
  1482. "Special-action", but its name might later be
  1483. preempted
  1484. Message-ID: <4231.629.XYzi-What@Other-Host>
  1485. August 13, 1982 - 39 - RFC #822
  1486. Standard for ARPA Internet Text Messages
  1487. B. SIMPLE FIELD PARSING
  1488. Some mail-reading software systems may wish to perform only
  1489. minimal processing, ignoring the internal syntax of structured
  1490. field-bodies and treating them the same as unstructured-field-
  1491. bodies. Such software will need only to distinguish:
  1492. o Header fields from the message body,
  1493. o Beginnings of fields from lines which continue fields,
  1494. o Field-names from field-contents.
  1495. The abbreviated set of syntactic rules which follows will
  1496. suffice for this purpose. It describes a limited view of mes-
  1497. sages and is a subset of the syntactic rules provided in the main
  1498. part of this specification. One small exception is that the con-
  1499. tents of field-bodies consist only of text:
  1500. B.1. SYNTAX
  1501. message = *field *(CRLF *text)
  1502. field = field-name ":" [field-body] CRLF
  1503. field-name = 1*<any CHAR, excluding CTLs, SPACE, and ":">
  1504. field-body = *text [CRLF LWSP-char field-body]
  1505. B.2. SEMANTICS
  1506. Headers occur before the message body and are terminated by
  1507. a null line (i.e., two contiguous CRLFs).
  1508. A line which continues a header field begins with a SPACE or
  1509. HTAB character, while a line beginning a field starts with a
  1510. printable character which is not a colon.
  1511. A field-name consists of one or more printable characters
  1512. (excluding colon, space, and control-characters). A field-name
  1513. MUST be contained on one line. Upper and lower case are not dis-
  1514. tinguished when comparing field-names.
  1515. August 13, 1982 - 40 - RFC #822
  1516. Standard for ARPA Internet Text Messages
  1517. C. DIFFERENCES FROM RFC #733
  1518. The following summarizes the differences between this stan-
  1519. dard and the one specified in Arpanet Request for Comments #733,
  1520. "Standard for the Format of ARPA Network Text Messages". The
  1521. differences are listed in the order of their occurrence in the
  1522. current specification.
  1523. C.1. FIELD DEFINITIONS
  1524. C.1.1. FIELD NAMES
  1525. These now must be a sequence of printable characters. They
  1526. may not contain any LWSP-chars.
  1527. C.2. LEXICAL TOKENS
  1528. C.2.1. SPECIALS
  1529. The characters period ("."), left-square bracket ("["), and
  1530. right-square bracket ("]") have been added. For presentation
  1531. purposes, and when passing a specification to a system that
  1532. does not conform to this standard, periods are to be contigu-
  1533. ous with their surrounding lexical tokens. No linear-white-
  1534. space is permitted between them. The presence of one LWSP-
  1535. char between other tokens is still directed.
  1536. C.2.2. ATOM
  1537. Atoms may not contain SPACE.
  1538. C.2.3. SPECIAL TEXT
  1539. ctext and qtext have had backslash ("\") added to the list of
  1540. prohibited characters.
  1541. C.2.4. DOMAINS
  1542. The lexical tokens <domain-literal> and <dtext> have been
  1543. added.
  1544. C.3. MESSAGE SPECIFICATION
  1545. C.3.1. TRACE
  1546. The "Return-path:" and "Received:" fields have been specified.
  1547. August 13, 1982 - 41 - RFC #822
  1548. Standard for ARPA Internet Text Messages
  1549. C.3.2. FROM
  1550. The "From" field must contain machine-usable addresses (addr-
  1551. spec). Multiple addresses may be specified, but named-lists
  1552. (groups) may not.
  1553. C.3.3. RESENT
  1554. The meta-construct of prefacing field names with the string
  1555. "Resent-" has been added, to indicate that a message has been
  1556. forwarded by an intermediate recipient.
  1557. C.3.4. DESTINATION
  1558. A message must contain at least one destination address field.
  1559. "To" and "CC" are required to contain at least one address.
  1560. C.3.5. IN-REPLY-TO
  1561. The field-body is no longer a comma-separated list, although a
  1562. sequence is still permitted.
  1563. C.3.6. REFERENCE
  1564. The field-body is no longer a comma-separated list, although a
  1565. sequence is still permitted.
  1566. C.3.7. ENCRYPTED
  1567. A field has been specified that permits senders to indicate
  1568. that the body of a message has been encrypted.
  1569. C.3.8. EXTENSION-FIELD
  1570. Extension fields are prohibited from beginning with the char-
  1571. acters "X-".
  1572. C.4. DATE AND TIME SPECIFICATION
  1573. C.4.1. SIMPLIFICATION
  1574. Fewer optional forms are permitted and the list of three-
  1575. letter time zones has been shortened.
  1576. C.5. ADDRESS SPECIFICATION
  1577. August 13, 1982 - 42 - RFC #822
  1578. Standard for ARPA Internet Text Messages
  1579. C.5.1. ADDRESS
  1580. The use of quoted-string, and the ":"-atom-":" construct, have
  1581. been removed. An address now is either a single mailbox
  1582. reference or is a named list of addresses. The latter indi-
  1583. cates a group distribution.
  1584. C.5.2. GROUPS
  1585. Group lists are now required to to have a name. Group lists
  1586. may not be nested.
  1587. C.5.3. MAILBOX
  1588. A mailbox specification may indicate a person's name, as
  1589. before. Such a named list no longer may specify multiple
  1590. mailboxes and may not be nested.
  1591. C.5.4. ROUTE ADDRESSING
  1592. Addresses now are taken to be absolute, global specifications,
  1593. independent of transmission paths. The <route> construct has
  1594. been provided, to permit explicit specification of transmis-
  1595. sion path. RFC #733's use of multiple at-signs ("@") was
  1596. intended as a general syntax for indicating routing and/or
  1597. hierarchical addressing. The current standard separates these
  1598. specifications and only one at-sign is permitted.
  1599. C.5.5. AT-SIGN
  1600. The string " at " no longer is used as an address delimiter.
  1601. Only at-sign ("@") serves the function.
  1602. C.5.6. DOMAINS
  1603. Hierarchical, logical name-domains have been added.
  1604. C.6. RESERVED ADDRESS
  1605. The local-part "Postmaster" has been reserved, so that users can
  1606. be guaranteed at least one valid address at a site.
  1607. August 13, 1982 - 43 - RFC #822
  1608. Standard for ARPA Internet Text Messages
  1609. D. ALPHABETICAL LISTING OF SYNTAX RULES
  1610. address = mailbox ; one addressee
  1611. / group ; named list
  1612. addr-spec = local-part "@" domain ; global address
  1613. ALPHA = <any ASCII alphabetic character>
  1614. ; (101-132, 65.- 90.)
  1615. ; (141-172, 97.-122.)
  1616. atom = 1*<any CHAR except specials, SPACE and CTLs>
  1617. authentic = "From" ":" mailbox ; Single author
  1618. / ( "Sender" ":" mailbox ; Actual submittor
  1619. "From" ":" 1#mailbox) ; Multiple authors
  1620. ; or not sender
  1621. CHAR = <any ASCII character> ; ( 0-177, 0.-127.)
  1622. comment = "(" *(ctext / quoted-pair / comment) ")"
  1623. CR = <ASCII CR, carriage return> ; ( 15, 13.)
  1624. CRLF = CR LF
  1625. ctext = <any CHAR excluding "(", ; => may be folded
  1626. ")", "\" & CR, & including
  1627. linear-white-space>
  1628. CTL = <any ASCII control ; ( 0- 37, 0.- 31.)
  1629. character and DEL> ; ( 177, 127.)
  1630. date = 1*2DIGIT month 2DIGIT ; day month year
  1631. ; e.g. 20 Jun 82
  1632. dates = orig-date ; Original
  1633. [ resent-date ] ; Forwarded
  1634. date-time = [ day "," ] date time ; dd mm yy
  1635. ; hh:mm:ss zzz
  1636. day = "Mon" / "Tue" / "Wed" / "Thu"
  1637. / "Fri" / "Sat" / "Sun"
  1638. delimiters = specials / linear-white-space / comment
  1639. destination = "To" ":" 1#address ; Primary
  1640. / "Resent-To" ":" 1#address
  1641. / "cc" ":" 1#address ; Secondary
  1642. / "Resent-cc" ":" 1#address
  1643. / "bcc" ":" #address ; Blind carbon
  1644. / "Resent-bcc" ":" #address
  1645. DIGIT = <any ASCII decimal digit> ; ( 60- 71, 48.- 57.)
  1646. domain = sub-domain *("." sub-domain)
  1647. domain-literal = "[" *(dtext / quoted-pair) "]"
  1648. domain-ref = atom ; symbolic reference
  1649. dtext = <any CHAR excluding "[", ; => may be folded
  1650. "]", "\" & CR, & including
  1651. linear-white-space>
  1652. extension-field =
  1653. <Any field which is defined in a document
  1654. published as a formal extension to this
  1655. specification; none will have names beginning
  1656. with the string "X-">
  1657. August 13, 1982 - 44 - RFC #822
  1658. Standard for ARPA Internet Text Messages
  1659. field = field-name ":" [ field-body ] CRLF
  1660. fields = dates ; Creation time,
  1661. source ; author id & one
  1662. 1*destination ; address required
  1663. *optional-field ; others optional
  1664. field-body = field-body-contents
  1665. [CRLF LWSP-char field-body]
  1666. field-body-contents =
  1667. <the ASCII characters making up the field-body, as
  1668. defined in the following sections, and consisting
  1669. of combinations of atom, quoted-string, and
  1670. specials tokens, or else consisting of texts>
  1671. field-name = 1*<any CHAR, excluding CTLs, SPACE, and ":">
  1672. group = phrase ":" [#mailbox] ";"
  1673. hour = 2DIGIT ":" 2DIGIT [":" 2DIGIT]
  1674. ; 00:00:00 - 23:59:59
  1675. HTAB = <ASCII HT, horizontal-tab> ; ( 11, 9.)
  1676. LF = <ASCII LF, linefeed> ; ( 12, 10.)
  1677. linear-white-space = 1*([CRLF] LWSP-char) ; semantics = SPACE
  1678. ; CRLF => folding
  1679. local-part = word *("." word) ; uninterpreted
  1680. ; case-preserved
  1681. LWSP-char = SPACE / HTAB ; semantics = SPACE
  1682. mailbox = addr-spec ; simple address
  1683. / phrase route-addr ; name & addr-spec
  1684. message = fields *( CRLF *text ) ; Everything after
  1685. ; first null line
  1686. ; is message body
  1687. month = "Jan" / "Feb" / "Mar" / "Apr"
  1688. / "May" / "Jun" / "Jul" / "Aug"
  1689. / "Sep" / "Oct" / "Nov" / "Dec"
  1690. msg-id = "<" addr-spec ">" ; Unique message id
  1691. optional-field =
  1692. / "Message-ID" ":" msg-id
  1693. / "Resent-Message-ID" ":" msg-id
  1694. / "In-Reply-To" ":" *(phrase / msg-id)
  1695. / "References" ":" *(phrase / msg-id)
  1696. / "Keywords" ":" #phrase
  1697. / "Subject" ":" *text
  1698. / "Comments" ":" *text
  1699. / "Encrypted" ":" 1#2word
  1700. / extension-field ; To be defined
  1701. / user-defined-field ; May be pre-empted
  1702. orig-date = "Date" ":" date-time
  1703. originator = authentic ; authenticated addr
  1704. [ "Reply-To" ":" 1#address] )
  1705. phrase = 1*word ; Sequence of words
  1706. August 13, 1982 - 45 - RFC #822
  1707. Standard for ARPA Internet Text Messages
  1708. qtext = <any CHAR excepting <">, ; => may be folded
  1709. "\" & CR, and including
  1710. linear-white-space>
  1711. quoted-pair = "\" CHAR ; may quote any char
  1712. quoted-string = <"> *(qtext/quoted-pair) <">; Regular qtext or
  1713. ; quoted chars.
  1714. received = "Received" ":" ; one per relay
  1715. ["from" domain] ; sending host
  1716. ["by" domain] ; receiving host
  1717. ["via" atom] ; physical path
  1718. *("with" atom) ; link/mail protocol
  1719. ["id" msg-id] ; receiver msg id
  1720. ["for" addr-spec] ; initial form
  1721. ";" date-time ; time received
  1722. resent = resent-authentic
  1723. [ "Resent-Reply-To" ":" 1#address] )
  1724. resent-authentic =
  1725. = "Resent-From" ":" mailbox
  1726. / ( "Resent-Sender" ":" mailbox
  1727. "Resent-From" ":" 1#mailbox )
  1728. resent-date = "Resent-Date" ":" date-time
  1729. return = "Return-path" ":" route-addr ; return address
  1730. route = 1#("@" domain) ":" ; path-relative
  1731. route-addr = "<" [route] addr-spec ">"
  1732. source = [ trace ] ; net traversals
  1733. originator ; original mail
  1734. [ resent ] ; forwarded
  1735. SPACE = <ASCII SP, space> ; ( 40, 32.)
  1736. specials = "(" / ")" / "<" / ">" / "@" ; Must be in quoted-
  1737. / "," / ";" / ":" / "\" / <"> ; string, to use
  1738. / "." / "[" / "]" ; within a word.
  1739. sub-domain = domain-ref / domain-literal
  1740. text = <any CHAR, including bare ; => atoms, specials,
  1741. CR & bare LF, but NOT ; comments and
  1742. including CRLF> ; quoted-strings are
  1743. ; NOT recognized.
  1744. time = hour zone ; ANSI and Military
  1745. trace = return ; path to sender
  1746. 1*received ; receipt tags
  1747. user-defined-field =
  1748. <Any field which has not been defined
  1749. in this specification or published as an
  1750. extension to this specification; names for
  1751. such fields must be unique and may be
  1752. pre-empted by published extensions>
  1753. word = atom / quoted-string
  1754. August 13, 1982 - 46 - RFC #822
  1755. Standard for ARPA Internet Text Messages
  1756. zone = "UT" / "GMT" ; Universal Time
  1757. ; North American : UT
  1758. / "EST" / "EDT" ; Eastern: - 5/ - 4
  1759. / "CST" / "CDT" ; Central: - 6/ - 5
  1760. / "MST" / "MDT" ; Mountain: - 7/ - 6
  1761. / "PST" / "PDT" ; Pacific: - 8/ - 7
  1762. / 1ALPHA ; Military: Z = UT;
  1763. <"> = <ASCII quote mark> ; ( 42, 34.)
  1764. August 13, 1982 - 47 - RFC #822