III.C-E. Sintassi generale dei messaggi, elementi di destinatario e costrutti di supporto
C. SINTASSI GENERALE DEI MESSAGGI
NOTA: A causa di un artefatto delle convenzioni di notazione, la sintassi indica che, quando presenti, i campi "Date", "From", "Sender" e "Reply-To" devono comparire in un ordine particolare. Questi elementi di intestazione devono essere unici (comparire esattamente una volta). Tuttavia, in realtà NON è richiesto che i campi di intestazione compaiano in un ordine particolare, salvo che il corpo del messaggio deve comparire DOPO le intestazioni. Per leggibilità e facilità di analisi da parte di sistemi semplici, si raccomanda che le intestazioni siano inviate nell'ordine "Date", "From", "Subject", "Sender", "To", "cc", ecc. Questa specifica consente occorrenze multiple della maggior parte dei campi facoltativi. Tuttavia, la loro interpretazione non è specificata qui e il loro uso è fortemente sconsigliato.
La sintassi seguente per i corpi dei vari campi va intesa come descrittiva di ciascun corpo di campo come un'unica lunga stringa (o riga). La sezione sull'analisi lessicale (sezione II.B) indica come tali lunghe stringhe possano essere rappresentate su più di una riga nel messaggio effettivamente trasmesso.
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. SINTASSI DEGLI ELEMENTI GENERALI DI DESTINATARIO
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. COSTRUTTI DI SUPPORTO
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