no-fold-literal = "[" *(dtext / quoted-pair) "]"
The "Message-ID:" field provides a unique message identifier that
refers to a particular version of a particular message. The
uniqueness of the message identifier is guaranteed by the host that
generates it (see below). This message 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 each receive new message
identifiers.
Note: There are many instances when messages are "changed", but those
changes do not constitute a new instantiation of that message, and
therefore the message would not get a new message identifier. For
example, when messages are introduced into the transport system, they
are often prepended with additional header fields such as trace
fields (described in section 3.6.7) and resent fields (described in
section 3.6.6). The addition of such header fields does not change
the identity of the message and therefore the original "Message-ID:"
field is retained. In all cases, it is the meaning that the sender
of the message wishes to convey (i.e., whether this is the same
message or a different message) that determines whether or not the
"Message-ID:" field changes, not any particular syntactic difference
that appears (or does not appear) in the message.
The "In-Reply-To:" and "References:" fields are used when creating a
reply to a message. They hold the message identifier of the original
message and the message identifiers of other messages (for example,
in the case of a reply to a message which was itself a reply). The
"In-Reply-To:" field may be used to identify the message (or
messages) to which the new message is a reply, while the
"References:" field may be used to identify a "thread" of
conversation.
When creating a reply to a message, the "In-Reply-To:" and
"References:" fields of the resultant message are constructed as
follows:
The "In-Reply-To:" field will contain the contents of the "Message-
ID:" field of the message to which this one is a reply (the "parent
message"). If there is more than one parent message, then the "In-
Reply-To:" field will contain the contents of all of the parents'
"Message-ID:" fields. If there is no "Message-ID:" field in any of
the parent messages, then the new message will have no "In-Reply-To:"
field.
The "References:" field will contain the contents of the parent's
"References:" field (if any) followed by the contents of the parent's
"Message-ID:" field (if any). If the parent message does not contain
a "References:" field but does have an "In-Reply-To:" field
containing a single message identifier, then the "References:" field
will contain the contents of the parent's "In-Reply-To:" field
followed by the contents of the parent's "Message-ID:" field (if
any). If the parent has none of the "References:", "In-Reply-To:",
or "Message-ID:" fields, then the new message will have no
"References:" field.
Note: Some implementations parse the "References:" field to display
the "thread of the discussion". These implementations assume that
each new message is a reply to a single parent and hence that they
can walk backwards through the "References:" field to find the parent
of each message listed there. Therefore, trying to form a
"References:" field for a reply that has multiple parents is
discouraged and how to do so is not defined in this document.
The message identifier (msg-id) itself MUST be a globally unique
identifier for a message. The generator of the message identifier
MUST guarantee that the msg-id is unique. There are several
algorithms that can be used to accomplish this. Since the msg-id has
a similar syntax to angle-addr (identical except that comments and
folding white space are not allowed), a good method is to put the
domain name (or a domain literal IP address) of the host on which the
message identifier was created on the right hand side of the "@", and
put a combination of the current absolute date and time along with
some other currently unique (perhaps sequential) identifier available
on the system (for example, a process id number) on the left hand
side. Using a date on the left hand side and a domain name or domain
literal on the right hand side makes it possible to guarantee
uniqueness since no two hosts use the same domain name or IP address
at the same time. Though other algorithms will work, it is
RECOMMENDED that the right hand side contain some domain identifier
(either of the host itself or otherwise) such that the generator of
the message identifier can guarantee the uniqueness of the left hand
side within the scope of that domain.
Semantically, the angle bracket characters are not part of the
msg-id; the msg-id is what is contained between the two angle bracket
characters.
3.6.5. Informational fields
The informational fields are all optional. The "Keywords:" field
contains a comma-separated list of one or more words or
quoted-strings. The "Subject:" and "Comments:" fields are
unstructured fields as defined in section 2.2.1, and therefore may
contain text or folding white space.
subject = "Subject:" unstructured CRLF
comments = "Comments:" unstructured CRLF
keywords = "Keywords:" phrase *("," phrase) CRLF
These three fields are intended to have only human-readable content
with information about the message. The "Subject:" field is the most
common and contains a short string identifying the topic of the
message. When used in a reply, the field body MAY start with the
string "Re: " (from the Latin "res", in the matter of) followed by
the contents of the "Subject:" field body of the original message.
If this is done, only one instance of the literal string "Re: " ought
to be used since use of other strings or more than one instance can
lead to undesirable consequences. The "Comments:" field contains any
additional comments on the text of the body of the message. The
"Keywords:" field contains a comma-separated list of important words
and phrases that might be useful for the recipient.
3.6.6. Resent fields
Resent fields SHOULD be added to any message that is reintroduced by
a user into the transport system. A separate set of resent fields
SHOULD be added each time this is done. All of the resent fields
corresponding to a particular resending of the message SHOULD be
together. Each new set of resent fields is prepended to the message;
that is, the most recent set of resent fields appear earlier in the
message. No other fields in the message are changed when resent
fields are added.
Each of the resent fields corresponds to a particular field elsewhere
in the syntax. For instance, the "Resent-Date:" field corresponds to
the "Date:" field and the "Resent-To:" field corresponds to the "To:"
field. In each case, the syntax for the field body is identical to
the syntax given previously for the corresponding field.
When resent fields are used, the "Resent-From:" and "Resent-Date:"
fields MUST be sent. The "Resent-Message-ID:" field SHOULD be sent.
"Resent-Sender:" SHOULD NOT be used if "Resent-Sender:" would be
identical to "Resent-From:".
resent-date = "Resent-Date:" date-time CRLF
resent-from = "Resent-From:" mailbox-list CRLF
resent-sender = "Resent-Sender:" mailbox CRLF
resent-to = "Resent-To:" address-list CRLF
resent-cc = "Resent-Cc:" address-list CRLF
resent-bcc = "Resent-Bcc:" (address-list / [CFWS]) CRLF
resent-msg-id = "Resent-Message-ID:" msg-id CRLF
Resent fields are used to identify a message as having been
reintroduced into the transport system by a user. The purpose of
using resent fields is to have the message appear to the final
recipient as if it were sent directly by the original sender, with
all of the original fields remaining the same. Each set of resent
fields correspond to a particular resending event. That is, if a
message is resent multiple times, each set of resent fields gives
identifying information for each individual time. Resent fields are
strictly informational. They MUST NOT be used in the normal
processing of replies or other such automatic actions on messages.
Note: Reintroducing a message into the transport system and using
resent fields is a different operation from "forwarding".
"Forwarding" has two meanings: One sense of forwarding is that a mail
reading program can be told by a user to forward a copy of a message
to another person, making the forwarded message the body of the new
message. A forwarded message in this sense does not appear to have
come from the original sender, but is an entirely new message from
the forwarder of the message. On the other hand, forwarding is also
used to mean when a mail transport program gets a message and
forwards it on to a different destination for final delivery. Resent
header fields are not intended for use with either type of
forwarding.
The resent originator fields indicate the mailbox of the person(s) or
system(s) that resent the message. As with the regular originator
fields, there are two forms: a simple "Resent-From:" form which
contains the mailbox of the individual doing the resending, and the
more complex form, when one individual (identified in the
"Resent-Sender:" field) resends a message on behalf of one or more
others (identified in the "Resent-From:" field).
Note: When replying to a resent message, replies behave just as they
would with any other message, using the original "From:",
"Reply-To:", "Message-ID:", and other fields. The resent fields are
only informational and MUST NOT be used in the normal processing of
replies.
The "Resent-Date:" indicates the date and time at which the resent
message is dispatched by the resender of the message. Like the
"Date:" field, it is not the date and time that the message was
actually transported.
The "Resent-To:", "Resent-Cc:", and "Resent-Bcc:" fields function
identically to the "To:", "Cc:", and "Bcc:" fields respectively,
except that they indicate the recipients of the resent message, not
the recipients of the original message.
The "Resent-Message-ID:" field provides a unique identifier for the
resent message.
3.6.7. Trace fields
The trace fields are a group of header fields consisting of an
optional "Return-Path:" field, and one or more "Received:" fields.
The "Return-Path:" header field contains a pair of angle brackets
that enclose an optional addr-spec. The "Received:" field contains a
(possibly empty) list of name/value pairs followed by a semicolon and
a date-time specification. The first item of the name/value pair is
defined by item-name, and the second item is either an addr-spec, an
atom, a domain, or a msg-id. Further restrictions may be applied to
the syntax of the trace fields by standards that provide for their
use, such as [RFC2821].
trace = [return]
1*received
return = "Return-Path:" path CRLF
path = ([CFWS] "<" ([CFWS] / addr-spec) ">" [CFWS]) /
obs-path
received = "Received:" name-val-list ";" date-time CRLF
name-val-list = [CFWS] [name-val-pair *(CFWS name-val-pair)]
name-val-pair = item-name CFWS item-value
item-name = ALPHA *(["-"] (ALPHA / DIGIT))
item-value = 1*angle-addr / addr-spec /
atom / domain / msg-id
A full discussion of the Internet mail use of trace fields is
contained in [RFC2821]. For the purposes of this standard, the trace
fields are strictly informational, and any formal interpretation of
them is outside of the scope of this document.
3.6.8. Optional fields
Fields may appear in messages that are otherwise unspecified in this
standard. They MUST conform to the syntax of an optional-field.
This is a field name, made up of the printable US-ASCII characters
except SP and colon, followed by a colon, followed by any text which
conforms to unstructured.
The field names of any optional-field MUST NOT be identical to any
field name specified elsewhere in this standard.
optional-field = field-name ":" unstructured CRLF
field-name = 1*ftext
ftext = %d33-57 / ; Any character except
%d59-126 ; controls, SP, and
; ":".
For the purposes of this standard, any optional field is
uninterpreted.
4. Obsolete Syntax
Earlier versions of this standard allowed for different (usually more
liberal) syntax than is allowed in this version. Also, there have
been syntactic elements used in messages on the Internet whose
interpretation have never been documented. Though some of these
syntactic forms MUST NOT be generated according to the grammar in
section 3, they MUST be accepted and parsed by a conformant receiver.
This section documents many of these syntactic elements. Taking the
grammar in section 3 and adding the definitions presented in this
section will result in the grammar to use for interpretation of
messages.
Note: This section identifies syntactic forms that any implementation
MUST reasonably interpret. However, there are certainly Internet
messages which do not conform to even the additional syntax given in
this section. The fact that a particular form does not appear in any
section of this document is not justification for computer programs
to crash or for malformed data to be irretrievably lost by any
implementation. To repeat an example, though this document requires
lines in messages to be no longer than 998 characters, silently
discarding the 999th and subsequent characters in a line without
warning would still be bad behavior for an implementation. It is up
to the implementation to deal with messages robustly.
One important difference between the obsolete (interpreting) and the
current (generating) syntax is that in structured header field bodies
(i.e., between the colon and the CRLF of any structured header
field), white space characters, including folding white space, and
comments can be freely inserted between any syntactic tokens. This
allows many complex forms that have proven difficult for some
implementations to parse.
Another key difference between the obsolete and the current syntax is
that the rule in section 3.2.3 regarding lines composed entirely of
white space in comments and folding white space does not apply. See
the discussion of folding white space in section 4.2 below.
Finally, certain characters that were formerly allowed in messages
appear in this section. The NUL character (ASCII value 0) was once
allowed, but is no longer for compatibility reasons. CR and LF were
allowed to appear in messages other than as CRLF; this use is also
shown here.
Other differences in syntax and semantics are noted in the following
sections.
4.1. Miscellaneous obsolete tokens
These syntactic elements are used elsewhere in the obsolete syntax or
in the main syntax. The obs-char and obs-qp elements each add ASCII
value 0. Bare CR and bare LF are added to obs-text and obs-utext.
The period character is added to obs-phrase. The obs-phrase-list
provides for "empty" elements in a comma-separated list of phrases.
Note: The "period" (or "full stop") character (".") in obs-phrase is
not a form that was allowed in earlier versions of this or any other
standard. Period (nor any other character from specials) was not
allowed in phrase because it introduced a parsing difficulty
distinguishing between phrases and portions of an addr-spec (see
section 4.4). It appears here because the period character is
currently used in many messages in the display-name portion of
addresses, especially for initials in names, and therefore must be
interpreted properly. In the future, period may appear in the
regular syntax of phrase.
obs-qp = "\" (%d0-127)
obs-text = *LF *CR *(obs-char *LF *CR)
obs-char = %d0-9 / %d11 / ; %d0-127 except CR and
%d12 / %d14-127 ; LF
obs-utext = obs-text
obs-phrase = word *(word / "." / CFWS)
obs-phrase-list = phrase / 1*([phrase] [CFWS] "," [CFWS]) [phrase]
Bare CR and bare LF appear in messages with two different meanings.
In many cases, bare CR or bare LF are used improperly instead of CRLF
to indicate line separators. In other cases, bare CR and bare LF are
used simply as ASCII control characters with their traditional ASCII
meanings.
4.2. Obsolete folding white space
In the obsolete syntax, any amount of folding white space MAY be
inserted where the obs-FWS rule is allowed. This creates the
possibility of having two consecutive "folds" in a line, and
therefore the possibility that a line which makes up a folded header
field could be composed entirely of white space.
obs-FWS = 1*WSP *(CRLF 1*WSP)
4.3. Obsolete Date and Time
The syntax for the obsolete date format allows a 2 digit year in the
date field and allows for a list of alphabetic time zone
specifications that were used in earlier versions of this standard.
It also permits comments and folding white space between many of the
tokens.
obs-day-of-week = [CFWS] day-name [CFWS]
obs-year = [CFWS] 2*DIGIT [CFWS]
obs-month = CFWS month-name CFWS
obs-day = [CFWS] 1*2DIGIT [CFWS]
obs-hour = [CFWS] 2DIGIT [CFWS]
obs-minute = [CFWS] 2DIGIT [CFWS]
obs-second = [CFWS] 2DIGIT [CFWS]
obs-zone = "UT" / "GMT" / ; Universal Time
; North American UT
; offsets
"EST" / "EDT" / ; Eastern: - 5/ - 4
"CST" / "CDT" / ; Central: - 6/ - 5
"MST" / "MDT" / ; Mountain: - 7/ - 6
"PST" / "PDT" / ; Pacific: - 8/ - 7
%d65-73 / ; Military zones - "A"
%d75-90 / ; through "I" and "K"
%d97-105 / ; through "Z", both
%d107-122 ; upper and lower case
Where a two or three digit year occurs in a date, the year is to be
interpreted as follows: If a two digit year is encountered whose
value is between 00 and 49, the year is interpreted by adding 2000,
ending up with a value between 2000 and 2049. If a two digit year is
encountered with a value between 50 and 99, or any three digit year
is encountered, the year is interpreted by adding 1900.
In the obsolete time zone, "UT" and "GMT" are indications of
"Universal Time" and "Greenwich Mean Time" respectively and are both
semantically identical to "+0000".
The remaining three character zones are the US time zones. The first
letter, "E", "C", "M", or "P" stands for "Eastern", "Central",
"Mountain" and "Pacific". The second letter is either "S" for
"Standard" time, or "D" for "Daylight" (or summer) time. Their
interpretations are as follows:
EDT is semantically equivalent to -0400
EST is semantically equivalent to -0500
CDT is semantically equivalent to -0500
CST is semantically equivalent to -0600
MDT is semantically equivalent to -0600
MST is semantically equivalent to -0700
PDT is semantically equivalent to -0700
PST is semantically equivalent to -0800
The 1 character military time zones were defined in a non-standard
way in [RFC822] and are therefore unpredictable in their meaning.
The original definitions of the military zones "A" through "I" are
equivalent to "+0100" through "+0900" respectively; "K", "L", and "M"
are equivalent to "+1000", "+1100", and "+1200" respectively; "N"
through "Y" are equivalent to "-0100" through "-1200" respectively;
and "Z" is equivalent to "+0000". However, because of the error in
[RFC822], they SHOULD all be considered equivalent to "-0000" unless
there is out-of-band information confirming their meaning.
Other multi-character (usually between 3 and 5) alphabetic time zones
have been used in Internet messages. Any such time zone whose
meaning is not known SHOULD be considered equivalent to "-0000"
unless there is out-of-band information confirming their meaning.
4.4. Obsolete Addressing
There are three primary differences in addressing. First, mailbox
addresses were allowed to have a route portion before the addr-spec
when enclosed in "<" and ">". The route is simply a comma-separated
list of domain names, each preceded by "@", and the list terminated
by a colon. Second, CFWS were allowed between the period-separated
elements of local-part and domain (i.e., dot-atom was not used). In
addition, local-part is allowed to contain quoted-string in addition
to just atom. Finally, mailbox-list and address-list were allowed to
have "null" members. That is, there could be two or more commas in
such a list with nothing in between them.
obs-angle-addr = [CFWS] "<" [obs-route] addr-spec ">" [CFWS]
obs-route = [CFWS] obs-domain-list ":" [CFWS]
obs-domain-list = "@" domain *(*(CFWS / "," ) [CFWS] "@" domain)
obs-local-part = word *("." word)
obs-domain = atom *("." atom)
obs-mbox-list = 1*([mailbox] [CFWS] "," [CFWS]) [mailbox]
obs-addr-list = 1*([address] [CFWS] "," [CFWS]) [address]
When interpreting addresses, the route portion SHOULD be ignored.
4.5. Obsolete header fields
Syntactically, the primary difference in the obsolete field syntax is
that it allows multiple occurrences of any of the fields and they may
occur in any order. Also, any amount of white space is allowed
before the ":" at the end of the field name.
obs-fields = *(obs-return /
obs-received /
obs-orig-date /
obs-from /
obs-sender /
obs-reply-to /
obs-to /
obs-cc /
obs-bcc /
obs-message-id /
obs-in-reply-to /
obs-references /
obs-subject /
obs-comments /
obs-keywords /
obs-resent-date /
obs-resent-from /
obs-resent-send /
obs-resent-rply /
obs-resent-to /
obs-resent-cc /
obs-resent-bcc /
obs-resent-mid /
obs-optional)
Except for destination address fields (described in section 4.5.3),
the interpretation of multiple occurrences of fields is unspecified.
Also, the interpretation of trace fields and resent fields which do
not occur in blocks prepended to the message is unspecified as well.
Unless otherwise noted in the following sections, interpretation of
other fields is identical to the interpretation of their non-obsolete
counterparts in section 3.
4.5.1. Obsolete origination date field
obs-orig-date = "Date" *WSP ":" date-time CRLF
4.5.2. Obsolete originator fields
obs-from = "From" *WSP ":" mailbox-list CRLF
obs-sender = "Sender" *WSP ":" mailbox CRLF
obs-reply-to = "Reply-To" *WSP ":" mailbox-list CRLF
4.5.3. Obsolete destination address fields
obs-to = "To" *WSP ":" address-list CRLF
obs-cc = "Cc" *WSP ":" address-list CRLF
obs-bcc = "Bcc" *WSP ":" (address-list / [CFWS]) CRLF
When multiple occurrences of destination address fields occur in a
message, they SHOULD be treated as if the address-list in the first
occurrence of the field is combined with the address lists of the
subsequent occurrences by adding a comma and concatenating.
4.5.4. Obsolete identification fields
The obsolete "In-Reply-To:" and "References:" fields differ from the
current syntax in that they allow phrase (words or quoted strings) to
appear. The obsolete forms of the left and right sides of msg-id
allow interspersed CFWS, making them syntactically identical to
local-part and domain respectively.
obs-message-id = "Message-ID" *WSP ":" msg-id CRLF
obs-in-reply-to = "In-Reply-To" *WSP ":" *(phrase / msg-id) CRLF
obs-references = "References" *WSP ":" *(phrase / msg-id) CRLF
obs-id-left = local-part
obs-id-right = domain
For purposes of interpretation, the phrases in the "In-Reply-To:" and
"References:" fields are ignored.
Semantically, none of the optional CFWS surrounding the local-part
and the domain are part of the obs-id-left and obs-id-right
respectively.
4.5.5. Obsolete informational fields
obs-subject = "Subject" *WSP ":" unstructured CRLF
obs-comments = "Comments" *WSP ":" unstructured CRLF
obs-keywords = "Keywords" *WSP ":" obs-phrase-list CRLF
4.5.6. Obsolete resent fields
The obsolete syntax adds a "Resent-Reply-To:" field, which consists
of the field name, the optional comments and folding white space, the
colon, and a comma separated list of addresses.
obs-resent-from = "Resent-From" *WSP ":" mailbox-list CRLF
obs-resent-send = "Resent-Sender" *WSP ":" mailbox CRLF
obs-resent-date = "Resent-Date" *WSP ":" date-time CRLF
obs-resent-to = "Resent-To" *WSP ":" address-list CRLF
obs-resent-cc = "Resent-Cc" *WSP ":" address-list CRLF
obs-resent-bcc = "Resent-Bcc" *WSP ":"
(address-list / [CFWS]) CRLF
obs-resent-mid = "Resent-Message-ID" *WSP ":" msg-id CRLF
obs-resent-rply = "Resent-Reply-To" *WSP ":" address-list CRLF
As with other resent fields, the "Resent-Reply-To:" field is to be
treated as trace information only.
4.5.7. Obsolete trace fields
The obs-return and obs-received are again given here as template
definitions, just as return and received are in section 3. Their
full syntax is given in [RFC2821].
obs-return = "Return-Path" *WSP ":" path CRLF
obs-received = "Received" *WSP ":" name-val-list CRLF
obs-path = obs-angle-addr
4.5.8. Obsolete optional fields
obs-optional = field-name *WSP ":" unstructured CRLF
5. Security Considerations
Care needs to be taken when displaying messages on a terminal or
terminal emulator. Powerful terminals may act on escape sequences
and other combinations of ASCII control characters with a variety of
consequences. They can remap the keyboard or permit other
modifications to the terminal which could lead to denial of service
or even damaged data. They can trigger (sometimes programmable)
answerback messages which can allow a message to cause commands to be
issued on the recipient's behalf. They can also effect the operation
of terminal attached devices such as printers. Message viewers may
wish to strip potentially dangerous terminal escape sequences from
the message prior to display. However, other escape sequences appear
in messages for useful purposes (cf. [RFC2045, RFC2046, RFC2047,
RFC2048, RFC2049, ISO2022]) and therefore should not be stripped
indiscriminately.
Transmission of non-text objects in messages raises additional
security issues. These issues are discussed in [RFC2045, RFC2046,
RFC2047, RFC2048, RFC2049].
Many implementations use the "Bcc:" (blind carbon copy) field
described in section 3.6.3 to facilitate sending messages to
recipients without revealing the addresses of one or more of the
addressees to the other recipients. Mishandling this use of "Bcc:"
has implications for confidential information that might be revealed,
which could eventually lead to security problems through knowledge of
even the existence of a particular mail address. For example, if
using the first method described in section 3.6.3, where the "Bcc:"
line is removed from the message, blind recipients have no explicit
indication that they have been sent a blind copy, except insofar as
their address does not appear in the message header. Because of
this, one of the blind addressees could potentially send a reply to
all of the shown recipients and accidentally reveal that the message
went to the blind recipient. When the second method from section
3.6.3 is used, the blind recipient's address appears in the "Bcc:"
field of a separate copy of the message. If the "Bcc:" field sent
contains all of the blind addressees, all of the "Bcc:" recipients
will be seen by each "Bcc:" recipient. Even if a separate message is
sent to each "Bcc:" recipient with only the individual's address,
implementations still need to be careful to process replies to the
message as per section 3.6.3 so as not to accidentally reveal the
blind recipient to other recipients.
6. Bibliography
[ASCII] American National Standards Institute (ANSI), Coded
Character Set - 7-Bit American National Standard Code for
Information Interchange, ANSI X3.4, 1986.
[ISO2022] International Organization for Standardization (ISO),
Information processing - ISO 7-bit and 8-bit coded
character sets - Code extension techniques, Third edition
- 1986-05-01, ISO 2022, 1986.
[RFC822] Crocker, D., "Standard for the Format of ARPA Internet
Text Messages", RFC822, August 1982.
[RFC2045] Freed, N. and N. Borenstein, "Multipurpose Internet Mail
Extensions (MIME) Part One: Format of Internet Message
Bodies", RFC2045, November 1996.
[RFC2046] Freed, N. and N. Borenstein, "Multipurpose Internet Mail
Extensions (MIME) Part Two: Media Types", RFC2046,
November 1996.
[RFC2047] Moore, K., "Multipurpose Internet Mail Extensions (MIME)
Part Three: Message Header Extensions for Non-ASCII Text",
RFC2047, November 1996.
[RFC2048] Freed, N., Klensin, J. and J. Postel, "Multipurpose
Internet Mail Extensions (MIME) Part Four: Format of
Internet Message Bodies", RFC2048, November 1996.
[RFC2049] Freed, N. and N. Borenstein, "Multipurpose Internet Mail
Extensions (MIME) Part Five: Conformance Criteria and
Examples", RFC2049, November 1996.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC2119, March 1997.
[RFC2234] Crocker, D., Editor, and P. Overell, "Augmented BNF for
Syntax Specifications: ABNF", RFC2234, November 1997.
[RFC2821] Klensin, J., Editor, "Simple Mail Transfer Protocol", RFC
2821, March 2001.
[STD3] Braden, R., "Host Requirements", STD 3, RFC1122 and RFC
1123, October 1989.
[STD12] Mills, D., "Network Time Protocol", STD 12, RFC1119,
September 1989.
[STD13] Mockapetris, P., "Domain Name System", STD 13, RFC1034
and RFC1035, November 1987.
[STD14] Partridge, C., "Mail Routing and the Domain System", STD
14, RFC974, January 1986.
7. Editor's Address
Peter W. Resnick
QUALCOMM Incorporated
5775 Morehouse Drive
San Diego, CA 92121-1714
USA
Phone: +1 858 651 4478
Fax: +1 858 651 1102
EMail: presnick@qualcomm.com
8. Acknowledgements
Many people contributed to this document. They included folks who
participated in the Detailed Revision and Update of Messaging
Standards (DRUMS) Working Group of the Internet Engineering Task
Force (IETF), the chair of DRUMS, the Area Directors of the IETF, and
people who simply sent their comments in via e-mail. The editor is
deeply indebted to them all and thanks them sincerely. The below
list includes everyone who sent e-mail concerning this document.
Hopefully, everyone who contributed is named here:
Matti Aarnio Barry Finkel Larry Masinter
Tanaka Akira Erik Forsberg Denis McKeon
Russ Allbery Chuck Foster William P McQuillan
Eric Allman Paul Fox Alexey Melnikov
Harald Tveit Alvestrand Klaus M. Frank Perry E. Metzger
Ran Atkinson Ned Freed Steven Miller
Jos Backus Jochen Friedrich Keith Moore
Bruce Balden Randall C. Gellens John Gardiner Myers
Dave Barr Sukvinder Singh Gill Chris Newman
Alan Barrett Tim Goodwin John W. Noerenberg
John Beck Philip Guenther Eric Norman
J. Robert von Behren Tony Hansen Mike O'Dell
Jos den Bekker John Hawkinson Larry Osterman
D. J. Bernstein Philip Hazel Paul Overell
James Berriman Kai Henningsen Jacob Palme
Norbert Bollow Robert Herriot Michael A. Patton
Raj Bose Paul Hethmon Uzi Paz
Antony Bowesman Jim Hill Michael A. Quinlan
Scott Bradner Paul E. Hoffman Eric S. Raymond
Randy Bush Steve Hole Sam Roberts
Tom Byrer Kari Hurtta Hugh Sasse
Bruce Campbell Marco S. Hyman Bart Schaefer
Larry Campbell Ofer Inbar Tom Scola
W. J. Carpenter Olle Jarnefors Wolfgang Segmuller
Michael Chapman Kevin Johnson Nick Shelness
Richard Clayton Sudish Joseph John Stanley
Maurizio Codogno Maynard Kang Einar Stefferud
Jim Conklin Prabhat Keni Jeff Stephenson
R. Kelley Cook John C. Klensin Bernard Stern
Steve Coya Graham Klyne Peter Sylvester
Mark Crispin Brad Knowles Mark Symons
Dave Crocker Shuhei Kobayashi Eric Thomas
Matt Curtin Peter Koch Lee Thompson
Michael D'Errico Dan Kohn Karel De Vriendt
Cyrus Daboo Christian Kuhtz Matthew Wall
Jutta Degener Anand Kumria Rolf Weber
Mark Delany Steen Larsen Brent B. Welch
Steve Dorner Eliot Lear Dan Wing
Harold A. Driscoll Barry Leiba Jack De Winter
Michael Elkins Jay Levitt Gregory J. Woodhouse
Robert Elz Lars-Johan Liman Greg A. Woods
Johnny Eriksson Charles Lindsey Kazu Yamamoto
Erik E. Fair Pete Loshin Alain Zahm
Roger Fajman Simon Lyall Jamie Zawinski
Patrik Faltstrom Bill Manning Timothy S. Zurcher
Claus Andre Farber John Martin
Appendix A. Example messages
This section presents a selection of messages. These are intended to
assist in the implementation of this standard, but should not be
taken as normative; that is to say, although the examples in this
section were carefully reviewed, if there happens to be a conflict
between these examples and the syntax described in sections 3 and 4
of this document, the syntax in those sections is to be taken as
correct.
Messages are delimited in this section between lines of "----". The
"----" lines are not part of the message itself.
A.1. Addressing examples
The following are examples of messages that might be sent between two
individuals.
A.1.1. A message from one person to another with simple addressing
This could be called a canonical message. It has a single author,
John Doe, a single recipient, Mary Smith, a subject, the date, a
message identifier, and a textual message in the body.
----
From: John Doe <jdoe@machine.example>
To: Mary Smith <mary@example.net>
Subject: Saying Hello
Date: Fri, 21 Nov 1997 09:55:06 -0600
Message-ID: <1234@local.machine.example>
This is a message just to say hello.
So, "Hello".
----
If John's secretary Michael actually sent the message, though John
was the author and replies to this message should go back to him, the
sender field would be used:
----
From: John Doe <jdoe@machine.example>
Sender: Michael Jones <mjones@machine.example>
To: Mary Smith <mary@example.net>
Subject: Saying Hello
Date: Fri, 21 Nov 1997 09:55:06 -0600
Message-ID: <1234@local.machine.example>
This is a message just to say hello.
So, "Hello".
----
A.1.2. Different types of mailboxes
This message includes multiple addresses in the destination fields
and also uses several different forms of addresses.
----
From: "Joe Q. Public" <john.q.public@example.com>
To: Mary Smith <mary@x.test>, jdoe@example.org, Who? <one@y.test>
Cc: <boss@nil.test>, "Giant; \"Big\" Box" <sysservices@example.net>
Date: Tue, 1 Jul 2003 10:52:37 +0200
Message-ID: <5678.21-Nov-1997@example.com>
Hi everyone.
----
Note that the display names for Joe Q. Public and Giant; "Big" Box
needed to be enclosed in double-quotes because the former contains
the period and the latter contains both semicolon and double-quote
characters (the double-quote characters appearing as quoted-pair
construct). Conversely, the display name for Who? could appear
without them because the question mark is legal in an atom. Notice
also that jdoe@example.org and boss@nil.test have no display names
associated with them at all, and jdoe@example.org uses the simpler
address form without the angle brackets.
A.1.3. Group addresses
----
From: Pete <pete@silly.example>
To: A Group:Chris Jones <c@a.test>,joe@where.test,John <jdoe@one.test>;
Cc: Undisclosed recipients:;
Date: Thu, 13 Feb 1969 23:32:54 -0330
Message-ID: <testabcd.1234@silly.example>
Testing.
----
In this message, the "To:" field has a single group recipient named A
Group which contains 3 addresses, and a "Cc:" field with an empty
group recipient named Undisclosed recipients.
A.2. Reply messages
The following is a series of three messages that make up a
conversation thread between John and Mary. John firsts sends a
message to Mary, Mary then replies to John's message, and then John
replies to Mary's reply message.
Note especially the "Message-ID:", "References:", and "In-Reply-To:"
fields in each message.
----
From: John Doe <jdoe@machine.example>
To: Mary Smith <mary@example.net>
Subject: Saying Hello
Date: Fri, 21 Nov 1997 09:55:06 -0600
Message-ID: <1234@local.machine.example>
This is a message just to say hello.
So, "Hello".
----
When sending replies, the Subject field is often retained, though
prepended with "Re: " as described in section 3.6.5.
----
From: Mary Smith <mary@example.net>
To: John Doe <jdoe@machine.example>
Reply-To: "Mary Smith: Personal Account" <smith@home.example>
Subject: Re: Saying Hello
Date: Fri, 21 Nov 1997 10:01:10 -0600
Message-ID: <3456@example.net>
In-Reply-To: <1234@local.machine.example>
References: <1234@local.machine.example>
This is a reply to your hello.
----
Note the "Reply-To:" field in the above message. When John replies
to Mary's message above, the reply should go to the address in the
"Reply-To:" field instead of the address in the "From:" field.
----
To: "Mary Smith: Personal Account" <smith@home.example>
From: John Doe <jdoe@machine.example>
Subject: Re: Saying Hello
Date: Fri, 21 Nov 1997 11:00:00 -0600
Message-ID: <abcd.1234@local.machine.tld>
In-Reply-To: <3456@example.net>
References: <1234@local.machine.example> <3456@example.net>
This is a reply to your reply.
----
A.3. Resent messages
Start with the message that has been used as an example several
times:
----
From: John Doe <jdoe@machine.example>
To: Mary Smith <mary@example.net>
Subject: Saying Hello
Date: Fri, 21 Nov 1997 09:55:06 -0600
Message-ID: <1234@local.machine.example>
This is a message just to say hello.
So, "Hello".
----
Say that Mary, upon receiving this message, wishes to send a copy of
the message to Jane such that (a) the message would appear to have
come straight from John; (b) if Jane replies to the message, the
reply should go back to John; and (c) all of the original
information, like the date the message was originally sent to Mary,
the message identifier, and the original addressee, is preserved. In
this case, resent fields are prepended to the message:
----
Resent-From: Mary Smith <mary@example.net>
Resent-To: Jane Brown <j-brown@other.example>
Resent-Date: Mon, 24 Nov 1997 14:22:01 -0800
Resent-Message-ID: <78910@example.net>
From: John Doe <jdoe@machine.example>
To: Mary Smith <mary@example.net>
Subject: Saying Hello
Date: Fri, 21 Nov 1997 09:55:06 -0600
Message-ID: <1234@local.machine.example>
This is a message just to say hello.
So, "Hello".
----
If Jane, in turn, wished to resend this message to another person,
she would prepend her own set of resent header fields to the above
and send that.
A.4. Messages with trace fields
As messages are sent through the transport system as described in
[RFC2821], trace fields are prepended to the message. The following
is an example of what those trace fields might look like. Note that
there is some folding white space in the first one since these lines
can be long.
----
Received: from x.y.test
by example.net
via TCP
with ESMTP
id ABC12345
for <mary@example.net>; 21 Nov 1997 10:05:43 -0600
Received: from machine.example by x.y.test; 21 Nov 1997 10:01:22 -0600
From: John Doe <jdoe@machine.example>
To: Mary Smith <mary@example.net>
Subject: Saying Hello
Date: Fri, 21 Nov 1997 09:55:06 -0600
Message-ID: <1234@local.machine.example>
This is a message just to say hello.
So, "Hello".
----
A.5. White space, comments, and other oddities
White space, including folding white space, and comments can be
inserted between many of the tokens of fields. Taking the example
from A.1.3, white space and comments can be inserted into all of the
fields.
----
From: Pete(A wonderful \) chap) <pete(his account)@silly.test(his host)>
To:A Group(Some people)
:Chris Jones <c@(Chris's host.)public.example>,
joe@example.org,
John <jdoe@one.test> (my dear friend); (the end of the group)
Cc:(Empty list)(start)Undisclosed recipients :(nobody(that I know)) ;
Date: Thu,
13
Feb
1969
23:32
-0330 (Newfoundland Time)
Message-ID: <testabcd.1234@silly.test>
Testing.
----
The above example is aesthetically displeasing, but perfectly legal.
Note particularly (1) the comments in the "From:" field (including
one that has a ")" character appearing as part of a quoted-pair); (2)
the white space absent after the ":" in the "To:" field as well as
the comment and folding white space after the group name, the special
character (".") in the comment in Chris Jones's address, and the
folding white space before and after "joe@example.org,"; (3) the
multiple and nested comments in the "Cc:" field as well as the
comment immediately following the ":" after "Cc"; (4) the folding
white space (but no comments except at the end) and the missing
seconds in the time of the date field; and (5) the white space before
(but not within) the identifier in the "Message-ID:" field.
A.6. Obsoleted forms
The following are examples of obsolete (that is, the "MUST NOT
generate") syntactic elements described in section 4 of this
document.
A.6.1. Obsolete addressing
Note in the below example the lack of quotes around Joe Q. Public,
the route that appears in the address for Mary Smith, the two commas
that appear in the "To:" field, and the spaces that appear around the
"." in the jdoe address.
----
From: Joe Q. Public <john.q.public@example.com>
To: Mary Smith <@machine.tld:mary@example.net>, , jdoe@test . example
Date: Tue, 1 Jul 2003 10:52:37 +0200
Message-ID: <5678.21-Nov-1997@example.com>
Hi everyone.
----
A.6.2. Obsolete dates
The following message uses an obsolete date format, including a non-
numeric time zone and a two digit year. Note that although the
day-of-week is missing, that is not specific to the obsolete syntax;
it is optional in the current syntax as well.
----
From: John Doe <jdoe@machine.example>
To: Mary Smith <mary@example.net>
Subject: Saying Hello
Date: 21 Nov 97 09:55:06 GMT
Message-ID: <1234@local.machine.example>
This is a message just to say hello.
So, "Hello".
----
A.6.3. Obsolete white space and comments
White space and comments can appear between many more elements than
in the current syntax. Also, folding lines that are made up entirely
of white space are legal.
----
From : John Doe <jdoe@machine(comment). example>
To : Mary Smith
__
<mary@example.net>
Subject : Saying Hello
Date : Fri, 21 Nov 1997 09(comment): 55 : 06 -0600
Message-ID : <1234 @ local(blah) .machine .example>
This is a message just to say hello.
So, "Hello".
----
Note especially the second line of the "To:" field. It starts with
two space characters. (Note that "__" represent blank spaces.)
Therefore, it is considered part of the folding as described in
section 4.2. Also, the comments and white space throughout
addresses, dates, and message identifiers are all part of the
obsolete syntax.
Appendix B. Differences from earlier standards
This appendix contains a list of changes that have been made in the
Internet Message Format from earlier standards, specifically [RFC822]
and [STD3]. Items marked with an asterisk (*) below are items which
appear in section 4 of this document and therefore can no longer be
generated.
1. Period allowed in obsolete form of phrase.
2. ABNF moved out of document to [RFC2234].
3. Four or more digits allowed for year.
4. Header field ordering (and lack thereof) made explicit.
5. Encrypted header field removed.
6. Received syntax loosened to allow any token/value pair.