III.C-E. General Syntax of Messages, Addressee Items and Supporting Constructs
C. GENERAL SYNTAX OF MESSAGES
NOTE: Due to an artifact of the notational conventions, the syntax indicates that, when present, "Date", "From", "Sender", and "Reply-To" fields must be in a particular order. These header items must be unique (occur exactly once). However header fields, in fact, are NOT required to occur in any particular order, except that the message body must occur AFTER the headers. For readability and ease of parsing by simple systems, it is recommended that headers be sent in the order "Date", "From", "Subject", "Sender", "To", "cc", etc. This specification permits multiple occurrences of most optional-fields. However, their interpretation is not specified here, and their use is strongly discouraged.
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) indicates how such long strings can be represented on more than one line in the actual transmitted message.
message = fields *( CRLF *text ) ; Everything after
; first null line
; is message body
fields = date-field ; Creation time-stamp
originator-fields ; & author id are
*optional-field ; required: others
; are all optional
originator-fields =
( "From" ":" mailbox ; Single author
["Reply-To" ":" #address] )
/ ( "From" ":" 1#address ; Multiple authors &
"Sender" ":" mailbox ; may have non-mach-
["Reply-To" ":" #address] ); ine addresses
date-field = "Date" ":" date-time
optional-field =
"To" ":" #address
/ "cc" ":" #address
/ "bcc" ":" #address ; Blind carbon
/ "Subject" ":" *text
/ "Comments" ":" *text
/ "Message-ID" ":" mach-id ; Only one allowed
/ "In-Reply-To"":" #(phrase / mach-id)
/ "References" ":" #(phrase / mach-id)
/ "Keywords" ":" #phrase
/ extension-field ; To be defined in
; supplemental
; specifications
/ user-defined-field ; Must have unique
; field-name & may
; be pre-empted
extension-field = <Any field which is defined in a document
published as a formal extension to this
specification>
user-defined-field = <Any field which has not been defined in
this specification or published as an extension to
this specification; names for such fields must be
unique and may be preempted by published
extensions>
D. SYNTAX OF GENERAL ADDRESSEE ITEMS
address = host-phrase ; Machine mailbox
/ ( [phrase] "<" #address ">") ; Individual / List
/ ( [phrase] ":" #address ";") ; Group
/ quoted-string ; Arbitrary text
/ (":" ( "Include" ; File, w/ addr list
/ "Postal" ; (U.S.) Postal addr
/ atom ) ; Extended data type
":" address)
mailbox = host-phrase / (phrase mach-id)
mach-id = "<" host-phrase ">" ; Contents must never
; be modified!
E. SUPPORTING CONSTRUCTS
host-phrase = phrase host-indicator ; Basic address
host-indicator = 1*( ("at" / "@") node ) ; Right-most node is
; at top of network
; hierarchy; left-
; most must be host
node = word / 1*DIGIT ; Official host or
; network name or
; decimal address
date-time = [ day-of-week "," ] date time
day-of-week = "Monday" / "Mon" / "Tuesday" / "Tue"
/ "Wednesday" / "Wed" / "Thursday" / "Thu"
/ "Friday" / "Fri" / "Saturday" / "Sat"
/ "Sunday" / "Sun"
date = 1*2DIGIT ["-"] month ; day month year
["-"] (2DIGIT /4DIGIT) ; e.g. 20 Aug [19]77
month = "January" / "Jan" / "February" / "Feb"
/ "March" / "Mar" / "April" / "Apr"
/ "May" / "June" / "Jun"
/ "July" / "Jul" / "August" / "Aug"
/ "September" / "Sep" / "October" / "Oct"
/ "November" / "Nov" / "December" / "Dec"
time = hour zone ; ANSI and Military
; (seconds optional)
hour = 2DIGIT [":"] 2DIGIT [ [":"] 2DIGIT ]
; 0000[00] - 2359[59]
zone = ( ["-"] ( "GMT" ; Relative to GMT:
; North American
/ "NST" / ; Newfoundland:-3:30
/ "AST" / "ADT" ; Atlantic: - 4/ - 3
/ "EST" / "EDT" ; Eastern: - 5/ - 4
/ "CST" / "CDT" ; Central: - 6/ - 5
/ "MST" / "MDT" ; Mountain: - 7/ - 6
/ "PST" / "PDT" ; Pacific: - 8/ - 7
/ "YST" / "YDT" ; Yukon: - 9/ - 8
/ "HST" / "HDT" ; Haw/Ala -10/ - 9
/ "BST" / "BDT" ; Bering: -11/ -10
1ALPHA )) ; Military: Z = GMT;
; A:-1; (J not used)
; M:-12; N:+1; Y:+12
/ ( ("+" / "-") 4DIGIT ) ; Local differential
; hours/min. (HHMM)
phrase = 1*word ; Sequence of words.
; Separation seman-
; tically = SPACE
word = atom / quoted-string