home *** CD-ROM | disk | FTP | other *** search
/ Magazyn WWW 1998 October / www_10_1998.iso / info / ogonki / rfc822.txt < prev    next >
Text File  |  1998-09-09  |  106KB  |  2,896 lines

  1.  
  2.      RFC #  822
  3.  
  4.      Obsoletes:  RFC #733  (NIC #41952)
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.                         STANDARD FOR THE FORMAT OF
  18.  
  19.                         ARPA INTERNET TEXT MESSAGES
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.                               August 13, 1982
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.                                 Revised by
  34.  
  35.                              David H. Crocker
  36.  
  37.  
  38.                       Dept. of Electrical Engineering
  39.                  University of Delaware, Newark, DE  19711
  40.                       Network:  DCrocker @ UDel-Relay
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.      Standard for ARPA Internet Text Messages
  57.  
  58.  
  59.                              TABLE OF CONTENTS
  60.  
  61.  
  62.      PREFACE ....................................................   ii
  63.  
  64.      1.  INTRODUCTION ...........................................    1
  65.  
  66.          1.1.  Scope ............................................    1
  67.          1.2.  Communication Framework ..........................    2
  68.  
  69.      2.  NOTATIONAL CONVENTIONS .................................    3
  70.  
  71.      3.  LEXICAL ANALYSIS OF MESSAGES ...........................    5
  72.  
  73.          3.1.  General Description ..............................    5
  74.          3.2.  Header Field Definitions .........................    9
  75.          3.3.  Lexical Tokens ...................................   10
  76.          3.4.  Clarifications ...................................   11
  77.  
  78.      4.  MESSAGE SPECIFICATION ..................................   17
  79.  
  80.          4.1.  Syntax ...........................................   17
  81.          4.2.  Forwarding .......................................   19
  82.          4.3.  Trace Fields .....................................   20
  83.          4.4.  Originator Fields ................................   21
  84.          4.5.  Receiver Fields ..................................   23
  85.          4.6.  Reference Fields .................................   23
  86.          4.7.  Other Fields .....................................   24
  87.  
  88.      5.  DATE AND TIME SPECIFICATION ............................   26
  89.  
  90.          5.1.  Syntax ...........................................   26
  91.          5.2.  Semantics ........................................   26
  92.  
  93.      6.  ADDRESS SPECIFICATION ..................................   27
  94.  
  95.          6.1.  Syntax ...........................................   27
  96.          6.2.  Semantics ........................................   27
  97.          6.3.  Reserved Address .................................   33
  98.  
  99.      7.  BIBLIOGRAPHY ...........................................   34
  100.  
  101.  
  102.                              APPENDIX
  103.  
  104.      A.  EXAMPLES ...............................................   36
  105.      B.  SIMPLE FIELD PARSING ...................................   40
  106.      C.  DIFFERENCES FROM RFC #733 ..............................   41
  107.      D.  ALPHABETICAL LISTING OF SYNTAX RULES ...................   44
  108.  
  109.  
  110.      August 13, 1982               - i -                      RFC #822
  111.  
  112.  
  113.  
  114.  
  115.      Standard for ARPA Internet Text Messages
  116.  
  117.  
  118.                                   PREFACE
  119.  
  120.  
  121.           By 1977, the Arpanet employed several informal standards for
  122.      the  text  messages (mail) sent among its host computers.  It was
  123.      felt necessary to codify these practices and  provide  for  those
  124.      features  that  seemed  imminent.   The result of that effort was
  125.      Request for Comments (RFC) #733, "Standard for the Format of ARPA
  126.      Network Text Message", by Crocker, Vittal, Pogran, and Henderson.
  127.      The specification attempted to avoid major  changes  in  existing
  128.      software, while permitting several new features.
  129.  
  130.           This document revises the specifications  in  RFC  #733,  in
  131.      order  to  serve  the  needs  of the larger and more complex ARPA
  132.      Internet.  Some of RFC #733's features failed  to  gain  adequate
  133.      acceptance.   In  order to simplify the standard and the software
  134.      that follows it, these features have been removed.   A  different
  135.      addressing  scheme  is  used, to handle the case of inter-network
  136.      mail; and the concept of re-transmission has been introduced.
  137.  
  138.           This specification is intended for use in the ARPA Internet.
  139.      However, an attempt has been made to free it of any dependence on
  140.      that environment, so that it can be applied to other network text
  141.      message systems.
  142.  
  143.           The specification of RFC #733 took place over the course  of
  144.      one  year, using the ARPANET mail environment, itself, to provide
  145.      an on-going forum for discussing the capabilities to be included.
  146.      More  than  twenty individuals, from across the country, partici-
  147.      pated in  the  original  discussion.   The  development  of  this
  148.      revised specification has, similarly, utilized network mail-based
  149.      group discussion.  Both specification efforts  greatly  benefited
  150.      from the comments and ideas of the participants.
  151.  
  152.           The syntax of the standard,  in  RFC  #733,  was  originally
  153.      specified  in  the  Backus-Naur Form (BNF) meta-language.  Ken L.
  154.      Harrenstien, of SRI International, was responsible for  re-coding
  155.      the  BNF  into  an  augmented  BNF  that makes the representation
  156.      smaller and easier to understand.
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.      August 13, 1982              - ii -                      RFC #822
  170.  
  171.  
  172.  
  173.      Standard for ARPA Internet Text Messages
  174.  
  175.  
  176.      1.  INTRODUCTION
  177.  
  178.      1.1.  SCOPE
  179.  
  180.           This standard specifies a syntax for text messages that  are
  181.      sent  among  computer  users, within the framework of "electronic
  182.      mail".  The standard supersedes  the  one  specified  in  ARPANET
  183.      Request  for Comments #733, "Standard for the Format of ARPA Net-
  184.      work Text Messages".
  185.  
  186.           In this context, messages are viewed as having  an  envelope
  187.      and  contents.   The  envelope  contains  whatever information is
  188.      needed to accomplish transmission  and  delivery.   The  contents
  189.      compose  the object to be delivered to the recipient.  This stan-
  190.      dard applies only to the format and some of the semantics of mes-
  191.      sage  contents.   It contains no specification of the information
  192.      in the envelope.
  193.  
  194.           However, some message systems may use information  from  the
  195.      contents  to create the envelope.  It is intended that this stan-
  196.      dard facilitate the acquisition of such information by programs.
  197.  
  198.           Some message systems may  store  messages  in  formats  that
  199.      differ  from the one specified in this standard.  This specifica-
  200.      tion is intended strictly as a definition of what message content
  201.      format is to be passed BETWEEN hosts.
  202.  
  203.      Note:  This standard is NOT intended to dictate the internal for-
  204.             mats  used  by sites, the specific message system features
  205.             that they are expected to support, or any of  the  charac-
  206.             teristics  of  user interface programs that create or read
  207.             messages.
  208.  
  209.           A distinction should be made between what the  specification
  210.      REQUIRES  and  what  it ALLOWS.  Messages can be made complex and
  211.      rich with formally-structured components of information or can be
  212.      kept small and simple, with a minimum of such information.  Also,
  213.      the standard simplifies the interpretation  of  differing  visual
  214.      formats  in  messages;  only  the  visual  aspect of a message is
  215.      affected and not the interpretation  of  information  within  it.
  216.      Implementors may choose to retain such visual distinctions.
  217.  
  218.           The formal definition is divided into four levels.  The bot-
  219.      tom level describes the meta-notation used in this document.  The
  220.      second level describes basic lexical analyzers that  feed  tokens
  221.      to  higher-level  parsers.   Next is an overall specification for
  222.      messages; it permits distinguishing individual fields.   Finally,
  223.      there is definition of the contents of several structured fields.
  224.  
  225.  
  226.  
  227.      August 13, 1982               - 1 -                      RFC #822
  228.  
  229.  
  230.  
  231.      Standard for ARPA Internet Text Messages
  232.  
  233.  
  234.      1.2.  COMMUNICATION FRAMEWORK
  235.  
  236.           Messages consist of lines of text.   No  special  provisions
  237.      are  made for encoding drawings, facsimile, speech, or structured
  238.      text.  No significant consideration has been given  to  questions
  239.      of  data  compression  or to transmission and storage efficiency,
  240.      and the standard tends to be free with the number  of  bits  con-
  241.      sumed.   For  example,  field  names  are specified as free text,
  242.      rather than special terse codes.
  243.  
  244.           A general "memo" framework is used.  That is, a message con-
  245.      sists of some information in a rigid format, followed by the main
  246.      part of the message, with a format that is not specified in  this
  247.      document.   The  syntax of several fields of the rigidly-formated
  248.      ("headers") section is defined in  this  specification;  some  of
  249.      these fields must be included in all messages.
  250.  
  251.           The syntax  that  distinguishes  between  header  fields  is
  252.      specified  separately  from  the  internal  syntax for particular
  253.      fields.  This separation is intended to allow simple  parsers  to
  254.      operate on the general structure of messages, without concern for
  255.      the detailed structure of individual header fields.   Appendix  B
  256.      is provided to facilitate construction of these parsers.
  257.  
  258.           In addition to the fields specified in this document, it  is
  259.      expected  that  other fields will gain common use.  As necessary,
  260.      the specifications for these "extension-fields" will be published
  261.      through  the same mechanism used to publish this document.  Users
  262.      may also  wish  to  extend  the  set  of  fields  that  they  use
  263.      privately.  Such "user-defined fields" are permitted.
  264.  
  265.           The framework severely constrains document tone and  appear-
  266.      ance and is primarily useful for most intra-organization communi-
  267.      cations and  well-structured   inter-organization  communication.
  268.      It  also  can  be used for some types of inter-process communica-
  269.      tion, such as simple file transfer and remote job entry.  A  more
  270.      robust  framework might allow for multi-font, multi-color, multi-
  271.      dimension encoding of information.  A  less  robust  one,  as  is
  272.      present  in  most  single-machine  message  systems,  would  more
  273.      severely constrain the ability to add fields and the decision  to
  274.      include specific fields.  In contrast with paper-based communica-
  275.      tion, it is interesting to note that the RECEIVER  of  a  message
  276.      can   exercise  an  extraordinary  amount  of  control  over  the
  277.      message's appearance.  The amount of actual control available  to
  278.      message  receivers  is  contingent upon the capabilities of their
  279.      individual message systems.
  280.  
  281.  
  282.  
  283.  
  284.  
  285.      August 13, 1982               - 2 -                      RFC #822
  286.  
  287.  
  288.  
  289.      Standard for ARPA Internet Text Messages
  290.  
  291.  
  292.      2.  NOTATIONAL CONVENTIONS
  293.  
  294.           This specification uses an augmented Backus-Naur Form  (BNF)
  295.      notation.  The differences from standard BNF involve naming rules
  296.      and indicating repetition and "local" alternatives.
  297.  
  298.      2.1.  RULE NAMING
  299.  
  300.           Angle brackets ("<", ">") are not  used,  in  general.   The
  301.      name  of  a rule is simply the name itself, rather than "<name>".
  302.      Quotation-marks enclose literal text (which may be  upper  and/or
  303.      lower  case).   Certain  basic  rules  are  in uppercase, such as
  304.      SPACE, TAB, CRLF, DIGIT, ALPHA, etc.  Angle brackets are used  in
  305.      rule  definitions,  and  in  the rest of this  document, whenever
  306.      their presence will facilitate discerning the use of rule names.
  307.  
  308.      2.2.  RULE1 / RULE2:  ALTERNATIVES
  309.  
  310.           Elements separated by slash ("/") are alternatives.   There-
  311.      fore "foo / bar" will accept foo or bar.
  312.  
  313.      2.3.  (RULE1 RULE2):  LOCAL ALTERNATIVES
  314.  
  315.           Elements enclosed in parentheses are  treated  as  a  single
  316.      element.   Thus,  "(elem  (foo  /  bar)  elem)"  allows the token
  317.      sequences "elem foo elem" and "elem bar elem".
  318.  
  319.      2.4.  *RULE:  REPETITION
  320.  
  321.           The character "*" preceding an element indicates repetition.
  322.      The full form is:
  323.  
  324.                               <l>*<m>element
  325.  
  326.      indicating at least <l> and at most <m> occurrences  of  element.
  327.      Default values are 0 and infinity so that "*(element)" allows any
  328.      number, including zero; "1*element" requires at  least  one;  and
  329.      "1*2element" allows one or two.
  330.  
  331.      2.5.  [RULE]:  OPTIONAL
  332.  
  333.           Square brackets enclose optional elements; "[foo  bar]"   is
  334.      equivalent to "*1(foo bar)".
  335.  
  336.      2.6.  NRULE:  SPECIFIC REPETITION
  337.  
  338.           "<n>(element)" is equivalent to "<n>*<n>(element)"; that is,
  339.      exactly  <n>  occurrences  of (element). Thus 2DIGIT is a 2-digit
  340.      number, and 3ALPHA is a string of three alphabetic characters.
  341.  
  342.  
  343.      August 13, 1982               - 3 -                      RFC #822
  344.  
  345.  
  346.  
  347.      Standard for ARPA Internet Text Messages
  348.  
  349.  
  350.      2.7.  #RULE:  LISTS
  351.  
  352.           A construct "#" is defined, similar to "*", as follows:
  353.  
  354.                               <l>#<m>element
  355.  
  356.      indicating at least <l> and at most <m> elements, each  separated
  357.      by  one  or more commas (","). This makes the usual form of lists
  358.      very easy; a rule such as '(element *("," element))' can be shown
  359.      as  "1#element".   Wherever this construct is used, null elements
  360.      are allowed, but do not  contribute  to  the  count  of  elements
  361.      present.   That  is,  "(element),,(element)"  is  permitted,  but
  362.      counts as only two elements.  Therefore, where at least one  ele-
  363.      ment  is required, at least one non-null element must be present.
  364.      Default values are 0 and infinity so that "#(element)" allows any
  365.      number,  including  zero;  "1#element" requires at least one; and
  366.      "1#2element" allows one or two.
  367.  
  368.      2.8.  ; COMMENTS
  369.  
  370.           A semi-colon, set off some distance to  the  right  of  rule
  371.      text,  starts  a comment that continues to the end of line.  This
  372.      is a simple way of including useful notes in  parallel  with  the
  373.      specifications.
  374.  
  375.  
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.  
  401.      August 13, 1982               - 4 -                      RFC #822
  402.  
  403.  
  404.  
  405.      Standard for ARPA Internet Text Messages
  406.  
  407.  
  408.      3.  LEXICAL ANALYSIS OF MESSAGES
  409.  
  410.      3.1.  GENERAL DESCRIPTION
  411.  
  412.           A message consists of header fields and, optionally, a body.
  413.      The  body  is simply a sequence of lines containing ASCII charac-
  414.      ters.  It is separated from the headers by a null line  (i.e.,  a
  415.      line with nothing preceding the CRLF).
  416.  
  417.      3.1.1.  LONG HEADER FIELDS
  418.  
  419.         Each header field can be viewed as a single, logical  line  of
  420.         ASCII  characters,  comprising  a field-name and a field-body.
  421.         For convenience, the field-body  portion  of  this  conceptual
  422.         entity  can be split into a multiple-line representation; this
  423.         is called "folding".  The general rule is that wherever  there
  424.         may  be  linear-white-space  (NOT  simply  LWSP-chars), a CRLF
  425.         immediately followed by AT LEAST one LWSP-char may instead  be
  426.         inserted.  Thus, the single line
  427.  
  428.             To:  "Joe & J. Harvey" <ddd @Org>, JJV @ BBN
  429.  
  430.         can be represented as:
  431.  
  432.             To:  "Joe & J. Harvey" <ddd @ Org>,
  433.                     JJV@BBN
  434.  
  435.         and
  436.  
  437.             To:  "Joe & J. Harvey"
  438.                             <ddd@ Org>, JJV
  439.              @BBN
  440.  
  441.         and
  442.  
  443.             To:  "Joe &
  444.              J. Harvey" <ddd @ Org>, JJV @ BBN
  445.  
  446.              The process of moving  from  this  folded   multiple-line
  447.         representation  of a header field to its single line represen-
  448.         tation is called "unfolding".  Unfolding  is  accomplished  by
  449.         regarding   CRLF   immediately  followed  by  a  LWSP-char  as
  450.         equivalent to the LWSP-char.
  451.  
  452.         Note:  While the standard  permits  folding  wherever  linear-
  453.                white-space is permitted, it is recommended that struc-
  454.                tured fields, such as those containing addresses, limit
  455.                folding  to higher-level syntactic breaks.  For address
  456.                fields, it  is  recommended  that  such  folding  occur
  457.  
  458.  
  459.      August 13, 1982               - 5 -                      RFC #822
  460.  
  461.  
  462.  
  463.      Standard for ARPA Internet Text Messages
  464.  
  465.  
  466.                between addresses, after the separating comma.
  467.  
  468.      3.1.2.  STRUCTURE OF HEADER FIELDS
  469.  
  470.         Once a field has been unfolded, it may be viewed as being com-
  471.         posed of a field-name followed by a colon (":"), followed by a
  472.         field-body, and  terminated  by  a  carriage-return/line-feed.
  473.         The  field-name must be composed of printable ASCII characters
  474.         (i.e., characters that  have  values  between  33.  and  126.,
  475.         decimal, except colon).  The field-body may be composed of any
  476.         ASCII characters, except CR or LF.  (While CR and/or LF may be
  477.         present  in the actual text, they are removed by the action of
  478.         unfolding the field.)
  479.  
  480.         Certain field-bodies of headers may be  interpreted  according
  481.         to  an  internal  syntax  that some systems may wish to parse.
  482.         These  fields  are  called  "structured   fields".    Examples
  483.         include  fields containing dates and addresses.  Other fields,
  484.         such as "Subject"  and  "Comments",  are  regarded  simply  as
  485.         strings of text.
  486.  
  487.         Note:  Any field which has a field-body  that  is  defined  as
  488.                other  than  simply <text> is to be treated as a struc-
  489.                tured field.
  490.  
  491.                Field-names, unstructured field bodies  and  structured
  492.                field bodies each are scanned by their own, independent
  493.                "lexical" analyzers.
  494.  
  495.      3.1.3.  UNSTRUCTURED FIELD BODIES
  496.  
  497.         For some fields, such as "Subject" and "Comments",  no  struc-
  498.         turing  is assumed, and they are treated simply as <text>s, as
  499.         in the message body.  Rules of folding apply to these  fields,
  500.         so  that  such  field  bodies  which occupy several lines must
  501.         therefore have the second and successive lines indented by  at
  502.         least one LWSP-char.
  503.  
  504.      3.1.4.  STRUCTURED FIELD BODIES
  505.  
  506.         To aid in the creation and reading of structured  fields,  the
  507.         free  insertion   of linear-white-space (which permits folding
  508.         by inclusion of CRLFs)  is  allowed  between  lexical  tokens.
  509.         Rather  than  obscuring  the  syntax  specifications for these
  510.         structured fields with explicit syntax for this  linear-white-
  511.         space, the existence of another "lexical" analyzer is assumed.
  512.         This analyzer does not apply  for  unstructured  field  bodies
  513.         that  are  simply  strings  of  text, as described above.  The
  514.         analyzer provides  an  interpretation  of  the  unfolded  text
  515.  
  516.  
  517.      August 13, 1982               - 6 -                      RFC #822
  518.  
  519.  
  520.  
  521.      Standard for ARPA Internet Text Messages
  522.  
  523.  
  524.         composing  the body of the field as a sequence of lexical sym-
  525.         bols.
  526.  
  527.         These symbols are:
  528.  
  529.                      -  individual special characters
  530.                      -  quoted-strings
  531.                      -  domain-literals
  532.                      -  comments
  533.                      -  atoms
  534.  
  535.         The first four of these symbols  are  self-delimiting.   Atoms
  536.         are not; they are delimited by the self-delimiting symbols and
  537.         by  linear-white-space.   For  the  purposes  of  regenerating
  538.         sequences  of  atoms  and quoted-strings, exactly one SPACE is
  539.         assumed to exist, and should be used, between them.  (Also, in
  540.         the "Clarifications" section on "White Space", below, note the
  541.         rules about treatment of multiple contiguous LWSP-chars.)
  542.  
  543.         So, for example, the folded body of an address field
  544.  
  545.             ":sysmail"@  Some-Group. Some-Org,
  546.             Muhammed.(I am  the greatest) Ali @(the)Vegas.WBA
  547.  
  548.  
  549.  
  550.  
  551.  
  552.  
  553.  
  554.  
  555.  
  556.  
  557.  
  558.  
  559.  
  560.  
  561.  
  562.  
  563.  
  564.  
  565.  
  566.  
  567.  
  568.  
  569.  
  570.  
  571.  
  572.  
  573.  
  574.  
  575.      August 13, 1982               - 7 -                      RFC #822
  576.  
  577.  
  578.  
  579.      Standard for ARPA Internet Text Messages
  580.  
  581.  
  582.         is analyzed into the following lexical symbols and types:
  583.  
  584.                     :sysmail              quoted string
  585.                     @                     special
  586.                     Some-Group            atom
  587.                     .                     special
  588.                     Some-Org              atom
  589.                     ,                     special
  590.                     Muhammed              atom
  591.                     .                     special
  592.                     (I am  the greatest)  comment
  593.                     Ali                   atom
  594.                     @                     atom
  595.                     (the)                 comment
  596.                     Vegas                 atom
  597.                     .                     special
  598.                     WBA                   atom
  599.  
  600.         The canonical representations for the data in these  addresses
  601.         are the following strings:
  602.  
  603.                         ":sysmail"@Some-Group.Some-Org
  604.  
  605.         and
  606.  
  607.                             Muhammed.Ali@Vegas.WBA
  608.  
  609.         Note:  For purposes of display, and when passing  such  struc-
  610.                tured information to other systems, such as mail proto-
  611.                col  services,  there  must  be  NO  linear-white-space
  612.                between  <word>s  that are separated by period (".") or
  613.                at-sign ("@") and exactly one SPACE between  all  other
  614.                <word>s.  Also, headers should be in a folded form.
  615.  
  616.  
  617.  
  618.  
  619.  
  620.  
  621.  
  622.  
  623.  
  624.  
  625.  
  626.  
  627.  
  628.  
  629.  
  630.  
  631.  
  632.  
  633.      August 13, 1982               - 8 -                      RFC #822
  634.  
  635.  
  636.  
  637.      Standard for ARPA Internet Text Messages
  638.  
  639.  
  640.      3.2.  HEADER FIELD DEFINITIONS
  641.  
  642.           These rules show a field meta-syntax, without regard for the
  643.      particular  type  or internal syntax.  Their purpose is to permit
  644.      detection of fields; also, they present to  higher-level  parsers
  645.      an image of each field as fitting on one line.
  646.  
  647.      field       =  field-name ":" [ field-body ] CRLF
  648.  
  649.      field-name  =  1*<any CHAR, excluding CTLs, SPACE, and ":">
  650.  
  651.      field-body  =  field-body-contents
  652.                     [CRLF LWSP-char field-body]
  653.  
  654.      field-body-contents =
  655.                    <the ASCII characters making up the field-body, as
  656.                     defined in the following sections, and consisting
  657.                     of combinations of atom, quoted-string, and
  658.                     specials tokens, or else consisting of texts>
  659.  
  660.  
  661.  
  662.  
  663.  
  664.  
  665.  
  666.  
  667.  
  668.  
  669.  
  670.  
  671.  
  672.  
  673.  
  674.  
  675.  
  676.  
  677.  
  678.  
  679.  
  680.  
  681.  
  682.  
  683.  
  684.  
  685.  
  686.  
  687.  
  688.  
  689.  
  690.  
  691.      August 13, 1982               - 9 -                      RFC #822
  692.  
  693.  
  694.  
  695.      Standard for ARPA Internet Text Messages
  696.  
  697.  
  698.      3.3.  LEXICAL TOKENS
  699.  
  700.           The following rules are used to define an underlying lexical
  701.      analyzer,  which  feeds  tokens to higher level parsers.  See the
  702.      ANSI references, in the Bibliography.
  703.  
  704.                                                  ; (  Octal, Decimal.)
  705.      CHAR        =  <any ASCII character>        ; (  0-177,  0.-127.)
  706.      ALPHA       =  <any ASCII alphabetic character>
  707.                                                  ; (101-132, 65.- 90.)
  708.                                                  ; (141-172, 97.-122.)
  709.      DIGIT       =  <any ASCII decimal digit>    ; ( 60- 71, 48.- 57.)
  710.      CTL         =  <any ASCII control           ; (  0- 37,  0.- 31.)
  711.                      character and DEL>          ; (    177,     127.)
  712.      CR          =  <ASCII CR, carriage return>  ; (     15,      13.)
  713.      LF          =  <ASCII LF, linefeed>         ; (     12,      10.)
  714.      SPACE       =  <ASCII SP, space>            ; (     40,      32.)
  715.      HTAB        =  <ASCII HT, horizontal-tab>   ; (     11,       9.)
  716.      <">         =  <ASCII quote mark>           ; (     42,      34.)
  717.      CRLF        =  CR LF
  718.  
  719.      LWSP-char   =  SPACE / HTAB                 ; semantics = SPACE
  720.  
  721.      linear-white-space =  1*([CRLF] LWSP-char)  ; semantics = SPACE
  722.                                                  ; CRLF => folding
  723.  
  724.      specials    =  "(" / ")" / "<" / ">" / "@"  ; Must be in quoted-
  725.                  /  "," / ";" / ":" / "\" / <">  ;  string, to use
  726.                  /  "." / "[" / "]"              ;  within a word.
  727.  
  728.      delimiters  =  specials / linear-white-space / comment
  729.  
  730.      text        =  <any CHAR, including bare    ; => atoms, specials,
  731.                      CR & bare LF, but NOT       ;  comments and
  732.                      including CRLF>             ;  quoted-strings are
  733.                                                  ;  NOT recognized.
  734.  
  735.      atom        =  1*<any CHAR except specials, SPACE and CTLs>
  736.  
  737.      quoted-string = <"> *(qtext/quoted-pair) <">; Regular qtext or
  738.                                                  ;   quoted chars.
  739.  
  740.      qtext       =  <any CHAR excepting <">,     ; => may be folded
  741.                      "\" & CR, and including
  742.                      linear-white-space>
  743.  
  744.      domain-literal =  "[" *(dtext / quoted-pair) "]"
  745.  
  746.  
  747.  
  748.  
  749.      August 13, 1982              - 10 -                      RFC #822
  750.  
  751.  
  752.  
  753.      Standard for ARPA Internet Text Messages
  754.  
  755.  
  756.      dtext       =  <any CHAR excluding "[",     ; => may be folded
  757.                      "]", "\" & CR, & including
  758.                      linear-white-space>
  759.  
  760.      comment     =  "(" *(ctext / quoted-pair / comment) ")"
  761.  
  762.      ctext       =  <any CHAR excluding "(",     ; => may be folded
  763.                      ")", "\" & CR, & including
  764.                      linear-white-space>
  765.  
  766.      quoted-pair =  "\" CHAR                     ; may quote any char
  767.  
  768.      phrase      =  1*word                       ; Sequence of words
  769.  
  770.      word        =  atom / quoted-string
  771.  
  772.  
  773.      3.4.  CLARIFICATIONS
  774.  
  775.      3.4.1.  QUOTING
  776.  
  777.         Some characters are reserved for special interpretation,  such
  778.         as  delimiting lexical tokens.  To permit use of these charac-
  779.         ters as uninterpreted data, a quoting mechanism  is  provided.
  780.         To quote a character, precede it with a backslash ("\").
  781.  
  782.         This mechanism is not fully general.  Characters may be quoted
  783.         only  within  a subset of the lexical constructs.  In particu-
  784.         lar, quoting is limited to use within:
  785.  
  786.                              -  quoted-string
  787.                              -  domain-literal
  788.                              -  comment
  789.  
  790.         Within these constructs, quoting is REQUIRED for  CR  and  "\"
  791.         and for the character(s) that delimit the token (e.g., "(" and
  792.         ")" for a comment).  However, quoting  is  PERMITTED  for  any
  793.         character.
  794.  
  795.         Note:  In particular, quoting is NOT permitted  within  atoms.
  796.                For  example  when  the local-part of an addr-spec must
  797.                contain a special character, a quoted  string  must  be
  798.                used.  Therefore, a specification such as:
  799.  
  800.                             Full\ Name@Domain
  801.  
  802.                is not legal and must be specified as:
  803.  
  804.                             "Full Name"@Domain
  805.  
  806.  
  807.      August 13, 1982              - 11 -                      RFC #822
  808.  
  809.  
  810.  
  811.      Standard for ARPA Internet Text Messages
  812.  
  813.  
  814.      3.4.2.  WHITE SPACE
  815.  
  816.         Note:  In structured field bodies, multiple linear space ASCII
  817.                characters  (namely  HTABs  and  SPACEs) are treated as
  818.                single spaces and may freely surround any  symbol.   In
  819.                all header fields, the only place in which at least one
  820.                LWSP-char is REQUIRED is at the beginning of  continua-
  821.                tion lines in a folded field.
  822.  
  823.         When passing text to processes  that  do  not  interpret  text
  824.         according to this standard (e.g., mail protocol servers), then
  825.         NO linear-white-space characters should occur between a period
  826.         (".") or at-sign ("@") and a <word>.  Exactly ONE SPACE should
  827.         be used in place of arbitrary linear-white-space  and  comment
  828.         sequences.
  829.  
  830.         Note:  Within systems conforming to this standard, wherever  a
  831.                member of the list of delimiters is allowed, LWSP-chars
  832.                may also occur before and/or after it.
  833.  
  834.         Writers of  mail-sending  (i.e.,  header-generating)  programs
  835.         should realize that there is no network-wide definition of the
  836.         effect of ASCII HT (horizontal-tab) characters on the  appear-
  837.         ance  of  text  at another network host; therefore, the use of
  838.         tabs in message headers, though permitted, is discouraged.
  839.  
  840.      3.4.3.  COMMENTS
  841.  
  842.         A comment is a set of ASCII characters, which is  enclosed  in
  843.         matching  parentheses  and which is not within a quoted-string
  844.         The comment construct permits message originators to add  text
  845.         which  will  be  useful  for  human readers, but which will be
  846.         ignored by the formal semantics.  Comments should be  retained
  847.         while  the  message  is subject to interpretation according to
  848.         this standard.  However, comments  must  NOT  be  included  in
  849.         other  cases,  such  as  during  protocol  exchanges with mail
  850.         servers.
  851.  
  852.         Comments nest, so that if an unquoted left parenthesis  occurs
  853.         in  a  comment  string,  there  must  also be a matching right
  854.         parenthesis.  When a comment acts as the delimiter  between  a
  855.         sequence of two lexical symbols, such as two atoms, it is lex-
  856.         ically equivalent with a single SPACE,  for  the  purposes  of
  857.         regenerating  the  sequence, such as when passing the sequence
  858.         onto a mail protocol server.  Comments are  detected  as  such
  859.         only within field-bodies of structured fields.
  860.  
  861.         If a comment is to be "folded" onto multiple lines,  then  the
  862.         syntax  for  folding  must  be  adhered to.  (See the "Lexical
  863.  
  864.  
  865.      August 13, 1982              - 12 -                      RFC #822
  866.  
  867.  
  868.  
  869.      Standard for ARPA Internet Text Messages
  870.  
  871.  
  872.         Analysis of Messages" section on "Folding Long Header  Fields"
  873.         above,  and  the  section on "Case Independence" below.)  Note
  874.         that  the  official  semantics  therefore  do  not  "see"  any
  875.         unquoted CRLFs that are in comments, although particular pars-
  876.         ing programs may wish to note their presence.  For these  pro-
  877.         grams,  it would be reasonable to interpret a "CRLF LWSP-char"
  878.         as being a CRLF that is part of the comment; i.e., the CRLF is
  879.         kept  and  the  LWSP-char is discarded.  Quoted CRLFs (i.e., a
  880.         backslash followed by a CR followed by a  LF)  still  must  be
  881.         followed by at least one LWSP-char.
  882.  
  883.      3.4.4.  DELIMITING AND QUOTING CHARACTERS
  884.  
  885.         The quote character (backslash) and  characters  that  delimit
  886.         syntactic  units  are not, generally, to be taken as data that
  887.         are part of the delimited or quoted unit(s).   In  particular,
  888.         the   quotation-marks   that   define   a  quoted-string,  the
  889.         parentheses that define  a  comment  and  the  backslash  that
  890.         quotes  a  following  character  are  NOT  part of the quoted-
  891.         string, comment or quoted character.  A quotation-mark that is
  892.         to  be  part  of  a quoted-string, a parenthesis that is to be
  893.         part of a comment and a backslash that is to be part of either
  894.         must  each be preceded by the quote-character backslash ("\").
  895.         Note that the syntax allows any character to be quoted  within
  896.         a  quoted-string  or  comment; however only certain characters
  897.         MUST be quoted to be included as data.  These  characters  are
  898.         the  ones that are not part of the alternate text group (i.e.,
  899.         ctext or qtext).
  900.  
  901.         The one exception to this rule  is  that  a  single  SPACE  is
  902.         assumed  to  exist  between  contiguous words in a phrase, and
  903.         this interpretation is independent of  the  actual  number  of
  904.         LWSP-chars  that  the  creator  places  between the words.  To
  905.         include more than one SPACE, the creator must make  the  LWSP-
  906.         chars be part of a quoted-string.
  907.  
  908.         Quotation marks that delimit a quoted string  and  backslashes
  909.         that  quote  the  following character should NOT accompany the
  910.         quoted-string when the string is passed to processes  that  do
  911.         not interpret data according to this specification (e.g., mail
  912.         protocol servers).
  913.  
  914.      3.4.5.  QUOTED-STRINGS
  915.  
  916.         Where permitted (i.e., in words in structured fields)  quoted-
  917.         strings  are  treated  as a single symbol.  That is, a quoted-
  918.         string is equivalent to an atom, syntactically.  If a  quoted-
  919.         string  is to be "folded" onto multiple lines, then the syntax
  920.         for folding must be adhered to.  (See the "Lexical Analysis of
  921.  
  922.  
  923.      August 13, 1982              - 13 -                      RFC #822
  924.  
  925.  
  926.  
  927.      Standard for ARPA Internet Text Messages
  928.  
  929.  
  930.         Messages"  section  on "Folding Long Header Fields" above, and
  931.         the section on "Case  Independence"  below.)   Therefore,  the
  932.         official  semantics  do  not  "see" any bare CRLFs that are in
  933.         quoted-strings; however particular parsing programs  may  wish
  934.         to  note  their presence.  For such programs, it would be rea-
  935.         sonable to interpret a "CRLF LWSP-char" as being a CRLF  which
  936.         is  part  of the quoted-string; i.e., the CRLF is kept and the
  937.         LWSP-char is discarded.  Quoted CRLFs (i.e., a backslash  fol-
  938.         lowed  by  a CR followed by a LF) are also subject to rules of
  939.         folding, but the presence of the quoting character (backslash)
  940.         explicitly  indicates  that  the  CRLF  is  data to the quoted
  941.         string.  Stripping off the first following LWSP-char  is  also
  942.         appropriate when parsing quoted CRLFs.
  943.  
  944.      3.4.6.  BRACKETING CHARACTERS
  945.  
  946.         There is one type of bracket which must occur in matched pairs
  947.         and may have pairs nested within each other:
  948.  
  949.             o   Parentheses ("(" and ")") are used  to  indicate  com-
  950.                 ments.
  951.  
  952.         There are three types of brackets which must occur in  matched
  953.         pairs, and which may NOT be nested:
  954.  
  955.             o   Colon/semi-colon (":" and ";") are   used  in  address
  956.                 specifications  to  indicate that the included list of
  957.                 addresses are to be treated as a group.
  958.  
  959.             o   Angle brackets ("<" and ">")  are  generally  used  to
  960.                 indicate  the  presence of a one machine-usable refer-
  961.                 ence (e.g., delimiting mailboxes), possibly  including
  962.                 source-routing to the machine.
  963.  
  964.             o   Square brackets ("[" and "]") are used to indicate the
  965.                 presence  of  a  domain-literal, which the appropriate
  966.                 name-domain  is  to  use  directly,  bypassing  normal
  967.                 name-resolution mechanisms.
  968.  
  969.      3.4.7.  CASE INDEPENDENCE
  970.  
  971.         Except as noted, alphabetic strings may be represented in  any
  972.         combination of upper and lower case.  The only syntactic units
  973.  
  974.  
  975.  
  976.  
  977.  
  978.  
  979.  
  980.  
  981.      August 13, 1982              - 14 -                      RFC #822
  982.  
  983.  
  984.  
  985.      Standard for ARPA Internet Text Messages
  986.  
  987.  
  988.         which requires preservation of case information are:
  989.  
  990.                     -  text
  991.                     -  qtext
  992.                     -  dtext
  993.                     -  ctext
  994.                     -  quoted-pair
  995.                     -  local-part, except "Postmaster"
  996.  
  997.         When matching any other syntactic unit, case is to be ignored.
  998.         For  example, the field-names "From", "FROM", "from", and even
  999.         "FroM" are semantically equal and should all be treated ident-
  1000.         ically.
  1001.  
  1002.         When generating these units, any mix of upper and  lower  case
  1003.         alphabetic  characters  may  be  used.  The case shown in this
  1004.         specification is suggested for message-creating processes.
  1005.  
  1006.         Note:  The reserved local-part address unit, "Postmaster",  is
  1007.                an  exception.   When  the  value "Postmaster" is being
  1008.                interpreted, it must be  accepted  in  any  mixture  of
  1009.                case, including "POSTMASTER", and "postmaster".
  1010.  
  1011.      3.4.8.  FOLDING LONG HEADER FIELDS
  1012.  
  1013.         Each header field may be represented on exactly one line  con-
  1014.         sisting  of the name of the field and its body, and terminated
  1015.         by a CRLF; this is what the parser sees.  For readability, the
  1016.         field-body  portion of long header fields may be "folded" onto
  1017.         multiple lines of the actual field.  "Long" is commonly inter-
  1018.         preted  to  mean greater than 65 or 72 characters.  The former
  1019.         length serves as a limit, when the message is to be viewed  on
  1020.         most  simple terminals which use simple display software; how-
  1021.         ever, the limit is not imposed by this standard.
  1022.  
  1023.         Note:  Some display software often can selectively fold lines,
  1024.                to  suit  the display terminal.  In such cases, sender-
  1025.                provided  folding  can  interfere  with   the   display
  1026.                software.
  1027.  
  1028.      3.4.9.  BACKSPACE CHARACTERS
  1029.  
  1030.         ASCII BS characters (Backspace, decimal 8) may be included  in
  1031.         texts and quoted-strings to effect overstriking.  However, any
  1032.         use of backspaces which effects an overstrike to the  left  of
  1033.         the beginning of the text or quoted-string is prohibited.
  1034.  
  1035.  
  1036.  
  1037.  
  1038.  
  1039.      August 13, 1982              - 15 -                      RFC #822
  1040.  
  1041.  
  1042.  
  1043.      Standard for ARPA Internet Text Messages
  1044.  
  1045.  
  1046.      3.4.10.  NETWORK-SPECIFIC TRANSFORMATIONS
  1047.  
  1048.         During transmission through heterogeneous networks, it may  be
  1049.         necessary  to  force data to conform to a network's local con-
  1050.         ventions.  For example, it may be required that a CR  be  fol-
  1051.         lowed  either by LF, making a CRLF, or by <null>, if the CR is
  1052.         to stand alone).  Such transformations are reversed, when  the
  1053.         message exits that network.
  1054.  
  1055.         When  crossing  network  boundaries,  the  message  should  be
  1056.         treated  as  passing  through  two modules.  It will enter the
  1057.         first module containing whatever network-specific  transforma-
  1058.         tions  that  were  necessary  to  permit migration through the
  1059.         "current" network.  It then passes through the modules:
  1060.  
  1061.             o   Transformation Reversal
  1062.  
  1063.                 The "current" network's idiosyncracies are removed and
  1064.                 the  message  is returned to the canonical form speci-
  1065.                 fied in this standard.
  1066.  
  1067.             o   Transformation
  1068.  
  1069.                 The "next" network's local idiosyncracies are  imposed
  1070.                 on the message.
  1071.  
  1072.                                 ------------------
  1073.                     From   ==>  | Remove Net-A   |
  1074.                     Net-A       | idiosyncracies |
  1075.                                 ------------------
  1076.                                        ||
  1077.                                        \/
  1078.                                   Conformance
  1079.                                   with standard
  1080.                                        ||
  1081.                                        \/
  1082.                                 ------------------
  1083.                                 | Impose Net-B   |  ==>  To
  1084.                                 | idiosyncracies |       Net-B
  1085.                                 ------------------
  1086.  
  1087.  
  1088.  
  1089.  
  1090.  
  1091.  
  1092.  
  1093.  
  1094.  
  1095.  
  1096.  
  1097.      August 13, 1982              - 16 -                      RFC #822
  1098.  
  1099.  
  1100.  
  1101.      Standard for ARPA Internet Text Messages
  1102.  
  1103.  
  1104.      4.  MESSAGE SPECIFICATION
  1105.  
  1106.      4.1.  SYNTAX
  1107.  
  1108.      Note:  Due to an artifact of the notational conventions, the syn-
  1109.             tax  indicates that, when present, some fields, must be in
  1110.             a particular order.  Header fields  are  NOT  required  to
  1111.             occur  in  any  particular  order, except that the message
  1112.             body must occur AFTER  the  headers.   It  is  recommended
  1113.             that,  if  present,  headers be sent in the order "Return-
  1114.             Path", "Received", "Date",  "From",  "Subject",  "Sender",
  1115.             "To", "cc", etc.
  1116.  
  1117.             This specification permits multiple  occurrences  of  most
  1118.             fields.   Except  as  noted,  their  interpretation is not
  1119.             specified here, and their use is discouraged.
  1120.  
  1121.           The following syntax for the bodies of various fields should
  1122.      be  thought  of  as  describing  each field body as a single long
  1123.      string (or line).  The "Lexical Analysis of Message"  section  on
  1124.      "Long  Header Fields", above, indicates how such long strings can
  1125.      be represented on more than one line in  the  actual  transmitted
  1126.      message.
  1127.  
  1128.      message     =  fields *( CRLF *text )       ; Everything after
  1129.                                                  ;  first null line
  1130.                                                  ;  is message body
  1131.  
  1132.      fields      =    dates                      ; Creation time,
  1133.                       source                     ;  author id & one
  1134.                     1*destination                ;  address required
  1135.                      *optional-field             ;  others optional
  1136.  
  1137.      source      = [  trace ]                    ; net traversals
  1138.                       originator                 ; original mail
  1139.                    [  resent ]                   ; forwarded
  1140.  
  1141.      trace       =    return                     ; path to sender
  1142.                     1*received                   ; receipt tags
  1143.  
  1144.      return      =  "Return-path" ":" route-addr ; return address
  1145.  
  1146.      received    =  "Received"    ":"            ; one per relay
  1147.                        ["from" domain]           ; sending host
  1148.                        ["by"   domain]           ; receiving host
  1149.                        ["via"  atom]             ; physical path
  1150.                       *("with" atom)             ; link/mail protocol
  1151.                        ["id"   msg-id]           ; receiver msg id
  1152.                        ["for"  addr-spec]        ; initial form
  1153.  
  1154.  
  1155.      August 13, 1982              - 17 -                      RFC #822
  1156.  
  1157.  
  1158.  
  1159.      Standard for ARPA Internet Text Messages
  1160.  
  1161.  
  1162.                         ";"    date-time         ; time received
  1163.  
  1164.      originator  =   authentic                   ; authenticated addr
  1165.                    [ "Reply-To"   ":" 1#address] )
  1166.  
  1167.      authentic   =   "From"       ":"   mailbox  ; Single author
  1168.                  / ( "Sender"     ":"   mailbox  ; Actual submittor
  1169.                      "From"       ":" 1#mailbox) ; Multiple authors
  1170.                                                  ;  or not sender
  1171.  
  1172.      resent      =   resent-authentic
  1173.                    [ "Resent-Reply-To"  ":" 1#address] )
  1174.  
  1175.      resent-authentic =
  1176.                  =   "Resent-From"      ":"   mailbox
  1177.                  / ( "Resent-Sender"    ":"   mailbox
  1178.                      "Resent-From"      ":" 1#mailbox  )
  1179.  
  1180.      dates       =   orig-date                   ; Original
  1181.                    [ resent-date ]               ; Forwarded
  1182.  
  1183.      orig-date   =  "Date"        ":"   date-time
  1184.  
  1185.      resent-date =  "Resent-Date" ":"   date-time
  1186.  
  1187.      destination =  "To"          ":" 1#address  ; Primary
  1188.                  /  "Resent-To"   ":" 1#address
  1189.                  /  "cc"          ":" 1#address  ; Secondary
  1190.                  /  "Resent-cc"   ":" 1#address
  1191.                  /  "bcc"         ":"  #address  ; Blind carbon
  1192.                  /  "Resent-bcc"  ":"  #address
  1193.  
  1194.      optional-field =
  1195.                  /  "Message-ID"        ":"   msg-id
  1196.                  /  "Resent-Message-ID" ":"   msg-id
  1197.                  /  "In-Reply-To"       ":"  *(phrase / msg-id)
  1198.                  /  "References"        ":"  *(phrase / msg-id)
  1199.                  /  "Keywords"          ":"  #phrase
  1200.                  /  "Subject"           ":"  *text
  1201.                  /  "Comments"          ":"  *text
  1202.                  /  "Encrypted"         ":" 1#2word
  1203.                  /  extension-field              ; To be defined
  1204.                  /  user-defined-field           ; May be pre-empted
  1205.  
  1206.      msg-id      =  "<" addr-spec ">"            ; Unique message id
  1207.  
  1208.  
  1209.  
  1210.  
  1211.  
  1212.  
  1213.      August 13, 1982              - 18 -                      RFC #822
  1214.  
  1215.  
  1216.  
  1217.      Standard for ARPA Internet Text Messages
  1218.  
  1219.  
  1220.      extension-field =
  1221.                    <Any field which is defined in a document
  1222.                     published as a formal extension to this
  1223.                     specification; none will have names beginning
  1224.                     with the string "X-">
  1225.  
  1226.      user-defined-field =
  1227.                    <Any field which has not been defined
  1228.                     in this specification or published as an
  1229.                     extension to this specification; names for
  1230.                     such fields must be unique and may be
  1231.                     pre-empted by published extensions>
  1232.  
  1233.      4.2.  FORWARDING
  1234.  
  1235.           Some systems permit mail recipients to  forward  a  message,
  1236.      retaining  the original headers, by adding some new fields.  This
  1237.      standard supports such a service, through the "Resent-" prefix to
  1238.      field names.
  1239.  
  1240.           Whenever the string "Resent-" begins a field name, the field
  1241.      has  the  same  semantics as a field whose name does not have the
  1242.      prefix.  However, the message is assumed to have  been  forwarded
  1243.      by  an original recipient who attached the "Resent-" field.  This
  1244.      new field is treated as being more recent  than  the  equivalent,
  1245.      original  field.   For  example, the "Resent-From", indicates the
  1246.      person that forwarded the message, whereas the "From" field indi-
  1247.      cates the original author.
  1248.  
  1249.           Use of such precedence  information  depends  upon  partici-
  1250.      pants'  communication needs.  For example, this standard does not
  1251.      dictate when a "Resent-From:" address should receive replies,  in
  1252.      lieu of sending them to the "From:" address.
  1253.  
  1254.      Note:  In general, the "Resent-" fields should be treated as con-
  1255.             taining  a  set  of information that is independent of the
  1256.             set of original fields.  Information for  one  set  should
  1257.             not  automatically be taken from the other.  The interpre-
  1258.             tation of multiple "Resent-" fields, of the same type,  is
  1259.             undefined.
  1260.  
  1261.           In the remainder of this specification, occurrence of  legal
  1262.      "Resent-"  fields  are treated identically with the occurrence of
  1263.  
  1264.  
  1265.  
  1266.  
  1267.  
  1268.  
  1269.  
  1270.  
  1271.      August 13, 1982              - 19 -                      RFC #822
  1272.  
  1273.  
  1274.  
  1275.      Standard for ARPA Internet Text Messages
  1276.  
  1277.  
  1278.      fields whose names do not contain this prefix.
  1279.  
  1280.      4.3.  TRACE FIELDS
  1281.  
  1282.           Trace information is used to provide an audit trail of  mes-
  1283.      sage  handling.   In  addition,  it indicates a route back to the
  1284.      sender of the message.
  1285.  
  1286.           The list of known "via" and  "with"  values  are  registered
  1287.      with  the  Network  Information  Center, SRI International, Menlo
  1288.      Park, California.
  1289.  
  1290.      4.3.1.  RETURN-PATH
  1291.  
  1292.         This field  is  added  by  the  final  transport  system  that
  1293.         delivers  the message to its recipient.  The field is intended
  1294.         to contain definitive information about the address and  route
  1295.         back to the message's originator.
  1296.  
  1297.         Note:  The "Reply-To" field is added  by  the  originator  and
  1298.                serves  to  direct  replies,  whereas the "Return-Path"
  1299.                field is used to identify a path back to  the  origina-
  1300.                tor.
  1301.  
  1302.         While the syntax  indicates  that  a  route  specification  is
  1303.         optional,  every attempt should be made to provide that infor-
  1304.         mation in this field.
  1305.  
  1306.      4.3.2.  RECEIVED
  1307.  
  1308.         A copy of this field is added by each transport  service  that
  1309.         relays the message.  The information in the field can be quite
  1310.         useful for tracing transport problems.
  1311.  
  1312.         The names of the sending  and  receiving  hosts  and  time-of-
  1313.         receipt may be specified.  The "via" parameter may be used, to
  1314.         indicate what physical mechanism the message  was  sent  over,
  1315.         such  as  Arpanet or Phonenet, and the "with" parameter may be
  1316.         used to indicate the mail-,  or  connection-,  level  protocol
  1317.         that  was  used, such as the SMTP mail protocol, or X.25 tran-
  1318.         sport protocol.
  1319.  
  1320.         Note:  Several "with" parameters may  be  included,  to  fully
  1321.                specify the set of protocols that were used.
  1322.  
  1323.         Some transport services queue mail; the internal message iden-
  1324.         tifier that is assigned to the message may be noted, using the
  1325.         "id" parameter.  When the  sending  host  uses  a  destination
  1326.         address specification that the receiving host reinterprets, by
  1327.  
  1328.  
  1329.      August 13, 1982              - 20 -                      RFC #822
  1330.  
  1331.  
  1332.  
  1333.      Standard for ARPA Internet Text Messages
  1334.  
  1335.  
  1336.         expansion or transformation, the receiving host  may  wish  to
  1337.         record  the original specification, using the "for" parameter.
  1338.         For example, when a copy of mail is sent to the  member  of  a
  1339.         distribution  list,  this  parameter may be used to record the
  1340.         original address that was used to specify the list.
  1341.  
  1342.      4.4.  ORIGINATOR FIELDS
  1343.  
  1344.           The standard allows only a subset of the combinations possi-
  1345.      ble  with the From, Sender, Reply-To, Resent-From, Resent-Sender,
  1346.      and Resent-Reply-To fields.  The limitation is intentional.
  1347.  
  1348.      4.4.1.  FROM / RESENT-FROM
  1349.  
  1350.         This field contains the identity of the person(s)  who  wished
  1351.         this  message to be sent.  The message-creation process should
  1352.         default this field  to  be  a  single,  authenticated  machine
  1353.         address,  indicating  the  AGENT  (person,  system or process)
  1354.         entering the message.  If this is not done, the "Sender" field
  1355.         MUST  be  present.  If the "From" field IS defaulted this way,
  1356.         the "Sender" field is  optional  and  is  redundant  with  the
  1357.         "From"  field.   In  all  cases, addresses in the "From" field
  1358.         must be machine-usable (addr-specs) and may not contain  named
  1359.         lists (groups).
  1360.  
  1361.      4.4.2.  SENDER / RESENT-SENDER
  1362.  
  1363.         This field contains the authenticated identity  of  the  AGENT
  1364.         (person,  system  or  process)  that sends the message.  It is
  1365.         intended for use when the sender is not the author of the mes-
  1366.         sage,  or  to  indicate  who among a group of authors actually
  1367.         sent the message.  If the contents of the "Sender" field would
  1368.         be  completely  redundant  with  the  "From"  field,  then the
  1369.         "Sender" field need not be present and its use is  discouraged
  1370.         (though  still legal).  In particular, the "Sender" field MUST
  1371.         be present if it is NOT the same as the "From" Field.
  1372.  
  1373.         The Sender mailbox  specification  includes  a  word  sequence
  1374.         which  must correspond to a specific agent (i.e., a human user
  1375.         or a computer program) rather than a standard  address.   This
  1376.         indicates  the  expectation  that  the field will identify the
  1377.         single AGENT (person,  system,  or  process)  responsible  for
  1378.         sending  the mail and not simply include the name of a mailbox
  1379.         from which the mail was sent.  For example in the  case  of  a
  1380.         shared login name, the name, by itself, would not be adequate.
  1381.         The local-part address unit, which refers to  this  agent,  is
  1382.         expected to be a computer system term, and not (for example) a
  1383.         generalized person reference which can  be  used  outside  the
  1384.         network text message context.
  1385.  
  1386.  
  1387.      August 13, 1982              - 21 -                      RFC #822
  1388.  
  1389.  
  1390.  
  1391.      Standard for ARPA Internet Text Messages
  1392.  
  1393.  
  1394.         Since the critical function served by the  "Sender"  field  is
  1395.         identification  of  the agent responsible for sending mail and
  1396.         since computer programs cannot be held accountable  for  their
  1397.         behavior, it is strongly recommended that when a computer pro-
  1398.         gram generates a message, the HUMAN  who  is  responsible  for
  1399.         that program be referenced as part of the "Sender" field mail-
  1400.         box specification.
  1401.  
  1402.      4.4.3.  REPLY-TO / RESENT-REPLY-TO
  1403.  
  1404.         This field provides a general  mechanism  for  indicating  any
  1405.         mailbox(es)  to which responses are to be sent.  Three typical
  1406.         uses for this feature can  be  distinguished.   In  the  first
  1407.         case,  the  author(s) may not have regular machine-based mail-
  1408.         boxes and therefore wish(es) to indicate an alternate  machine
  1409.         address.   In  the  second case, an author may wish additional
  1410.         persons to be made aware of, or responsible for,  replies.   A
  1411.         somewhat  different  use  may be of some help to "text message
  1412.         teleconferencing" groups equipped with automatic  distribution
  1413.         services:   include the address of that service in the "Reply-
  1414.         To" field of all messages  submitted  to  the  teleconference;
  1415.         then  participants  can  "reply"  to conference submissions to
  1416.         guarantee the correct distribution of any submission of  their
  1417.         own.
  1418.  
  1419.         Note:  The "Return-Path" field is added by the mail  transport
  1420.                service,  at the time of final deliver.  It is intended
  1421.                to identify a path back to the orginator  of  the  mes-
  1422.                sage.   The  "Reply-To"  field  is added by the message
  1423.                originator and is intended to direct replies.
  1424.  
  1425.      4.4.4.  AUTOMATIC USE OF FROM / SENDER / REPLY-TO
  1426.  
  1427.         For systems which automatically  generate  address  lists  for
  1428.         replies to messages, the following recommendations are made:
  1429.  
  1430.             o   The "Sender" field mailbox should be sent  notices  of
  1431.                 any  problems in transport or delivery of the original
  1432.                 messages.  If there is no  "Sender"  field,  then  the
  1433.                 "From" field mailbox should be used.
  1434.  
  1435.             o   The  "Sender"  field  mailbox  should  NEVER  be  used
  1436.                 automatically, in a recipient's reply message.
  1437.  
  1438.             o   If the "Reply-To" field exists, then the reply  should
  1439.                 go to the addresses indicated in that field and not to
  1440.                 the address(es) indicated in the "From" field.
  1441.  
  1442.  
  1443.  
  1444.  
  1445.      August 13, 1982              - 22 -                      RFC #822
  1446.  
  1447.  
  1448.  
  1449.      Standard for ARPA Internet Text Messages
  1450.  
  1451.  
  1452.             o   If there is a "From" field, but no  "Reply-To"  field,
  1453.                 the  reply should be sent to the address(es) indicated
  1454.                 in the "From" field.
  1455.  
  1456.         Sometimes, a recipient may actually wish to  communicate  with
  1457.         the  person  that  initiated  the  message  transfer.  In such
  1458.         cases, it is reasonable to use the "Sender" address.
  1459.  
  1460.         This recommendation is intended  only  for  automated  use  of
  1461.         originator-fields  and is not intended to suggest that replies
  1462.         may not also be sent to other recipients of messages.   It  is
  1463.         up  to  the  respective  mail-handling programs to decide what
  1464.         additional facilities will be provided.
  1465.  
  1466.         Examples are provided in Appendix A.
  1467.  
  1468.      4.5.  RECEIVER FIELDS
  1469.  
  1470.      4.5.1.  TO / RESENT-TO
  1471.  
  1472.         This field contains the identity of the primary recipients  of
  1473.         the message.
  1474.  
  1475.      4.5.2.  CC / RESENT-CC
  1476.  
  1477.         This field contains the identity of  the  secondary  (informa-
  1478.         tional) recipients of the message.
  1479.  
  1480.      4.5.3.  BCC / RESENT-BCC
  1481.  
  1482.         This field contains the identity of additional  recipients  of
  1483.         the  message.   The contents of this field are not included in
  1484.         copies of the message sent to the primary and secondary  reci-
  1485.         pients.   Some  systems  may choose to include the text of the
  1486.         "Bcc" field only in the author(s)'s  copy,  while  others  may
  1487.         also include it in the text sent to all those indicated in the
  1488.         "Bcc" list.
  1489.  
  1490.      4.6.  REFERENCE FIELDS
  1491.  
  1492.      4.6.1.  MESSAGE-ID / RESENT-MESSAGE-ID
  1493.  
  1494.              This field contains a unique identifier  (the  local-part
  1495.         address  unit)  which  refers to THIS version of THIS message.
  1496.         The uniqueness of the message identifier is guaranteed by  the
  1497.         host  which  generates  it.  This identifier is intended to be
  1498.         machine readable and not necessarily meaningful to humans.   A
  1499.         message  identifier pertains to exactly one instantiation of a
  1500.         particular message; subsequent revisions to the message should
  1501.  
  1502.  
  1503.      August 13, 1982              - 23 -                      RFC #822
  1504.  
  1505.  
  1506.  
  1507.      Standard for ARPA Internet Text Messages
  1508.  
  1509.  
  1510.         each receive new message identifiers.
  1511.  
  1512.      4.6.2.  IN-REPLY-TO
  1513.  
  1514.              The contents of this field identify  previous  correspon-
  1515.         dence  which this message answers.  Note that if message iden-
  1516.         tifiers are used in this  field,  they  must  use  the  msg-id
  1517.         specification format.
  1518.  
  1519.      4.6.3.  REFERENCES
  1520.  
  1521.              The contents of this field identify other  correspondence
  1522.         which  this message references.  Note that if message identif-
  1523.         iers are used, they must use the msg-id specification format.
  1524.  
  1525.      4.6.4.  KEYWORDS
  1526.  
  1527.              This field contains keywords  or  phrases,  separated  by
  1528.         commas.
  1529.  
  1530.      4.7.  OTHER FIELDS
  1531.  
  1532.      4.7.1.  SUBJECT
  1533.  
  1534.              This is intended to provide a summary,  or  indicate  the
  1535.         nature, of the message.
  1536.  
  1537.      4.7.2.  COMMENTS
  1538.  
  1539.              Permits adding text comments  onto  the  message  without
  1540.         disturbing the contents of the message's body.
  1541.  
  1542.      4.7.3.  ENCRYPTED
  1543.  
  1544.              Sometimes,  data  encryption  is  used  to  increase  the
  1545.         privacy  of  message  contents.   If the body of a message has
  1546.         been encrypted, to keep its contents private, the  "Encrypted"
  1547.         field  can be used to note the fact and to indicate the nature
  1548.         of the encryption.  The first <word> parameter  indicates  the
  1549.         software  used  to  encrypt the body, and the second, optional
  1550.         <word> is intended to  aid  the  recipient  in  selecting  the
  1551.         proper  decryption  key.   This  code word may be viewed as an
  1552.         index to a table of keys held by the recipient.
  1553.  
  1554.         Note:  Unfortunately, headers must contain envelope,  as  well
  1555.                as  contents,  information.  Consequently, it is neces-
  1556.                sary that they remain unencrypted, so that  mail  tran-
  1557.                sport   services   may   access   them.   Since  names,
  1558.                addresses, and "Subject"  field  contents  may  contain
  1559.  
  1560.  
  1561.      August 13, 1982              - 24 -                      RFC #822
  1562.  
  1563.  
  1564.  
  1565.      Standard for ARPA Internet Text Messages
  1566.  
  1567.  
  1568.                sensitive  information,  this  requirement limits total
  1569.                message privacy.
  1570.  
  1571.              Names of encryption software are registered with the Net-
  1572.         work  Information Center, SRI International, Menlo Park, Cali-
  1573.         fornia.
  1574.  
  1575.      4.7.4.  EXTENSION-FIELD
  1576.  
  1577.              A limited number of common fields have  been  defined  in
  1578.         this  document.   As  network mail requirements dictate, addi-
  1579.         tional fields may be standardized.   To  provide  user-defined
  1580.         fields  with  a  measure  of  safety,  in name selection, such
  1581.         extension-fields will never have names  that  begin  with  the
  1582.         string "X-".
  1583.  
  1584.              Names of Extension-fields are registered with the Network
  1585.         Information Center, SRI International, Menlo Park, California.
  1586.  
  1587.      4.7.5.  USER-DEFINED-FIELD
  1588.  
  1589.              Individual users of network mail are free to  define  and
  1590.         use  additional  header  fields.   Such fields must have names
  1591.         which are not already used in the current specification or  in
  1592.         any definitions of extension-fields, and the overall syntax of
  1593.         these user-defined-fields must conform to this specification's
  1594.         rules   for   delimiting  and  folding  fields.   Due  to  the
  1595.         extension-field  publishing  process,  the  name  of  a  user-
  1596.         defined-field may be pre-empted
  1597.  
  1598.         Note:  The prefatory string "X-" will never  be  used  in  the
  1599.                names  of Extension-fields.  This provides user-defined
  1600.                fields with a protected set of names.
  1601.  
  1602.  
  1603.  
  1604.  
  1605.  
  1606.  
  1607.  
  1608.  
  1609.  
  1610.  
  1611.  
  1612.  
  1613.  
  1614.  
  1615.  
  1616.  
  1617.  
  1618.  
  1619.      August 13, 1982              - 25 -                      RFC #822
  1620.  
  1621.  
  1622.  
  1623.      Standard for ARPA Internet Text Messages
  1624.  
  1625.  
  1626.      5.  DATE AND TIME SPECIFICATION
  1627.  
  1628.      5.1.  SYNTAX
  1629.  
  1630.      date-time   =  [ day "," ] date time        ; dd mm yy
  1631.                                                  ;  hh:mm:ss zzz
  1632.  
  1633.      day         =  "Mon"  / "Tue" /  "Wed"  / "Thu"
  1634.                  /  "Fri"  / "Sat" /  "Sun"
  1635.  
  1636.      date        =  1*2DIGIT month 2DIGIT        ; day month year
  1637.                                                  ;  e.g. 20 Jun 82
  1638.  
  1639.      month       =  "Jan"  /  "Feb" /  "Mar"  /  "Apr"
  1640.                  /  "May"  /  "Jun" /  "Jul"  /  "Aug"
  1641.                  /  "Sep"  /  "Oct" /  "Nov"  /  "Dec"
  1642.  
  1643.      time        =  hour zone                    ; ANSI and Military
  1644.  
  1645.      hour        =  2DIGIT ":" 2DIGIT [":" 2DIGIT]
  1646.                                                  ; 00:00:00 - 23:59:59
  1647.  
  1648.      zone        =  "UT"  / "GMT"                ; Universal Time
  1649.                                                  ; North American : UT
  1650.                  /  "EST" / "EDT"                ;  Eastern:  - 5/ - 4
  1651.                  /  "CST" / "CDT"                ;  Central:  - 6/ - 5
  1652.                  /  "MST" / "MDT"                ;  Mountain: - 7/ - 6
  1653.                  /  "PST" / "PDT"                ;  Pacific:  - 8/ - 7
  1654.                  /  1ALPHA                       ; Military: Z = UT;
  1655.                                                  ;  A:-1; (J not used)
  1656.                                                  ;  M:-12; N:+1; Y:+12
  1657.                  / ( ("+" / "-") 4DIGIT )        ; Local differential
  1658.                                                  ;  hours+min. (HHMM)
  1659.  
  1660.      5.2.  SEMANTICS
  1661.  
  1662.           If included, day-of-week must be the day implied by the date
  1663.      specification.
  1664.  
  1665.           Time zone may be indicated in several ways.  "UT" is Univer-
  1666.      sal  Time  (formerly called "Greenwich Mean Time"); "GMT" is per-
  1667.      mitted as a reference to Universal Time.  The  military  standard
  1668.      uses  a  single  character for each zone.  "Z" is Universal Time.
  1669.      "A" indicates one hour earlier, and "M" indicates 12  hours  ear-
  1670.      lier;  "N"  is  one  hour  later, and "Y" is 12 hours later.  The
  1671.      letter "J" is not used.  The other remaining two forms are  taken
  1672.      from ANSI standard X3.51-1975.  One allows explicit indication of
  1673.      the amount of offset from UT; the other uses  common  3-character
  1674.      strings for indicating time zones in North America.
  1675.  
  1676.  
  1677.      August 13, 1982              - 26 -                      RFC #822
  1678.  
  1679.  
  1680.  
  1681.      Standard for ARPA Internet Text Messages
  1682.  
  1683.  
  1684.      6.  ADDRESS SPECIFICATION
  1685.  
  1686.      6.1.  SYNTAX
  1687.  
  1688.      address     =  mailbox                      ; one addressee
  1689.                  /  group                        ; named list
  1690.  
  1691.      group       =  phrase ":" [#mailbox] ";"
  1692.  
  1693.      mailbox     =  addr-spec                    ; simple address
  1694.                  /  phrase route-addr            ; name & addr-spec
  1695.  
  1696.      route-addr  =  "<" [route] addr-spec ">"
  1697.  
  1698.      route       =  1#("@" domain) ":"           ; path-relative
  1699.  
  1700.      addr-spec   =  local-part "@" domain        ; global address
  1701.  
  1702.      local-part  =  word *("." word)             ; uninterpreted
  1703.                                                  ; case-preserved
  1704.  
  1705.      domain      =  sub-domain *("." sub-domain)
  1706.  
  1707.      sub-domain  =  domain-ref / domain-literal
  1708.  
  1709.      domain-ref  =  atom                         ; symbolic reference
  1710.  
  1711.      6.2.  SEMANTICS
  1712.  
  1713.           A mailbox receives mail.  It is a  conceptual  entity  which
  1714.      does  not necessarily pertain to file storage.  For example, some
  1715.      sites may choose to print mail on their line printer and  deliver
  1716.      the output to the addressee's desk.
  1717.  
  1718.           A mailbox specification comprises a person, system  or  pro-
  1719.      cess name reference, a domain-dependent string, and a name-domain
  1720.      reference.  The name reference is optional and is usually used to
  1721.      indicate  the  human name of a recipient.  The name-domain refer-
  1722.      ence specifies a sequence of sub-domains.   The  domain-dependent
  1723.      string is uninterpreted, except by the final sub-domain; the rest
  1724.      of the mail service merely transmits it as a literal string.
  1725.  
  1726.      6.2.1.  DOMAINS
  1727.  
  1728.         A name-domain is a set of registered (mail)  names.   A  name-
  1729.         domain  specification  resolves  to  a subordinate name-domain
  1730.         specification  or  to  a  terminal  domain-dependent   string.
  1731.         Hence,  domain  specification  is  extensible,  permitting any
  1732.         number of registration levels.
  1733.  
  1734.  
  1735.      August 13, 1982              - 27 -                      RFC #822
  1736.  
  1737.  
  1738.  
  1739.      Standard for ARPA Internet Text Messages
  1740.  
  1741.  
  1742.         Name-domains model a global, logical, hierarchical  addressing
  1743.         scheme.   The  model is logical, in that an address specifica-
  1744.         tion is related to name registration and  is  not  necessarily
  1745.         tied  to  transmission  path.   The  model's  hierarchy  is  a
  1746.         directed graph, called an in-tree, such that there is a single
  1747.         path  from  the root of the tree to any node in the hierarchy.
  1748.         If more than one path actually exists, they are considered  to
  1749.         be different addresses.
  1750.  
  1751.         The root node is common to all addresses; consequently, it  is
  1752.         not  referenced.   Its  children  constitute "top-level" name-
  1753.         domains.  Usually, a service has access to its own full domain
  1754.         specification and to the names of all top-level name-domains.
  1755.  
  1756.         The "top" of the domain addressing hierarchy -- a child of the
  1757.         root  --  is  indicated  by  the right-most field, in a domain
  1758.         specification.  Its child is specified to the left, its  child
  1759.         to the left, and so on.
  1760.  
  1761.         Some groups provide formal registration services;  these  con-
  1762.         stitute   name-domains   that  are  independent  logically  of
  1763.         specific machines.  In addition, networks and machines  impli-
  1764.         citly  compose name-domains, since their membership usually is
  1765.         registered in name tables.
  1766.  
  1767.         In the case of formal registration, an organization implements
  1768.         a  (distributed)  data base which provides an address-to-route
  1769.         mapping service for addresses of the form:
  1770.  
  1771.                          person@registry.organization
  1772.  
  1773.         Note that "organization" is a logical  entity,  separate  from
  1774.         any particular communication network.
  1775.  
  1776.         A mechanism for accessing "organization" is universally avail-
  1777.         able.   That mechanism, in turn, seeks an instantiation of the
  1778.         registry; its location is not indicated in the address specif-
  1779.         ication.   It  is assumed that the system which operates under
  1780.         the name "organization" knows how to find a subordinate regis-
  1781.         try.  The registry will then use the "person" string to deter-
  1782.         mine where to send the mail specification.
  1783.  
  1784.         The latter,  network-oriented  case  permits  simple,  direct,
  1785.         attachment-related address specification, such as:
  1786.  
  1787.                               user@host.network
  1788.  
  1789.         Once the network is accessed, it is expected  that  a  message
  1790.         will  go  directly  to the host and that the host will resolve
  1791.  
  1792.  
  1793.      August 13, 1982              - 28 -                      RFC #822
  1794.  
  1795.  
  1796.  
  1797.      Standard for ARPA Internet Text Messages
  1798.  
  1799.  
  1800.         the user name, placing the message in the user's mailbox.
  1801.  
  1802.      6.2.2.  ABBREVIATED DOMAIN SPECIFICATION
  1803.  
  1804.         Since any number of  levels  is  possible  within  the  domain
  1805.         hierarchy,  specification  of  a  fully  qualified address can
  1806.         become inconvenient.  This standard permits abbreviated domain
  1807.         specification, in a special case:
  1808.  
  1809.             For the address of  the  sender,  call  the  left-most
  1810.             sub-domain  Level  N.   In a header address, if all of
  1811.             the sub-domains above (i.e., to the right of) Level  N
  1812.             are  the same as those of the sender, then they do not
  1813.             have to appear in the specification.   Otherwise,  the
  1814.             address must be fully qualified.
  1815.  
  1816.             This feature is subject  to  approval  by  local  sub-
  1817.             domains.   Individual  sub-domains  may  require their
  1818.             member systems, which originate mail, to provide  full
  1819.             domain  specification only.  When permitted, abbrevia-
  1820.             tions may be present  only  while  the  message  stays
  1821.             within the sub-domain of the sender.
  1822.  
  1823.             Use of this mechanism requires the sender's sub-domain
  1824.             to reserve the names of all top-level domains, so that
  1825.             full specifications can be distinguished from abbrevi-
  1826.             ated specifications.
  1827.  
  1828.         For example, if a sender's address is:
  1829.  
  1830.                  sender@registry-A.registry-1.organization-X
  1831.  
  1832.         and one recipient's address is:
  1833.  
  1834.                 recipient@registry-B.registry-1.organization-X
  1835.  
  1836.         and another's is:
  1837.  
  1838.                 recipient@registry-C.registry-2.organization-X
  1839.  
  1840.         then ".registry-1.organization-X" need not be specified in the
  1841.         the  message,  but  "registry-C.registry-2"  DOES  have  to be
  1842.         specified.  That is, the first two addresses may  be  abbrevi-
  1843.         ated, but the third address must be fully specified.
  1844.  
  1845.         When a message crosses a domain boundary, all  addresses  must
  1846.         be  specified  in  the  full format, ending with the top-level
  1847.         name-domain in the right-most field.  It is the responsibility
  1848.         of  mail  forwarding services to ensure that addresses conform
  1849.  
  1850.  
  1851.      August 13, 1982              - 29 -                      RFC #822
  1852.  
  1853.  
  1854.  
  1855.      Standard for ARPA Internet Text Messages
  1856.  
  1857.  
  1858.         with this requirement.  In the case of abbreviated  addresses,
  1859.         the  relaying  service must make the necessary expansions.  It
  1860.         should be noted that it often is difficult for such a  service
  1861.         to locate all occurrences of address abbreviations.  For exam-
  1862.         ple, it will not be possible to find such abbreviations within
  1863.         the  body  of  the  message.   The "Return-Path" field can aid
  1864.         recipients in recovering from these errors.
  1865.  
  1866.         Note:  When passing any portion of an addr-spec onto a process
  1867.                which  does  not interpret data according to this stan-
  1868.                dard (e.g., mail protocol servers).  There must  be  NO
  1869.                LWSP-chars  preceding  or  following the at-sign or any
  1870.                delimiting period ("."), such as  shown  in  the  above
  1871.                examples,   and   only  ONE  SPACE  between  contiguous
  1872.                <word>s.
  1873.  
  1874.      6.2.3.  DOMAIN TERMS
  1875.  
  1876.         A domain-ref must be THE official name of a registry, network,
  1877.         or  host.   It  is  a  symbolic  reference, within a name sub-
  1878.         domain.  At times, it is necessary to bypass standard  mechan-
  1879.         isms  for  resolving  such  references,  using  more primitive
  1880.         information, such as a network host address  rather  than  its
  1881.         associated host name.
  1882.  
  1883.         To permit such references, this standard provides the  domain-
  1884.         literal  construct.   Its contents must conform with the needs
  1885.         of the sub-domain in which it is interpreted.
  1886.  
  1887.         Domain-literals which refer to domains within the ARPA  Inter-
  1888.         net  specify  32-bit  Internet addresses, in four 8-bit fields
  1889.         noted in decimal, as described in Request for  Comments  #820,
  1890.         "Assigned Numbers."  For example:
  1891.  
  1892.                                  [10.0.3.19]
  1893.  
  1894.         Note:  THE USE OF DOMAIN-LITERALS IS STRONGLY DISCOURAGED.  It
  1895.                is  permitted  only  as  a means of bypassing temporary
  1896.                system limitations, such as name tables which  are  not
  1897.                complete.
  1898.  
  1899.         The names of "top-level" domains, and  the  names  of  domains
  1900.         under  in  the  ARPA Internet, are registered with the Network
  1901.         Information Center, SRI International, Menlo Park, California.
  1902.  
  1903.      6.2.4.  DOMAIN-DEPENDENT LOCAL STRING
  1904.  
  1905.         The local-part of an  addr-spec  in  a  mailbox  specification
  1906.         (i.e.,  the  host's  name for the mailbox) is understood to be
  1907.  
  1908.  
  1909.      August 13, 1982              - 30 -                      RFC #822
  1910.  
  1911.  
  1912.  
  1913.      Standard for ARPA Internet Text Messages
  1914.  
  1915.  
  1916.         whatever the receiving mail protocol server allows.  For exam-
  1917.         ple,  some systems do not understand mailbox references of the
  1918.         form "P. D. Q. Bach", but others do.
  1919.  
  1920.         This specification treats periods (".") as lexical separators.
  1921.         Hence,  their  presence  in  local-parts which are not quoted-
  1922.         strings, is detected.   However,  such  occurrences  carry  NO
  1923.         semantics.  That is, if a local-part has periods within it, an
  1924.         address parser will divide the local-part into several tokens,
  1925.         but  the  sequence  of  tokens will be treated as one uninter-
  1926.         preted unit.  The sequence  will  be  re-assembled,  when  the
  1927.         address is passed outside of the system such as to a mail pro-
  1928.         tocol service.
  1929.  
  1930.         For example, the address:
  1931.  
  1932.                            First.Last@Registry.Org
  1933.  
  1934.         is legal and does not require the local-part to be  surrounded
  1935.         with  quotation-marks.   (However,  "First  Last" DOES require
  1936.         quoting.)  The local-part of the address, when passed  outside
  1937.         of  the  mail  system,  within  the  Registry.Org  domain,  is
  1938.         "First.Last", again without quotation marks.
  1939.  
  1940.      6.2.5.  BALANCING LOCAL-PART AND DOMAIN
  1941.  
  1942.         In some cases, the boundary between local-part and domain  can
  1943.         be  flexible.  The local-part may be a simple string, which is
  1944.         used for the final determination of the  recipient's  mailbox.
  1945.         All  other  levels  of  reference  are, therefore, part of the
  1946.         domain.
  1947.  
  1948.         For some systems, in the case of abbreviated reference to  the
  1949.         local  and  subordinate  sub-domains,  it  may  be possible to
  1950.         specify only one reference within the domain  part  and  place
  1951.         the  other,  subordinate  name-domain  references  within  the
  1952.         local-part.  This would appear as:
  1953.  
  1954.                         mailbox.sub1.sub2@this-domain
  1955.  
  1956.         Such a specification would be acceptable  to  address  parsers
  1957.         which  conform  to  RFC  #733,  but  do not support this newer
  1958.         Internet standard.  While contrary to the intent of this stan-
  1959.         dard, the form is legal.
  1960.  
  1961.         Also, some sub-domains have a specification syntax which  does
  1962.         not conform to this standard.  For example:
  1963.  
  1964.                       sub-net.mailbox@sub-domain.domain
  1965.  
  1966.  
  1967.      August 13, 1982              - 31 -                      RFC #822
  1968.  
  1969.  
  1970.  
  1971.      Standard for ARPA Internet Text Messages
  1972.  
  1973.  
  1974.         uses a different parsing  sequence  for  local-part  than  for
  1975.         domain.
  1976.  
  1977.         Note:  As a rule,  the  domain  specification  should  contain
  1978.                fields  which  are  encoded  according to the syntax of
  1979.                this standard and which contain  generally-standardized
  1980.                information.   The local-part specification should con-
  1981.                tain only that portion of the  address  which  deviates
  1982.                from the form or intention of the domain field.
  1983.  
  1984.      6.2.6.  MULTIPLE MAILBOXES
  1985.  
  1986.         An individual may have several mailboxes and wish  to  receive
  1987.         mail  at  whatever  mailbox  is  convenient  for the sender to
  1988.         access.  This standard does not provide a means of  specifying
  1989.         "any member of" a list of mailboxes.
  1990.  
  1991.         A set of individuals may wish to receive mail as a single unit
  1992.         (i.e.,  a  distribution  list).  The <group> construct permits
  1993.         specification of such a list.  Recipient mailboxes are  speci-
  1994.         fied  within  the  bracketed  part (":" - ";").  A copy of the
  1995.         transmitted message is to be  sent  to  each  mailbox  listed.
  1996.         This  standard  does  not  permit  recursive  specification of
  1997.         groups within groups.
  1998.  
  1999.         While a list must be named, it is not required that  the  con-
  2000.         tents  of  the  list be included.  In this case, the <address>
  2001.         serves only as an indication of group distribution  and  would
  2002.         appear in the form:
  2003.  
  2004.                                     name:;
  2005.  
  2006.         Some mail  services  may  provide  a  group-list  distribution
  2007.         facility,  accepting  a single mailbox reference, expanding it
  2008.         to the full distribution list, and relaying the  mail  to  the
  2009.         list's  members.   This standard provides no additional syntax
  2010.         for indicating such a  service.   Using  the  <group>  address
  2011.         alternative,  while listing one mailbox in it, can mean either
  2012.         that the mailbox reference will be expanded to a list or  that
  2013.         there is a group with one member.
  2014.  
  2015.      6.2.7.  EXPLICIT PATH SPECIFICATION
  2016.  
  2017.         At times, a  message  originator  may  wish  to  indicate  the
  2018.         transmission  path  that  a  message  should  follow.  This is
  2019.         called source routing.  The normal addressing scheme, used  in
  2020.         an  addr-spec,  is  carefully separated from such information;
  2021.         the <route> portion of a route-addr is provided for such occa-
  2022.         sions.  It specifies the sequence of hosts and/or transmission
  2023.  
  2024.  
  2025.      August 13, 1982              - 32 -                      RFC #822
  2026.  
  2027.  
  2028.  
  2029.      Standard for ARPA Internet Text Messages
  2030.  
  2031.  
  2032.         services that are  to  be  traversed.   Both  domain-refs  and
  2033.         domain-literals may be used.
  2034.  
  2035.         Note:  The use of source routing is discouraged.   Unless  the
  2036.                sender has special need of path restriction, the choice
  2037.                of transmission route should be left to the mail  tran-
  2038.                sport service.
  2039.  
  2040.      6.3.  RESERVED ADDRESS
  2041.  
  2042.           It often is necessary to send mail to a site, without  know-
  2043.      ing  any  of its valid addresses.  For example, there may be mail
  2044.      system dysfunctions, or a user may wish to find  out  a  person's
  2045.      correct address, at that site.
  2046.  
  2047.           This standard specifies a single, reserved  mailbox  address
  2048.      (local-part)  which  is  to  be valid at each site.  Mail sent to
  2049.      that address is to be routed to  a  person  responsible  for  the
  2050.      site's mail system or to a person with responsibility for general
  2051.      site operation.  The name of the reserved local-part address is:
  2052.  
  2053.                                 Postmaster
  2054.  
  2055.      so that "Postmaster@domain" is required to be valid.
  2056.  
  2057.      Note:  This reserved local-part must be  matched  without  sensi-
  2058.             tivity to alphabetic case, so that "POSTMASTER", "postmas-
  2059.             ter", and even "poStmASteR" is to be accepted.
  2060.  
  2061.  
  2062.  
  2063.  
  2064.  
  2065.  
  2066.  
  2067.  
  2068.  
  2069.  
  2070.  
  2071.  
  2072.  
  2073.  
  2074.  
  2075.  
  2076.  
  2077.  
  2078.  
  2079.  
  2080.  
  2081.  
  2082.  
  2083.      August 13, 1982              - 33 -                      RFC #822
  2084.  
  2085.  
  2086.  
  2087.      Standard for ARPA Internet Text Messages
  2088.  
  2089.  
  2090.      7.  BIBLIOGRAPHY
  2091.  
  2092.  
  2093.      ANSI.  "USA Standard Code  for  Information  Interchange,"  X3.4.
  2094.         American  National Standards Institute: New York (1968).  Also
  2095.         in:  Feinler, E.  and J. Postel, eds., "ARPANET Protocol Hand-
  2096.         book", NIC 7104.
  2097.  
  2098.      ANSI.  "Representations of Universal Time, Local  Time  Differen-
  2099.         tials,  and United States Time Zone References for Information
  2100.         Interchange," X3.51-1975.  American National Standards  Insti-
  2101.         tute:  New York (1975).
  2102.  
  2103.      Bemer, R.W., "Time and the Computer."  In:  Interface  Age  (Feb.
  2104.         1979).
  2105.  
  2106.      Bennett, C.J.  "JNT Mail Protocol".  Joint Network Team,  Ruther-
  2107.         ford and Appleton Laboratory:  Didcot, England.
  2108.  
  2109.      Bhushan, A.K., Pogran, K.T., Tomlinson,  R.S.,  and  White,  J.E.
  2110.         "Standardizing  Network  Mail  Headers,"   ARPANET Request for
  2111.         Comments No. 561, Network Information Center  No.  18516;  SRI
  2112.         International:  Menlo Park (September 1973).
  2113.  
  2114.      Birrell, A.D., Levin, R.,  Needham,  R.M.,  and  Schroeder,  M.D.
  2115.         "Grapevine:  An Exercise in Distributed Computing," Communica-
  2116.         tions of the ACM 25, 4 (April 1982), 260-274.
  2117.  
  2118.      Crocker,  D.H.,  Vittal,  J.J.,  Pogran,  K.T.,  Henderson,  D.A.
  2119.         "Standard  for  the  Format  of  ARPA  Network  Text Message,"
  2120.         ARPANET Request for  Comments  No.  733,  Network  Information
  2121.         Center  No.  41952.   SRI International:  Menlo Park (November
  2122.         1977).
  2123.  
  2124.      Feinler, E.J. and Postel, J.B.  ARPANET Protocol  Handbook,  Net-
  2125.         work  Information  Center  No.  7104   (NTIS AD A003890).  SRI
  2126.         International:  Menlo Park (April 1976).
  2127.  
  2128.      Harary, F.   "Graph  Theory".   Addison-Wesley:   Reading,  Mass.
  2129.         (1969).
  2130.  
  2131.      Levin, R. and Schroeder, M.  "Transport  of  Electronic  Messages
  2132.         through  a  Network,"   TeleInformatics  79, pp. 29-33.  North
  2133.         Holland (1979).  Also  as  Xerox  Palo  Alto  Research  Center
  2134.         Technical Report CSL-79-4.
  2135.  
  2136.      Myer, T.H. and Henderson, D.A.  "Message Transmission  Protocol,"
  2137.         ARPANET  Request  for  Comments,  No. 680, Network Information
  2138.         Center No. 32116.  SRI International:  Menlo Park (1975).
  2139.  
  2140.  
  2141.      August 13, 1982              - 34 -                      RFC #822
  2142.  
  2143.  
  2144.  
  2145.      Standard for ARPA Internet Text Messages
  2146.  
  2147.  
  2148.      NBS.  "Specification of Message Format for Computer Based Message
  2149.         Systems, Recommended Federal Information Processing Standard."
  2150.         National  Bureau   of   Standards:    Gaithersburg,   Maryland
  2151.         (October 1981).
  2152.  
  2153.      NIC.  Internet Protocol Transition Workbook.  Network Information
  2154.         Center,   SRI-International,  Menlo  Park,  California  (March
  2155.         1982).
  2156.  
  2157.      Oppen, D.C. and Dalal, Y.K.  "The Clearinghouse:  A Decentralized
  2158.         Agent  for  Locating  Named  Objects in a Distributed Environ-
  2159.         ment," OPD-T8103.  Xerox Office Products Division:  Palo Alto,
  2160.         CA. (October 1981).
  2161.  
  2162.      Postel, J.B.  "Assigned Numbers,"  ARPANET Request for  Comments,
  2163.         No. 820.  SRI International:  Menlo Park (August 1982).
  2164.  
  2165.      Postel, J.B.  "Simple Mail Transfer  Protocol,"  ARPANET  Request
  2166.         for Comments, No. 821.  SRI International:  Menlo Park (August
  2167.         1982).
  2168.  
  2169.      Shoch, J.F.  "Internetwork naming, addressing  and  routing,"  in
  2170.         Proc. 17th IEEE Computer Society International Conference, pp.
  2171.         72-79, Sept. 1978, IEEE Cat. No. 78 CH 1388-8C.
  2172.  
  2173.      Su, Z. and Postel, J.  "The Domain Naming Convention for Internet
  2174.         User  Applications,"  ARPANET  Request  for Comments, No. 819.
  2175.         SRI International:  Menlo Park (August 1982).
  2176.  
  2177.  
  2178.  
  2179.  
  2180.  
  2181.  
  2182.  
  2183.  
  2184.  
  2185.  
  2186.  
  2187.  
  2188.  
  2189.  
  2190.  
  2191.  
  2192.  
  2193.  
  2194.  
  2195.  
  2196.  
  2197.  
  2198.  
  2199.      August 13, 1982              - 35 -                      RFC #822
  2200.  
  2201.  
  2202.  
  2203.      Standard for ARPA Internet Text Messages
  2204.  
  2205.  
  2206.                                  APPENDIX
  2207.  
  2208.  
  2209.      A.  EXAMPLES
  2210.  
  2211.      A.1.  ADDRESSES
  2212.  
  2213.      A.1.1.  Alfred Neuman <Neuman@BBN-TENEXA>
  2214.  
  2215.      A.1.2.  Neuman@BBN-TENEXA
  2216.  
  2217.              These two "Alfred Neuman" examples have identical  seman-
  2218.         tics, as far as the operation of the local host's mail sending
  2219.         (distribution) program (also sometimes  called  its  "mailer")
  2220.         and  the remote host's mail protocol server are concerned.  In
  2221.         the first example, the  "Alfred  Neuman"  is  ignored  by  the
  2222.         mailer,  as "Neuman@BBN-TENEXA" completely specifies the reci-
  2223.         pient.  The second example contains  no  superfluous  informa-
  2224.         tion,  and,  again,  "Neuman@BBN-TENEXA" is the intended reci-
  2225.         pient.
  2226.  
  2227.         Note:  When the message crosses name-domain  boundaries,  then
  2228.                these specifications must be changed, so as to indicate
  2229.                the remainder of the hierarchy, starting with  the  top
  2230.                level.
  2231.  
  2232.      A.1.3.  "George, Ted" <Shared@Group.Arpanet>
  2233.  
  2234.              This form might be used to indicate that a single mailbox
  2235.         is  shared  by several users.  The quoted string is ignored by
  2236.         the originating host's mailer, because  "Shared@Group.Arpanet"
  2237.         completely specifies the destination mailbox.
  2238.  
  2239.      A.1.4.  Wilt . (the  Stilt) Chamberlain@NBA.US
  2240.  
  2241.              The "(the  Stilt)" is a comment, which is NOT included in
  2242.         the  destination  mailbox  address  handed  to the originating
  2243.         system's mailer.  The local-part of the address is the  string
  2244.         "Wilt.Chamberlain", with NO space between the first and second
  2245.         words.
  2246.  
  2247.      A.1.5.  Address Lists
  2248.  
  2249.      Gourmets:  Pompous Person <WhoZiWhatZit@Cordon-Bleu>,
  2250.                 Childs@WGBH.Boston, Galloping Gourmet@
  2251.                 ANT.Down-Under (Australian National Television),
  2252.                 Cheapie@Discount-Liquors;,
  2253.        Cruisers:  Port@Portugal, Jones@SEA;,
  2254.          Another@Somewhere.SomeOrg
  2255.  
  2256.  
  2257.      August 13, 1982              - 36 -                      RFC #822
  2258.  
  2259.  
  2260.  
  2261.      Standard for ARPA Internet Text Messages
  2262.  
  2263.  
  2264.         This group list example points out the use of comments and the
  2265.         mixing of addresses and groups.
  2266.  
  2267.      A.2.  ORIGINATOR ITEMS
  2268.  
  2269.      A.2.1.  Author-sent
  2270.  
  2271.              George Jones logs into his host  as  "Jones".   He  sends
  2272.         mail himself.
  2273.  
  2274.             From:  Jones@Group.Org
  2275.  
  2276.         or
  2277.  
  2278.             From:  George Jones <Jones@Group.Org>
  2279.  
  2280.      A.2.2.  Secretary-sent
  2281.  
  2282.              George Jones logs in as Jones on his  host.   His  secre-
  2283.         tary,  who logs in as Secy sends mail for him.  Replies to the
  2284.         mail should go to George.
  2285.  
  2286.             From:    George Jones <Jones@Group>
  2287.             Sender:  Secy@Other-Group
  2288.  
  2289.      A.2.3.  Secretary-sent, for user of shared directory
  2290.  
  2291.              George Jones' secretary sends mail  for  George.  Replies
  2292.         should go to George.
  2293.  
  2294.             From:     George Jones<Shared@Group.Org>
  2295.             Sender:   Secy@Other-Group
  2296.  
  2297.         Note that there need not be a space between  "Jones"  and  the
  2298.         "<",  but  adding a space enhances readability (as is the case
  2299.         in other examples.
  2300.  
  2301.      A.2.4.  Committee activity, with one author
  2302.  
  2303.              George is a member of a committee.  He wishes to have any
  2304.         replies to his message go to all committee members.
  2305.  
  2306.             From:     George Jones <Jones@Host.Net>
  2307.             Sender:   Jones@Host
  2308.             Reply-To: The Committee: Jones@Host.Net,
  2309.                                      Smith@Other.Org,
  2310.                                      Doe@Somewhere-Else;
  2311.  
  2312.         Note  that  if  George  had  not  included  himself   in   the
  2313.  
  2314.  
  2315.      August 13, 1982              - 37 -                      RFC #822
  2316.  
  2317.  
  2318.  
  2319.      Standard for ARPA Internet Text Messages
  2320.  
  2321.  
  2322.         enumeration  of  The  Committee,  he  would not have gotten an
  2323.         implicit reply; the presence of the  "Reply-to"  field  SUPER-
  2324.         SEDES the sending of a reply to the person named in the "From"
  2325.         field.
  2326.  
  2327.      A.2.5.  Secretary acting as full agent of author
  2328.  
  2329.              George Jones asks his secretary  (Secy@Host)  to  send  a
  2330.         message for him in his capacity as Group.  He wants his secre-
  2331.         tary to handle all replies.
  2332.  
  2333.             From:     George Jones <Group@Host>
  2334.             Sender:   Secy@Host
  2335.             Reply-To: Secy@Host
  2336.  
  2337.      A.2.6.  Agent for user without online mailbox
  2338.  
  2339.              A friend  of  George's,  Sarah,  is  visiting.   George's
  2340.         secretary  sends  some  mail to a friend of Sarah in computer-
  2341.         land.  Replies should go to George, whose mailbox is Jones  at
  2342.         Registry.
  2343.  
  2344.             From:     Sarah Friendly <Secy@Registry>
  2345.             Sender:   Secy-Name <Secy@Registry>
  2346.             Reply-To: Jones@Registry.
  2347.  
  2348.      A.2.7.  Agent for member of a committee
  2349.  
  2350.              George's secretary sends out a message which was authored
  2351.         jointly by all the members of a committee.  Note that the name
  2352.         of the committee cannot be specified, since <group> names  are
  2353.         not permitted in the From field.
  2354.  
  2355.             From:   Jones@Host,
  2356.                     Smith@Other-Host,
  2357.                     Doe@Somewhere-Else
  2358.             Sender: Secy@SHost
  2359.  
  2360.  
  2361.  
  2362.  
  2363.  
  2364.  
  2365.  
  2366.  
  2367.  
  2368.  
  2369.  
  2370.  
  2371.  
  2372.  
  2373.      August 13, 1982              - 38 -                      RFC #822
  2374.  
  2375.  
  2376.  
  2377.      Standard for ARPA Internet Text Messages
  2378.  
  2379.  
  2380.      A.3.  COMPLETE HEADERS
  2381.  
  2382.      A.3.1.  Minimum required
  2383.  
  2384.      Date:     26 Aug 76 1429 EDT        Date:     26 Aug 76 1429 EDT
  2385.      From:     Jones@Registry.Org   or   From:     Jones@Registry.Org
  2386.      Bcc:                                To:       Smith@Registry.Org
  2387.  
  2388.         Note that the "Bcc" field may be empty, while the  "To"  field
  2389.         is required to have at least one address.
  2390.  
  2391.      A.3.2.  Using some of the additional fields
  2392.  
  2393.      Date:     26 Aug 76 1430 EDT
  2394.      From:     George Jones<Group@Host>
  2395.      Sender:   Secy@SHOST
  2396.      To:       "Al Neuman"@Mad-Host,
  2397.                Sam.Irving@Other-Host
  2398.      Message-ID:  <some.string@SHOST>
  2399.  
  2400.      A.3.3.  About as complex as you're going to get
  2401.  
  2402.      Date     :  27 Aug 76 0932 PDT
  2403.      From     :  Ken Davis <KDavis@This-Host.This-net>
  2404.      Subject  :  Re: The Syntax in the RFC
  2405.      Sender   :  KSecy@Other-Host
  2406.      Reply-To :  Sam.Irving@Reg.Organization
  2407.      To       :  George Jones <Group@Some-Reg.An-Org>,
  2408.                  Al.Neuman@MAD.Publisher
  2409.      cc       :  Important folk:
  2410.                    Tom Softwood <Balsa@Tree.Root>,
  2411.                    "Sam Irving"@Other-Host;,
  2412.                  Standard Distribution:
  2413.                    /main/davis/people/standard@Other-Host,
  2414.                    "<Jones>standard.dist.3"@Tops-20-Host>;
  2415.      Comment  :  Sam is away on business. He asked me to handle
  2416.                  his mail for him.  He'll be able to provide  a
  2417.                  more  accurate  explanation  when  he  returns
  2418.                  next week.
  2419.      In-Reply-To: <some.string@DBM.Group>, George's message
  2420.      X-Special-action:  This is a sample of user-defined field-
  2421.                  names.  There could also be a field-name
  2422.                  "Special-action", but its name might later be
  2423.                  preempted
  2424.      Message-ID: <4231.629.XYzi-What@Other-Host>
  2425.  
  2426.  
  2427.  
  2428.  
  2429.  
  2430.  
  2431.      August 13, 1982              - 39 -                      RFC #822
  2432.  
  2433.  
  2434.  
  2435.      Standard for ARPA Internet Text Messages
  2436.  
  2437.  
  2438.      B.  SIMPLE FIELD PARSING
  2439.  
  2440.           Some mail-reading software systems may wish to perform  only
  2441.      minimal  processing,  ignoring  the internal syntax of structured
  2442.      field-bodies and treating them the  same  as  unstructured-field-
  2443.      bodies.  Such software will need only to distinguish:
  2444.  
  2445.          o   Header fields from the message body,
  2446.  
  2447.          o   Beginnings of fields from lines which continue fields,
  2448.  
  2449.          o   Field-names from field-contents.
  2450.  
  2451.           The abbreviated set of syntactic rules  which  follows  will
  2452.      suffice  for  this  purpose.  It describes a limited view of mes-
  2453.      sages and is a subset of the syntactic rules provided in the main
  2454.      part of this specification.  One small exception is that the con-
  2455.      tents of field-bodies consist only of text:
  2456.  
  2457.      B.1.  SYNTAX
  2458.  
  2459.  
  2460.      message         =   *field *(CRLF *text)
  2461.  
  2462.      field           =    field-name ":" [field-body] CRLF
  2463.  
  2464.      field-name      =  1*<any CHAR, excluding CTLs, SPACE, and ":">
  2465.  
  2466.      field-body      =   *text [CRLF LWSP-char field-body]
  2467.  
  2468.  
  2469.      B.2.  SEMANTICS
  2470.  
  2471.           Headers occur before the message body and are terminated  by
  2472.      a null line (i.e., two contiguous CRLFs).
  2473.  
  2474.           A line which continues a header field begins with a SPACE or
  2475.      HTAB  character,  while  a  line  beginning a field starts with a
  2476.      printable character which is not a colon.
  2477.  
  2478.           A field-name consists of one or  more  printable  characters
  2479.      (excluding  colon,  space, and control-characters).  A field-name
  2480.      MUST be contained on one line.  Upper and lower case are not dis-
  2481.      tinguished when comparing field-names.
  2482.  
  2483.  
  2484.  
  2485.  
  2486.  
  2487.  
  2488.  
  2489.      August 13, 1982              - 40 -                      RFC #822
  2490.  
  2491.  
  2492.  
  2493.      Standard for ARPA Internet Text Messages
  2494.  
  2495.  
  2496.      C.  DIFFERENCES FROM RFC #733
  2497.  
  2498.           The following summarizes the differences between this  stan-
  2499.      dard  and the one specified in Arpanet Request for Comments #733,
  2500.      "Standard for the Format of ARPA  Network  Text  Messages".   The
  2501.      differences  are  listed  in the order of their occurrence in the
  2502.      current specification.
  2503.  
  2504.      C.1.  FIELD DEFINITIONS
  2505.  
  2506.      C.1.1.  FIELD NAMES
  2507.  
  2508.         These now must be a sequence of  printable  characters.   They
  2509.         may not contain any LWSP-chars.
  2510.  
  2511.      C.2.  LEXICAL TOKENS
  2512.  
  2513.      C.2.1.  SPECIALS
  2514.  
  2515.         The characters period ("."), left-square  bracket  ("["),  and
  2516.         right-square  bracket ("]") have been added.  For presentation
  2517.         purposes, and when passing a specification to  a  system  that
  2518.         does  not conform to this standard, periods are to be contigu-
  2519.         ous with their surrounding lexical tokens.   No  linear-white-
  2520.         space  is  permitted  between them.  The presence of one LWSP-
  2521.         char between other tokens is still directed.
  2522.  
  2523.      C.2.2.  ATOM
  2524.  
  2525.         Atoms may not contain SPACE.
  2526.  
  2527.      C.2.3.  SPECIAL TEXT
  2528.  
  2529.         ctext and qtext have had backslash ("\") added to the list  of
  2530.         prohibited characters.
  2531.  
  2532.      C.2.4.  DOMAINS
  2533.  
  2534.         The lexical tokens  <domain-literal>  and  <dtext>  have  been
  2535.         added.
  2536.  
  2537.      C.3.  MESSAGE SPECIFICATION
  2538.  
  2539.      C.3.1.  TRACE
  2540.  
  2541.         The "Return-path:" and "Received:" fields have been specified.
  2542.  
  2543.  
  2544.  
  2545.  
  2546.  
  2547.      August 13, 1982              - 41 -                      RFC #822
  2548.  
  2549.  
  2550.  
  2551.      Standard for ARPA Internet Text Messages
  2552.  
  2553.  
  2554.      C.3.2.  FROM
  2555.  
  2556.         The "From" field must contain machine-usable addresses  (addr-
  2557.         spec).   Multiple  addresses may be specified, but named-lists
  2558.         (groups) may not.
  2559.  
  2560.      C.3.3.  RESENT
  2561.  
  2562.         The meta-construct of prefacing field names  with  the  string
  2563.         "Resent-"  has been added, to indicate that a message has been
  2564.         forwarded by an intermediate recipient.
  2565.  
  2566.      C.3.4.  DESTINATION
  2567.  
  2568.         A message must contain at least one destination address field.
  2569.         "To" and "CC" are required to contain at least one address.
  2570.  
  2571.      C.3.5.  IN-REPLY-TO
  2572.  
  2573.         The field-body is no longer a comma-separated list, although a
  2574.         sequence is still permitted.
  2575.  
  2576.      C.3.6.  REFERENCE
  2577.  
  2578.         The field-body is no longer a comma-separated list, although a
  2579.         sequence is still permitted.
  2580.  
  2581.      C.3.7.  ENCRYPTED
  2582.  
  2583.         A field has been specified that permits  senders  to  indicate
  2584.         that the body of a message has been encrypted.
  2585.  
  2586.      C.3.8.  EXTENSION-FIELD
  2587.  
  2588.         Extension fields are prohibited from beginning with the  char-
  2589.         acters "X-".
  2590.  
  2591.      C.4.  DATE AND TIME SPECIFICATION
  2592.  
  2593.      C.4.1.  SIMPLIFICATION
  2594.  
  2595.         Fewer optional forms are permitted  and  the  list  of  three-
  2596.         letter time zones has been shortened.
  2597.  
  2598.      C.5.  ADDRESS SPECIFICATION
  2599.  
  2600.  
  2601.  
  2602.  
  2603.  
  2604.  
  2605.      August 13, 1982              - 42 -                      RFC #822
  2606.  
  2607.  
  2608.  
  2609.      Standard for ARPA Internet Text Messages
  2610.  
  2611.  
  2612.      C.5.1.  ADDRESS
  2613.  
  2614.         The use of quoted-string, and the ":"-atom-":" construct, have
  2615.         been  removed.   An  address  now  is  either a single mailbox
  2616.         reference or is a named list of addresses.  The  latter  indi-
  2617.         cates a group distribution.
  2618.  
  2619.      C.5.2.  GROUPS
  2620.  
  2621.         Group lists are now required to to have a name.   Group  lists
  2622.         may not be nested.
  2623.  
  2624.      C.5.3.  MAILBOX
  2625.  
  2626.         A mailbox specification  may  indicate  a  person's  name,  as
  2627.         before.   Such  a  named  list  no longer may specify multiple
  2628.         mailboxes and may not be nested.
  2629.  
  2630.      C.5.4.  ROUTE ADDRESSING
  2631.  
  2632.         Addresses now are taken to be absolute, global specifications,
  2633.         independent  of transmission paths.  The <route> construct has
  2634.         been provided, to permit explicit specification  of  transmis-
  2635.         sion  path.   RFC  #733's  use  of multiple at-signs ("@") was
  2636.         intended as a general syntax  for  indicating  routing  and/or
  2637.         hierarchical addressing.  The current standard separates these
  2638.         specifications and only one at-sign is permitted.
  2639.  
  2640.      C.5.5.  AT-SIGN
  2641.  
  2642.         The string " at " no longer is used as an  address  delimiter.
  2643.         Only at-sign ("@") serves the function.
  2644.  
  2645.      C.5.6.  DOMAINS
  2646.  
  2647.         Hierarchical, logical name-domains have been added.
  2648.  
  2649.      C.6.  RESERVED ADDRESS
  2650.  
  2651.      The local-part "Postmaster" has been reserved, so that users  can
  2652.      be guaranteed at least one valid address at a site.
  2653.  
  2654.  
  2655.  
  2656.  
  2657.  
  2658.  
  2659.  
  2660.  
  2661.  
  2662.  
  2663.      August 13, 1982              - 43 -                      RFC #822
  2664.  
  2665.  
  2666.  
  2667.      Standard for ARPA Internet Text Messages
  2668.  
  2669.  
  2670.      D.  ALPHABETICAL LISTING OF SYNTAX RULES
  2671.  
  2672.      address     =  mailbox                      ; one addressee
  2673.                  /  group                        ; named list
  2674.      addr-spec   =  local-part "@" domain        ; global address
  2675.      ALPHA       =  <any ASCII alphabetic character>
  2676.                                                  ; (101-132, 65.- 90.)
  2677.                                                  ; (141-172, 97.-122.)
  2678.      atom        =  1*<any CHAR except specials, SPACE and CTLs>
  2679.      authentic   =   "From"       ":"   mailbox  ; Single author
  2680.                  / ( "Sender"     ":"   mailbox  ; Actual submittor
  2681.                      "From"       ":" 1#mailbox) ; Multiple authors
  2682.                                                  ;  or not sender
  2683.      CHAR        =  <any ASCII character>        ; (  0-177,  0.-127.)
  2684.      comment     =  "(" *(ctext / quoted-pair / comment) ")"
  2685.      CR          =  <ASCII CR, carriage return>  ; (     15,      13.)
  2686.      CRLF        =  CR LF
  2687.      ctext       =  <any CHAR excluding "(",     ; => may be folded
  2688.                      ")", "\" & CR, & including
  2689.                      linear-white-space>
  2690.      CTL         =  <any ASCII control           ; (  0- 37,  0.- 31.)
  2691.                      character and DEL>          ; (    177,     127.)
  2692.      date        =  1*2DIGIT month 2DIGIT        ; day month year
  2693.                                                  ;  e.g. 20 Jun 82
  2694.      dates       =   orig-date                   ; Original
  2695.                    [ resent-date ]               ; Forwarded
  2696.      date-time   =  [ day "," ] date time        ; dd mm yy
  2697.                                                  ;  hh:mm:ss zzz
  2698.      day         =  "Mon"  / "Tue" /  "Wed"  / "Thu"
  2699.                  /  "Fri"  / "Sat" /  "Sun"
  2700.      delimiters  =  specials / linear-white-space / comment
  2701.      destination =  "To"          ":" 1#address  ; Primary
  2702.                  /  "Resent-To"   ":" 1#address
  2703.                  /  "cc"          ":" 1#address  ; Secondary
  2704.                  /  "Resent-cc"   ":" 1#address
  2705.                  /  "bcc"         ":"  #address  ; Blind carbon
  2706.                  /  "Resent-bcc"  ":"  #address
  2707.      DIGIT       =  <any ASCII decimal digit>    ; ( 60- 71, 48.- 57.)
  2708.      domain      =  sub-domain *("." sub-domain)
  2709.      domain-literal =  "[" *(dtext / quoted-pair) "]"
  2710.      domain-ref  =  atom                         ; symbolic reference
  2711.      dtext       =  <any CHAR excluding "[",     ; => may be folded
  2712.                      "]", "\" & CR, & including
  2713.                      linear-white-space>
  2714.      extension-field =
  2715.                    <Any field which is defined in a document
  2716.                     published as a formal extension to this
  2717.                     specification; none will have names beginning
  2718.                     with the string "X-">
  2719.  
  2720.  
  2721.      August 13, 1982              - 44 -                      RFC #822
  2722.  
  2723.  
  2724.  
  2725.      Standard for ARPA Internet Text Messages
  2726.  
  2727.  
  2728.      field       =  field-name ":" [ field-body ] CRLF
  2729.      fields      =    dates                      ; Creation time,
  2730.                       source                     ;  author id & one
  2731.                     1*destination                ;  address required
  2732.                      *optional-field             ;  others optional
  2733.      field-body  =  field-body-contents
  2734.                     [CRLF LWSP-char field-body]
  2735.      field-body-contents =
  2736.                    <the ASCII characters making up the field-body, as
  2737.                     defined in the following sections, and consisting
  2738.                     of combinations of atom, quoted-string, and
  2739.                     specials tokens, or else consisting of texts>
  2740.      field-name  =  1*<any CHAR, excluding CTLs, SPACE, and ":">
  2741.      group       =  phrase ":" [#mailbox] ";"
  2742.      hour        =  2DIGIT ":" 2DIGIT [":" 2DIGIT]
  2743.                                                  ; 00:00:00 - 23:59:59
  2744.      HTAB        =  <ASCII HT, horizontal-tab>   ; (     11,       9.)
  2745.      LF          =  <ASCII LF, linefeed>         ; (     12,      10.)
  2746.      linear-white-space =  1*([CRLF] LWSP-char)  ; semantics = SPACE
  2747.                                                  ; CRLF => folding
  2748.      local-part  =  word *("." word)             ; uninterpreted
  2749.                                                  ; case-preserved
  2750.      LWSP-char   =  SPACE / HTAB                 ; semantics = SPACE
  2751.      mailbox     =  addr-spec                    ; simple address
  2752.                  /  phrase route-addr            ; name & addr-spec
  2753.      message     =  fields *( CRLF *text )       ; Everything after
  2754.                                                  ;  first null line
  2755.                                                  ;  is message body
  2756.      month       =  "Jan"  /  "Feb" /  "Mar"  /  "Apr"
  2757.                  /  "May"  /  "Jun" /  "Jul"  /  "Aug"
  2758.                  /  "Sep"  /  "Oct" /  "Nov"  /  "Dec"
  2759.      msg-id      =  "<" addr-spec ">"            ; Unique message id
  2760.      optional-field =
  2761.                  /  "Message-ID"        ":"   msg-id
  2762.                  /  "Resent-Message-ID" ":"   msg-id
  2763.                  /  "In-Reply-To"       ":"  *(phrase / msg-id)
  2764.                  /  "References"        ":"  *(phrase / msg-id)
  2765.                  /  "Keywords"          ":"  #phrase
  2766.                  /  "Subject"           ":"  *text
  2767.                  /  "Comments"          ":"  *text
  2768.                  /  "Encrypted"         ":" 1#2word
  2769.                  /  extension-field              ; To be defined
  2770.                  /  user-defined-field           ; May be pre-empted
  2771.      orig-date   =  "Date"        ":"   date-time
  2772.      originator  =   authentic                   ; authenticated addr
  2773.                    [ "Reply-To"   ":" 1#address] )
  2774.      phrase      =  1*word                       ; Sequence of words
  2775.  
  2776.  
  2777.  
  2778.  
  2779.      August 13, 1982              - 45 -                      RFC #822
  2780.  
  2781.  
  2782.  
  2783.      Standard for ARPA Internet Text Messages
  2784.  
  2785.  
  2786.      qtext       =  <any CHAR excepting <">,     ; => may be folded
  2787.                      "\" & CR, and including
  2788.                      linear-white-space>
  2789.      quoted-pair =  "\" CHAR                     ; may quote any char
  2790.      quoted-string = <"> *(qtext/quoted-pair) <">; Regular qtext or
  2791.                                                  ;   quoted chars.
  2792.      received    =  "Received"    ":"            ; one per relay
  2793.                        ["from" domain]           ; sending host
  2794.                        ["by"   domain]           ; receiving host
  2795.                        ["via"  atom]             ; physical path
  2796.                       *("with" atom)             ; link/mail protocol
  2797.                        ["id"   msg-id]           ; receiver msg id
  2798.                        ["for"  addr-spec]        ; initial form
  2799.                         ";"    date-time         ; time received
  2800.  
  2801.      resent      =   resent-authentic
  2802.                    [ "Resent-Reply-To"  ":" 1#address] )
  2803.      resent-authentic =
  2804.                  =   "Resent-From"      ":"   mailbox
  2805.                  / ( "Resent-Sender"    ":"   mailbox
  2806.                      "Resent-From"      ":" 1#mailbox  )
  2807.      resent-date =  "Resent-Date" ":"   date-time
  2808.      return      =  "Return-path" ":" route-addr ; return address
  2809.      route       =  1#("@" domain) ":"           ; path-relative
  2810.      route-addr  =  "<" [route] addr-spec ">"
  2811.      source      = [  trace ]                    ; net traversals
  2812.                       originator                 ; original mail
  2813.                    [  resent ]                   ; forwarded
  2814.      SPACE       =  <ASCII SP, space>            ; (     40,      32.)
  2815.      specials    =  "(" / ")" / "<" / ">" / "@"  ; Must be in quoted-
  2816.                  /  "," / ";" / ":" / "\" / <">  ;  string, to use
  2817.                  /  "." / "[" / "]"              ;  within a word.
  2818.      sub-domain  =  domain-ref / domain-literal
  2819.      text        =  <any CHAR, including bare    ; => atoms, specials,
  2820.                      CR & bare LF, but NOT       ;  comments and
  2821.                      including CRLF>             ;  quoted-strings are
  2822.                                                  ;  NOT recognized.
  2823.      time        =  hour zone                    ; ANSI and Military
  2824.      trace       =    return                     ; path to sender
  2825.                     1*received                   ; receipt tags
  2826.      user-defined-field =
  2827.                    <Any field which has not been defined
  2828.                     in this specification or published as an
  2829.                     extension to this specification; names for
  2830.                     such fields must be unique and may be
  2831.                     pre-empted by published extensions>
  2832.      word        =  atom / quoted-string
  2833.  
  2834.  
  2835.  
  2836.  
  2837.      August 13, 1982              - 46 -                      RFC #822
  2838.  
  2839.  
  2840.  
  2841.      Standard for ARPA Internet Text Messages
  2842.  
  2843.  
  2844.      zone        =  "UT"  / "GMT"                ; Universal Time
  2845.                                                  ; North American : UT
  2846.                  /  "EST" / "EDT"                ;  Eastern:  - 5/ - 4
  2847.                  /  "CST" / "CDT"                ;  Central:  - 6/ - 5
  2848.                  /  "MST" / "MDT"                ;  Mountain: - 7/ - 6
  2849.                  /  "PST" / "PDT"                ;  Pacific:  - 8/ - 7
  2850.                  /  1ALPHA                       ; Military: Z = UT;
  2851.      <">         =  <ASCII quote mark>           ; (     42,      34.)
  2852.  
  2853.  
  2854.  
  2855.  
  2856.  
  2857.  
  2858.  
  2859.  
  2860.  
  2861.  
  2862.  
  2863.  
  2864.  
  2865.  
  2866.  
  2867.  
  2868.  
  2869.  
  2870.  
  2871.  
  2872.  
  2873.  
  2874.  
  2875.  
  2876.  
  2877.  
  2878.  
  2879.  
  2880.  
  2881.  
  2882.  
  2883.  
  2884.  
  2885.  
  2886.  
  2887.  
  2888.  
  2889.  
  2890.  
  2891.  
  2892.  
  2893.  
  2894.  
  2895.      August 13, 1982              - 47 -                      RFC #822
  2896.