home *** CD-ROM | disk | FTP | other *** search
/ Unix System Administration Handbook 1997 October / usah_oct97.iso / rfc / 700s / rfc733.txt < prev    next >
Text File  |  1992-10-14  |  73KB  |  1,958 lines

  1.  
  2.  
  3.  
  4.  
  5. RFC #   733
  6. NIC # 41952
  7.  
  8. Obsoletes:  RFC #561  (NIC #18516)
  9.             RFC #680  (NIC #32116)
  10.             RFC #724  (NIC #37435)
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.                    STANDARD FOR THE FORMAT OF
  19.  
  20.                   ARPA NETWORK TEXT MESSAGES(1)
  21.  
  22.  
  23.  
  24.  
  25.                         21 November 1977
  26.  
  27.  
  28.  
  29.  
  30.                                by
  31.  
  32.  
  33.                         David H. Crocker
  34.                       The Rand Corporation
  35.  
  36.                          John J. Vittal
  37.                   Bolt Beranek and Newman Inc.
  38.  
  39.                         Kenneth T. Pogran
  40.               Massachusets Institute of Technology
  41.  
  42.                    D. Austin Henderson, Jr.(2)
  43.                   Bolt Beranek and Newman Inc.
  44.  
  45.  
  46.  
  47. _________________________________________________________________
  48. (1)This work was  supported  by  the  Defense  Advanced  Research
  49. Projects Agency of the Department of Defense, under contract Nos.
  50. N00014-75-C-0661, MDA903-76-C-0212, and DAHC15-73-C0181.
  51.  
  52. (2)The authors' postal  addresses  are:   D.  Crocker,  The  Rand
  53. Corporation,  Information  Sciences  Dept.,  1700 Main St., Santa
  54. Monica, California 90406; J.  Vittal  &  D.  A.  Henderson,  Bolt
  55. Beranek & Newman, 50 Moulton St., Cambridge, Massachusetts 02138;
  56. and  K.  Pogran,  MIT  Laboratory  for  Computer   Science,   545
  57. Technology  Square, Cambridge, Massachusetts 02139.  The authors'
  58. ARPANET addresses are:  DCrocker at  Rand-Unix,  Vittal  at  BBN-
  59. TenexD, Pogran at MIT-Multics, and Henderson at BBN-TenexD.
  60.  
  61.                               -iii-
  62.  
  63.  
  64.  
  65.  
  66.  
  67.                              PREFACE
  68.  
  69.  
  70.  
  71.      ARPA's  Committee  on  Computer-Aided  Human   Communication
  72. (CAHCOM)  wishes  to promulgate a standard for the format of ARPA
  73. Network text message (mail) headers which  will  reasonably  meet
  74. the  needs  of  the  various  message  service  subsystems on the
  75. Network today.  The  authors  of  this  document  constitute  the
  76. CAHCOM  subcommittee charged with the task of developing this new
  77. standard.
  78.  
  79.      Essentially, we specify a revision to  ARPANET  Request  for
  80. Comments (RFC) 561, "Standardizing Network Mail Headers", and RFC
  81. 680, "Message Transmission Protocol".  This revision removes  and
  82. compacts  portions  of  the  previous  syntax  and  adds  several
  83. features to network address  specification.   In  particular,  we
  84. focus  on  people  and  not  mailboxes  as  recipients  and allow
  85. reference to stored address lists.   We  expect  this  syntax  to
  86. provide  sufficient  capabilities  to  meet most users' immediate
  87. needs and, therefore, give developers enough  breathing  room  to
  88. produce  a new mail transmission protocol "properly".  We believe
  89. that there is enough of a consensus in the Network  community  in
  90. favor  of such a standard syntax to make possible its adoption at
  91. this time.  An earlier draft of this specification was  published
  92. as  RFC  #724, "Proposed Official Standard for the Format of ARPA
  93. Network Messages"  and  contained  extensive  discussion  of  the
  94. background and issues in ARPANET mail standards.
  95.  
  96.      This specification was developed  over  the  course  of  one
  97. year,  using  the ARPANET mail environment, itself, to provide an
  98. on-going forum for discussing the capabilities  to  be  included.
  99. More   than   twenty   individuals,   from  across  the  country,
  100. participated in this discussion and we would like to  acknowledge
  101. their  considerable  efforts.   The  syntax  of  the standard was
  102. originally specified in the Backus-Naur Form (BNF) meta-language.
  103. Ken  L.   Harrenstien,  of SRI International, was responsible for
  104. re-coding the BNF  into  an  augmented  BNF  which  compacts  the
  105. specification and allows increased comprehensibility.
  106.  
  107.  
  108.  
  109.                                -v-
  110.  
  111.  
  112.  
  113.  
  114.  
  115.                             CONTENTS
  116.  
  117.  
  118.  
  119. PREFACE..................................................... iii
  120.  
  121.  
  122. Section
  123.    I.  INTRODUCTION.........................................   1
  124.  
  125.   II.  FRAMEWORK............................................   2
  126.  
  127.  III.  SYNTAX...............................................   4
  128.        A. Notational Conventions............................   4
  129.        B. Lexical Analysis of Messages......................   5
  130.        C. General Syntax of Messages........................  13
  131.        D. Syntax of General Addressee Items.................  15
  132.        E. Supporting Constructs.............................  15
  133.  
  134.   IV.  SEMANTICS............................................  17
  135.        A. Address Fields....................................  17
  136.        B. Reference Specification Fields....................  22
  137.        C. Other Fields and Syntactic Items..................  23
  138.        D. Dates and Times...................................  24
  139.  
  140.    V.  EXAMPLES.............................................  25
  141.        A. Addresses.........................................  25
  142.        B. Address Lists.....................................  26
  143.        C. Originator Items..................................  26
  144.        D. Complete Headers..................................  28
  145.  
  146.  
  147. Appendix
  148.    A.  ALPHABETICAL LISTING OF SYNTAX RULES.................  31
  149.    B.  SIMPLE PARSING.......................................  35
  150.  
  151. BIBLIOGRAPHY................................................  37
  152.  
  153.  
  154. Standard for the Format of Text Messages                        1
  155. I. Introduction
  156.  
  157.  
  158.  
  159.  
  160.  
  161.                         I.  INTRODUCTION
  162.  
  163.  
  164.  
  165.  
  166.      This standard specifies a syntax for text messages which are
  167. passed between computer users within the framework of "electronic
  168. mail".  The standard supersedes the informal standards  specified
  169. in  ARPANET  Request  for  Comments  numbers  561, "Standardizing
  170. Network Mail Headers", and 680, "Message Transmission  Protocol".
  171. In  this  document,  a  general framework is first described; the
  172. formal syntax is then specified, followed by a discussion of  the
  173. semantics.  Finally, a number of examples are given.
  174.  
  175.      This specification is intended strictly as a  definition  of
  176. what  is  to  be  passed between hosts on the ARPANET.  It is NOT
  177. intended to dictate either features which systems on the  Network
  178. are  expected  to support, or user interfaces to message creating
  179. or reading programs.
  180.  
  181.      A distinction should be made between what the  specification
  182. REQUIRES  and  what  it ALLOWS.  Messages can be made complex and
  183. rich with formally-structured components of information or can be
  184. kept small and simple, with a minimum of such information.  Also,
  185. the standard simplifies the interpretation  of  differing  visual
  186. formats in messages.  These simplifications facilitate the formal
  187. specification and indicate what the OFFICIAL  semantics  are  for
  188. messages.   Only  the  visual aspect of a message is affected and
  189. not the interpretation of information  within  it.   Implementors
  190. may choose to retain such visual distinctions.
  191.  
  192.  
  193.  
  194.  
  195. Standard for the Format of Text Messages                        2
  196. II. Framework
  197.  
  198.  
  199.  
  200.  
  201.  
  202.                          II.  FRAMEWORK
  203.  
  204.  
  205.  
  206.  
  207.      Since there are many message systems which exist outside the
  208. ARPANET environment, as well as those within it, it may be useful
  209. to consider the general framework, and resulting capabilities and
  210. limitations, provided by this standard.
  211.  
  212.      Messages are expected to  consist  of  lines  of  text.   No
  213. special provisions are made, at this time, for encoding drawings,
  214. facsimile, speech, or structured text.
  215.  
  216.      No significant consideration has been given to questions  of
  217. data   compression   or   transmission/storage  efficiency.   The
  218. standard, in fact, tends to be very free with the number of  bits
  219. consumed.   For  example, field names are specified as free text,
  220. rather than special terse codes.
  221.  
  222.      A general "memo" framework is  used.   That  is,  a  message
  223. consists  of some information, in a rigid format, followed by the
  224. main part of the message, which is text and whose format  is  not
  225. specified  in this document.  The syntax of several fields of the
  226. rigidly-formated  ("header")   section   is   defined   in   this
  227. specification;  some of the header fields must be included in all
  228. messages.  The syntax  which  distinguishes  between  headers  is
  229. specified  separately  from  the  internal  syntax for particular
  230. headers.  This separation is intended to allow  extremely  simple
  231. parsers  to operate on the overall structure of messages, without
  232. concern  for  the  detailed  structure  of  individual   headers.
  233. Appendix B is provided to facilitate construction of these simple
  234. parsers.  In addition to the fields specified in  this  document,
  235. it  is  expected  that  other fields will gain common use.  User-
  236. defined header fields allow systems to extend their functionality
  237. while  maintaining  a uniform framework.  The approach is similar
  238. to that of the TELNET protocol,  in  that  a  basic  standard  is
  239. defined  which  includes  a  mechanism for (optionally) extending
  240. itself.  As necessary, the authors of this document will regulate
  241. the  publishing  of  specifications for these "extension-fields",
  242. through the same mechanisms used to publish this document.
  243.  
  244.      Such a  framework  severely  constrains  document  tone  and
  245. appearance  and  is  primarily useful for most intra-organization
  246. communications  and  relatively   structured   inter-organization
  247. communication.   A more robust environment might allow for multi-
  248. font, multi-color, multi-dimension encoding  of  information.   A
  249. less  robust  environment,  as  is present in most single-machine
  250. message systems, would more severely constrain the ability to add
  251. fields  and the decision to include specific fields.  In contrast
  252. to paper-based communication, it is interesting to note that  the
  253.  
  254. Standard for the Format of Text Messages                        3
  255. II. Framework
  256.  
  257.  
  258.  
  259. RECEIVER  of  a  message  can exercise an extraordinary amount of
  260. control over the message's  appearance.   The  amount  of  actual
  261. control  available  to  message  receivers is contingent upon the
  262. capabilities of their individual message systems.
  263.  
  264.  
  265. Standard for the Format of Text Messages                        4
  266. III. Syntax
  267.  
  268.  
  269.  
  270.  
  271.  
  272.                           III.  SYNTAX
  273.  
  274.  
  275.  
  276.      This  syntax  is  given  in  five  parts.   The  first  part
  277. describes  the  notation  used  in the specification.  The second
  278. part describes the base-level lexical analyzers  which  feed  the
  279. higher-level  parser  described  in the succeeding sections.  The
  280. third part gives a  general  syntax  for  messages  and  standard
  281. header  fields;  and  the  fourth  part  specifies  the syntax of
  282. addresses.  A final part  specifies  some  general  syntax  which
  283. supports the other sections.
  284.  
  285.  
  286.  
  287. A.  NOTATIONAL CONVENTIONS
  288.  
  289. These specifications are made in an  augmented  Backus-Naur  Form
  290. (BNF).  Differences  from  standard  BNF  involve  the  naming of
  291. rules, the indication of repetition and of "local" alternatives.
  292.  
  293.  
  294. 1.  Rule naming
  295.  
  296. Angle brackets ("<", ">") are not used, in general.  The name  of
  297. a   rule  is  simply  the  name  itself,  rather  than  "<name>".
  298. Quotation-marks enclose literal text (which may be  upper  and/or
  299. lower case).  Certain basic  rules  are  in  uppercase,  such  as
  300. SPACE,  TAB, CRLF, DIGIT, ALPHA, etc.  Angle brackets are used in
  301. rule definitions, and in the  rest  of  this  document,  whenever
  302. their presence will facilitate discerning the use of rule names.
  303.  
  304.  
  305. 2.  Parentheses:  Local alternatives
  306.  
  307. Elements enclosed in parentheses are treated as a single element.
  308. Thus,  "(elem  (foo  /  bar)  elem)" allows "(elem foo elem)" and
  309. "(elem bar elem)".
  310.  
  311.  
  312. 3.  * construct:  Repetition
  313.  
  314. The character "*" preceding an element indicates repetition.  The
  315. full form is:
  316.  
  317.           <l>*<m>element
  318.  
  319. indicating at least <l> and at most <m> occurrences  of  element.
  320. Default values are 0 and infinity so that "*(element)" allows any
  321. number, including zero; "1*element" requires at  least  one;  and
  322. "1*2element" allows one or two.
  323.  
  324. Standard for the Format of Text Messages                        5
  325. III. Syntax
  326.   A. Notational Conventions
  327.  
  328.  
  329.  
  330. 4.  <number>element
  331.  
  332. "<n>(element)" is  equivalent  to  "<n>*<n>(element)";  that  is,
  333. exactly  <n>  occurrences of (element).  Thus 2DIGIT is a 2-digit
  334. number, and 3ALPHA is a string of three alphabetic characters.
  335.  
  336.  
  337. 5.  # construct:  Lists
  338.  
  339. A construct "#" is defined, similar to "*", as follows:
  340.  
  341.                   <l>#<m>element
  342.  
  343. indicating at least <l> and at most <m> elements, each  separated
  344. by  one or more commas (",").  This makes the usual form of lists
  345. very easy; a rule such as '(element *("," element))' can be shown
  346. as  "1#element".   Wherever this construct is used, null elements
  347. are allowed, but do not  contribute  to  the  count  of  elements
  348. present.   That  is,  "(element),,(element)"  is  permitted,  but
  349. counts as only two  elements.   Therefore,  where  at  least  one
  350. element  is  required,  at  least  one  non-null  element must be
  351. present.
  352.  
  353.  
  354. 6.  [optional]
  355.  
  356. Square  brackets  enclose  optional  elements;  "[foo  bar]"   is
  357. equivalent to "*1(foo bar)".
  358.  
  359.  
  360. 7.  ; Comments
  361.  
  362. A semi-colon, set off some distance to the right  of  rule  text,
  363. starts  a  comment which continues to the end of line.  This is a
  364. simple way  of  including  useful  notes  in  parallel  with  the
  365. specifications.
  366.  
  367.  
  368.  
  369. B.  LEXICAL ANALYSIS OF MESSAGES
  370.  
  371.  
  372. 1.  General Description
  373.  
  374. A message consists of headers and, optionally,  a  body  (i.e.  a
  375. series of text lines).  The text part is just a sequence of lines
  376. containing ASCII characters; it is separated from the headers  by
  377. a null line (i.e., a line with nothing preceding the CRLF).
  378.  
  379.  
  380. Standard for the Format of Text Messages                        6
  381. III. Syntax
  382.   B. Lexical Analysis
  383.  
  384.  
  385.  
  386. a.  Folding and unfolding of headers
  387.  
  388.     Each header item can be viewed as a single, logical  line  of
  389.     ASCII characters.  For convenience, the field-body portion of
  390.     this conceptual entity can  be  split  into  a  multiple-line
  391.     representation  (i.e.,  "folded").   The general rule is that
  392.     wherever there can be linear-white-space  (NOT  simply  LWSP-
  393.     chars), a CRLF immediately followed by AT LEAST one LWSP-char
  394.     can instead be inserted.  (However, a header's name  and  the
  395.     following  colon  (":"),  which occur at the beginning of the
  396.     header item, may NOT be folded onto multiple  lines.)   Thus,
  397.     the single line
  398.  
  399.        To:  "Joe Dokes & J. Harvey" <ddd at Host>, JJV at BBN
  400.  
  401.     can be represented as
  402.  
  403.        To:  "Joe Dokes & J. Harvey" <ddd at Host>,
  404.             JJV at BBN
  405.  
  406.     and
  407.  
  408.        To:  "Joe Dokes & J. Harvey"
  409.                         <ddd at Host>,
  410.         JJV at BBN
  411.  
  412.     and
  413.  
  414.        To:  "Joe Dokes
  415.         & J. Harvey" <ddd at Host>, JJV at BBN
  416.  
  417.     The  process  of  moving  from  this   folded   multiple-line
  418.     representation   of   a  header  field  to  its  single  line
  419.     representation will  be  called  "unfolding".   Unfolding  is
  420.     accomplished  by  regarding  CRLF  immediately  followed by a
  421.     LWSP-char as equivalent  to  the  LWSP-char.
  422.  
  423. b.  Structure of header fields
  424.  
  425.     Once header fields have been unfolded, they may be viewed  as
  426.     being  composed  of  a  field-name followed by a colon (":"),
  427.     followed by a field-body.  The field-name must be composed of
  428.     printable  ASCII  characters  (i.e.,  characters  which  have
  429.     values between 33.  and  126.,  decimal,  except  colon)  and
  430.     LWSP-chars.   The  field-body  may  be  composed of any ASCII
  431.     characters (other than  an  unquoted  CRLF,  which  has  been
  432.     removed by unfolding).
  433.  
  434.     Certain field-bodies of  header  fields  may  be  interpreted
  435.     according  to  an internal syntax which some systems may wish
  436.     to parse.  These fields will be referred to  as  "structured"
  437.     fields.    Examples   include  fields  containing  dates  and
  438.  
  439. Standard for the Format of Text Messages                        7
  440. III. Syntax
  441.   B. Lexical Analysis
  442.  
  443.  
  444.  
  445.     addresses.  Other fields, such as "Subject"  and  "Comments",
  446.     are regarded simply as strings of text.
  447.  
  448.     NOTE:  Field-names, unstructured field bodies and  structured
  449.     field  bodies  each  are  scanned  by  their own, INDEPENDENT
  450.     "lexical" analyzer.
  451.  
  452. c.  Field-names
  453.  
  454.     To aid in the creation and reading of field-names,  the  free
  455.     insertion  of  LWSP-chars  is  allowed in  reasonable places.
  456.  
  457.     Rather than obscuring the syntax specification for field-name
  458.     with  the explicit syntax for these LWSP-chars, the existence
  459.     of a "lexical" analyzer is assumed.  The analyzer  interprets
  460.     the  text  which  comprises  the  field-name as a sequence of
  461.     field-name atoms (fnatoms) separated by LWSP-chars
  462.  
  463.     Note that ONLY LWSP-chars may occur between the fnatoms of  a
  464.     field-name and that CRLFs may NOT.  In addition, comments are
  465.     NOT lexically recognized, as such, but parenthesized  strings
  466.     are  legal  as  part  of  field-names.  These constraints are
  467.     different from what is permissible  within  structured  field
  468.     bodies.   In  particular,  this means that header field-names
  469.     must wholly occur on the FIRST line of a folded  header  item
  470.     and may NOT be split across two or more lines.
  471.  
  472. d.  Unstructured field bodies
  473.  
  474.     For  some  fields,  such  as  "Subject"  and  "Comments",  no
  475.     structuring is assumed; and they are treated simply as texts,
  476.     like those in the message body.  Rules of  folding  apply  to
  477.     these  fields, so that such field bodies which occupy several
  478.     lines must therefore have the  second  and  successive  lines
  479.     indented by at least one LWSP-char.
  480.  
  481. e.  Structured field bodies
  482.  
  483.     To aid in the creation and reading of structured fields,  the
  484.     free  insertion  of linear-white-space (which permits folding
  485.     by inclusion of  CRLFs)  is  allowed  in  reasonable  places.
  486.     Rather  than  obscuring  the  syntax specifications for these
  487.     structured fields  with  explicit  syntax  for  this  linear-
  488.     white-space,  the  existence of another "lexical" analyzer is
  489.     assumed.  This analyzer does not apply for field bodies which
  490.     are  simply unstructured strings of text, as described above.
  491.     It provides an interpretation of the unfolded text comprising
  492.     the  body  of  the  field  as  a sequence of lexical symbols.
  493.     These symbols are:
  494.  
  495.             -  individual special characters
  496.             -  quoted-strings
  497.  
  498. Standard for the Format of Text Messages                        8
  499. III. Syntax
  500.   B. Lexical Analysis
  501.  
  502.  
  503.  
  504.             -  comments
  505.             -  atoms
  506.  
  507.     The first three of these symbols are self-delimiting.   Atoms
  508.     are  not; they therefore are delimited by the self-delimiting
  509.     symbols and by linear-white-space.  For the purposes  of  re-
  510.     generating sequences of atoms and quoted-strings, exactly one
  511.     SPACE is assumed to exist and should be  used  between  them.
  512.     (Also,  in  Section  III.B.3.a,  note  the  rules  concerning
  513.     treatment of multiple continguous LWSP-chars.)
  514.  
  515.     So, for example, the folded body of an address field
  516.  
  517.             ":sysmail"@   Some-Host,
  518.             Muhammed(I am   the greatest)Ali   at(the)WBA
  519.  
  520.     is analyzed into the following lexical symbols and types:
  521.  
  522.             ":sysmail"              quoted string
  523.             @                       special
  524.             Some-Host               atom
  525.             ,                       special
  526.             Muhammed                atom
  527.             (I am   the greatest)   comment
  528.             Ali                     atom
  529.             at                      atom
  530.             (the)                   comment
  531.             WBA                     atom
  532.  
  533.     The cononical representations for the data in these addresses
  534.     are  the  following  strings  (note that there is exactly one
  535.     SPACE between words):
  536.  
  537.                 :sysmail at Some-Host
  538.  
  539.     and
  540.  
  541.                 Muhammed Ali at WBA
  542.  
  543.  
  544.  
  545. 2.  Formal Definitions
  546.  
  547. The first four rules, below, indicate a meta-syntax  for  fields,
  548. without  regard to their particular type or internal syntax.  The
  549. remaining rules define basic syntactic structures which are  used
  550. by the rules in Sections III.C, III.D, and III.E.
  551.  
  552. field       =  field-name ":" [ field-body ] CRLF
  553.  
  554. field-name  =  fnatom *( LWSP-char [fnatom] )
  555.  
  556.  
  557. Standard for the Format of Text Messages                        9
  558. III. Syntax
  559.   B. Lexical Analysis
  560.  
  561.  
  562.  
  563. fnatom      =  1*<any CHAR, excluding CTLs, SPACE, and ":">
  564.  
  565. field-body  =  field-body-contents
  566.                [CRLF LWSP-char field-body]
  567.  
  568. field-body-contents = <the TELNET ASCII characters making up the
  569.                field-body, as defined in the following sections,
  570.                and consisting of combinations of atom, quoted-
  571.                string, and specials tokens, or else consisting of
  572.                texts>
  573.  
  574.                                             ; (  Octal, Decimal.)
  575. CHAR        =  <any TELNET ASCII character> ; (  0-177,  0.-127.)
  576. ALPHA       =  <any TELNET ASCII alphabetic character>
  577.                                             ; (101-132, 65.- 90.)
  578.                                             ; (141-172, 97.-122.)
  579. DIGIT       =  <any TELNET ASCII digit>     ; ( 60- 71, 48.- 57.)
  580. CTL         =  <any TELNET ASCII control    ; (  0- 37,  0.- 31.)
  581.                 character and DEL>          ; (    177,     127.)
  582. CR          =  <TELNET ASCII carriage return>;(     15,      13.)
  583. LF          =  <TELNET ASCII linefeed>      ; (     12,      10.)
  584. SPACE       =  <TELNET ASCII space>         ; (     40,      32.)
  585. HTAB        =  <TELNET ASCII horizontal-tab>; (     11,       9.)
  586. <">         =  <TELNET ASCII quote mark>    ; (     42,      34.)
  587. CRLF        =  CR LF
  588.  
  589. LWSP-char   =  SPACE / HTAB                 ; semantics = SPACE
  590. linear-white-space =  1*([CRLF] LWSP-char)  ; semantics = SPACE
  591.                                             ; CRLF => folding
  592.  
  593. specials    =  "(" / ")" / "<" / ">" / "@"  ; To use in a word,
  594.             /  "," / ";" / ":" / "\" / <">  ;  word must be a
  595.                                             ;  quoted-string.
  596.  
  597. delimiters  =  specials / comment / linear-white-space
  598.  
  599. text        =  <any CHAR, including bare    ; => atoms, specials,
  600.                 CR and/or bare LF, but NOT  ;  comments and
  601.                 including CRLF>             ;  quoted-strings are
  602.                                             ;  NOT interpreted.
  603.  
  604. atom        =  1*<any CHAR except specials and CTLs>
  605.  
  606. quoted-string = <"> *(qtext/quoted-pair) <">; Any number of qtext
  607.                                             ;   chars or any
  608.                                             ;   quoted char.
  609.  
  610. qtext       =  <any CHAR excepting <">      ; => may be folded
  611.                 and CR, and including
  612.                 linear-white-space>
  613.  
  614.  
  615. Standard for the Format of Text Messages                       10
  616. III. Syntax
  617.   B. Lexical Analysis
  618.  
  619.  
  620.  
  621. comment     =  "(" *(ctext / comment / quoted-pair) ")"
  622. ctext       =  <any CHAR excluding "(",     ; => may be folded
  623.                 ")" and CR, and including
  624.                 linear-white-space>
  625.  
  626. quoted-pair =  "\" CHAR
  627.  
  628.  
  629. 3.  Clarifications
  630.  
  631. a.  "White space"
  632.  
  633.     Remember that in field-names  and  structured  field  bodies,
  634.     MULTIPLE  LINEAR  WHITE SPACE TELNET ASCII CHARACTERS (namely
  635.     HTABs and SPACEs) ARE TREATED AS SINGLE SPACES AND MAY FREELY
  636.     SURROUND ANY SYMBOL.  In all header fields, the only place in
  637.     which at least one space is REQUIRED is at the  beginning  of
  638.     continuation  lines  in a folded field.  When passing text to
  639.     processes which do  not  interpret  text  according  to  this
  640.     standard  (e.g.,  ARPANET FTP mail servers), then exactly one
  641.     SPACE should be used in place of arbitrary linear-white-space
  642.     and comment sequences.
  643.  
  644.     WHEREVER A MEMBER OF THE LIST  OF  <DELIMITER>S  IS  ALLOWED,
  645.     LWSP-CHARS MAY ALSO OCCUR BEFORE AND/OR AFTER IT.
  646.  
  647.     Writers of mail-sending  (i.e.  header  generating)  programs
  648.     should  realize  that  there is no Network-wide definition of
  649.     the effect of horizontal-tab TELNET ASCII characters  on  the
  650.     appearance  of  text  at another Network host; therefore, the
  651.     use  of  tabs  in  message  headers,  though  permitted,   is
  652.     discouraged.
  653.  
  654.     Note that  during  transmissions  across  the  ARPANET  using
  655.     TELNET  NVT  connections,  data  must  conform  to TELNET NVT
  656.     conventions (e.g., CR must be followed by either LF, making a
  657.     CRLF, or <null>, if the CR is to stand alone).
  658.  
  659. b.  Comments
  660.  
  661.     Comments are detected as such  only  within  field-bodies  of
  662.     structured  fields.   A  comment  is  a  set  of TELNET ASCII
  663.     characters, which is not within a quoted-string and which  is
  664.     enclosed  in  matching parentheses; parentheses nest, so that
  665.     if an unquoted left parenthesis occurs in a  comment  string,
  666.     there  must  also  be  a  matching right parenthesis.  When a
  667.     comment is used to act as the delimiter between a sequence of
  668.     two  lexical  symbols,  such  as  two  atoms, it is lexically
  669.     equivalent with one SPACE, for the purposes  of  regenerating
  670.     the  sequence,  such as when passing the sequence onto an FTP
  671.     mail server.
  672.  
  673.  
  674. Standard for the Format of Text Messages                       11
  675. III. Syntax
  676.   B. Lexical Analysis
  677.  
  678.  
  679.  
  680.     In particular comments are NOT passed to the FTP  server,  as
  681.     part  of  a MAIL or MLFL command, since comments are not part
  682.     of the "formal" address.
  683.  
  684.     If a comment is to be "folded" onto multiple lines, then  the
  685.     syntax for folding must be adhered to.  (See items III.B.1.a,
  686.     above,  and  III.B.3.f,  below.)   Note  that  the   official
  687.     semantics therefore do not "see" any unquoted CRLFs which are
  688.     in comments, although particular parsing programs may wish to
  689.     note  their  presence.   For  these  programs,  it  would  be
  690.     reasonable to interpret a "CRLF LWSP-char" as  being  a  CRLF
  691.     which  is part of the comment; i.e., the CRLF is kept and the
  692.     LWSP-char is discarded.   Quoted  CRLFs  (i.e.,  a  backslash
  693.     followed  by a CR followed by a LF) still must be followed by
  694.     at least one LWSP-char.
  695.  
  696. c.  Delimiting and quoting characters
  697.  
  698.     The quote character (backslash) and characters which  delimit
  699.     syntactic units are not, generally, to be taken as data which
  700.     are part  of  the  delimited  or  quoted  unit(s).   The  one
  701.     exception is SPACE.  In particular, the quotation-marks which
  702.     define  a  quoted-string,  the  parentheses  which  define  a
  703.     comment  and the backslash which quotes a following character
  704.     are  NOT  part  of  the  quoted-string,  comment  or   quoted
  705.     character.   A  quotation-mark  which  is  to  be  part  of a
  706.     quoted-string, a parenthesis which is to be part of a comment
  707.     and  a  backslash  which is to be part of either must each be
  708.     preceded by the quote-character backslash ("\").   Note  that
  709.     the  syntax  allows  any  character  to  be  quoted  within a
  710.     quoted-string or comment;  however  only  certain  characters
  711.     MUST  be quoted to be included as data.  These characters are
  712.     those which are not part of the alternate text  group  (i.e.,
  713.     ctext or qtext).
  714.  
  715.     A single SPACE is assumed to exist between  contiguous  words
  716.     in  a  phrase,  and this interpretation is independent of the
  717.     actual number of LWSP-chars which the creator places  between
  718.     the  words.  To include more than one SPACE, the creator must
  719.     make the LWSP-chars be part of a quoted-string.
  720.  
  721.     Quotation marks which delimit a quoted string and backslashes
  722.     which  quote the following character should NOT accompany the
  723.     quoted-string when the string is used with processes that  do
  724.     not  interpret  data  according  to this specification (e.g.,
  725.     ARPANET FTP mail servers).
  726.  
  727.  
  728. Standard for the Format of Text Messages                       12
  729. III. Syntax
  730.   B. Lexical Analysis
  731.  
  732.  
  733.  
  734. d.  Quoted-strings
  735.  
  736.     Where   permitted  (i.e.,  in  words  in  structured  fields)
  737.     quoted-strings   are   treated   as  a  single  symbol  (i.e.
  738.     equivalent to an atom, syntactically).  If a quoted-string is
  739.     to  be  "folded"  onto  multiple  lines,  then the syntax for
  740.     folding must be adhered to.  (See items III.B.1.a, above, and
  741.     III.B.3.f,   below.)    Note   that  the  official  semantics
  742.     therefore do not "see" any bare CRLFs which  are  in  quoted-
  743.     strings,  although  particular  parsing  programs may wish to
  744.     note  their  presence.   For  these  programs,  it  would  be
  745.     reasonable  to  interpret  a "CRLF LWSP-char" as being a CRLF
  746.     which is part of the quoted-string; i.e., the  CRLF  is  kept
  747.     and  the  LWSP-char  is  discarded.   Quoted  CRLFs  (i.e., a
  748.     backslash followed by a CR followed by a LF) are also subject
  749.     to  rules  of  folding,  but  the  presence  of  the  quoting
  750.     character (backslash) explicitly indicates that the  CRLF  is
  751.     data to the quoted string.  Stripping off the first following
  752.     LWSP-char is also appropriate when parsing quoted CRLFs.
  753.  
  754. e.  Bracketing characters
  755.  
  756.     There are three types of brackets which must be well nested:
  757.  
  758.         o  Parentheses are used to indicate comments.
  759.  
  760.         o  Angle brackets ("<" and ">") are  generally  used
  761.            to indicate the presence of at least one machine-
  762.            usable code (e.g., delimiting mailboxes).
  763.  
  764.         o  Colon/semi-colon  (":"  and  ";")  are   used  in
  765.            address   specifications  to  indicate  that  the
  766.            included list of addresses are to be treated as a
  767.            group.
  768.  
  769. f.  Case independence of certain specials atoms
  770.  
  771.     Certain atoms, which are represented in the syntax as literal
  772.     alphabetic  strings, can be represented in any combination of
  773.     upper and lower case.  These are:
  774.  
  775.         -  field-name,
  776.         -  "Include", "Postal" and equivalent atoms in a
  777.            ":"<atom>":" address specification,
  778.         -  "at", in a host-indicator,
  779.         -  node,
  780.         -  day-of-week,
  781.         -  month, and
  782.         -  zones.
  783.  
  784.     When matching an atom against one of these literals, case  is
  785.     to  be ignored.  For example, the field-names "From", "FROM",
  786.  
  787. Standard for the Format of Text Messages                       13
  788. III. Syntax
  789.   B. Lexical Analysis
  790.  
  791.  
  792.  
  793.     "from", and even "FroM" should all  be  treated  identically.
  794.     However,  the  case  shown in this specification is suggested
  795.     for message-creating processes.  Note that, at the  level  of
  796.     this  specification,  case  IS  relevant  to  other words and
  797.     texts.  Also see Section IV.A.1.f, below.
  798.  
  799. g.  Folding long lines
  800.  
  801.     Each header item (field of the message) may be represented on
  802.     exactly  one line consisting of the name of the field and its
  803.     body; this is what the parser sees.  For readability,  it  is
  804.     recommended  that the field-body portion of long header items
  805.     be "folded" onto multiple lines of the actual header.  "Long"
  806.     is  commonly  interpreted  to  mean  greater  than  65  or 72
  807.     characters.  The former length is recommended as a limit, but
  808.     it is not imposed by this standard.
  809.  
  810. h.  Backspace characters
  811.  
  812.     Backspace TELNET ASCII characters (ASCII BS, decimal 8.)  may
  813.     be   included   in   texts   and   quoted-strings  to  effect
  814.     overstriking; however, any use of backspaces which effects an
  815.     overstrike  to  the  left  of  the  beginning  of the text or
  816.     quoted-string is prohibited.
  817.  
  818.  
  819.  
  820. C.  GENERAL SYNTAX OF MESSAGES:
  821.  
  822.  
  823.     NOTE:  Due to an artifact of the notational conventions,
  824.            the  syntax indicates that, when present, "Date",
  825.            "From", "Sender", and "Reply-To" fields  must  be
  826.            in  a  particular order.  These header items must
  827.            be unique (occur exactly once).   However  header
  828.            fields, in fact, are NOT required to occur in any
  829.            particular order, except that  the  message  body
  830.            must  occur  AFTER  the headers.  For readability
  831.            and ease of parsing  by  simple  systems,  it  is
  832.            recommended  that  headers  be  sent in the order
  833.            "Date", "From", "Subject", "Sender", "To",  "cc",
  834.            etc.    This   specification   permits   multiple
  835.            occurrences of  most  optional-fields.   However,
  836.            their  interpretation  is not specified here, and
  837.            their use is strongly discouraged.
  838.  
  839. The following syntax for the bodies of various fields  should  be
  840. thought  of as describing each field body as a single long string
  841. (or line).   The  section  on  Lexical  Analysis  (section  II.B)
  842. indicates how such long strings can be represented on more than
  843. one line in the actual transmitted message.
  844.  
  845.  
  846. Standard for the Format of Text Messages                       14
  847. III. Syntax
  848.   C. Messages
  849.  
  850.  
  851.  
  852. message     =  fields *( CRLF *text )       ; Everything after
  853.                                             ;  first null line
  854.                                             ;  is message body
  855.  
  856. fields      =  date-field                   ; Creation time-stamp
  857.                originator-fields            ;  & author id are
  858.                *optional-field              ;  required: others
  859.                                             ;  are all optional
  860.  
  861. originator-fields =
  862.                (  "From"     ":" mailbox    ; Single author
  863.                  ["Reply-To" ":" #address] )
  864.             /  (  "From"     ":" 1#address  ; Multiple authors &
  865.                   "Sender"   ":" mailbox    ;  may have non-mach-
  866.                  ["Reply-To" ":" #address] );  ine addresses
  867.  
  868. date-field  =  "Date"       ":" date-time
  869.  
  870. optional-field  =
  871.                "To"         ":" #address
  872.             /  "cc"         ":" #address
  873.             /  "bcc"        ":" #address    ; Blind carbon
  874.             /  "Subject"    ":" *text
  875.             /  "Comments"   ":" *text
  876.             /  "Message-ID" ":" mach-id     ; Only one allowed
  877.             /  "In-Reply-To"":" #(phrase / mach-id)
  878.             /  "References" ":" #(phrase / mach-id)
  879.             /  "Keywords"   ":" #phrase
  880.             /  extension-field              ; To be defined in
  881.                                             ;  supplemental
  882.                                             ;  specifications
  883.             /  user-defined-field           ; Must have unique
  884.                                             ;  field-name & may
  885.                                             ;  be pre-empted
  886.  
  887. extension-field = <Any field which is defined in a document
  888.                published as a formal extension to this
  889.                specification>
  890.  
  891. user-defined-field = <Any field which has not been defined in
  892.                this specification or published as an extension to
  893.                this specification; names for such fields must be
  894.                unique and may be preempted by published
  895.                extensions>
  896.  
  897.  
  898.  
  899.  
  900. Standard for the Format of Text Messages                       15
  901. III. Syntax
  902.   D. Addressee Items
  903.  
  904.  
  905.  
  906. D.  SYNTAX OF GENERAL ADDRESSEE ITEMS
  907.  
  908.  
  909. address     =  host-phrase                  ; Machine mailbox
  910.             / ( [phrase] "<" #address ">")  ; Individual / List
  911.             / ( [phrase] ":" #address ";")  ; Group
  912.             /  quoted-string                ; Arbitrary text
  913.             / (":" ( "Include"              ; File, w/ addr list
  914.                    / "Postal"               ; (U.S.) Postal addr
  915.                    /  atom )                ; Extended data type
  916.                ":" address)
  917.  
  918. mailbox     =  host-phrase /  (phrase mach-id)
  919.  
  920. mach-id     =  "<" host-phrase ">"          ; Contents must never
  921.                                             ;  be modified!
  922.  
  923.  
  924.  
  925. E.  SUPPORTING CONSTRUCTS
  926.  
  927.  
  928. host-phrase =  phrase  host-indicator       ; Basic address
  929.  
  930. host-indicator =  1*( ("at" / "@") node )   ; Right-most node is
  931.                                             ;  at top of network
  932.                                             ;  hierarchy; left-
  933.                                             ;  most must be host
  934.  
  935. node        =  word / 1*DIGIT               ; Official host or
  936.                                             ;  network name or
  937.                                             ;  decimal address
  938.  
  939.  
  940. date-time   =  [ day-of-week "," ] date time
  941.  
  942. day-of-week =  "Monday"    / "Mon"  / "Tuesday"   / "Tue"
  943.             /  "Wednesday" / "Wed"  / "Thursday"  / "Thu"
  944.             /  "Friday"    / "Fri"  / "Saturday"  / "Sat"
  945.             /  "Sunday"    / "Sun"
  946.  
  947. date        =  1*2DIGIT ["-"] month         ; day month year
  948.                ["-"] (2DIGIT /4DIGIT)       ;  e.g. 20 Aug [19]77
  949.  
  950. month       =  "January"   / "Jan"  / "February"  / "Feb"
  951.             /  "March"     / "Mar"  / "April"     / "Apr"
  952.             /  "May"                / "June"      / "Jun"
  953.             /  "July"      / "Jul"  / "August"    / "Aug"
  954.             /  "September" / "Sep"  / "October"   / "Oct"
  955.             /  "November"  / "Nov"  / "December"  / "Dec"
  956.  
  957.  
  958. Standard for the Format of Text Messages                       16
  959. III. Syntax
  960.   E. Supporting Constructs
  961.  
  962.  
  963.  
  964. time        =  hour zone                    ; ANSI and Military
  965.                                             ;  (seconds optional)
  966.  
  967. hour        =  2DIGIT [":"] 2DIGIT [ [":"] 2DIGIT ]
  968.                                             ; 0000[00] - 2359[59]
  969.  
  970. zone        = ( ["-"] ( "GMT"               ; Relative to GMT:
  971.                                             ; North American
  972.                  /  "NST" /                 ;  Newfoundland:-3:30
  973.                  /  "AST" / "ADT"           ;  Atlantic: - 4/ - 3
  974.                  /  "EST" / "EDT"           ;  Eastern:  - 5/ - 4
  975.                  /  "CST" / "CDT"           ;  Central:  - 6/ - 5
  976.                  /  "MST" / "MDT"           ;  Mountain: - 7/ - 6
  977.                  /  "PST" / "PDT"           ;  Pacific:  - 8/ - 7
  978.                  /  "YST" / "YDT"           ;  Yukon:    - 9/ - 8
  979.                  /  "HST" / "HDT"           ;  Haw/Ala   -10/ - 9
  980.                  /  "BST" / "BDT"           ;  Bering:   -11/ -10
  981.                     1ALPHA       ))         ; Military: Z = GMT;
  982.                                             ;  A:-1; (J not used)
  983.                                             ;  M:-12; N:+1; Y:+12
  984.             / ( ("+" / "-") 4DIGIT )        ; Local differential
  985.                                             ;  hours/min. (HHMM)
  986.  
  987. phrase      =  1*word                       ; Sequence of words.
  988.                                             ;  Separation seman-
  989.                                             ;  tically = SPACE
  990.  
  991. word        =  atom / quoted-string
  992.  
  993.  
  994.  
  995. Standard for the Format of Text Messages                       17
  996. IV. Semantics
  997.  A. Address Fields
  998.  
  999.  
  1000.  
  1001.  
  1002.  
  1003.                          IV.  SEMANTICS
  1004.  
  1005.  
  1006.  
  1007. A.  ADDRESS FIELDS
  1008.  
  1009.  
  1010. 1.  General
  1011.  
  1012. a.  The phrase part of a host-phrase in an address  specification
  1013.     (i.e.,  the  host's name for the mailbox) is understood to be
  1014.     whatever the receiving FTP Server allows (for example,  TENEX
  1015.     systems  do  not  now understand addresses of the form "P. D.
  1016.     Q. Bach", but another system might).
  1017.  
  1018.     Note that a mailbox is a conceptual  entity  which  does  not
  1019.     necessarily pertain to file storage.  For example, some sites
  1020.     may choose to print mail on their line  printer  and  deliver
  1021.     the output to the addressee's desk.
  1022.  
  1023.     An individual may have  several  mailboxes  and  a  group  of
  1024.     individuals  may wish to receive mail as a single unit (i.e.,
  1025.     a distribution list).  The second and third  alternatives  of
  1026.     an  address  list  (#address)  allow  naming  a collection of
  1027.     subordinate  addresses  list(s).   Recipient  mailboxes   are
  1028.     specified  within the bracketed part ("<" - ">" or ":" - ";")
  1029.     of such named lists.  The use of angle-brackets ("<", ">") is
  1030.     intended for the cases of individuals with multiple mailboxes
  1031.     and of special mailbox lists; it is not expected to be nested
  1032.     more  than  one level, although the specification allows such
  1033.     nesting.  The use of colon/semi-colon (":", ";") is  intended
  1034.     for  the  case  of  groups.   Groups  can be expected to nest
  1035.     (i.e., to  contain  subgroups).   For  both  individuals  and
  1036.     groups,  a  copy  of the transmitted message is to be sent to
  1037.     EACH mailbox  listed.   For  the  case  of  a  special  list,
  1038.     treatment of addresses is defined in the relevant subsections
  1039.     of this section.
  1040.  
  1041. b.  The inclusion of bare quoted-strings as addresses (i.e.,  the
  1042.     fourth  address-form  alternative)  is allowed as a syntactic
  1043.     convenience, but no semantics  are  defined  for  their  use.
  1044.     However,  it is reasonable, when replicating an address list,
  1045.     to replicate ALL of its members, including quoted-strings.
  1046.  
  1047. c.  ":Include:" specifications are used to refer to one  or  more
  1048.     locations  containing  stored  address  lists (#address).  If
  1049.     more than one location is referenced, the address part of the
  1050.     Include  phrase  must  be  a  list  (#address)  surrounded by
  1051.     angle-brackets, as per the "Individual / List" alternative of
  1052.     <address>.   Constituent  addresses  must  resolve to a host-
  1053.  
  1054. Standard for the Format of Text Messages                       18
  1055. IV. Semantics
  1056.  A. Address Fields
  1057.  
  1058.  
  1059.  
  1060.     phrase; only they have any  meaning  within  this  construct.
  1061.     The phrase part of indicated host-phrases should contain text
  1062.     which the referenced  host  can  resolve  to  a  file.   This
  1063.     standard is not a protocol and so does not prescribe HOW data
  1064.     is to be retrieved from the  file.   However,  the  following
  1065.     requirements are made:
  1066.  
  1067.          o  The file must be accessible  through  the  local
  1068.             operating system interface (if it exists), given
  1069.             adequate user access rights; and
  1070.  
  1071.          o  If a host has an FTP server and a user  is  able
  1072.             to  retrieve  any files from the host using that
  1073.             server, then the file must be accessible through
  1074.             FTP,  using  DEFAULT  transfer  settings,  given
  1075.             adequate user access rights.
  1076.  
  1077.     It is intended that this mechanism allow programs to retrieve
  1078.     such lists automatically.
  1079.  
  1080.     The interpretation of such a file reference follows.  This is
  1081.     not  intended  to imply any particular implementation scheme,
  1082.     but is presented  to  aid  in  understanding  the  notion  of
  1083.     including  file  contents in address lists:
  1084.  
  1085.          o  Elements of the address list part are alternates
  1086.             and  the  contents of ONLY ONE of them are to be
  1087.             included in the resultant address list.
  1088.  
  1089.          o  The contents of the file indicated by  a  member
  1090.             host-phrase  are  treated as an address list and
  1091.             are inserted as an address  list  (#address)  in
  1092.             the  position  of  the  path item in the syntax.
  1093.             That is, the TELNET ASCII characters  specifying
  1094.             the  entire Include <address> is replaced by the
  1095.             contents of one of the files to which the  host-
  1096.             phrase(s),   of  the  address  list  (#address),
  1097.             refers.  Therefore, the contents of  each  file,
  1098.             indicated   by   an  Include  address,  must  be
  1099.             syntactically self-contained and must adhere  to
  1100.             the full syntax prescribed herein for an address
  1101.             list.
  1102.  
  1103. d.  ":Postal:" specifications are used to indicate (U.S.)  postal
  1104.     addresses,  but  can  be  treated  the  same as quoted-string
  1105.     addresses.  To reference a list of postal addresses, the list
  1106.     must  conform  to  the  "Individual  /  List"  alternative of
  1107.     <address>.  The ":Include:" alternative also is valid.
  1108.  
  1109. e.  The "':' atom ':'" syntax is intended as a general  mechanism
  1110.     for  indicating  specially  data-typed  addresses.   As  with
  1111.     extension-fields, the authors of this document will  regulate
  1112.  
  1113. Standard for the Format of Text Messages                       19
  1114. IV. Semantics
  1115.  A. Address Fields
  1116.  
  1117.  
  1118.  
  1119.     the  publishing  of  specifications  for these extended data-
  1120.     types.  In the absence of defined semantics,  any  occurrence
  1121.     of  an address in this form may be treated as a quoted-string
  1122.     address.
  1123.  
  1124. f.  A node name must be THE official name of a network or a host,
  1125.     or  else  a decimal number indicating the Network address for
  1126.     that network or host, at the time  the  message  is  created.
  1127.     The  USE  OF NUMBERS IS STRONGLY DISCOURAGED and is permitted
  1128.     only due to the occasional necessity of bypassing local  name
  1129.     tables.   For  the  ARPANET, official names are maintained by
  1130.     the Network Information Center at  SRI  International,  Menlo
  1131.     Park, California.
  1132.  
  1133.     Whenever a message might be transmitted or migrate to a  host
  1134.     on  another  network,  full  hierarchical  addresses  must be
  1135.     specified.   These  are  indicated  as  a  series  of  words,
  1136.     separated  by at-sign or "at" indications.  The communication
  1137.     environment is assumed to consist of a collection of networks
  1138.     organized  as  independent  "trees"  except  for  connections
  1139.     between the root nodes.  That is, only the roots can  act  as
  1140.     gateways  between  these  independent  networks.  While other
  1141.     actual connections may exist, it is believed  that  presuming
  1142.     this  type of organization will provide a reliable method for
  1143.     describing VALID, if not EFFICIENT, paths between  hosts.   A
  1144.     typical full mailbox specification might therefore look like:
  1145.  
  1146.          Friendly User @ hosta @ local-net1 @ major-netq
  1147.  
  1148.     In the simplest case, a mail-sending host should transmit the
  1149.     message  to the node which is mentioned last (farthest to the
  1150.     right), strip off that node reference from the specification,
  1151.     and then pass the remaining host-phrase to the recipient host
  1152.     (in  the  ARPANET,  its  FTP server) for it to process.  This
  1153.     treats the remaining portion of the host-indicator merely  as
  1154.     the terminating part of the phrase.
  1155.  
  1156.          NOTE:  When passing any portion of a host-indicator
  1157.                 onto a process which does not interpret data
  1158.                 according to this  standard  (e.g.,  ARPANET
  1159.                 FTP  servers), "@" must be used and not "at"
  1160.                 and it must not be preceded or  followed  by
  1161.                 any  LWSP-chars.   Using  the above example,
  1162.                 the following string would be passed to  the
  1163.                 major-netq gateway:
  1164.  
  1165.                 Friendly User@hosta@local-net1
  1166.  
  1167.     When the sending host  has  more  knowledge  of  the  network
  1168.     environment,  then  it  should  send the message along a more
  1169.     efficient path, making appropriate changes to the form of the
  1170.     host-phrase which it gives to the recipient host.
  1171.  
  1172. Standard for the Format of Text Messages                       20
  1173. IV. Semantics
  1174.  A. Address Fields
  1175.  
  1176.  
  1177.  
  1178.     To use the above specification as an example:  If  a  sending
  1179.     hostb  also were part of local-net1, then it could  send  the
  1180.     message  directly  to  hosta  and  would give only the phrase
  1181.     "Friendly User" to hosta's mail-receiving program.  If  hostb
  1182.     were  part  of  local-net2, along with hostc, and happened to
  1183.     know that hosta and hostc were  part  of  another  local-net,
  1184.     then  hostb  could  send  the message to hostc to the address
  1185.     "Friendly User@hosta".
  1186.  
  1187.     The phrase in a host-phrase is intended to be meaningful only
  1188.     to  the  indicated  receiving  host.  To all other hosts, the
  1189.     phrase is to be treated as an uninterpreted string.  No  case
  1190.     transformations  should  be  (automatically) performed on the
  1191.     phrase.  The phrase  is  passed  to  the  local  host's  mail
  1192.     sending  program; it is the responsibility of the destination
  1193.     host's mail receiving (distribution) program to perform  case
  1194.     mapping on this phrase, if required, to deliver the mail.
  1195.  
  1196.  
  1197. 2.  Originator Fields
  1198.  
  1199.     WARNING:  The standard  allows  only  a  subset  of  the
  1200.               combinations  possible  with the From, Sender,
  1201.               and  Reply-To  fields.   The   limitation   is
  1202.               intentional.
  1203.  
  1204. a.  From
  1205.  
  1206.     This field contains the identity of the person(s) who  wished
  1207.     this message to be sent.  The message-creation process should
  1208.     default this field to be a single machine address, indicating
  1209.     the AGENT (person or process) entering the message.  If  this
  1210.     is  NOT  done, the "Sender" field MUST be present; if this IS
  1211.     done, the "Sender" field is optional.
  1212.  
  1213. b.  Sender
  1214.  
  1215.     This field contains  the  identity  of  the  AGENT (person or
  1216.     process) who  sends the message.  It is intended for use when
  1217.     the sender is not the author of the message, or  to  indicate
  1218.     who  among  a group of authors actually sent the message.  If
  1219.     the contents  of  the  "Sender"  field  would  be  completely
  1220.     redundant with the "From" field, then the "Sender" field need
  1221.     not be present and  its  use  is  discouraged  (though  still
  1222.     legal);  in  particular,  the  "Sender" field MUST be present
  1223.     if it is NOT the same as the "From" Field.
  1224.  
  1225.     The  Sender  host-phrase  includes  a   phrase   which   must
  1226.     correspond  to  a  specific  agent  (i.e.,  a human user or a
  1227.     computer program)  rather  than  a  standard  address.   This
  1228.     indicates  the  expectation  that the field will identify the
  1229.     single AGENT (person or process) responsible for sending  the
  1230.  
  1231. Standard for the Format of Text Messages                       21
  1232. IV. Semantics
  1233.  A. Address Fields
  1234.  
  1235.  
  1236.  
  1237.     mail  and not simply include the name of a mailbox from which
  1238.     the mail was sent.  For example in the case of a shared login
  1239.     name, the name, by itself, would not be adequate.  The phrase
  1240.     part of the host-phrase,  which  refers  to  this  agent,  is
  1241.     expected  to be a computer system term, and not (for example)
  1242.     a generalized person reference which can be used outside  the
  1243.     network text message context.
  1244.  
  1245.     Since the critical function served by the "Sender"  field  is
  1246.     the  identification of the agent responsible for sending mail
  1247.     and since computer programs cannot be  held  accountable  for
  1248.     their  behavior, is strongly recommended that when a computer
  1249.     program generates a message, the HUMAN who is responsible for
  1250.     that  program  be  referenced  as  part of the "Sender" field
  1251.     host-phrase.
  1252.  
  1253. c.  Reply-To
  1254.  
  1255.     This field provides a general mechanism  for  indicating  any
  1256.     mailbox(es) to which responses are to be sent.  Three typical
  1257.     uses for this feature can be  distinguished.   In  the  first
  1258.     case,  the  author(s)  may  not  have  regular  machine-based
  1259.     mailboxes and therefore wish(es)  to  indicate  an  alternate
  1260.     machine  address.   In  the  second  case, an author may wish
  1261.     additional persons to be made aware of, or  responsible  for,
  1262.     responses;  responders  should  send  their  replies  to  the
  1263.     "Reply-To" mailbox(es) listed in  the  original  message.   A
  1264.     somewhat  different  use may be of some help to "text message
  1265.     teleconferencing" groups equipped with automatic distribution
  1266.     services:   include  the  address  of  that  service  in  the
  1267.     "Reply-To"  field  of   all   messages   submitted   to   the
  1268.     teleconference;  then  participants can "reply" to conference
  1269.     submissions to guarantee  the  correct  distribution  of  any
  1270.     submission of their own.
  1271.  
  1272.     Reply-To fields are  NOT  required  to  contain  any  machine
  1273.     addresses  (i.e., host-phrases).   Note,  however,  that  the
  1274.     absence  of even one  valid  network  address  will  tend  to
  1275.     prevent  software  systems from automatically assisting users
  1276.     in conveniently responding to mail.
  1277.  
  1278. NOTE:  For systems which automatically generate address lists for
  1279. replies to messages, the following recommendations are made:
  1280.  
  1281.      o  The receiver, when replying  to  a  message,  should
  1282.         NEVER automatically include the "Sender" host-phrase
  1283.         in the reply's address list;
  1284.  
  1285.      o  If the  "Reply-To"  field  exists,  then  the  reply
  1286.         should  go  ONLY  to the addresses indicated in that
  1287.         field and not to  the  addresses  indicated  in  the
  1288.         "From" field.
  1289.  
  1290. Standard for the Format of Text Messages                       22
  1291. IV. Semantics
  1292.  A. Address Fields
  1293.  
  1294.  
  1295.  
  1296. (Extensive    examples  are  provided  in   Section   V.)    This
  1297. recommendation  is intended only for originator-fields and is not
  1298. intended to suggest that replies should not also be sent  to  the
  1299. other  recipients  of  this  message.  It is up to the respective
  1300. mail handling programs to decide what additional facilities  will
  1301. be provided.
  1302.  
  1303.  
  1304. 3.  Receiver Fields
  1305.  
  1306. a.  To
  1307.  
  1308.     This field contains the identity of the primary recipients of
  1309.     the message.
  1310.  
  1311. b.  cc
  1312.  
  1313.     This field contains the identity of the secondary  recipients
  1314.     of the message.
  1315.  
  1316. b.  Bcc
  1317.  
  1318.     This field contains the identity of additional recipients  of
  1319.     the  message.  The contents of this field are not included in
  1320.     copies of the message  sent  to  the  primary  and  secondary
  1321.     recipients.   Some  systems may choose to include the text of
  1322.     the "Bcc" field only in the author(s)'s  copy,  while  others
  1323.     may  also  include it in the text sent to all those indicated
  1324.     in the "Bcc" list.
  1325.  
  1326.  
  1327.  
  1328. B.  REFERENCE SPECIFICATION FIELDS
  1329.  
  1330.  
  1331. 1.  Message-ID
  1332.  
  1333. This field contains a unique identifier (the phrase) which refers
  1334. to  THIS  version of THIS message.  The uniqueness of the message
  1335. identifier is guaranteed by the host which  generates  it.   This
  1336. identifier is intended to be machine readable and not necessarily
  1337. meaningful to humans.  A message identifier pertains  to  exactly
  1338. one  instantiation  of a particular message; subsequent revisions
  1339. to the message should each receive a new message identifier.
  1340.  
  1341.  
  1342. 2.  In-Reply-To
  1343.  
  1344. The contents of this field identify previous correspondence which
  1345. this  message answers.  Note that if message identifiers are used
  1346. in this field, they must use the mach-id specification format.
  1347.  
  1348.  
  1349. Standard for the Format of Text Messages                       23
  1350. IV. Semantics
  1351.  B. Reference Specification Fields
  1352.  
  1353.  
  1354.  
  1355. 3.  References
  1356.  
  1357. The contents of this field identify  other  correspondence  which
  1358. this  message  references.   Note  that  if  message  identifiers
  1359. are used, they  must  use  the  mach-id  specification format.
  1360.  
  1361.  
  1362. 4.  Keywords
  1363.  
  1364. This field contains keywords or phrases, separated by commas.
  1365.  
  1366.  
  1367.  
  1368. C.  OTHER FIELDS AND SYNTACTIC ITEMS
  1369.  
  1370.  
  1371. 1.  Subject
  1372.  
  1373. The "Subject" field is intended to provide as much information as
  1374. necessary  to  adequately summarize or indicate the nature of the
  1375. message.
  1376.  
  1377.  
  1378. 2.  Comments
  1379.  
  1380. Permits adding text comments onto the message without  disturbing
  1381. the contents of the message's body.
  1382.  
  1383.  
  1384. 3.  Extension-field
  1385.  
  1386. A relatively limited number of common fields have been defined in
  1387. this  document.  As network mail requirements dictate, additional
  1388. fields may be standardized.  The authors of  this  document  will
  1389. regulate  the publishing of such definitions as extensions to the
  1390. basic specification.
  1391.  
  1392.  
  1393. 4.  User-defined-field
  1394.  
  1395. Individual users of network mail  are  free  to  define  and  use
  1396. additional  header fields.  Such fields must have names which are
  1397. not  already  used  in  the  current  specification  or  in   any
  1398. definitions  of extension-fields, and the overall syntax of these
  1399. user-defined-fields must conform to  this  specification's  rules
  1400. for  delimiting and  folding  fields.  Due to the extension-field
  1401. publishing process, the name of a user-defined-field may be  pre-
  1402. empted.
  1403.  
  1404.  
  1405.  
  1406.  
  1407. Standard for the Format of Text Messages                       24
  1408. IV. Semantics
  1409.  D. Dates
  1410.  
  1411.  
  1412.  
  1413. D.  DATES AND TIMES
  1414.  
  1415. If included, day-of-week must be the  day  implied  by  the  date
  1416. specification.
  1417.  
  1418. Time zone  may  be  indicated  in  several  ways.   The  military
  1419. standard   uses  a  single  character  for  each  zone.   "Z"  is
  1420. Greenwhich Mean Time; "A" indicates one  hour  earlier,  and  "M"
  1421. indicates  12 hours earlier; "N" is one hour later, and "Y" is 12
  1422. hours later.  The letter "J" is not used.   The  other  remaining
  1423. two  forms  are  taken from ANSI standard X3.51-1975.  One allows
  1424. explicit indication of the amount of offset from GMT;  the  other
  1425. uses  common  3-character  strings  for  indicating time zones in
  1426. North America.
  1427.  
  1428.  
  1429. Standard for the Format of Text Messages                       25
  1430. V. Examples
  1431. A. Addresses
  1432.  
  1433.  
  1434.  
  1435.  
  1436.  
  1437.                           V.  EXAMPLES
  1438.  
  1439.  
  1440. A.  ADDRESSES
  1441.  
  1442.  
  1443. 1.  Alfred E. Neuman <Neuman at BBN-TENEXA>
  1444.  
  1445. 2.  Neuman@BBN-TENEXA
  1446.  
  1447. These two "Alfred E. Neuman" examples have  identical  semantics,
  1448. as  far  as  the  operation  of  the  local  host's  mail sending
  1449. (distribution) program (also sometimes called its  "mailer")  and
  1450. the  remote  host's  FTP  server  are  concerned.   In  the first
  1451. example, the "Alfred E. Neuman" is  ignored  by  the  mailer,  as
  1452. "Neuman  at  BBN-TENEXA" completely specifies the recipient.  The
  1453. second example contains no superfluous information,  and,  again,
  1454. "Neuman@BBN-TENEXA" is the intended recipient.
  1455.  
  1456.  
  1457. 3.  Al Neuman at BBN-TENEXA
  1458.  
  1459. This is identical to "Al Neuman <Al Neuman at BBN-TENEXA>".  That
  1460. is,  the  full  phrase, "Al Neuman", is passed to the FTP server.
  1461. Note that not all FTP servers accept multi-word identifiers;  and
  1462. some  that  do  accept  them  will treat each word as a different
  1463. addressee (in this case, attempting to send a copy of the message
  1464. to "Al" and a copy to "Neuman").
  1465.  
  1466.  
  1467. 4.  "George Lovell, Ted Hackle" <Shared-Mailbox at Office-1>
  1468.  
  1469. This form might be used to indicate  that  a  single  mailbox  is
  1470. shared  by  several  users.   The quoted string is ignored by the
  1471. originating  host's  mailer,  as  "Shared-Mailbox  at   Office-1"
  1472. completely specifies the destination mailbox.
  1473.  
  1474.  
  1475. 4.  Wilt (the Stilt) Chamberlain at NBA
  1476.  
  1477. The "(the Stilt)" is a comment, which  is  NOT  included  in  the
  1478. destination  mailbox  address  handed to the originating system's
  1479. mailer.  The  address  is  the  string  "Wilt Chamberlain",  with
  1480. exactly  one  space  between  the  first  and second words.  (The
  1481. quotation marks are not included.)
  1482.  
  1483.  
  1484.  
  1485.  
  1486. Standard for the Format of Text Messages                       26
  1487. V. Examples
  1488. B. Address Lists
  1489.  
  1490.  
  1491.  
  1492. B.  ADDRESS LISTS
  1493.  
  1494.     Gourmets:  Pompous Person <WhoZiWhatZit at Cordon-Bleu>,
  1495.                Cooks:  Childs at WGBH, Galloping Gourmet at
  1496.                        ANT (Australian National Television);,
  1497.                Wine Lovers:  Cheapie at Discount-Liquors,
  1498.                              Port at Portugal;;,
  1499.     Jones at SEA
  1500.  
  1501. This group list example points  out  the  use  of  comments,  the
  1502. nesting  of groups, and the mixing of addresses and groups.  Note
  1503. that the two consecutive semi-colons  preceding  "Jones  at  SEA"
  1504. mean that Jones is NOT a member of the Gourmets group.
  1505.  
  1506.  
  1507. C.  ORIGINATOR ITEMS
  1508.  
  1509.  
  1510. 1.  Author-sent
  1511.  
  1512. George Jones logs into  his  Host  as  "Jones".   He  sends  mail
  1513. himself.
  1514.  
  1515.     From:  Jones at Host
  1516. or
  1517.     From:  George Jones <Jones at Host>
  1518.  
  1519.  
  1520. 2.  Secretary-sent
  1521.  
  1522. George Jones logs in as Jones on his Host.   His  secretary,  who
  1523. logs in as Secy on Shost sends mail for him.  Replies to the mail
  1524. should go to George, of course.
  1525.  
  1526.     From:    George Jones <Jones at Host>
  1527.     Sender:  Secy at SHost
  1528.  
  1529.  
  1530. 3.  Shared directory or unrepresentative directory-name
  1531.  
  1532. George Jones logs in as Group at Host.  He  sends  mail  himself;
  1533. replies should go to the Group mailbox.
  1534.  
  1535.     From:  George Jones <Group at Host>
  1536.  
  1537.  
  1538.  
  1539. Standard for the Format of Text Messages                       27
  1540. V. Examples
  1541. C. Originator Items
  1542.  
  1543.  
  1544.  
  1545. 4.  Secretary-sent, for user of shared directory
  1546.  
  1547. George Jones' secretary sends mail for George in his capacity  as
  1548. a  member  of  Group  while  logged  in as Secy at Host.  Replies
  1549. should go to Group.
  1550.  
  1551.     From:   George Jones<Group at Host>
  1552.     Sender: Secy at Host
  1553.  
  1554. Note that there need not be a space between "Jones" and the  "<",
  1555. but  adding a space enhances readability (as is the case in other
  1556. examples).
  1557.  
  1558.  
  1559. 5.  Secretary acting as full agent of author
  1560.  
  1561. George Jones asks his secretary (Secy at Host) to send a  message
  1562. for  him  in  his  capacity  as Group.  He wants his secretary to
  1563. handle all replies.
  1564.  
  1565.     From:     George Jones <Group at Host>
  1566.     Sender:   Secy at Host
  1567.     Reply-To: Secy at Host
  1568.  
  1569.  
  1570. 6.  Agent for user without online mailbox
  1571.  
  1572. A  non-ARPANET  user  friend  of  George's,  Sarah,  is  visting.
  1573. George's  secretary  sends  some  mail  to  a  friend of Sarah in
  1574. computer-land.  Replies should go to  George,  whose  mailbox  is
  1575. Jones at Host.
  1576.  
  1577.     From:     Sarah Friendly
  1578.     Sender:   Secy at Host
  1579.     Reply-To: Jones at Host
  1580.  
  1581.  
  1582. 7.  Sent by member of a committee
  1583.  
  1584. George is a member of a committee.  He wishes to have any replies
  1585. to his message go to all committee members.
  1586.  
  1587.     From:     George Jones
  1588.     Sender:   Jones at Host
  1589.     Reply-To: Big-committee: Jones at Host,
  1590.                              Smith at Other-Host,
  1591.                              Doe at Somewhere-Else;
  1592.  
  1593. Note that if George had not included himself in  the  enumeration
  1594. of Big-committee, he would not have gotten an implicit reply; the
  1595. presence  of  the  "Reply-to"  field  SUPERSEDES the sending of a
  1596. reply to the person named in the "From" field.
  1597.  
  1598. Standard for the Format of Text Messages                       28
  1599. V. Examples
  1600. C. Originator Items
  1601.  
  1602.  
  1603.  
  1604. 8.  Example of INCORRECT use
  1605.  
  1606. George desires a reply to go  to  his  secretary;  therefore  his
  1607. secretary  leaves  his  mailbox  address  off  the  "From" field,
  1608. leaving only his name, which is not, itself, a mailbox address.
  1609.  
  1610.          From:   George Jones
  1611.          Sender: Secy at SHost
  1612.  
  1613. THIS IS NOT PERMITTED.  Replies are NEVER implicitly sent to  the
  1614. "Sender";  George's  secretary  should  have  used the "Reply-To"
  1615. field, or the  mail  creating  program  should  have  forced  the
  1616. secretary to.
  1617.  
  1618. 9.  Agent for member of a committee
  1619.  
  1620. George's secretary sends out a message which was authored jointly
  1621. by all the members of the "Big-committee".
  1622.  
  1623.          From:   Big-committee: Jones at Host,
  1624.                                 Smith at Other-Host,
  1625.                                 Doe at Somewhere-Else;
  1626.          Sender: Secy at SHost
  1627.  
  1628.  
  1629.  
  1630. D.  COMPLETE HEADERS
  1631.  
  1632.  
  1633. 1.  Minimum required:
  1634.  
  1635.        Date:  26 August 1976 1429-EDT
  1636.        From:  Jones at Host
  1637.  
  1638.  
  1639. 2.  Using some of the additional fields:
  1640.  
  1641.        Date: 26 August 1976 1430-EDT
  1642.        From:George Jones<Group at Host>
  1643.        Sender:Secy at SHOST
  1644.        To:Al Neuman at Mad-Host,
  1645.                 Sam Irving at Other-Host
  1646.        Message-ID:  <some string at SHOST>
  1647.  
  1648.  
  1649.  
  1650. Standard for the Format of Text Messages                       29
  1651. V. Examples
  1652. D.  Complete Headers
  1653.  
  1654.  
  1655.  
  1656. 3.  About as complex as you're going to get:
  1657.  
  1658.        Date     :  27 Aug 1976 0932-PDT
  1659.        From     :  Ken Davis <KDavis at Other-Host>
  1660.        Subject  :  Re: The Syntax in the RFC
  1661.        Sender   :  KSecy at Other-Host
  1662.        Reply-To :  Sam Irving at Other-Host
  1663.        To       :  George Jones <Group at Host>,
  1664.                    Al Neuman at Mad-Host
  1665.        cc       :  Important folk:
  1666.                    Tom Softwood <Balsa at Another-Host>,
  1667.                    Sam Irving at Other-Host;,
  1668.                    Standard Distribution::Include:
  1669.                     </main/davis/people/standard at Other-Host,
  1670.                      "<Jones>standard.dist.3" at Tops-20-Host>,
  1671.                    (The following Included Postal list is part
  1672.                    of Standard Distribution.)
  1673.                    :Postal::Include: Non-net-addrs@Other-host;,
  1674.                    :Postal: "Sam Irving, P.O. Box 001, Las Vegas,
  1675.                              Nevada"  (So that he can stay
  1676.                              apprised of the situation)
  1677.        Comment  :  Sam is away on business. He asked me to handle
  1678.                    his mail for him.  He'll be able to provide  a
  1679.                    more  accurate  explanation  when  he  returns
  1680.                    next week.
  1681.        In-Reply-To: <some string at SHOST>
  1682.        Special (action):  This is a sample of multi-word field-
  1683.                    names, using a range of characters.  There
  1684.                    could also be a field-name "Special (info)".
  1685.        Message-ID: <4231.629.XYzi-What at Other-Host>
  1686.  
  1687.  
  1688. Standard for the Format of Text Messages                       31
  1689. Appendix
  1690. A. Alphabetical Listing of Syntax Rules
  1691.  
  1692.  
  1693.  
  1694.  
  1695.  
  1696.                         APPENDIX
  1697.  
  1698.  
  1699.  
  1700. A.  ALPHABETICAL LISTING OF SYNTAX RULES
  1701.  
  1702.  
  1703. address     =  host-phrase / quoted-string
  1704.             / (*phrase "<" #address ">" )
  1705.             / (*phrase ":" #address ";" )
  1706.             / (":" ("Include" / "Postal" / atom) ":" address)
  1707. ALPHA       =  <any TELNET ASCII alphabetic character>
  1708. atom        =  1*<any CHAR except specials and CTLs>
  1709.  
  1710. CHAR        =  <any TELNET ASCII character>
  1711. comment     =  "(" *(ctext / comment / quoted-pair) ")"
  1712. CR          =  <TELNET ASCII carriage return>
  1713. CRLF        =  CR LF
  1714. ctext       =  <any CHAR excluding "(", ")", CR, LF and
  1715.                including linear-white-space>
  1716. CTL         =  <any TELNET ASCII control character and DEL>
  1717.  
  1718. date        =  1*2DIGIT ["-"] month ["-"] (2DIGIT /4DIGIT)
  1719. date-field  =  "Date"       ":" date-time
  1720. date-time   =  [ day-of-week "," ] date time
  1721. day-of-week =  "Monday"    / "Mon"  / "Tuesday"   / "Tue"
  1722.             /  "Wednesday" / "Wed"  / "Thursday"  / "Thu"
  1723.             /  "Friday"    / "Fri"  / "Saturday"  / "Sat"
  1724.             /  "Sunday"    / "Sun"
  1725. delimiters  =  specials / comment / linear-white-space
  1726. DIGIT       =  <any TELNET ASCII digit>
  1727.  
  1728. extension-field = <Any field which is defined in a document
  1729.                published as a formal extension to this
  1730.                specification>
  1731.  
  1732. field       =  field-name ":" [ field-body ] CRLF
  1733.  
  1734. fields      =  date-field  originator-fields  *optional-field
  1735. field-body  =  field-body-contents
  1736.                [CRLF LWSP-char field-body]
  1737. field-body-contents = <the TELNET ASCII characters making up the
  1738.                field-body, as defined in the following sections,
  1739.                and consisting of combinations of atom, quoted-
  1740.                string, and specials tokens, or else consisting of
  1741.                texts>
  1742. field-name  =  fnatom *(LWSP-char [fnatom])
  1743. fnatom      =  1*<any CHAR, excluding CTLs, SPACE, and ":">
  1744.  
  1745.  
  1746. Standard for the Format of Text Messages                       32
  1747. Appendix
  1748. A. Alphabetical Listing of Syntax Rules
  1749.  
  1750.  
  1751.  
  1752. host-indicator =  1*( ("at" / "@") node )
  1753. host-phrase =  phrase  host-indicator
  1754. hour        =  2DIGIT [":"] 2DIGIT [ [":"] 2DIGIT ]
  1755. HTAB        =  <TELNET ASCII horizontal-tab>
  1756.  
  1757. LF          =  <TELNET ASCII linefeed>
  1758. linear-white-space =  1*([CRLF] LWSP-char)
  1759. LWSP-char   = SPACE / HTAB
  1760.  
  1761. mach-id     =  "<" host-phrase ">"
  1762. mailbox     =  host-phrase /  (phrase mach-id)
  1763. message     =  fields *(CRLF *text)
  1764. month       =  "January"   / "Jan"  / "February"  / "Feb"
  1765.             /  "March"     / "Mar"  / "April"     / "Apr"
  1766.             /  "May"                / "June"      / "Jun"
  1767.             /  "July"      / "Jul"  / "August"    / "Aug"
  1768.             /  "September" / "Sep"  / "October"   / "Oct"
  1769.             /  "November"  / "Nov"  / "December"  / "Dec"
  1770.  
  1771. node        =  word / 1*DIGIT
  1772.  
  1773. optional-field  =
  1774.                "To"         ":" #address
  1775.             /  "cc"         ":" #address
  1776.             /  "bcc"        ":" #address
  1777.             /  "Subject"    ":" *text
  1778.             /  "Comments"   ":" *text
  1779.             /  "Message-ID" ":" mach-id
  1780.             /  "In-Reply-To"":" #(phrase / mach-id)
  1781.             /  "References" ":" #(phrase / mach-id)
  1782.             /  "Keywords"   ":" #phrase
  1783.             /  extension-field
  1784.             /  user-defined-field
  1785. originator-fields =
  1786.                (  "From"     ":" mailbox
  1787.                  ["Reply-To" ":" #address] )
  1788.             /  (  "From"     ":" 1#address
  1789.                   "Sender"   ":" mailbox
  1790.                  ["Reply-To" ":" #address] )
  1791.  
  1792. phrase      =  1*word
  1793.  
  1794. quoted-pair =  "\" CHAR
  1795. quoted-string =  <">  *(qtext / quoted-pair)  <">
  1796. qtext       =  <any CHAR except <">, CR, or LF and including
  1797.                linear-white-space>
  1798. SPACE       =  <TELNET ASCII space>
  1799. specials    =  "(" / ")" / "<" / ">" / "@"/ "," / ";" / ":"
  1800.             /  "\" / <">
  1801.  
  1802. text        =  <any CHAR, including bare CR and/or bare LF, but
  1803.                NOT including CRLF>
  1804.  
  1805. Standard for the Format of Text Messages                       33
  1806. Appendix
  1807. A. Alphabetical Listing of Syntax Rules
  1808.  
  1809.  
  1810.  
  1811. time        =  hour zone
  1812.  
  1813. user-defined-field = <Any field which has not been defined in
  1814.                this specification or published as an extension to
  1815.                this specification; names for such fields must be
  1816.                unique and may be preempted by putlished
  1817.                extensions>
  1818.  
  1819. word        =  atom / quoted-string
  1820.  
  1821. zone        = ( ("+" / "-") 4DIGIT )
  1822.             / ( ["-"] (1ALPHA
  1823.               / "GMT" / "NST"  / "AST" / "ADT" / "EST" / "EDT"
  1824.               / "CST" / "CDT"  / "MST" / "MDT" / "PST" / "PDT"
  1825.               / "YST" / "YDT"  / "HST" / "HDT" / "BST" / "BDT" ))
  1826.  
  1827. <">         =  <TELNET ASCII quote mark>
  1828.  
  1829.  
  1830. Standard for the Format of Text Messages                       35
  1831. Appendix
  1832. B. Simple Parsing
  1833.  
  1834.  
  1835.  
  1836.  
  1837. B.  SIMPLE PARSING
  1838.  
  1839.  
  1840.      Some mail-reading software systems may wish to perform  only
  1841. minimal  processing,  ignoring  the internal syntax of structured
  1842. field-bodies and treating them the  same  as  unstructured-field-
  1843. bodies.  Such software will need only to distinguish:
  1844.  
  1845.      -  Header fields from the message body,
  1846.      -  Beginnings of fields from lines which continue fields,
  1847.      -  Field-names from field-contents.
  1848.  
  1849.      The abbreviated set of syntactic rules  which  follows  will
  1850. suffice  for  this  purpose.   They  describe  a  limited view of
  1851. messages and are a subset of the syntactic rules provided in  the
  1852. main part of this specification.  One small exception is that the
  1853. contents of field-bodies consist only of text:
  1854.  
  1855.  
  1856. SYNTAX:
  1857.  
  1858. message         =  *field *(CRLF *text)
  1859.  
  1860. field           =  field-name ":" [field-body] CRLF
  1861.  
  1862. field-name      =  fnatom *( LWSP-char [fnatom] )
  1863.  
  1864. fnatom          =  1*<any CHAR, excluding CTLs, SPACE, and ":">
  1865.  
  1866.  
  1867. field-body      =  *text [CRLF LWSP-char field-body]
  1868.  
  1869.  
  1870. SEMANTICS:
  1871.  
  1872.      Headers occur before the message body and are terminated  by
  1873. a null line (i.e., two contiguous CRLFs).
  1874.  
  1875.      A line which continues a header field begins with a SPACE or
  1876. HTAB  character,  while  a  line  beginning a field starts with a
  1877. printable character which is not a colon.
  1878.  
  1879.      A field-name consists of one or  more  printable  characters
  1880. (excluding colon), each separated by one or more SPACES or HTABS.
  1881. A field-name MUST be contained on one line.  Upper and lower case
  1882. are not distinguished when comparing field-names.
  1883.  
  1884.  
  1885. Standard for the Format of Text Messages                       37
  1886. Bibliography
  1887.  
  1888.  
  1889.  
  1890.  
  1891.  
  1892.  
  1893.                           BIBLIOGRAPHY
  1894.  
  1895.  
  1896. ANSI.   Representations   of   universal   time,    local    time
  1897.    differentials,  and  United  States  time  zone references for
  1898.    information interchange.  ANSI X3.51-1975;  American  National
  1899.    Standards Institute:  New York, 1975.
  1900.  
  1901. Bhushan, A.K.  The File Transfer Protocol.  ARPANET  Request  for
  1902.    Comments,  No.   354,  Network  Information Center No.  10596;
  1903.    Augmentation Research  Center,  Stanford  Research  Institute:
  1904.    Menlo Park, July 1972.
  1905.  
  1906. Bhushan, A.K.  Comments on the File Transfer  Protocol.   ARPANET
  1907.    Request for Comments, No.  385, Network Information Center No.
  1908.    11357;  Augmentation  Research   Center,   Stanford   Research
  1909.    Institute:  Menlo Park, August 1972.
  1910.  
  1911. Bhushan, A.K., Pogran, K.T., Tomlinson,  R.S.,  and  White,  J.E.
  1912.    Standardizing  Network  Mail  Headers.   ARPANET  Request  for
  1913.    Comments, No.  561,  Network  Information  Center  No.  18516;
  1914.    Augmentation  Research  Center,  Stanford  Research Institute:
  1915.    Menlo Park, September 1973.
  1916.  
  1917. Feinler,  E.J.  and  Postel,  J.B.   ARPANET  Protocol  Handbook.
  1918.    Network  Information  Center  No.  7104; Augmentation Research
  1919.    Center, Stanford Research Institute:  Menlo Park,  April  1976.
  1920.    (NTIS AD A003890).
  1921.  
  1922. McKenzie,  A.   File  Transfer  Protocol.   ARPANET  Request  for
  1923.    Comments,  No.  454,  Network  Information  Center  No. 14333;
  1924.    Augmentation Research  Center,  Stanford  Research  Institute:
  1925.    Menlo Park, February 1973.
  1926.  
  1927. McKenzie,  A. TELNET Protocol Specification.  Network Information
  1928.    Center  No.   18639;  Augmentation  Research  Center, Stanford
  1929.    Research Institute:  Menlo Park, August 1973.
  1930.  
  1931. Myer, T.H. and Henderson, D.A.   Message  Transmission  Protocol.
  1932.    ARPANET  Request  for  Comments,  No. 680, Network Information
  1933.    Center  No.  32116;  Augmentation  Research  Center,  Stanford
  1934.    Research Institute:  Menlo Park, 1975.
  1935.  
  1936. Neigus,  N.   File  Transfer  Protocol.   ARPANET   Request   for
  1937.    Comments,  No.  542,  Network  Information  Center  No. 17759;
  1938.    Augmentation Research  Center,  Stanford  Research  Institute:
  1939.    Menlo Park, July 1973.
  1940.  
  1941. Pogran, K., Vittal, J., Crocker, D. and Henderson,  A.   Proposed
  1942.    official  standard  for  the  format of ARPA network messages.
  1943.  
  1944. Standard for the Format of Text Messages                       38
  1945. Bibliography
  1946.  
  1947.  
  1948.  
  1949.  
  1950.    ARPANET Request for Comments,  No.  724,  Network  Information
  1951.    Center  No.  37435;  Augmentation  Research  Center,  Stanford
  1952.    Research Institute:  Menlo Park, May 1977.
  1953.  
  1954. Postel, J.B.  Revised  FTP  Reply  Codes.   ARPANET  Request  for
  1955.    Comments,  No.  640,  Network  Information  Center  No. 30843;
  1956.    Augmentation Research  Center,  Stanford  Research  Institute:
  1957.    Menlo Park, June 1974.
  1958.