当前位置:   article > 正文

邮件协议rfc822文档

wimmail邮箱服务器是否支持rfc 822 headers选项

最近项目要解析eml文件,所以收藏以便以后查看

  1. RFC # 822
  2. Obsoletes: RFC #733 (NIC #41952)

RFC822: Standard for ARPA Internet Text Messages

Revised by David H. Crocker

Dept. of Electrical Engineering

University of Delaware, Newark, DE 19711

Network: DCrocker @ UDel-Relay

Partial Hypertext conversion by Tim Berners-Lee/CERN

TABLE OF CONTENTS

  1. PREFACE .................................................... ii
  2. 1. INTRODUCTION ........................................... 1
  3. 1.1. Scope ............................................ 1
  4. 1.2. Communication Framework .......................... 2
  5. 2. NOTATIONAL CONVENTIONS ................................. 3
  6. 3. LEXICAL ANALYSIS OF MESSAGES 3.1. General Description 3.2. Header Field Definitions 3.3. Lexical Tokens 3.4. Clarifications 4. MESSAGE SPECIFICATION .................................. 17
  7. 4.1. Syntax ........................................... 17
  8. 4.2. Forwarding ....................................... 19
  9. 4.3. Trace Fields ..................................... 20
  10. 4.4. Originator Fields ................................ 21
  11. 4.5. Receiver Fields .................................. 23
  12. 4.6. Reference Fields ................................. 23
  13. 4.7. Other Fields ..................................... 24
  14. 5. DATE AND TIME SPECIFICATION ............................ 26
  15. 5.1. Syntax ........................................... 26
  16. 5.2. Semantics ........................................ 26
  17. 6. ADDRESS SPECIFICATION .................................. 27
  18. 6.1. Syntax ........................................... 27
  19. 6.2. Semantics ........................................ 27
  20. 6.3. Reserved Address ................................. 33
  21. 7. BIBLIOGRAPHY ........................................... 34
  22. APPENDIX
  23. A. EXAMPLES ............................................... 36
  24. B. SIMPLE FIELD PARSING ................................... 40
  25. C. DIFFERENCES FROM RFC #733 .............................. 41
  26. D. ALPHABETICAL LISTING OF SYNTAX RULES ................... 44

PREFACE

By 1977, the Arpanet employed several informal standards for the text messages (mail) sent among its host computers. It was felt necessary to codify these practices and provide for those features that seemed imminent. The result of that effort was Request for Comments (RFC) #733, "Standard for the Format of ARPA Network Text Message", by Crocker, Vittal, Pogran, and Henderson. The specification attempted to avoid major changes in existing software, while permitting several new features.

This document revises the specifications in RFC #733, in order to serve the needs of the larger and more complex ARPA Internet. Some of RFC #733's features failed to gain adequate acceptance. In order to simplify the standard and the software that follows it, these features have been removed. A different addressing scheme is used, to handle the case of inter-network mail; and the concept of re-transmission has been introduced.

This specification is intended for use in the ARPA Internet. However, an attempt has been made to free it of any dependence on that environment, so that it can be applied to other network text message systems.

The specification of RFC #733 took place over the course of one year, using the ARPANET mail environment, itself, to provide an on-going forum for discussing the capabilities to be included. More than twenty individuals, from across the country, participated in the original discussion. The development of this revised specification has, similarly, utilized network mail-based group discussion. Both specification efforts greatly benefited from the comments and ideas of the participants.

The syntax of the standard, in RFC #733, was originally specified in the Backus-Naur Form (BNF) meta-language. Ken L. Harrenstien, of SRI International, was responsible for recoding the BNF into an augmented BNF that makes the representation smaller and easier to understand.

1. INTRODUCTION

1.1. SCOPE

  1. This standard specifies a syntax for text messages that are
  2. sent among computer users, within the framework of "electronic
  3. mail". The standard supersedes the one specified in ARPANET
  4. Request for Comments #733, "Standard for the Format of ARPA Net-
  5. work Text Messages".
  6. In this context, messages are viewed as having an envelope
  7. and contents. The envelope contains whatever information is
  8. needed to accomplish transmission and delivery. The contents
  9. compose the object to be delivered to the recipient. This stan-
  10. dard applies only to the format and some of the semantics of mes-
  11. sage contents. It contains no specification of the information
  12. in the envelope.
  13. However, some message systems may use information from the
  14. contents to create the envelope. It is intended that this stan-
  15. dard facilitate the acquisition of such information by programs.
  16. Some message systems may store messages in formats that
  17. differ from the one specified in this standard. This specifica-
  18. tion is intended strictly as a definition of what message content
  19. format is to be passed BETWEEN hosts.
  20. Note: This standard is NOT intended to dictate the internal for-
  21. mats used by sites, the specific message system features
  22. that they are expected to support, or any of the charac-
  23. teristics of user interface programs that create or read
  24. messages.
  25. A distinction should be made between what the specification
  26. REQUIRES and what it ALLOWS. Messages can be made complex and
  27. rich with formally-structured components of information or can be
  28. kept small and simple, with a minimum of such information. Also,
  29. the standard simplifies the interpretation of differing visual
  30. formats in messages; only the visual aspect of a message is
  31. affected and not the interpretation of information within it.
  32. Implementors may choose to retain such visual distinctions.
  33. The formal definition is divided into four levels. The bot-
  34. tom level describes the meta-notation used in this document. The
  35. second level describes basic lexical analyzers that feed tokens
  36. to higher-level parsers. Next is an overall specification for
  37. messages; it permits distinguishing individual fields. Finally,
  38. there is definition of the contents of several structured fields.

1.2. COMMUNICATION FRAMEWORK

  1. Messages consist of lines of text. No special provisions
  2. are made for encoding drawings, facsimile, speech, or structured
  3. text. No significant consideration has been given to questions
  4. of data compression or to transmission and storage efficiency,
  5. and the standard tends to be free with the number of bits con-
  6. sumed. For example, field names are specified as free text,
  7. rather than special terse codes.
  8. A general "memo" framework is used. That is, a message con-
  9. sists of some information in a rigid format, followed by the main
  10. part of the message, with a format that is not specified in this
  11. document. The syntax of several fields of the rigidly-formated
  12. ("headers") section is defined in this specification; some of
  13. these fields must be included in all messages.
  14. The syntax that distinguishes between header fields is
  15. specified separately from the internal syntax for particular
  16. fields. This separation is intended to allow simple parsers to
  17. operate on the general structure of messages, without concern for
  18. the detailed structure of individual header fields. Appendix B
  19. is provided to facilitate construction of these parsers.
  20. In addition to the fields specified in this document, it is
  21. expected that other fields will gain common use. As necessary,
  22. the specifications for these "extension-fields" will be published
  23. through the same mechanism used to publish this document. Users
  24. may also wish to extend the set of fields that they use
  25. privately. Such "user-defined fields" are permitted.
  26. The framework severely constrains document tone and appear-
  27. ance and is primarily useful for most intra-organization communi-
  28. cations and well-structured inter-organization communication.
  29. It also can be used for some types of inter-process communica-
  30. tion, such as simple file transfer and remote job entry. A more
  31. robust framework might allow for multi-font, multi-color, multi-
  32. dimension encoding of information. A less robust one, as is
  33. present in most single-machine message systems, would more
  34. severely constrain the ability to add fields and the decision to
  35. include specific fields. In contrast with paper-based communica-
  36. tion, it is interesting to note that the RECEIVER of a message
  37. can exercise an extraordinary amount of control over the
  38. message's appearance. The amount of actual control available to
  39. message receivers is contingent upon the capabilities of their
  40. individual message systems.

2. Notational Conventions

This specification uses an augmented Backus-Naur Form (BNF) notation. The differences from standard BNF involve naming rules and indicating repetition and "local" alternatives.

2.1. RULE NAMING

  1. Angle brackets ("<", ">") are not used, in general. The
  2. name of a rule is simply the name itself, rather than "<name>".
  3. Quotation-marks enclose literal text (which may be upper and/or
  4. lower case). Certain basic rules are in uppercase, such as
  5. SPACE, TAB, CRLF, DIGIT, ALPHA, etc. Angle brackets are used in
  6. rule definitions, and in the rest of this document, whenever
  7. their presence will facilitate discerning the use of rule names.

2.2. RULE1 / RULE2: ALTERNATIVES

  1. Elements separated by slash ("/") are alternatives. There-
  2. fore "foo / bar" will accept foo or bar.

2.3. (RULE1 RULE2): LOCAL ALTERNATIVES

  1. Elements enclosed in parentheses are treated as a single
  2. element. Thus, "(elem (foo / bar) elem)" allows the token
  3. sequences "elem foo elem" and "elem bar elem".

2.4. *RULE: REPETITION

  1. The character "*" preceding an element indicates repetition.
  2. The full form is:
  3. <l>*<m>element
  4. indicating at least <l> and at most <m> occurrences of element.
  5. Default values are 0 and infinity so that "*(element)" allows any
  6. number, including zero; "1*element" requires at least one; and
  7. "1*2element" allows one or two.

2.5. [RULE]: OPTIONAL

  1. Square brackets enclose optional elements; "[foo bar]" is
  2. equivalent to "*1(foo bar)".

2.6. NRULE: SPECIFIC REPETITION

  1. "<n>(element)" is equivalent to "<n>*<n>(element)"; that is,
  2. exactly <n> occurrences of (element). Thus 2DIGIT is a 2-digit
  3. number, and 3ALPHA is a string of three alphabetic characters.

2.7. #RULE: LISTS

  1. A construct "#" is defined, similar to "*", as follows:
  2. <l>#<m>element
  3. indicating at least <l> and at most <m> elements, each separated
  4. by one or more commas (","). This makes the usual form of lists
  5. very easy; a rule such as '(element *("," element))' can be shown
  6. as "1#element". Wherever this construct is used, null elements
  7. are allowed, but do not contribute to the count of elements
  8. present. That is, "(element),,(element)" is permitted, but
  9. counts as only two elements. Therefore, where at least one ele-
  10. ment is required, at least one non-null element must be present.
  11. Default values are 0 and infinity so that "#(element)" allows any
  12. number, including zero; "1#element" requires at least one; and
  13. "1#2element" allows one or two.

2.8. ; COMMENTS

  1. A semi-colon, set off some distance to the right of rule
  2. text, starts a comment that continues to the end of line. This
  3. is a simple way of including useful notes in parallel with the
  4. specifications.

3. LEXICAL ANALYSIS OF MESSAGES

3.1. GENERAL DESCRIPTION

A message consists of header fields and, optionally, a body. The body is simply a sequence of lines containing ASCII characters. It is separated from the headers by a null line (i.e., a line with nothing preceding the CRLF).

3.1.1. LONG HEADER FIELDS

Each header field can be viewed as a single, logical line of ASCII characters, comprising a field-name and a field-body. For convenience, the field-body portion of this conceptual entity can be split into a multiple-line representation; this is called "folding". The general rule is that wherever there may be linear-white-space (NOT simply LWSP-chars), a CRLF immediately followed by AT LEAST one LWSP-char may instead be inserted. Thus, the single line
To:  "Joe & J. Harvey" <ddd @Org>, JJV @ BBN
can be represented as:
  1. To: "Joe & J. Harvey" <ddd @ Org>,
  2. JJV@BBN
and
  1. To: "Joe & J. Harvey"
  2. <ddd@ Org>, JJV
  3. @BBN
and
  1. To: "Joe &
  2. J. Harvey" <ddd @ Org>, JJV @ BBN
The process of moving from this folded multiple-line representation of a header field to its single line representation is called "unfolding". Unfolding is accomplished by regarding CRLF immediately followed by a LWSP-char as equivalent to the LWSP-char.
Note:
While the standard permits folding wherever linear-white-space is permitted, it is recommended that structured fields, such as those containing addresses, limit folding to higher-level syntactic breaks. For address fields, it is recommended that such folding occur between addresses, after the separating comma.

3.1.2. STRUCTURE OF HEADER FIELDS

Once a field has been unfolded, it may be viewed as being composed of a field-name followed by a colon (":"), followed by a field-body, and terminated by a carriage-return/line-feed. The field-name must be composed of printable ASCII characters (i.e., characters that have values between 33. and 126., decimal, except colon). The field-body may be composed of any ASCII characters, except CR or LF. (While CR and/or LF may be present in the actual text, they are removed by the action of unfolding the field.)

Certain field-bodies of headers may be interpreted according to an internal syntax that some systems may wish to parse. These fields are called "structured fields". Examples include fields containing dates and addresses. Other fields, such as "Subject" and "Comments", are regarded simply as strings of text.

Note:
Any field which has a field-body that is defined as other than simply <text> is to be treated as a structured field.

Field-names, unstructured field bodies and structured field bodies each are scanned by their own, independent "lexical" analyzers.

3.1.3. UNSTRUCTURED FIELD BODIES

For some fields, such as "Subject" and "Comments", no structuring is assumed, and they are treated simply as <text>s, as in the message body. Rules of folding apply to these fields, so that such field bodies which occupy several lines must therefore have the second and successive lines indented by at least one LWSP-char.

3.1.4. STRUCTURED FIELD BODIES

To aid in the creation and reading of structured fields, the free insertion of linear-white-space (which permits folding by inclusion of CRLFs) is allowed between lexical tokens. Rather than obscuring the syntax specifications for these structured fields with explicit syntax for this linear-white-space, the existence of another "lexical" analyzer is assumed. This analyzer does not apply for unstructured field bodies that are simply strings of text, as described above. The analyzer provides an interpretation of the unfolded text composing the body of the field as a sequence of lexical symbols.

These symbols are:

  • individual special characters
  • quoted-strings
  • domain-literals
  • comments
  • atoms
The first four of these symbols are self-delimiting. Atoms are not; they are delimited by the self-delimiting symbols and by linear-white-space. For the purposes of regenerating sequences of atoms and quoted-strings, exactly one SPACE is assumed to exist, and should be used, between them. (Also, in the "Clarifications" section on "White Space", below, note the rules about treatment of multiple contiguous LWSP-chars.)

So, for example, the folded body of an address field

  1. ":sysmail"@ Some-Group. Some-Org,
  2. Muhammed.(I am the greatest) Ali @(the)Vegas.WBA
is analyzed into the following lexical symbols and types:
  1. :sysmail quoted string
  2. @ special
  3. Some-Group atom
  4. . special
  5. Some-Org atom
  6. , special
  7. Muhammed atom
  8. . special
  9. (I am the greatest) comment
  10. Ali atom
  11. @ atom
  12. (the) comment
  13. Vegas atom
  14. . special
  15. WBA atom
The canonical representations for the data in these addresses are the following strings:
  1. ":sysmail"@Some-Group.Some-Org
  2. and
  3. Muhammed.Ali@Vegas.WBA
Note:
For purposes of display, and when passing such structured information to other systems, such as mail protocol services, there must be NO linear-white-space between <word>s that are separated by period (".") or at-sign ("@") and exactly one SPACE between all other <word>s. Also, headers should be in a folded form.

3.2. HEADER FIELD DEFINITIONS

These rules show a field meta-syntax, without regard for the particular type or internal syntax. Their purpose is to permit detection of fields; also, they present to higher-level parsers an image of each field as fitting on one line.
  1. field = field-name ":" [ field-body ] CRLF
  2. field-name = 1*<any CHAR, excluding CTLs, SPACE, and ":">
  3. field-body = field-body-contents
  4. [CRLF LWSP-char field-body]
  5. field-body-contents =
  6. <the ASCII characters making up the field-body, as
  7. defined in the following sections, and consisting
  8. of combinations of atom, quoted-string, and
  9. specials tokens, or else consisting of texts>

3.3. LEXICAL TOKENS

The following rules are used to define an underlying lexical analyzer, which feeds tokens to higher level parsers. See the ANSI references, in the Bibliography.
  1. ; ( Octal, Decimal.)
  2. CHAR = <any ASCII character> ; ( 0-177, 0.-127.)
  3. ALPHA = <any ASCII alphabetic character>
  4. ; (101-132, 65.- 90.)
  5. ; (141-172, 97.-122.)
  6. DIGIT = <any ASCII decimal digit> ; ( 60- 71, 48.- 57.)
  7. CTL = <any ASCII control ; ( 0- 37, 0.- 31.)
  8. character and DEL> ; ( 177, 127.)
  9. CR = <ASCII CR, carriage return> ; ( 15, 13.)
  10. LF = <ASCII LF, linefeed> ; ( 12, 10.)
  11. SPACE = <ASCII SP, space> ; ( 40, 32.)
  12. HTAB = <ASCII HT, horizontal-tab> ; ( 11, 9.)
  13. <"> = <ASCII quote mark> ; ( 42, 34.)
  14. CRLF = CR LF
  15. LWSP-char = SPACE / HTAB ; semantics = SPACE
  16. linear-white-space = 1*([CRLF] LWSP-char) ; semantics = SPACE
  17. ; CRLF => folding
  18. specials = "(" / ")" / "<" / ">" / "@" ; Must be in quoted-
  19. / "," / ";" / ":" / "\" / <"> ; string, to use
  20. / "." / "[" / "]" ; within a word.
  21. delimiters = specials / linear-white-space / comment
  22. text = <any CHAR, including bare ; => atoms, specials,
  23. CR & bare LF, but NOT ; comments and
  24. including CRLF> ; quoted-strings are
  25. ; NOT recognized. atom = 1*<any CHAR except specials, SPACE and CTLs>
  26. quoted-string = <"> *(qtext/quoted-pair) <">; Regular qtext or
  27. ; quoted chars.
  28. qtext = <any CHAR excepting <">, ; => may be folded
  29. "\" & CR, and including
  30. linear-white-space>
  31. domain-literal = "[" *(dtext / quoted-pair) "]"
  32. dtext = <any CHAR excluding "[", ; => may be folded
  33. "]", "\" & CR, & including
  34. linear-white-space>
  35. comment = "(" *(ctext / quoted-pair / comment) ")"
  36. ctext = <any CHAR excluding "(", ; => may be folded
  37. ")", "\" & CR, & including
  38. linear-white-space>
  39. quoted-pair = "\" CHAR ; may quote any char
  40. phrase = 1*word ; Sequence of words word = atom / quoted-string

3.4. CLARIFICATIONS

3.4.1. QUOTING

Some characters are reserved for special interpretation, such as delimiting lexical tokens. To permit use of these characters as uninterpreted data, a quoting mechanism is provided. To quote a character, precede it with a backslash ("\").

This mechanism is not fully general. Characters may be quoted only within a subset of the lexical constructs. In particular, quoting is limited to use within:

  • - quoted-string
  • - domain-literal
  • - comment
Within these constructs, quoting is REQUIRED for CR and "\" and for the character(s) that delimit the token (e.g., "(" and ")" for a comment). However, quoting is PERMITTED for any character.
Note:
In particular, quoting is NOT permitted within atoms. For example when the local-part of an addr-spec must contain a special character, a quoted string must be used. Therefore, a specification such as:
Full\ Name@Domain
is not legal and must be specified as:
"Full Name"@Domain

3.4.2. WHITE SPACE

  1. Note: In structured field bodies, multiple linear space ASCII
  2. characters (namely HTABs and SPACEs) are treated as
  3. single spaces and may freely surround any symbol. In
  4. all header fields, the only place in which at least one
  5. LWSP-char is REQUIRED is at the beginning of continua-
  6. tion lines in a folded field.
  7. When passing text to processes that do not interpret text
  8. according to this standard (e.g., mail protocol servers), then
  9. NO linear-white-space characters should occur between a period
  10. (".") or at-sign ("@") and a <word>. Exactly ONE SPACE should
  11. be used in place of arbitrary linear-white-space and comment
  12. sequences.
  13. Note: Within systems conforming to this standard, wherever a
  14. member of the list of delimiters is allowed, LWSP-chars
  15. may also occur before and/or after it.
  16. Writers of mail-sending (i.e., header-generating) programs
  17. should realize that there is no network-wide definition of the
  18. effect of ASCII HT (horizontal-tab) characters on the appear-
  19. ance of text at another network host; therefore, the use of
  20. tabs in message headers, though permitted, is discouraged.

3.4.3. COMMENTS

  1. A comment is a set of ASCII characters, which is enclosed in
  2. matching parentheses and which is not within a quoted-string
  3. The comment construct permits message originators to add text
  4. which will be useful for human readers, but which will be
  5. ignored by the formal semantics. Comments should be retained
  6. while the message is subject to interpretation according to
  7. this standard. However, comments must NOT be included in
  8. other cases, such as during protocol exchanges with mail
  9. servers.
  10. Comments nest, so that if an unquoted left parenthesis occurs
  11. in a comment string, there must also be a matching right
  12. parenthesis. When a comment acts as the delimiter between a
  13. sequence of two lexical symbols, such as two atoms, it is lex-
  14. ically equivalent with a single SPACE, for the purposes of
  15. regenerating the sequence, such as when passing the sequence
  16. onto a mail protocol server. Comments are detected as such
  17. only within field-bodies of structured fields.
  18. If a comment is to be "folded" onto multiple lines, then the
  19. syntax for folding must be adhered to. (See the "Lexical
  20. Analysis of Messages" section on "Folding Long Header Fields"
  21. above, and the section on "Case Independence" below.) Note
  22. that the official semantics therefore do not "see" any
  23. unquoted CRLFs that are in comments, although particular pars-
  24. ing programs may wish to note their presence. For these pro-
  25. grams, it would be reasonable to interpret a "CRLF LWSP-char"
  26. as being a CRLF that is part of the comment; i.e., the CRLF is
  27. kept and the LWSP-char is discarded. Quoted CRLFs (i.e., a
  28. backslash followed by a CR followed by a LF) still must be
  29. followed by at least one LWSP-char.
  30. 3.4.4. DELIMITING AND QUOTING CHARACTERS
  31. The quote character (backslash) and characters that delimit
  32. syntactic units are not, generally, to be taken as data that
  33. are part of the delimited or quoted unit(s). In particular,
  34. the quotation-marks that define a quoted-string, the
  35. parentheses that define a comment and the backslash that
  36. quotes a following character are NOT part of the quoted-
  37. string, comment or quoted character. A quotation-mark that is
  38. to be part of a quoted-string, a parenthesis that is to be
  39. part of a comment and a backslash that is to be part of either
  40. must each be preceded by the quote-character backslash ("\").
  41. Note that the syntax allows any character to be quoted within
  42. a quoted-string or comment; however only certain characters
  43. MUST be quoted to be included as data. These characters are
  44. the ones that are not part of the alternate text group (i.e.,
  45. ctext or qtext).
  46. The one exception to this rule is that a single SPACE is
  47. assumed to exist between contiguous words in a phrase, and
  48. this interpretation is independent of the actual number of
  49. LWSP-chars that the creator places between the words. To
  50. include more than one SPACE, the creator must make the LWSP-
  51. chars be part of a quoted-string.
  52. Quotation marks that delimit a quoted string and backslashes
  53. that quote the following character should NOT accompany the
  54. quoted-string when the string is passed to processes that do
  55. not interpret data according to this specification (e.g., mail
  56. protocol servers).
  57. 3.4.5. QUOTED-STRINGS
  58. Where permitted (i.e., in words in structured fields) quoted-
  59. strings are treated as a single symbol. That is, a quoted-
  60. string is equivalent to an atom, syntactically. If a quoted-
  61. string is to be "folded" onto multiple lines, then the syntax
  62. for folding must be adhered to. (See the "Lexical Analysis of
  63. Messages" section on "Folding Long Header Fields" above, and
  64. the section on "Case Independence" below.) Therefore, the
  65. official semantics do not "see" any bare CRLFs that are in
  66. quoted-strings; however particular parsing programs may wish
  67. to note their presence. For such programs, it would be rea-
  68. sonable to interpret a "CRLF LWSP-char" as being a CRLF which
  69. is part of the quoted-string; i.e., the CRLF is kept and the
  70. LWSP-char is discarded. Quoted CRLFs (i.e., a backslash fol-
  71. lowed by a CR followed by a LF) are also subject to rules of
  72. folding, but the presence of the quoting character (backslash)
  73. explicitly indicates that the CRLF is data to the quoted
  74. string. Stripping off the first following LWSP-char is also
  75. appropriate when parsing quoted CRLFs.

3.4.6. BRACKETING CHARACTERS

  1. There is one type of bracket which must occur in matched pairs
  2. and may have pairs nested within each other:
  3. o Parentheses ("(" and ")") are used to indicate com-
  4. ments.
  5. There are three types of brackets which must occur in matched
  6. pairs, and which may NOT be nested:
  7. o Colon/semi-colon (":" and ";") are used in address
  8. specifications to indicate that the included list of
  9. addresses are to be treated as a group.
  10. o Angle brackets ("<" and ">") are generally used to
  11. indicate the presence of a one machine-usable refer-
  12. ence (e.g., delimiting mailboxes), possibly including
  13. source-routing to the machine.
  14. o Square brackets ("[" and "]") are used to indicate the
  15. presence of a domain-literal, which the appropriate
  16. name-domain is to use directly, bypassing normal
  17. name-resolution mechanisms.

3.4.7. CASE INDEPENDENCE

Except as noted, alphabetic strings may be represented in any combination of upper and lower case. The only syntactic units which requires preservation of case information are:
  • text
  • qtext
  • dtext
  • ctext
  • quoted-pair
  • local-part, except "Postmaster"
  1. When matching any other syntactic unit, case is to be ignored.
  2. For example, the field-names "From", "FROM", "from", and even
  3. "FroM" are semantically equal and should all be treated ident-
  4. ically.
  5. When generating these units, any mix of upper and lower case
  6. alphabetic characters may be used. The case shown in this
  7. specification is suggested for message-creating processes.
  8. Note: The reserved local-part address unit, "Postmaster", is
  9. an exception. When the value "Postmaster" is being
  10. interpreted, it must be accepted in any mixture of
  11. case, including "POSTMASTER", and "postmaster".
  12. 3.4.8. FOLDING LONG HEADER FIELDS
  13. Each header field may be represented on exactly one line con-
  14. sisting of the name of the field and its body, and terminated
  15. by a CRLF; this is what the parser sees. For readability, the
  16. field-body portion of long header fields may be "folded" onto
  17. multiple lines of the actual field. "Long" is commonly inter-
  18. preted to mean greater than 65 or 72 characters. The former
  19. length serves as a limit, when the message is to be viewed on
  20. most simple terminals which use simple display software; how-
  21. ever, the limit is not imposed by this standard.
  22. Note: Some display software often can selectively fold lines,
  23. to suit the display terminal. In such cases, sender-
  24. provided folding can interfere with the display
  25. software.
  26. 3.4.9. BACKSPACE CHARACTERS
  27. ASCII BS characters (Backspace, decimal 8) may be included in
  28. texts and quoted-strings to effect overstriking. However, any
  29. use of backspaces which effects an overstrike to the left of
  30. the beginning of the text or quoted-string is prohibited.

3.4.10. NETWORK-SPECIFIC TRANSFORMATIONS

  1. During transmission through heterogeneous networks, it may be
  2. necessary to force data to conform to a network's local con-
  3. ventions. For example, it may be required that a CR be fol-
  4. lowed either by LF, making a CRLF, or by <null>, if the CR is
  5. to stand alone). Such transformations are reversed, when the
  6. message exits that network.
  7. When crossing network boundaries, the message should be
  8. treated as passing through two modules. It will enter the
  9. first module containing whatever network-specific transforma-
  10. tions that were necessary to permit migration through the
  11. "current" network. It then passes through the modules:
Transformation ReversalThe "current" network's idiosyncracies are removed and the message is returned to the canonical form specified in this standard.TransformationThe "next" network's local idiosyncracies are imposed on the message.
  1. ------------------
  2. From ==> | Remove Net-A |
  3. Net-A | idiosyncracies |
  4. ------------------
  5. ||
  6. \/
  7. Conformance
  8. with standard
  9. ||
  10. \/
  11. ------------------
  12. | Impose Net-B | ==> To
  13. | idiosyncracies | Net-B
  14. ------------------

4. Message Specification

4.1. SYNTAX

  1. Note: Due to an artifact of the notational conventions, the syn-
  2. tax indicates that, when present, some fields, must be in
  3. a particular order. Header fields are NOT required to
  4. occur in any particular order, except that the message
  5. body must occur AFTER the headers. It is recommended
  6. that, if present, headers be sent in the order "Return-
  7. Path", "Received", "Date", "From", "Subject", "Sender",
  8. "To", "cc", etc.
  9. This specification permits multiple occurrences of most
  10. fields. Except as noted, their interpretation is not
  11. specified here, and their use is discouraged.
  12. The following syntax for the bodies of various fields should
  13. be thought of as describing each field body as a single long
  14. string (or line). The "Lexical Analysis of Message" section on
  15. "Long Header Fields", above, indicates how such long strings can
  16. be represented on more than one line in the actual transmitted
  17. message.
  18. message = fields *( CRLF *text ) ; Everything after
  19. ; first null line
  20. ; is message body
  21. fields = dates ; Creation time,
  22. source ; author id & one
  23. 1*destination ; address required
  24. *optional-field ; others optional
  25. source = [ trace ] ; net traversals
  26. originator ; original mail
  27. [ resent ] ; forwarded
  28. trace = return ; path to sender
  29. 1*received ; receipt tags
  30. return = "Return-path" ":" route-addr ; return address
  31. received = "Received" ":" ; one per relay
  32. ["from" domain] ; sending host
  33. ["by" domain] ; receiving host
  34. ["via" atom] ; physical path
  35. *("with" atom) ; link/mail protocol
  36. ["id" msg-id] ; receiver msg id
  37. ["for" addr-spec] ; initial form
  38. ";" date-time ; time received
  39. originator = authentic ; authenticated addr
  40. [ "Reply-To" ":" 1#address] )
  41. authentic = "From" ":" mailbox ; Single author
  42. / ( "Sender" ":" mailbox ; Actual submittor
  43. "From" ":" 1#mailbox) ; Multiple authors
  44. ; or not sender
  45. resent = resent-authentic
  46. [ "Resent-Reply-To" ":" 1#address] )
  47. resent-authentic =
  48. = "Resent-From" ":" mailbox
  49. / ( "Resent-Sender" ":" mailbox
  50. "Resent-From" ":" 1#mailbox )
  51. dates = orig-date ; Original
  52. [ resent-date ] ; Forwarded
  53. orig-date = "Date" ":" date-time
  54. resent-date = "Resent-Date" ":" date-time
  55. destination = "To" ":" 1#address ; Primary
  56. / "Resent-To" ":" 1#address
  57. / "cc" ":" 1#address ; Secondary
  58. / "Resent-cc" ":" 1#address
  59. / "bcc" ":" #address ; Blind carbon
  60. / "Resent-bcc" ":" #address
  61. optional-field =
  62. / "Message-ID" ":" msg-id
  63. / "Resent-Message-ID" ":" msg-id
  64. / "In-Reply-To" ":" *(phrase / msg-id)
  65. / "References" ":" *(phrase / msg-id)
  66. / "Keywords" ":" #phrase
  67. / "Subject" ":" *text
  68. / "Comments" ":" *text
  69. / "Encrypted" ":" 1#2word
  70. / extension-field ; To be defined
  71. / user-defined-field ; May be pre-empted msg-id = "<" addr-spec ">" ; Unique message id
  72. extension-field =
  73. <Any field which is defined in a document
  74. published as a formal extension to this
  75. specification; none will have names beginning
  76. with the string "X-">
  77. user-defined-field =
  78. <Any field which has not been defined
  79. in this specification or published as an
  80. extension to this specification; names for
  81. such fields must be unique and may be
  82. pre-empted by published extensions>

4.2. FORWARDING

  1. Some systems permit mail recipients to forward a message,
  2. retaining the original headers, by adding some new fields. This
  3. standard supports such a service, through the "Resent-" prefix to
  4. field names.
  5. Whenever the string "Resent-" begins a field name, the field
  6. has the same semantics as a field whose name does not have the
  7. prefix. However, the message is assumed to have been forwarded
  8. by an original recipient who attached the "Resent-" field. This
  9. new field is treated as being more recent than the equivalent,
  10. original field. For example, the "Resent-From", indicates the
  11. person that forwarded the message, whereas the "From" field indi-
  12. cates the original author.
  13. Use of such precedence information depends upon partici-
  14. pants' communication needs. For example, this standard does not
  15. dictate when a "Resent-From:" address should receive replies, in
  16. lieu of sending them to the "From:" address.
  17. Note: In general, the "Resent-" fields should be treated as con-
  18. taining a set of information that is independent of the
  19. set of original fields. Information for one set should
  20. not automatically be taken from the other. The interpre-
  21. tation of multiple "Resent-" fields, of the same type, is
  22. undefined.
In the remainder of this specification, occurrence of legal "Resent-" fields are treated identically with the occurrence of fields whose names do not contain this prefix.

4.3. TRACE FIELDS

Trace information is used to provide an audit trail of message handling. In addition, it indicates a route back to the sender of the message.

The list of known "via" and "with" values are registered with the Network Information Center, SRI International, Menlo Park, California.

4.3.1. RETURN-PATH

  1. This field is added by the final transport system that
  2. delivers the message to its recipient. The field is intended
  3. to contain definitive information about the address and route
  4. back to the message's originator.
  5. Note: The "Reply-To" field is added by the originator and
  6. serves to direct replies, whereas the "Return-Path"
  7. field is used to identify a path back to the origina-
  8. tor.
  9. While the syntax indicates that a route specification is
  10. optional, every attempt should be made to provide that infor-
  11. mation in this field.

4.3.2. RECEIVED

  1. A copy of this field is added by each transport service that
  2. relays the message. The information in the field can be quite
  3. useful for tracing transport problems.
  4. The names of the sending and receiving hosts and time-of-
  5. receipt may be specified. The "via" parameter may be used, to
  6. indicate what physical mechanism the message was sent over,
  7. such as Arpanet or Phonenet, and the "with" parameter may be
  8. used to indicate the mail-, or connection-, level protocol
  9. that was used, such as the SMTP mail protocol, or X.25 tran-
  10. sport protocol.
  11. Note: Several "with" parameters may be included, to fully
  12. specify the set of protocols that were used.
  13. Some transport services queue mail; the internal message iden-
  14. tifier that is assigned to the message may be noted, using the
  15. "id" parameter. When the sending host uses a destination
  16. address specification that the receiving host reinterprets, by
  17. expansion or transformation, the receiving host may wish to
  18. record the original specification, using the "for" parameter.
  19. For example, when a copy of mail is sent to the member of a
  20. distribution list, this parameter may be used to record the
  21. original address that was used to specify the list.

4.4. ORIGINATOR FIELDS

  1. The standard allows only a subset of the combinations possi-
  2. ble with the From, Sender, Reply-To, Resent-From, Resent-Sender,
  3. and Resent-Reply-To fields. The limitation is intentional.

4.4.1. FROM / RESENT-FROM

  1. This field contains the identity of the person(s) who wished
  2. this message to be sent. The message-creation process should
  3. default this field to be a single, authenticated machine
  4. address, indicating the AGENT (person, system or process)
  5. entering the message. If this is not done, the "Sender" field
  6. MUST be present. If the "From" field IS defaulted this way,
  7. the "Sender" field is optional and is redundant with the
  8. "From" field. In all cases, addresses in the "From" field
  9. must be machine-usable (addr-specs) and may not contain named
  10. lists (groups).

4.4.2. SENDER / RESENT-SENDER

  1. This field contains the authenticated identity of the AGENT
  2. (person, system or process) that sends the message. It is
  3. intended for use when the sender is not the author of the mes-
  4. sage, or to indicate who among a group of authors actually
  5. sent the message. If the contents of the "Sender" field would
  6. be completely redundant with the "From" field, then the
  7. "Sender" field need not be present and its use is discouraged
  8. (though still legal). In particular, the "Sender" field MUST
  9. be present if it is NOT the same as the "From" Field.
  10. The Sender mailbox specification includes a word sequence
  11. which must correspond to a specific agent (i.e., a human user
  12. or a computer program) rather than a standard address. This
  13. indicates the expectation that the field will identify the
  14. single AGENT (person, system, or process) responsible for
  15. sending the mail and not simply include the name of a mailbox
  16. from which the mail was sent. For example in the case of a
  17. shared login name, the name, by itself, would not be adequate.
  18. The local-part address unit, which refers to this agent, is
  19. expected to be a computer system term, and not (for example) a
  20. generalized person reference which can be used outside the
  21. network text message context.
  22. Since the critical function served by the "Sender" field is
  23. identification of the agent responsible for sending mail and
  24. since computer programs cannot be held accountable for their
  25. behavior, it is strongly recommended that when a computer pro-
  26. gram generates a message, the HUMAN who is responsible for
  27. that program be referenced as part of the "Sender" field mail-
  28. box specification.

4.4.3. REPLY-TO / RESENT-REPLY-TO

  1. This field provides a general mechanism for indicating any
  2. mailbox(es) to which responses are to be sent. Three typical
  3. uses for this feature can be distinguished. In the first
  4. case, the author(s) may not have regular machine-based mail-
  5. boxes and therefore wish(es) to indicate an alternate machine
  6. address. In the second case, an author may wish additional
  7. persons to be made aware of, or responsible for, replies. A
  8. somewhat different use may be of some help to "text message
  9. teleconferencing" groups equipped with automatic distribution
  10. services: include the address of that service in the "Reply-
  11. To" field of all messages submitted to the teleconference;
  12. then participants can "reply" to conference submissions to
  13. guarantee the correct distribution of any submission of their
  14. own.
  15. Note: The "Return-Path" field is added by the mail transport
  16. service, at the time of final deliver. It is intended
  17. to identify a path back to the orginator of the mes-
  18. sage. The "Reply-To" field is added by the message
  19. originator and is intended to direct replies.
  20. 4.4.4. AUTOMATIC USE OF FROM / SENDER / REPLY-TO
  21. For systems which automatically generate address lists for
  22. replies to messages, the following recommendations are made:
  23. o The "Sender" field mailbox should be sent notices of
  24. any problems in transport or delivery of the original
  25. messages. If there is no "Sender" field, then the
  26. "From" field mailbox should be used.
  27. o The "Sender" field mailbox should NEVER be used
  28. automatically, in a recipient's reply message.
  29. o If the "Reply-To" field exists, then the reply should
  30. go to the addresses indicated in that field and not to
  31. the address(es) indicated in the "From" field.
  32. o If there is a "From" field, but no "Reply-To" field,
  33. the reply should be sent to the address(es) indicated
  34. in the "From" field.
  35. Sometimes, a recipient may actually wish to communicate with
  36. the person that initiated the message transfer. In such
  37. cases, it is reasonable to use the "Sender" address.
  38. This recommendation is intended only for automated use of
  39. originator-fields and is not intended to suggest that replies
  40. may not also be sent to other recipients of messages. It is
  41. up to the respective mail-handling programs to decide what
  42. additional facilities will be provided.
  43. Examples are provided in Appendix A.
  44. 4.5. RECEIVER FIELDS
  45. 4.5.1. TO / RESENT-TO
  46. This field contains the identity of the primary recipients of
  47. the message.
  48. 4.5.2. CC / RESENT-CC
  49. This field contains the identity of the secondary (informa-
  50. tional) recipients of the message.
  51. 4.5.3. BCC / RESENT-BCC
  52. This field contains the identity of additional recipients of
  53. the message. The contents of this field are not included in
  54. copies of the message sent to the primary and secondary reci-
  55. pients. Some systems may choose to include the text of the
  56. "Bcc" field only in the author(s)'s copy, while others may
  57. also include it in the text sent to all those indicated in the
  58. "Bcc" list.

4.6. REFERENCE FIELDS

4.6.1. Message-ID / Resent-Message-ID

This field contains a  unique identifier  (the local-part address unit) which refers to THIS version of THIS message. The uniqueness of the message identifier is guaranteed by the host which generates it. This identifier is intended to be machine readable and not necessarily meaningful to humans. A message identifier pertains to exactly one instantiation of a particular message; subsequent revisions to the message should each receive new message identifiers.

4.6.2. IN-REPLY-TO

The contents of this field identify previous correspondence which this message answers. Note that if message identifiers are used in this field, they must use the  msg-id specification format.

4.6.3. REFERENCES

The contents of this field identify other correspondence which this message references. Note that if message identifiers are used, they must use the  msg-id  specification format.

4.6.4. KEYWORDS

This field contains keywords or phrases, separated by commas.

4.7. Other Fields

4.7.1. SUBJECT

This is intended to provide a summary, or indicate the nature, of the message.

4.7.2. COMMENTS

Permits adding text comments onto the message without disturbing the contents of the message's body.

4.7.3. ENCRYPTED

  1. Sometimes, data encryption is used to increase the
  2. privacy of message contents. If the body of a message has
  3. been encrypted, to keep its contents private, the "Encrypted"
  4. field can be used to note the fact and to indicate the nature
  5. of the encryption. The first <word> parameter indicates the
  6. software used to encrypt the body, and the second, optional
  7. <word> is intended to aid the recipient in selecting the
  8. proper decryption key. This code word may be viewed as an
  9. index to a table of keys held by the recipient.
  10. Note: Unfortunately, headers must contain envelope, as well
  11. as contents, information. Consequently, it is neces-
  12. sary that they remain unencrypted, so that mail tran-
  13. sport services may access them. Since names,
  14. addresses, and "Subject" field contents may contain
  15. sensitive information, this requirement limits total
  16. message privacy.
  17. Names of encryption software are registered with the Net-
  18. work Information Center, SRI International, Menlo Park, Cali-
  19. fornia.

4.7.4. EXTENSION-FIELD

  1. A limited number of common fields have been defined in
  2. this document. As network mail requirements dictate, addi-
  3. tional fields may be standardized. To provide user-defined
  4. fields with a measure of safety, in name selection, such
  5. extension-fields will never have names that begin with the
  6. string "X-".
  7. Names of Extension-fields are registered with the Network
  8. Information Center, SRI International, Menlo Park, California.

4.7.5. USER-DEFINED-FIELD

  1. Individual users of network mail are free to define and
  2. use additional header fields. Such fields must have names
  3. which are not already used in the current specification or in
  4. any definitions of extension-fields, and the overall syntax of
  5. these user-defined-fields must conform to this specification's
  6. rules for delimiting and folding fields. Due to the
  7. extension-field publishing process, the name of a user-
  8. defined-field may be pre-empted
  9. Note: The prefatory string "X-" will never be used in the
  10. names of Extension-fields. This provides user-defined
  11. fields with a protected set of names.

5. Date and Time Specification

5.1. SYNTAX

  1. date-time = [ day "," ] date time ; dd mm yy
  2. ; hh:mm:ss zzz
  3. day = "Mon" / "Tue" / "Wed" / "Thu"
  4. / "Fri" / "Sat" / "Sun"
  5. date = 1*2DIGIT month 2DIGIT ; day month year
  6. ; e.g. 20 Jun 82
  7. month = "Jan" / "Feb" / "Mar" / "Apr"
  8. / "May" / "Jun" / "Jul" / "Aug"
  9. / "Sep" / "Oct" / "Nov" / "Dec"
  10. time = hour zone ; ANSI and Military
  11. hour = 2DIGIT ":" 2DIGIT [":" 2DIGIT]
  12. ; 00:00:00 - 23:59:59
  13. zone = "UT" / "GMT" ; Universal Time
  14. ; North American : UT
  15. / "EST" / "EDT" ; Eastern: - 5/ - 4
  16. / "CST" / "CDT" ; Central: - 6/ - 5
  17. / "MST" / "MDT" ; Mountain: - 7/ - 6
  18. / "PST" / "PDT" ; Pacific: - 8/ - 7
  19. / 1ALPHA ; Military: Z = UT;
  20. ; A:-1; (J not used)
  21. ; M:-12; N:+1; Y:+12
  22. / ( ("+" / "-") 4DIGIT ) ; Local differential
  23. ; hours+min. (HHMM)

5.2. SEMANTICS

If included, day-of-week must be the day implied by the date specification.

Time zone may be indicated in several ways. "UT" is Universal Time (formerly called "Greenwich Mean Time"); "GMT" is permitted as a reference to Universal Time. The military standard uses a single character for each zone. "Z" is Universal Time. "A" indicates one hour earlier, and "M" indicates 12 hours earlier; "N" is one hour later, and "Y" is 12 hours later. The letter "J" is not used. The other remaining two forms are taken from ANSI standard X3.51-1975. One allows explicit indication of the amount of offset from UT; the other uses common 3-character strings for indicating time zones in North America.

6. Address Specification

6.1. Syntax

  1. address = mailbox ; one addressee
  2. / group ; named list group = phrase ":" [#mailbox] ";" mailbox = addr-spec ; simple address
  3. / phrase route-addr ; name & addr-spec route-addr = "<" [route] addr-spec ">" route = 1#("@" domain) ":" ; path-relative addr-spec = local-part "@" domain ; global address local-part = word *("." word) ; uninterpreted
  4. ; case-preserved domain = sub-domain *("." sub-domain) sub-domain = domain-ref / domain-literal domain-ref = atom ; symbolic reference

6.2. SEMANTICS

A mailbox receives mail. It is a conceptual entity which does not necessarily pertain to file storage. For example, some sites may choose to print mail on their line printer and deliver the output to the addressee's desk.

A mailbox specification comprises a person, system or process name reference, a domain-dependent string, and a name-domain reference. The name reference is optional and is usually used to indicate the human name of a recipient. The name-domain reference specifies a sequence of sub-domains. The domain-dependent string is uninterpreted, except by the final sub-domain; the rest of the mail service merely transmits it as a literal string.

6.2.1. DOMAINS

  1. A name-domain is a set of registered (mail) names. A name-
  2. domain specification resolves to a subordinate name-domain
  3. specification or to a terminal domain-dependent string.
  4. Hence, domain specification is extensible, permitting any
  5. number of registration levels.
  6. Name-domains model a global, logical, hierarchical addressing
  7. scheme. The model is logical, in that an address specifica-
  8. tion is related to name registration and is not necessarily
  9. tied to transmission path. The model's hierarchy is a
  10. directed graph, called an in-tree, such that there is a single
  11. path from the root of the tree to any node in the hierarchy.
  12. If more than one path actually exists, they are considered to
  13. be different addresses.
  14. The root node is common to all addresses; consequently, it is
  15. not referenced. Its children constitute "top-level" name-
  16. domains. Usually, a service has access to its own full domain
  17. specification and to the names of all top-level name-domains.
  18. The "top" of the domain addressing hierarchy -- a child of the
  19. root -- is indicated by the right-most field, in a domain
  20. specification. Its child is specified to the left, its child
  21. to the left, and so on.
  22. Some groups provide formal registration services; these con-
  23. stitute name-domains that are independent logically of
  24. specific machines. In addition, networks and machines impli-
  25. citly compose name-domains, since their membership usually is
  26. registered in name tables.
  27. In the case of formal registration, an organization implements
  28. a (distributed) data base which provides an address-to-route
  29. mapping service for addresses of the form:
  30. person@registry.organization
  31. Note that "organization" is a logical entity, separate from
  32. any particular communication network.
  33. A mechanism for accessing "organization" is universally avail-
  34. able. That mechanism, in turn, seeks an instantiation of the
  35. registry; its location is not indicated in the address specif-
  36. ication. It is assumed that the system which operates under
  37. the name "organization" knows how to find a subordinate regis-
  38. try. The registry will then use the "person" string to deter-
  39. mine where to send the mail specification.
  40. The latter, network-oriented case permits simple, direct,
  41. attachment-related address specification, such as:
  42. user@host.network
  43. Once the network is accessed, it is expected that a message
  44. will go directly to the host and that the host will resolve
  45. the user name, placing the message in the user's mailbox.

6.2.2. ABBREVIATED DOMAIN SPECIFICATION

  1. Since any number of levels is possible within the domain
  2. hierarchy, specification of a fully qualified address can
  3. become inconvenient. This standard permits abbreviated domain
  4. specification, in a special case:
  5. For the address of the sender, call the left-most
  6. sub-domain Level N. In a header address, if all of
  7. the sub-domains above (i.e., to the right of) Level N
  8. are the same as those of the sender, then they do not
  9. have to appear in the specification. Otherwise, the
  10. address must be fully qualified.
  11. This feature is subject to approval by local sub-
  12. domains. Individual sub-domains may require their
  13. member systems, which originate mail, to provide full
  14. domain specification only. When permitted, abbrevia-
  15. tions may be present only while the message stays
  16. within the sub-domain of the sender.
  17. Use of this mechanism requires the sender's sub-domain
  18. to reserve the names of all top-level domains, so that
  19. full specifications can be distinguished from abbrevi-
  20. ated specifications.
  21. For example, if a sender's address is:
  22. sender@registry-A.registry-1.organization-X
  23. and one recipient's address is:
  24. recipient@registry-B.registry-1.organization-X
  25. and another's is:
  26. recipient@registry-C.registry-2.organization-X
  27. then ".registry-1.organization-X" need not be specified in the
  28. the message, but "registry-C.registry-2" DOES have to be
  29. specified. That is, the first two addresses may be abbrevi-
  30. ated, but the third address must be fully specified.
  31. When a message crosses a domain boundary, all addresses must
  32. be specified in the full format, ending with the top-level
  33. name-domain in the right-most field. It is the responsibility
  34. of mail forwarding services to ensure that addresses conform
  35. with this requirement. In the case of abbreviated addresses,
  36. the relaying service must make the necessary expansions. It
  37. should be noted that it often is difficult for such a service
  38. to locate all occurrences of address abbreviations. For exam-
  39. ple, it will not be possible to find such abbreviations within
  40. the body of the message. The "Return-Path" field can aid
  41. recipients in recovering from these errors.
  42. Note: When passing any portion of an addr-spec onto a process
  43. which does not interpret data according to this stan-
  44. dard (e.g., mail protocol servers). There must be NO
  45. LWSP-chars preceding or following the at-sign or any
  46. delimiting period ("."), such as shown in the above
  47. examples, and only ONE SPACE between contiguous
  48. <word>s.

6.2.3. DOMAIN TERMS

  1. A domain-ref must be THE official name of a registry, network,
  2. or host. It is a symbolic reference, within a name sub-
  3. domain. At times, it is necessary to bypass standard mechan-
  4. isms for resolving such references, using more primitive
  5. information, such as a network host address rather than its
  6. associated host name.
  7. To permit such references, this standard provides the domain-
  8. literal construct. Its contents must conform with the needs
  9. of the sub-domain in which it is interpreted.
  10. Domain-literals which refer to domains within the ARPA Inter-
  11. net specify 32-bit Internet addresses, in four 8-bit fields
  12. noted in decimal, as described in Request for Comments #820,
  13. "Assigned Numbers." For example:
  14. [10.0.3.19]
  15. Note: THE USE OF DOMAIN-LITERALS IS STRONGLY DISCOURAGED. It
  16. is permitted only as a means of bypassing temporary
  17. system limitations, such as name tables which are not
  18. complete.
  19. The names of "top-level" domains, and the names of domains
  20. under in the ARPA Internet, are registered with the Network
  21. Information Center, SRI International, Menlo Park, California.

6.2.4. DOMAIN-DEPENDENT LOCAL STRING

  1. The local-part of an addr-spec in a mailbox specification
  2. (i.e., the host's name for the mailbox) is understood to be
  3. whatever the receiving mail protocol server allows. For exam-
  4. ple, some systems do not understand mailbox references of the
  5. form "P. D. Q. Bach", but others do.
  6. This specification treats periods (".") as lexical separators.
  7. Hence, their presence in local-parts which are not quoted-
  8. strings, is detected. However, such occurrences carry NO
  9. semantics. That is, if a local-part has periods within it, an
  10. address parser will divide the local-part into several tokens,
  11. but the sequence of tokens will be treated as one uninter-
  12. preted unit. The sequence will be re-assembled, when the
  13. address is passed outside of the system such as to a mail pro-
  14. tocol service.
  15. For example, the address:
  16. First.Last@Registry.Org
  17. is legal and does not require the local-part to be surrounded
  18. with quotation-marks. (However, "First Last" DOES require
  19. quoting.) The local-part of the address, when passed outside
  20. of the mail system, within the Registry.Org domain, is
  21. "First.Last", again without quotation marks.

6.2.5. BALANCING LOCAL-PART AND DOMAIN

  1. In some cases, the boundary between local-part and domain can
  2. be flexible. The local-part may be a simple string, which is
  3. used for the final determination of the recipient's mailbox.
  4. All other levels of reference are, therefore, part of the
  5. domain.
  6. For some systems, in the case of abbreviated reference to the
  7. local and subordinate sub-domains, it may be possible to
  8. specify only one reference within the domain part and place
  9. the other, subordinate name-domain references within the
  10. local-part. This would appear as:
  11. mailbox.sub1.sub2@this-domain
  12. Such a specification would be acceptable to address parsers
  13. which conform to RFC #733, but do not support this newer
  14. Internet standard. While contrary to the intent of this stan-
  15. dard, the form is legal.
  16. Also, some sub-domains have a specification syntax which does
  17. not conform to this standard. For example:
  18. sub-net.mailbox@sub-domain.domain
  19. uses a different parsing sequence for local-part than for
  20. domain.
  21. Note: As a rule, the domain specification should contain
  22. fields which are encoded according to the syntax of
  23. this standard and which contain generally-standardized
  24. information. The local-part specification should con-
  25. tain only that portion of the address which deviates
  26. from the form or intention of the domain field.

6.2.6. MULTIPLE MAILBOXES

  1. An individual may have several mailboxes and wish to receive
  2. mail at whatever mailbox is convenient for the sender to
  3. access. This standard does not provide a means of specifying
  4. "any member of" a list of mailboxes.
  5. A set of individuals may wish to receive mail as a single unit
  6. (i.e., a distribution list). The <group> construct permits
  7. specification of such a list. Recipient mailboxes are speci-
  8. fied within the bracketed part (":" - ";"). A copy of the
  9. transmitted message is to be sent to each mailbox listed.
  10. This standard does not permit recursive specification of
  11. groups within groups.
  12. While a list must be named, it is not required that the con-
  13. tents of the list be included. In this case, the <address>
  14. serves only as an indication of group distribution and would
  15. appear in the form:
  16. name:;
  17. Some mail services may provide a group-list distribution
  18. facility, accepting a single mailbox reference, expanding it
  19. to the full distribution list, and relaying the mail to the
  20. list's members. This standard provides no additional syntax
  21. for indicating such a service. Using the <group> address
  22. alternative, while listing one mailbox in it, can mean either
  23. that the mailbox reference will be expanded to a list or that
  24. there is a group with one member.

6.2.7. EXPLICIT PATH SPECIFICATION

  1. At times, a message originator may wish to indicate the
  2. transmission path that a message should follow. This is
  3. called source routing. The normal addressing scheme, used in
  4. an addr-spec, is carefully separated from such information;
  5. the <route> portion of a route-addr is provided for such occa-
  6. sions. It specifies the sequence of hosts and/or transmission
  7. services that are to be traversed. Both domain-refs and
  8. domain-literals may be used.
  9. Note: The use of source routing is discouraged. Unless the
  10. sender has special need of path restriction, the choice
  11. of transmission route should be left to the mail tran-
  12. sport service.

6.3. RESERVED ADDRESS

It often is necessary to send mail to a site, without knowing any of its valid addresses. For example, there may be mail system dysfunctions, or a user may wish to find out a person's correct address, at that site.

This standard specifies a single, reserved mailbox address (local-part) which is to be valid at each site. Mail sent to that address is to be routed to a person responsible for the site's mail system or to a person with responsibility for general site operation. The name of the reserved local-part address is:

Postmaster
so that "Postmaster@domain" is required to be valid.

Note: This reserved local-part must be matched without sensitivity to alphabetic case, so that "POSTMASTER", "postmaster", and even "poStmASteR" is to be accepted.

7. Bibliography

  1. ANSI. "USA Standard Code for Information Interchange," X3.4.
  2. American National Standards Institute: New York (1968). Also
  3. in: Feinler, E. and J. Postel, eds., "ARPANET Protocol Hand-
  4. book", NIC 7104.
  5. ANSI. "Representations of Universal Time, Local Time Differen-
  6. tials, and United States Time Zone References for Information
  7. Interchange," X3.51-1975. American National Standards Insti-
  8. tute: New York (1975).
  9. Bemer, R.W., "Time and the Computer." In: Interface Age (Feb.
  10. 1979).
  11. Bennett, C.J. "JNT Mail Protocol". Joint Network Team, Ruther-
  12. ford and Appleton Laboratory: Didcot, England.
  13. Bhushan, A.K., Pogran, K.T., Tomlinson, R.S., and White, J.E.
  14. "Standardizing Network Mail Headers," ARPANET Request for
  15. Comments No. 561, Network Information Center No. 18516; SRI
  16. International: Menlo Park (September 1973).
  17. Birrell, A.D., Levin, R., Needham, R.M., and Schroeder, M.D.
  18. "Grapevine: An Exercise in Distributed Computing," Communica-
  19. tions of the ACM 25, 4 (April 1982), 260-274.
  20. Crocker, D.H., Vittal, J.J., Pogran, K.T., Henderson, D.A.
  21. "Standard for the Format of ARPA Network Text Message,"
  22. ARPANET Request for Comments No. 733, Network Information
  23. Center No. 41952. SRI International: Menlo Park (November
  24. 1977).
  25. Feinler, E.J. and Postel, J.B. ARPANET Protocol Handbook, Net-
  26. work Information Center No. 7104 (NTIS AD A003890). SRI
  27. International: Menlo Park (April 1976).
  28. Harary, F. "Graph Theory". Addison-Wesley: Reading, Mass.
  29. (1969).
  30. Levin, R. and Schroeder, M. "Transport of Electronic Messages
  31. through a Network," TeleInformatics 79, pp. 29-33. North
  32. Holland (1979). Also as Xerox Palo Alto Research Center
  33. Technical Report CSL-79-4.
  34. Myer, T.H. and Henderson, D.A. "Message Transmission Protocol,"
  35. ARPANET Request for Comments, No. 680, Network Information
  36. Center No. 32116. SRI International: Menlo Park (1975).
  37. NBS. "Specification of Message Format for Computer Based Message
  38. Systems, Recommended Federal Information Processing Standard."
  39. National Bureau of Standards: Gaithersburg, Maryland
  40. (October 1981).
  41. NIC. Internet Protocol Transition Workbook. Network Information
  42. Center, SRI-International, Menlo Park, California (March
  43. 1982).
  44. Oppen, D.C. and Dalal, Y.K. "The Clearinghouse: A Decentralized
  45. Agent for Locating Named Objects in a Distributed Environ-
  46. ment," OPD-T8103. Xerox Office Products Division: Palo Alto,
  47. CA. (October 1981).
  48. Postel, J.B. "Assigned Numbers," ARPANET Request for Comments,
  49. No. 820. SRI International: Menlo Park (August 1982).
  50. Postel, J.B. "Simple Mail Transfer Protocol," ARPANET Request
  51. for Comments, No. 821. SRI International: Menlo Park (August
  52. 1982).
  53. Shoch, J.F. "Internetwork naming, addressing and routing," in
  54. Proc. 17th IEEE Computer Society International Conference, pp.
  55. 72-79, Sept. 1978, IEEE Cat. No. 78 CH 1388-8C.
  56. Su, Z. and Postel, J. "The Domain Naming Convention for Internet
  57. User Applications," ARPANET Request for Comments, No. 819.
  58. SRI International: Menlo Park (August 1982).

APPENDIX A. EXAMPLES

A.1. ADDRESSES

A.1.1. Alfred Neuman <Neuman@BBN-TENEXA>

A.1.2. Neuman@BBN-TENEXA

  1. These two "Alfred Neuman" examples have identical seman-
  2. tics, as far as the operation of the local host's mail sending
  3. (distribution) program (also sometimes called its "mailer")
  4. and the remote host's mail protocol server are concerned. In
  5. the first example, the "Alfred Neuman" is ignored by the
  6. mailer, as "Neuman@BBN-TENEXA" completely specifies the reci-
  7. pient. The second example contains no superfluous informa-
  8. tion, and, again, "Neuman@BBN-TENEXA" is the intended reci-
  9. pient.
  10. Note: When the message crosses name-domain boundaries, then
  11. these specifications must be changed, so as to indicate
  12. the remainder of the hierarchy, starting with the top
  13. level.

A.1.3. "George, Ted" <Shared@Group.Arpanet>

  1. This form might be used to indicate that a single mailbox
  2. is shared by several users. The quoted string is ignored by
  3. the originating host's mailer, because "Shared@Group.Arpanet"
  4. completely specifies the destination mailbox.

A.1.4. Wilt . (the Stilt) Chamberlain@NBA.US

  1. The "(the Stilt)" is a comment, which is NOT included in
  2. the destination mailbox address handed to the originating
  3. system's mailer. The local-part of the address is the string
  4. "Wilt.Chamberlain", with NO space between the first and second
  5. words.

A.1.5. Address Lists

  1. Gourmets: Pompous Person <WhoZiWhatZit@Cordon-Bleu>,
  2. Childs@WGBH.Boston, Galloping Gourmet@
  3. ANT.Down-Under (Australian National Television),
  4. Cheapie@Discount-Liquors;,
  5. Cruisers: Port@Portugal, Jones@SEA;,
  6. Another@Somewhere.SomeOrg
  7. This group list example points out the use of comments and the
  8. mixing of addresses and groups.

A.2. ORIGINATOR ITEMS

A.2.1. Author-sent

  1. George Jones logs into his host as "Jones". He sends
  2. mail himself.
  3. From: Jones@Group.Org
  4. or
  5. From: George Jones <Jones@Group.Org>

A.2.2. Secretary-sent

  1. George Jones logs in as Jones on his host. His secre-
  2. tary, who logs in as Secy sends mail for him. Replies to the
  3. mail should go to George.
  4. From: George Jones <Jones@Group>
  5. Sender: Secy@Other-Group

A.2.3. Secretary-sent, for user of shared directory

  1. George Jones' secretary sends mail for George. Replies
  2. should go to George.
  3. From: George Jones<Shared@Group.Org>
  4. Sender: Secy@Other-Group
  5. Note that there need not be a space between "Jones" and the
  6. "<", but adding a space enhances readability (as is the case
  7. in other examples.

A.2.4. Committee activity, with one author

  1. George is a member of a committee. He wishes to have any
  2. replies to his message go to all committee members.
  3. From: George Jones <Jones@Host.Net>
  4. Sender: Jones@Host
  5. Reply-To: The Committee: Jones@Host.Net,
  6. Smith@Other.Org,
  7. Doe@Somewhere-Else;
  8. Note that if George had not included himself in the
  9. enumeration of The Committee, he would not have gotten an
  10. implicit reply; the presence of the "Reply-to" field SUPER-
  11. SEDES the sending of a reply to the person named in the "From"
  12. field.

A.2.5. Secretary acting as full agent of author

  1. George Jones asks his secretary (Secy@Host) to send a
  2. message for him in his capacity as Group. He wants his secre-
  3. tary to handle all replies.
  4. From: George Jones <Group@Host>
  5. Sender: Secy@Host
  6. Reply-To: Secy@Host

A.2.6. Agent for user without online mailbox

  1. A friend of George's, Sarah, is visiting. George's
  2. secretary sends some mail to a friend of Sarah in computer-
  3. land. Replies should go to George, whose mailbox is Jones at
  4. Registry.
  5. From: Sarah Friendly <Secy@Registry>
  6. Sender: Secy-Name <Secy@Registry>
  7. Reply-To: Jones@Registry.

A.2.7. Agent for member of a committee

  1. George's secretary sends out a message which was authored
  2. jointly by all the members of a committee. Note that the name
  3. of the committee cannot be specified, since <group> names are
  4. not permitted in the From field.
  5. From: Jones@Host,
  6. Smith@Other-Host,
  7. Doe@Somewhere-Else
  8. Sender: Secy@SHost

A.3. COMPLETE HEADERS

A.3.1. Minimum required

  1. Date: 26 Aug 76 1429 EDT Date: 26 Aug 76 1429 EDT
  2. From: Jones@Registry.Org or From: Jones@Registry.Org
  3. Bcc: To: Smith@Registry.Org
  4. Note that the "Bcc" field may be empty, while the "To" field
  5. is required to have at least one address.

A.3.2. Using some of the additional fields

  1. Date: 26 Aug 76 1430 EDT
  2. From: George Jones<Group@Host>
  3. Sender: Secy@SHOST
  4. To: "Al Neuman"@Mad-Host,
  5. Sam.Irving@Other-Host
  6. Message-ID: <some.string@SHOST>

A.3.3. About as complex as you're going to get

  1. Date : 27 Aug 76 0932 PDT
  2. From : Ken Davis <KDavis@This-Host.This-net>
  3. Subject : Re: The Syntax in the RFC
  4. Sender : KSecy@Other-Host
  5. Reply-To : Sam.Irving@Reg.Organization
  6. To : George Jones <Group@Some-Reg.An-Org>,
  7. Al.Neuman@MAD.Publisher
  8. cc : Important folk:
  9. Tom Softwood <Balsa@Tree.Root>,
  10. "Sam Irving"@Other-Host;,
  11. Standard Distribution:
  12. /main/davis/people/standard@Other-Host,
  13. "<Jones>standard.dist.3"@Tops-20-Host>;
  14. Comment : Sam is away on business. He asked me to handle
  15. his mail for him. He'll be able to provide a
  16. more accurate explanation when he returns
  17. next week.
  18. In-Reply-To: <some.string@DBM.Group>, George's message
  19. X-Special-action: This is a sample of user-defined field-
  20. names. There could also be a field-name
  21. "Special-action", but its name might later be
  22. preempted
  23. Message-ID: <4231.629.XYzi-What@Other-Host>

Appendix B. Simple Field Parsing

Some mail-reading software systems may wish to perform only minimal processing, ignoring the internal syntax of structured field-bodies and treating them the same as unstructured-field-bodies. Such software will need only to distinguish:
  • Header fields from the message body,
  • Beginnings of fields from lines which continue fields,
  • Field-names from field-contents.
The abbreviated set of syntactic rules which follows will suffice for this purpose. It describes a limited view of messages and is a subset of the syntactic rules provided in the main part of this specification. One small exception is that the contents of field-bodies consist only of text:

B.1. SYNTAX

  1. message = *field *(CRLF *text)
  2. field = field-name ":" [field-body] CRLF
  3. field-name = 1*<any CHAR, excluding CTLs, SPACE, and ":">
  4. field-body = *text [CRLF LWSP-char field-body]

B.2. SEMANTICS

  1. Headers occur before the message body and are terminated by
  2. a null line (i.e., two contiguous CRLFs).
  3. A line which continues a header field begins with a SPACE or
  4. HTAB character, while a line beginning a field starts with a
  5. printable character which is not a colon.
  6. A field-name consists of one or more printable characters
  7. (excluding colon, space, and control-characters). A field-name
  8. MUST be contained on one line. Upper and lower case are not dis-
  9. tinguished when comparing field-names.

Apppendix C. DIFFERENCES FROM RFC #733

  1. The following summarizes the differences between this stan-
  2. dard and the one specified in Arpanet Request for Comments #733,
  3. "Standard for the Format of ARPA Network Text Messages". The
  4. differences are listed in the order of their occurrence in the
  5. current specification.
  6. C.1. FIELD DEFINITIONS
  7. C.1.1. FIELD NAMES
  8. These now must be a sequence of printable characters. They
  9. may not contain any LWSP-chars.
  10. C.2. LEXICAL TOKENS
  11. C.2.1. SPECIALS
  12. The characters period ("."), left-square bracket ("["), and
  13. right-square bracket ("]") have been added. For presentation
  14. purposes, and when passing a specification to a system that
  15. does not conform to this standard, periods are to be contigu-
  16. ous with their surrounding lexical tokens. No linear-white-
  17. space is permitted between them. The presence of one LWSP-
  18. char between other tokens is still directed.
  19. C.2.2. ATOM
  20. Atoms may not contain SPACE.
  21. C.2.3. SPECIAL TEXT
  22. ctext and qtext have had backslash ("\") added to the list of
  23. prohibited characters.
  24. C.2.4. DOMAINS
  25. The lexical tokens <domain-literal> and <dtext> have been
  26. added.
  27. C.3. MESSAGE SPECIFICATION
  28. C.3.1. TRACE
  29. The "Return-path:" and "Received:" fields have been specified.
  30. C.3.2. FROM
  31. The "From" field must contain machine-usable addresses (addr-
  32. spec). Multiple addresses may be specified, but named-lists
  33. (groups) may not.
  34. C.3.3. RESENT
  35. The meta-construct of prefacing field names with the string
  36. "Resent-" has been added, to indicate that a message has been
  37. forwarded by an intermediate recipient.
  38. C.3.4. DESTINATION
  39. A message must contain at least one destination address field.
  40. "To" and "CC" are required to contain at least one address.
  41. C.3.5. IN-REPLY-TO
  42. The field-body is no longer a comma-separated list, although a
  43. sequence is still permitted.
  44. C.3.6. REFERENCE
  45. The field-body is no longer a comma-separated list, although a
  46. sequence is still permitted.
  47. C.3.7. ENCRYPTED
  48. A field has been specified that permits senders to indicate
  49. that the body of a message has been encrypted.
  50. C.3.8. EXTENSION-FIELD
  51. Extension fields are prohibited from beginning with the char-
  52. acters "X-".

C.4. DATE AND TIME SPECIFICATION

  1. C.4.1. SIMPLIFICATION
  2. Fewer optional forms are permitted and the list of three-
  3. letter time zones has been shortened.

C.5. ADDRESS SPECIFICATION

C.5.1. ADDRESS

  1. The use of quoted-string, and the ":"-atom-":" construct, have
  2. been removed. An address now is either a single mailbox
  3. reference or is a named list of addresses. The latter indi-
  4. cates a group distribution.
  5. C.5.2. GROUPS
  6. Group lists are now required to to have a name. Group lists
  7. may not be nested.

C.5.3. MAILBOX

  1. A mailbox specification may indicate a person's name, as
  2. before. Such a named list no longer may specify multiple
  3. mailboxes and may not be nested.

C.5.4. ROUTE ADDRESSING

  1. Addresses now are taken to be absolute, global specifications,
  2. independent of transmission paths. The <route> construct has
  3. been provided, to permit explicit specification of transmis-
  4. sion path. RFC #733's use of multiple at-signs ("@") was
  5. intended as a general syntax for indicating routing and/or
  6. hierarchical addressing. The current standard separates these
  7. specifications and only one at-sign is permitted.

C.5.5. AT-SIGN

The string " at " no longer is used as an address delimiter. Only at-sign ("@") serves the function.

C.5.6. DOMAINS

Hierarchical, logical name-domains have been added.

C.6. RESERVED ADDRESS

The local-part "Postmaster" has been reserved, so that users can be guaranteed at least one valid address at a site.

Appendix D. Alphabetical Listing of Syntax Rules

  1. address = mailbox ; one addressee
  2. / group ; named list
  3. addr-spec = local-part "@" domain ; global address
  4. ALPHA = <any ASCII alphabetic character>
  5. ; (101-132, 65.- 90.)
  6. ; (141-172, 97.-122.)
  7. atom = 1*<any CHAR except specials, SPACE and CTLs>
  8. authentic = "From" ":" mailbox ; Single author
  9. / ( "Sender" ":" mailbox ; Actual submittor
  10. "From" ":" 1#mailbox) ; Multiple authors
  11. ; or not sender
  12. CHAR = <any ASCII character> ; ( 0-177, 0.-127.)
  13. comment = "(" *(ctext / quoted-pair / comment) ")"
  14. CR = <ASCII CR, carriage return> ; ( 15, 13.)
  15. CRLF = CR LF
  16. ctext = <any CHAR excluding "(", ; => may be folded
  17. ")", "\" & CR, & including
  18. linear-white-space>
  19. CTL = <any ASCII control ; ( 0- 37, 0.- 31.)
  20. character and DEL> ; ( 177, 127.)
  21. date = 1*2DIGIT month 2DIGIT ; day month year
  22. ; e.g. 20 Jun 82
  23. dates = orig-date ; Original
  24. [ resent-date ] ; Forwarded
  25. date-time = [ day "," ] date time ; dd mm yy
  26. ; hh:mm:ss zzz
  27. day = "Mon" / "Tue" / "Wed" / "Thu"
  28. / "Fri" / "Sat" / "Sun"
  29. delimiters = specials / linear-white-space / comment
  30. destination = "To" ":" 1#address ; Primary
  31. / "Resent-To" ":" 1#address
  32. / "cc" ":" 1#address ; Secondary
  33. / "Resent-cc" ":" 1#address
  34. / "bcc" ":" #address ; Blind carbon
  35. / "Resent-bcc" ":" #address
  36. DIGIT = <any ASCII decimal digit> ; ( 60- 71, 48.- 57.)
  37. domain = sub-domain *("." sub-domain)
  38. domain-literal = "[" *(dtext / quoted-pair) "]"
  39. domain-ref = atom ; symbolic reference
  40. dtext = <any CHAR excluding "[", ; => may be folded
  41. "]", "\" & CR, & including
  42. linear-white-space>
  43. extension-field =
  44. <Any field which is defined in a document
  45. published as a formal extension to this
  46. specification; none will have names beginning
  47. with the string "X-">
  48. field = field-name ":" [ field-body ] CRLF
  49. fields = dates ; Creation time,
  50. source ; author id & one
  51. 1*destination ; address required
  52. *optional-field ; others optional
  53. field-body = field-body-contents
  54. [CRLF LWSP-char field-body]
  55. field-body-contents =
  56. <the ASCII characters making up the field-body, as
  57. defined in the following sections, and consisting
  58. of combinations of atom, quoted-string, and
  59. specials tokens, or else consisting of texts>
  60. field-name = 1*<any CHAR, excluding CTLs, SPACE, and ":">
  61. group = phrase ":" [#mailbox] ";"
  62. hour = 2DIGIT ":" 2DIGIT [":" 2DIGIT]
  63. ; 00:00:00 - 23:59:59
  64. HTAB = <ASCII HT, horizontal-tab> ; ( 11, 9.)
  65. LF = <ASCII LF, linefeed> ; ( 12, 10.)
  66. linear-white-space = 1*([CRLF] LWSP-char) ; semantics = SPACE
  67. ; CRLF => folding
  68. local-part = word *("." word) ; uninterpreted
  69. ; case-preserved
  70. LWSP-char = SPACE / HTAB ; semantics = SPACE
  71. mailbox = addr-spec ; simple address
  72. / phrase route-addr ; name & addr-spec
  73. message = fields *( CRLF *text ) ; Everything after
  74. ; first null line
  75. ; is message body
  76. month = "Jan" / "Feb" / "Mar" / "Apr"
  77. / "May" / "Jun" / "Jul" / "Aug"
  78. / "Sep" / "Oct" / "Nov" / "Dec"
  79. msg-id = "<" addr-spec ">" ; Unique message id
  80. optional-field =
  81. / "Message-ID" ":" msg-id
  82. / "Resent-Message-ID" ":" msg-id
  83. / "In-Reply-To" ":" *(phrase / msg-id)
  84. / "References" ":" *(phrase / msg-id)
  85. / "Keywords" ":" #phrase
  86. / "Subject" ":" *text
  87. / "Comments" ":" *text
  88. / "Encrypted" ":" 1#2word
  89. / extension-field ; To be defined
  90. / user-defined-field ; May be pre-empted
  91. orig-date = "Date" ":" date-time
  92. originator = authentic ; authenticated addr
  93. [ "Reply-To" ":" 1#address] )
  94. phrase = 1*word ; Sequence of words
  95. qtext = <any CHAR excepting <">, ; => may be folded
  96. "\" & CR, and including
  97. linear-white-space>
  98. quoted-pair = "\" CHAR ; may quote any char
  99. quoted-string = <"> *(qtext/quoted-pair) <">; Regular qtext or
  100. ; quoted chars.
  101. received = "Received" ":" ; one per relay
  102. ["from" domain] ; sending host
  103. ["by" domain] ; receiving host
  104. ["via" atom] ; physical path
  105. *("with" atom) ; link/mail protocol
  106. ["id" msg-id] ; receiver msg id
  107. ["for" addr-spec] ; initial form
  108. ";" date-time ; time received
  109. resent = resent-authentic
  110. [ "Resent-Reply-To" ":" 1#address] )
  111. resent-authentic =
  112. = "Resent-From" ":" mailbox
  113. / ( "Resent-Sender" ":" mailbox
  114. "Resent-From" ":" 1#mailbox )
  115. resent-date = "Resent-Date" ":" date-time
  116. return = "Return-path" ":" route-addr ; return address
  117. route = 1#("@" domain) ":" ; path-relative
  118. route-addr = "<" [route] addr-spec ">"
  119. source = [ trace ] ; net traversals
  120. originator ; original mail
  121. [ resent ] ; forwarded
  122. SPACE = <ASCII SP, space> ; ( 40, 32.)
  123. specials = "(" / ")" / "<" / ">" / "@" ; Must be in quoted-
  124. / "," / ";" / ":" / "\" / <"> ; string, to use
  125. / "." / "[" / "]" ; within a word.
  126. sub-domain = domain-ref / domain-literal
  127. text = <any CHAR, including bare ; => atoms, specials,
  128. CR & bare LF, but NOT ; comments and
  129. including CRLF> ; quoted-strings are
  130. ; NOT recognized.
  131. time = hour zone ; ANSI and Military
  132. trace = return ; path to sender
  133. 1*received ; receipt tags
  134. user-defined-field =
  135. <Any field which has not been defined
  136. in this specification or published as an
  137. extension to this specification; names for
  138. such fields must be unique and may be
  139. pre-empted by published extensions>
  140. word = atom / quoted-string
  141. zone = "UT" / "GMT" ; Universal Time
  142. ; North American : UT
  143. / "EST" / "EDT" ; Eastern: - 5/ - 4
  144. / "CST" / "CDT" ; Central: - 6/ - 5
  145. / "MST" / "MDT" ; Mountain: - 7/ - 6
  146. / "PST" / "PDT" ; Pacific: - 8/ - 7
  147. / 1ALPHA ; Military: Z = UT;
  148. <"> = <ASCII quote mark> ; ( 42, 34.)

转载于:https://my.oschina.net/0x00/blog/152133

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/知新_RL/article/detail/816153?site
推荐阅读
相关标签
  

闽ICP备14008679号