home *** CD-ROM | disk | FTP | other *** search
/ Chip 2005 March / CMCD0305.ISO / Software / Shareware / Programare / meesageview / MVSetup.msi / _D37BEEA2FA7FCB676F731C0EE8A89AE4 / _E2483D6E5DD547DF83B0610A3DCB4324 / rfcs / rfc0822.txt next >
Encoding:
Text File  |  2005-01-27  |  106.6 KB  |  2,901 lines

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