rfc0822.txt 104KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902
  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