Zum Hauptinhalt springen

III.C-E. Allgemeine Syntax von Nachrichten, Empfängerelementen und unterstützenden Konstrukten

C. ALLGEMEINE SYNTAX VON NACHRICHTEN​

HINWEIS: Aufgrund eines Artefakts der Notationskonventionen zeigt die Syntax an, dass die Felder "Date", "From", "Sender" und "Reply-To", wenn vorhanden, in einer bestimmten Reihenfolge stehen müssen. Diese Header-Elemente müssen eindeutig sein (genau einmal vorkommen). Header-Felder müssen jedoch tatsächlich NICHT in einer bestimmten Reihenfolge auftreten, außer dass der Message-Body NACH den Headern stehen muss. Zur besseren Lesbarkeit und zur leichteren Verarbeitung durch einfache Systeme wird empfohlen, die Header in der Reihenfolge "Date", "From", "Subject", "Sender", "To", "cc" usw. zu senden. Diese Spezifikation erlaubt mehrfaches Auftreten der meisten optionalen Felder. Ihre Interpretation wird hier jedoch nicht spezifiziert, und von ihrer Verwendung wird dringend abgeraten.

Die folgende Syntax für die Bodies verschiedener Felder sollte so verstanden werden, dass sie jeden Field-Body als eine einzelne lange Zeichenkette (oder Zeile) beschreibt. Der Abschnitt über die lexikalische Analyse (Abschnitt II.B) zeigt, wie solche langen Zeichenketten in der tatsächlich übertragenen Nachricht auf mehr als eine Zeile verteilt dargestellt werden können.

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 ALLGEMEINER EMPFÄNGERELEMENTE​

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. UNTERSTÜTZENDE KONSTRUKTE​

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