II.B. Syntax (continued)
2. General Syntax of Messages
NOTE: The syntax indicates that items in <required-headers> must be in a specific order and precede all other header items. Header fields, in fact, are NOT required to occur in any particular order. Required header items must be unique (occur exactly once). This specification permits multiple occurrences of most optional fields. However, the interpretation of such multiple occurrences is not specified here.
<message> ::= <headers>
| <headers> <crlf> <message-text>
<headers> ::= <required-headers>
| <required-headers> <optional-headers>
<required-headers> ::= <date-field> <originator>
<originator> ::= <mach-from-field>
| <mach-from-list> <sender-field>
| <mach-from-field> <reply-to-field>
| <any-from-field> <sender-field>
<reply-to-field>
<date-field> ::= "Date" ":" <date-time>
<mach-from-field> ::= "From" ":" <mach-addr-item>
<mach-from-list> ::= "From" ":" <mach-addr-list>
<any-from-field> ::= "From" ":" <address-list>
<sender-field> ::= "Sender" ":" <host-phrase>
<reply-to-field> ::= "Reply-To" ":" <mach-addr-list>
<optional-headers>::= <optional-header-field>
| <optional-headers>
<optional-header-field>
<optional-header-field> ::= <addressee-field>
| <extension-field>
<addressee-field> ::= "To" ":" <address-list>
| "cc" ":" <address-list>
| "bcc" ":" <address-list>
| "Fcc" ":" <path-list>
<extension-field> ::= "In-Reply-To" ":" <reference-list>
| "Keywords" ":" <phrase-list>
| "Message-Id" ":" <mach-host-phrase>
| "References" ":" <reference-list>
| "Subject" ":" <text-line>
| "Comments" ":" <text-line>
| <user-defined-field>
<user-defined-field> ::= <A <field> which has a <field-name>
not defined in this specification>
The following syntax for the bodies of various fields should be thought of as describing each field body as a single long string (or line). The section on Lexical Analysis (section II.B.1) indicated how such long strings can be represented on more than one line in the actual transmitted message.
3. Syntax of General Addressee Items
<mach-addr-list> ::= <mach-addr-item>
| <mach-addr-item> "," <address-list>
<address-list> ::= <null>
| <address-item>
| <address-item> "," <address-list>
<address-item> ::= <mach-addr-item>
| <group-name> ":" <address-list> ";"
| <any-name>
| <path>
<mach-addr-item> ::= <mailbox>
| <phrase> "<" <mailbox-list> ">"
<group-name> ::= <phrase>
<any-name> ::= <quoted-string>
<mailbox-list> ::= <mailbox>
| <mailbox> "," <mailbox-list>
<mailbox> ::= <host-phrase>
<path> ::= ":" "File" ":" <path-name>
<path-name> ::= <path-item>
| "<" <path-list> ">"
<path-list> ::= <path-item>
| <path-item> "," <path-list>
<path-item> ::= <host-phrase>
4. Supporting Syntax
<reference-list> ::= <null>
| <reference-item>
| <reference-item> "," <reference-list>
<reference-item> ::= <phrase>
| <mach-host-phrase>
<mach-host-phrase>::= "<" <host-phrase> ">"
<host-phrase> ::= <phrase> <host-indicator>
<host-indicator> ::= <at-indicator> <host-name>
<at-indicator> ::= "at" | "@"
<host-name> ::= <atom>
| <decimal host address>
<date-time> ::= <day> <date> <time>
<day> ::= <null>
| <day-of-week> ","
<day-of-week> ::= "Monday" | "Mon"
| "Tuesday" | "Tue"
| "Wednesday" | "Wed"
| "Thursday" | "Thu"
| "Friday" | "Fri"
| "Saturday" | "Sat"
| "Sunday" | "Sun"
<date> ::= <string-date>
| <slash-date>
<string-date> ::= <day-of-month> <string-month>
<4-digit-year>
<slash-date> ::= <numeric-month> "/" <date-of-month>
"/" <2-digit-year>
<numeric-month> ::= <one or two decimal digits>
<day-of-month> ::= <one or two decimal digits>
<string-month> ::= "January" | "Jan"
| "February" | "Feb"
| "March" | "Mar"
| "April" | "Apr"
| "May"
| "June" | "Jun"
| "July" | "Jul"
| "August" | "Aug"
| "September"| "Sep"
| "October" | "Oct"
| "November" | "Nov"
| "December" | "Dec"
<4-digit-year> ::= <four decimal digits>
<2-digit-year> ::= <two decimal digits>
<time> ::= <24-hour-time> "-" <time-zone>
<24-hour-time> ::= <hour> <minute>
<hour> ::= <two decimal digits>
<minute> ::= <two decimal digits>
<time-zone> ::= "GMT" | "Z" | "GDT"
| "AST" | "ADT"
| "EST" | "EDT" | "CST" | "CDT"
| "MST" | "MDT" | "PST" | "PDT"
| "YST" | "YDT" | "HST" | "HDT"
<phrase> ::= <word>
| <word> <phrase>
<phrase-list> ::= <null>
| <phrase>
| <phrase> "," <phrase-list>
<word> ::= <atom>
| <quoted-string>