As per Relevance of the word obsolete, we have this rfc below:











Network Working Group P. Resnick,
Request for Comments: 2822 QUALCOMM
Obsoletes: 822 April 2001
Category: Standards


Internet Message

Status of this

This document specifies an Internet standards track protocol for
Internet community, and requests discussion and suggestions
improvements. Please refer to the current edition of the "
Official Protocol Standards" (STD 1) for the standardization
and status of this protocol. Distribution of this memo is unlimited

Copyright

Copyright (C) The Internet Society (2001). All Rights Reserved



This standard specifies a syntax for text messages that are
between computer users, within the framework of "electronic mail
messages. This standard supersedes the one specified in Request
Comments (RFC) 822, "Standard for the Format of ARPA Internet
Messages", updating it to reflect current practice and
incremental changes that were specified in other RFCs

Table of

1. Introduction ............................................... 3
1.1. Scope .................................................... 3
1.2. Notational conventions ................................... 4
1.2.1. Requirements notation .................................. 4
1.2.2. Syntactic notation ..................................... 4
1.3. Structure of this document ............................... 4
2. Lexical Analysis of Messages ............................... 5
2.1. General Description ...................................... 5
2.1.1. Line Length Limits ..................................... 6
2.2. Header Fields ............................................ 7
2.2.1. Unstructured Header Field Bodies ....................... 7
2.2.2. Structured Header Field Bodies ......................... 7
2.2.3. Long Header Fields ..................................... 7
2.3. Body ..................................................... 8
3. Syntax ..................................................... 9
3.1. Introduction ............................................. 9
3.2. Lexical Tokens ........................................... 9



Resnick Standards Track [Page 1]

RFC 2822 Internet Message Format April 2001


3.2.1. Primitive Tokens ....................................... 9
3.2.2. Quoted characters ......................................10
3.2.3. Folding white space and comments .......................11
3.2.4. Atom ...................................................12
3.2.5. Quoted strings .........................................13
3.2.6. Miscellaneous tokens ...................................13
3.3. Date and Time Specification ..............................14
3.4. Address Specification ....................................15
3.4.1. Addr-spec specification ................................16
3.5 Overall message syntax ....................................17
3.6. Field definitions ........................................18
3.6.1. The origination date field .............................20
3.6.2. Originator fields ......................................21
3.6.3. Destination address fields .............................22
3.6.4. Identification fields ..................................23
3.6.5. Informational fields ...................................26
3.6.6. Resent fields ..........................................26
3.6.7. Trace fields ...........................................28
3.6.8. Optional fields ........................................29
4. Obsolete Syntax ............................................29
4.1. Miscellaneous obsolete tokens ............................30
4.2. Obsolete folding white space .............................31
4.3. Obsolete Date and Time ...................................31
4.4. Obsolete Addressing ......................................33
4.5. Obsolete header fields ...................................33
4.5.1. Obsolete origination date field ........................34
4.5.2. Obsolete originator fields .............................34
4.5.3. Obsolete destination address fields ....................34
4.5.4. Obsolete identification fields .........................35
4.5.5. Obsolete informational fields ..........................35
4.5.6. Obsolete resent fields .................................35
4.5.7. Obsolete trace fields ..................................36
4.5.8. Obsolete optional fields ...............................36
5. Security Considerations ....................................36
6. Bibliography ...............................................37
7. Editor's Address ...........................................38
8. Acknowledgements ...........................................39
Appendix A. Example messages ..................................41
A.1. Addressing examples ......................................41
A.1.1. A message from one person to another with
addressing .............................................41
A.1.2. Different types of mailboxes ...........................42
A.1.3. Group addresses ........................................43
A.2. Reply messages ...........................................43
A.3. Resent messages ..........................................44
A.4. Messages with trace fields ...............................46
A.5. White space, comments, and other oddities ................47
A.6. Obsoleted forms ..........................................47



Resnick Standards Track [Page 2]

RFC 2822 Internet Message Format April 2001


A.6.1. Obsolete addressing ....................................48
A.6.2. Obsolete dates .........................................48
A.6.3. Obsolete white space and comments ......................48
Appendix B. Differences from earlier standards ................49
Appendix C. Notices ...........................................50
Full Copyright Statement ......................................51

1.

1.1.

This standard specifies a syntax for text messages that are
between computer users, within the framework of "electronic mail
messages. This standard supersedes the one specified in Request
Comments (RFC) 822, "Standard for the Format of ARPA Internet
Messages" [RFC822], updating it to reflect current practice
incorporating incremental changes that were specified in other
[STD3].

This standard specifies a syntax only for text messages.
particular, it makes no provision for the transmission of images
audio, or other sorts of structured data in electronic mail messages
There are several extensions published, such as the MIME
series [RFC2045, RFC2046, RFC2049], which describe mechanisms for
transmission of such data through electronic mail, either
extending the syntax provided here or by structuring such messages
conform to this syntax. Those mechanisms are outside of the scope
this standard

In the context of electronic mail, messages are viewed as having
envelope and contents. The envelope contains whatever information
needed to accomplish transmission and delivery. (See [RFC2821] for
discussion of the envelope.) The contents comprise the object to
delivered to the recipient. This standard applies only to the
and some of the semantics of message contents. It contains
specification of the information in the envelope

However, some message systems may use information from the
to create the envelope. It is intended that this standard
the acquisition of such information by programs

This specification is intended as a definition of what
content format is to be passed between systems. Though some
systems locally store messages in this format (which eliminates
need for translation between formats) and others use formats
differ from the one specified in this standard, local storage
outside of the scope of this standard




Resnick Standards Track [Page 3]

RFC 2822 Internet Message Format April 2001


Note: This standard is not intended to dictate the internal
used by sites, the specific message system features that they
expected to support, or any of the characteristics of user
programs that create or read messages. In addition, this
does not specify an encoding of the characters for either
or storage; that is, it does not specify the number of bits used
how those bits are specifically transferred over the wire or
on disk

1.2. Notational

1.2.1. Requirements

This document occasionally uses terms that appear in capital letters
When the terms "MUST", "SHOULD", "RECOMMENDED", "MUST NOT", "
NOT", and "MAY" appear capitalized, they are being used to
particular requirements of this specification. A discussion of
meanings of these terms appears in [RFC2119].

1.2.2. Syntactic

This standard uses the Augmented Backus-Naur Form (ABNF)
specified in [RFC2234] for the formal definitions of the syntax
messages. Characters will be specified either by a decimal
(e.g., the value %d65 for uppercase A and %d97 for lowercase A) or
a case-insensitive literal value enclosed in quotation marks (e.g.,
"A" for either uppercase or lowercase A). See [RFC2234] for the
description of the notation

1.3. Structure of this

This document is divided into several sections

This section, section 1, is a short introduction to the document

Section 2 lays out the general description of a message and
constituent parts. This is an overview to help the reader
some of the general principles used in the later portions of
document. Any examples in this section MUST NOT be taken
specification of the formal syntax of any part of a message

Section 3 specifies formal ABNF rules for the structure of each
of a message (the syntax) and describes the relationship
those parts and their meaning in the context of a message (
semantics). That is, it describes the actual rules for the
of each part of a message (the syntax) as well as a description
the parts and instructions on how they ought to be interpreted (
semantics). This includes analysis of the syntax and semantics



Resnick Standards Track [Page 4]

RFC 2822 Internet Message Format April 2001


subparts of messages that have specific structure. The
included in section 3 represents messages as they MUST be created
There are also notes in section 3 to indicate if any of the
specified in the syntax SHOULD be used over any of the others

Both sections 2 and 3 describe messages that are legal to
for purposes of this standard

Section 4 of this document specifies an "obsolete" syntax. There
references in section 3 to these obsolete syntactic elements.
rules of the obsolete syntax are elements that have appeared
earlier revisions of this standard or have previously been
used in Internet messages. As such, these elements MUST
interpreted by parsers of messages in order to be conformant to
standard. However, since items in this syntax have been
to be non-interoperable or to cause significant problems
recipients of messages, they MUST NOT be generated by creators
conformant messages

Section 5 details security considerations to take into account
implementing this standard

Section 6 is a bibliography of references in this document

Section 7 contains the editor's address

Section 8 contains acknowledgements

Appendix A lists examples of different sorts of messages.
examples are not exhaustive of the types of messages that appear
the Internet, but give a broad overview of certain syntactic forms

Appendix B lists the differences between this standard and
standards for Internet messages

Appendix C has copyright and intellectual property notices

2. Lexical Analysis of

2.1. General

At the most basic level, a message is a series of characters.
message that is conformant with this standard is comprised
characters with values in the range 1 through 127 and interpreted
US-ASCII characters [ASCII]. For brevity, this document
refers to this range of characters as simply "US-ASCII characters".





Resnick Standards Track [Page 5]

RFC 2822 Internet Message Format April 2001


Note: This standard specifies that messages are made up of
in the US-ASCII range of 1 through 127. There are other documents
specifically the MIME document series [RFC2045, RFC2046, RFC2047,
RFC2048, RFC2049], that extend this standard to allow for
outside of that range. Discussion of those mechanisms is not
the scope of this standard

Messages are divided into lines of characters. A line is a series
characters that is delimited with the two characters carriage-
and line-feed; that is, the carriage return (CR) character (
value 13) followed immediately by the line feed (LF) character (
value 10). (The carriage-return/line-feed pair is usually written
this document as "CRLF".)

A message consists of header fields (collectively called "the
of the message") followed, optionally, by a body. The header is
sequence of lines of characters with special syntax as defined
this standard. The body is simply a sequence of characters
follows the header and is separated from the header by an empty
(i.e., a line with nothing preceding the CRLF).

2.1.1. Line Length

There are two limits that this standard places on the number
characters in a line. Each line of characters MUST be no more
998 characters, and SHOULD be no more than 78 characters,
the CRLF

The 998 character limit is due to limitations in many
which send, receive, or store Internet Message Format messages
simply cannot handle more than 998 characters on a line.
implementations would do well to handle an arbitrarily large
of characters in a line for robustness sake. However, there are
many implementations which (in compliance with the
requirements of [RFC2821]) do not accept messages containing
than 1000 character including the CR and LF per line, it is
for implementations not to create such messages

The more conservative 78 character recommendation is to
the many implementations of user interfaces that display
messages which may truncate, or disastrously wrap, the display
more than 78 characters per line, in spite of the fact that
implementations are non-conformant to the intent of
specification (and that of [RFC2821] if they actually
information to be lost). Again, even though this limitation is put
messages, it is encumbant upon implementations which display





Resnick Standards Track [Page 6]

RFC 2822 Internet Message Format April 2001


to handle an arbitrarily large number of characters in a
(certainly at least up to the 998 character limit) for the sake
robustness

2.2. Header

Header fields are lines composed of a field name, followed by a
(":"), followed by a field body, and terminated by CRLF. A
name MUST be composed of printable US-ASCII characters (i.e.,
characters that have values between 33 and 126, inclusive),
colon. A field body may be composed of any US-ASCII characters
except for CR and LF. However, a field body may contain CRLF
used in header "folding" and "unfolding" as described in
2.2.3. All field bodies MUST conform to the syntax described
sections 3 and 4 of this standard

2.2.1. Unstructured Header Field

Some field bodies in this standard are defined simply
"unstructured" (which is specified below as any US-ASCII characters
except for CR and LF) with no further restrictions. These
referred to as unstructured field bodies. Semantically,
field bodies are simply to be treated as a single line of
with no further processing (except for header "folding"
"unfolding" as described in section 2.2.3).

2.2.2. Structured Header Field

Some field bodies in this standard have specific
structure more restrictive than the unstructured field
described above. These are referred to as "structured" field bodies
Structured field bodies are sequences of specific lexical tokens
described in sections 3 and 4 of this standard. Many of these
are allowed (according to their syntax) to be introduced or end
comments (as described in section 3.2.3) as well as the space (SP
ASCII value 32) and horizontal tab (HTAB, ASCII value 9)
(together known as the white space characters, WSP), and those
characters are subject to header "folding" and "unfolding"
described in section 2.2.3. Semantic analysis of structured
bodies is given along with their syntax

2.2.3. Long Header

Each header field is logically a single line of characters
the field name, the colon, and the field body. For
however, and to deal with the 998/78 character limitations per line
the field body portion of a header field can be split into a
line representation; this is called "folding". The general rule



Resnick Standards Track [Page 7]

RFC 2822 Internet Message Format April 2001


that wherever this standard allows for folding white space (
simply WSP characters), a CRLF may be inserted before any WSP.
example, the header field

Subject: This is a

can be represented as

Subject:
is a

Note: Though structured field bodies are defined in such a way
folding can take place between many of the lexical tokens (and
within some of the lexical tokens), folding SHOULD be limited
placing the CRLF at higher-level syntactic breaks. For instance,
a field body is defined as comma-separated values, it is
that folding occur after the comma separating the structured items
preference to other places where the field could be folded, even
it is allowed elsewhere

The process of moving from this folded multiple-line
of a header field to its single line representation is
"unfolding". Unfolding is accomplished by simply removing any
that is immediately followed by WSP. Each header field should
treated in its unfolded form for further syntactic and
evaluation

2.3.

The body of a message is simply lines of US-ASCII characters.
only two limitations on the body are as follows

- CR and LF MUST only occur together as CRLF; they MUST NOT
independently in the body

- Lines of characters in the body MUST be limited to 998 characters
and SHOULD be limited to 78 characters, excluding the CRLF

Note: As was stated earlier, there are other standards documents
specifically the MIME documents [RFC2045, RFC2046, RFC2048, RFC2049]
that extend this standard to allow for different sorts of
bodies. Again, these mechanisms are beyond the scope of
document








Resnick Standards Track [Page 8]

RFC 2822 Internet Message Format April 2001


3.

3.1.

The syntax as given in this section defines the legal syntax
Internet messages. Messages that are conformant to this
MUST conform to the syntax in this section. If there are options
this section where one option SHOULD be generated, that is
either in the prose or in a comment next to the syntax

For the defined expressions, a short description of the syntax
use is given, followed by the syntax in ABNF, followed by a
analysis. Primitive tokens that are used but otherwise
come from [RFC2234].

In some of the definitions, there will be nonterminals whose
start with "obs-". These "obs-" elements refer to tokens defined
the obsolete syntax in section 4. In all cases, these
are to be ignored for the purposes of generating legal
messages and MUST NOT be used as part of such a message. However
when interpreting messages, these tokens MUST be honored as part
the legal syntax. In this sense, section 3 defines a grammar
generation of messages, with "obs-" elements that are to be ignored
while section 4 adds grammar for interpretation of messages

3.2. Lexical

The following rules are used to define an underlying
analyzer, which feeds tokens to the higher-level parsers.
section defines the tokens used in structured header field bodies

Note: Readers of this standard need to pay special attention to
these lexical tokens are used in both the lower-level
higher-level syntax later in the document. Particularly, the
space tokens and the comment tokens defined in section 3.2.3 get
in the lower-level tokens defined here, and those lower-level
are in turn used as parts of the higher-level tokens defined later
Therefore, the white space and comments may be allowed in
higher-level tokens even though they may not explicitly appear in
particular definition

3.2.1. Primitive

The following are primitive tokens referred to elsewhere in
standard, but not otherwise defined in [RFC2234]. Some of them
not appear anywhere else in the syntax, but they are convenient
refer to in other parts of this document




Resnick Standards Track [Page 9]

RFC 2822 Internet Message Format April 2001


Note: The "specials" below are just such an example. Though
specials token does not appear anywhere else in this standard, it
useful for implementers who use tools that lexically
messages. Each of the characters in specials can be used to
a tokenization point in lexical analysis

NO-WS-CTL = %d1-8 / ; US-ASCII control
%d11 / ; that do not include
%d12 / ; carriage return, line feed
%d14-31 / ; and white space
%d127

text = %d1-9 / ; Characters excluding CR and
%d11 /
%d12 /
%d14-127 /
obs-

specials = "(" / ")" / ; Special characters used
"<" / ">" / ; other parts of the
"[" / "]" /
":" / ";" /
"@" / "\" /
"," / "." /


No special semantics are attached to these tokens. They are
single characters

3.2.2. Quoted

Some characters are reserved for special interpretation, such
delimiting lexical tokens. To permit use of these characters
uninterpreted data, a quoting mechanism is provided

quoted-pair = ("\" text) / obs-

Where any quoted-pair appears, it is to be interpreted as the
character alone. That is to say, the "\" character that appears
part of a quoted-pair is semantically "invisible".

Note: The "\" character may appear in a message where it is not
of a quoted-pair. A "\" character that does not appear in
quoted-pair is not semantically invisible. The only places in
standard where quoted-pair currently appears are ccontent, qcontent
dcontent, no-fold-quote, and no-fold-literal





Resnick Standards Track [Page 10]

RFC 2822 Internet Message Format April 2001


3.2.3. Folding white space and

White space characters, including white space used in
(described in section 2.2.3), may appear between many elements
header field bodies. Also, strings of characters that are treated
comments may be included in structured field bodies as
enclosed in parentheses. The following defines the folding
space (FWS) and comment constructs

Strings of characters enclosed in parentheses are considered
so long as they do not appear within a "quoted-string", as defined
section 3.2.5. Comments may nest

There are several places in this standard where comments and FWS
be freely inserted. To accommodate that syntax, an additional
for "CFWS" is defined for places where comments and/or FWS can occur
However, where CFWS occurs in this standard, it MUST NOT be
in such a way that any line of a folded header field is made
entirely of WSP characters and nothing else

FWS = ([*WSP CRLF] 1*WSP) / ; Folding white
obs-

ctext = NO-WS-CTL / ; Non white space

%d33-39 / ; The rest of the US-
%d42-91 / ; characters not including "(",
%d93-126 ; ")", or "\"

ccontent = ctext / quoted-pair /

comment = "(" *([FWS] ccontent) [FWS] ")"

CFWS = *([FWS] comment) (([FWS] comment) / FWS

Throughout this standard, where FWS (the folding white space token
appears, it indicates a place where header folding, as discussed
section 2.2.3, may take place. Wherever header folding appears in
message (that is, a header field body containing a CRLF followed
any WSP), header unfolding (removal of the CRLF) is performed
any further lexical analysis is performed on that header
according to this standard. That is to say, any CRLF that appears
FWS is semantically "invisible."

A comment is normally used in a structured field body to provide
human readable informational text. Since a comment is allowed
contain FWS, folding is permitted within the comment. Also note
since quoted-pair is allowed in a comment, the parentheses



Resnick Standards Track [Page 11]

RFC 2822 Internet Message Format April 2001


backslash characters may appear in a comment so long as they
as a quoted-pair. Semantically, the enclosing parentheses are
part of the comment; the comment is what is contained between the
parentheses. As stated earlier, the "\" in any quoted-pair and
CRLF in any FWS that appears within the comment are
"invisible" and therefore not part of the comment either

Runs of FWS, comment or CFWS that occur between lexical tokens in
structured field header are semantically interpreted as a
space character

3.2.4.

Several productions in structured header field bodies are
strings of certain basic characters. Such productions are
atoms

Some of the structured header field bodies also allow the
character (".", ASCII value 46) within runs of atext. An
"dot-atom" token is defined for those purposes

atext = ALPHA / DIGIT / ; Any character except controls
"!" / "#" / ; SP, and specials
"$" / "%" / ; Used for
"&" / "'" /
"*" / "+" /
"-" / "/" /
"=" / "?" /
"^" / "_" /
"`" / "{" /
"|" / "}" /
"~"

atom = [CFWS] 1*atext [CFWS

dot-atom = [CFWS] dot-atom-text [CFWS

dot-atom-text = 1*atext *("." 1*atext

Both atom and dot-atom are interpreted as a single unit, comprised
the string of characters that make it up. Semantically, the
comments and FWS surrounding the rest of the characters are not
of the atom; the atom is only the run of atext characters in an atom
or the atext and "." characters in a dot-atom







Resnick Standards Track [Page 12]

RFC 2822 Internet Message Format April 2001


3.2.5. Quoted

Strings of characters that include characters other than
allowed in atoms may be represented in a quoted string format,
the characters are surrounded by quote (DQUOTE, ASCII value 34)
characters

qtext = NO-WS-CTL / ; Non white space

%d33 / ; The rest of the US-
%d35-91 / ; characters not including "\"
%d93-126 ; or the quote

qcontent = qtext / quoted-

quoted-string = [CFWS
DQUOTE *([FWS] qcontent) [FWS]
[CFWS

A quoted-string is treated as a unit. That is, quoted-string
identical to atom, semantically. Since a quoted-string is allowed
contain FWS, folding is permitted. Also note that since quoted-
is allowed in a quoted-string, the quote and backslash characters
appear in a quoted-string so long as they appear as a quoted-pair

Semantically, neither the optional CFWS outside of the
characters nor the quote characters themselves are part of
quoted-string; the quoted-string is what is contained between the
quote characters. As stated earlier, the "\" in any quoted-pair
the CRLF in any FWS/CFWS that appears within the quoted-string
semantically "invisible" and therefore not part of the quoted-
either

3.2.6. Miscellaneous

Three additional tokens are defined, word and phrase for
of atoms and/or quoted-strings, and unstructured for use
unstructured header fields and in some places within
header fields

word = atom / quoted-

phrase = 1*word / obs-








Resnick Standards Track [Page 13]

RFC 2822 Internet Message Format April 2001


utext = NO-WS-CTL / ; Non white space
%d33-126 / ; The rest of US-
obs-

unstructured = *([FWS] utext) [FWS

3.3. Date and Time

Date and time occur in several header fields. This section
the syntax for a full date and time specification. Though
white space is permitted throughout the date-time specification,
is RECOMMENDED that a single space be used in each place that
appears (whether it is required or optional); some
implementations may not interpret other occurrences of folding
space correctly

date-time = [ day-of-week "," ] date FWS time [CFWS

day-of-week = ([FWS] day-name) / obs-day-of-

day-name = "Mon" / "Tue" / "Wed" / "Thu" /
"Fri" / "Sat" / "Sun

date = day month

year = 4*DIGIT / obs-

month = (FWS month-name FWS) / obs-

month-name = "Jan" / "Feb" / "Mar" / "Apr" /
"May" / "Jun" / "Jul" / "Aug" /
"Sep" / "Oct" / "Nov" / "Dec

day = ([FWS] 1*2DIGIT) / obs-

time = time-of-day FWS

time-of-day = hour ":" minute [ ":" second ]

hour = 2DIGIT / obs-

minute = 2DIGIT / obs-

second = 2DIGIT / obs-

zone = (( "+" / "-" ) 4DIGIT) / obs-





Resnick Standards Track [Page 14]

RFC 2822 Internet Message Format April 2001


The day is the numeric day of the month. The year is any
year 1900 or later

The time-of-day specifies the number of hours, minutes,
optionally seconds since midnight of the date indicated

The date and time-of-day SHOULD express local time

The zone specifies the offset from Coordinated Universal Time (UTC
formerly referred to as "Greenwich Mean Time") that the date
time-of-day represent. The "+" or "-" indicates whether
time-of-day is ahead of (i.e., east of) or behind (i.e., west of
Universal Time. The first two digits indicate the number of
difference from Universal Time, and the last two digits indicate
number of minutes difference from Universal Time. (Hence, +
means +(hh * 60 + mm) minutes, and -hhmm means -(hh * 60 + mm
minutes). The form "+0000" SHOULD be used to indicate a time zone
Universal Time. Though "-0000" also indicates Universal Time, it
used to indicate that the time was generated on a system that may
in a local time zone other than Universal Time and
indicates that the date-time contains no information about the
time zone

A date-time specification MUST be semantically valid. That is,
day-of-the-week (if included) MUST be the day implied by the date
the numeric day-of-month MUST be between 1 and the number of
allowed for the specified month (in the specified year),
time-of-day MUST be in the range 00:00:00 through 23:59:60 (
number of seconds allowing for a leap second; see [STD12]), and
zone MUST be within the range -9959 through +9959.

3.4. Address

Addresses occur in several message header fields to indicate
and recipients of messages. An address may either be an
mailbox, or a group of mailboxes

address = mailbox /

mailbox = name-addr / addr-

name-addr = [display-name] angle-

angle-addr = [CFWS] "<" addr-spec ">" [CFWS] / obs-angle-

group = display-name ":" [mailbox-list / CFWS] ";"
[CFWS




Resnick Standards Track [Page 15]

RFC 2822 Internet Message Format April 2001


display-name =

mailbox-list = (mailbox *("," mailbox)) / obs-mbox-

address-list = (address *("," address)) / obs-addr-

A mailbox receives mail. It is a conceptual entity which does
necessarily pertain to file storage. For example, some sites
choose to print mail on a printer and deliver the output to
addressee's desk. Normally, a mailbox is comprised of two parts: (1)
an optional display name that indicates the name of the
(which could be a person or a system) that could be displayed to
user of a mail application, and (2) an addr-spec address enclosed
angle brackets ("<" and ">"). There is also an alternate simple
of a mailbox where the addr-spec address appears alone, without
recipient's name or the angle brackets. The Internet addr-
address is described in section 3.4.1.

Note: Some legacy implementations used the simple form where
addr-spec appears without the angle brackets, but included the
of the recipient in parentheses as a comment following the addr-spec
Since the meaning of the information in a comment is unspecified
implementations SHOULD use the full name-addr form of the mailbox
instead of the legacy form, to specify the display name
with a mailbox. Also, because some legacy implementations
the comment, comments generally SHOULD NOT be used in address
to avoid confusing such implementations

When it is desirable to treat several mailboxes as a single
(i.e., in a distribution list), the group construct can be used.
group construct allows the sender to indicate a named group
recipients. This is done by giving a display name for the group
followed by a colon, followed by a comma separated list of any
of mailboxes (including zero and one), and ending with a semicolon
Because the list of mailboxes can be empty, using the group
is also a simple way to communicate to recipients that the
was sent to one or more named sets of recipients, without
providing the individual mailbox address for each of
recipients

3.4.1. Addr-spec

An addr-spec is a specific Internet identifier that contains
locally interpreted string followed by the at-sign character ("@",
ASCII value 64) followed by an Internet domain. The
interpreted string is either a quoted-string or a dot-atom. If
string can be represented as a dot-atom (that is, it contains
characters other than atext characters or "." surrounded by



Resnick Standards Track [Page 16]

RFC 2822 Internet Message Format April 2001


characters), then the dot-atom form SHOULD be used and
quoted-string form SHOULD NOT be used. Comments and folding
space SHOULD NOT be used around the "@" in the addr-spec

addr-spec = local-part "@"

local-part = dot-atom / quoted-string / obs-local-

domain = dot-atom / domain-literal / obs-

domain-literal = [CFWS] "[" *([FWS] dcontent) [FWS] "]" [CFWS

dcontent = dtext / quoted-

dtext = NO-WS-CTL / ; Non white space

%d33-90 / ; The rest of the US-
%d94-126 ; characters not including "[",
; "]", or "\"

The domain portion identifies the point to which the mail
delivered. In the dot-atom form, this is interpreted as an
domain name (either a host name or a mail exchanger name)
described in [STD3, STD13, STD14]. In the domain-literal form,
domain is interpreted as the literal Internet address of
particular host. In both cases, how addressing is used and
messages are transported to a particular host is covered in the
transport document [RFC2821]. These mechanisms are outside of
scope of this document

The local-part portion is a domain dependent string. In addresses
it is simply interpreted on the particular host as a name of
particular mailbox

3.5 Overall message

A message consists of header fields, optionally followed by a
body. Lines in a message MUST be a maximum of 998
excluding the CRLF, but it is RECOMMENDED that lines be limited to 78
characters excluding the CRLF. (See section 2.1.1 for explanation.)
In a message body, though all of the characters listed in the
rule MAY be used, the use of US-ASCII control characters (values 1
through 8, 11, 12, and 14 through 31) is discouraged since
interpretation by receivers for display is not guaranteed







Resnick Standards Track [Page 17]

RFC 2822 Internet Message Format April 2001


message = (fields / obs-fields
[CRLF body

body = *(*998text CRLF) *998

The header fields carry most of the semantic information and
defined in section 3.6. The body is simply a series of lines of
which are uninterpreted for the purposes of this standard

3.6. Field

The header fields of a message are defined here. All header
have the same general syntactic structure: A field name, followed
a colon, followed by the field body. The specific syntax for
header field is defined in the subsequent sections

Note: In the ABNF syntax for each field in subsequent sections,
field name is followed by the required colon. However, for
sometimes the colon is not referred to in the textual description
the syntax. It is, nonetheless, required

It is important to note that the header fields are not guaranteed
be in a particular order. They may appear in any order, and
have been known to be reordered occasionally when transported
the Internet. However, for the purposes of this standard,
fields SHOULD NOT be reordered when a message is transported
transformed. More importantly, the trace header fields and
header fields MUST NOT be reordered, and SHOULD be kept in
prepended to the message. See sections 3.6.6 and 3.6.7 for
information

The only required header fields are the origination date field
the originator address field(s). All other header fields
syntactically optional. More information is contained in the
following this definition

fields = *(
*(resent-date /
resent-from /
resent-sender /
resent-to /
resent-cc /
resent-bcc /
resent-msg-id))
*(orig-date /
from /
sender /
reply-to /



Resnick Standards Track [Page 18]

RFC 2822 Internet Message Format April 2001


to /
cc /
bcc /
message-id /
in-reply-to /
references /
subject /
comments /
keywords /
optional-field

The following table indicates limits on the number of times
field may occur in a message header as well as any
limitations on the use of those fields. An asterisk next to a
in the minimum or maximum column indicates that a special
appears in the Notes column

Field Min number Max number

trace 0 unlimited Block prepended -
3.6.7

resent-date 0* unlimited* One per block,
if other resent
present - see 3.6.6

resent-from 0 unlimited* One per block -
3.6.6

resent-sender 0* unlimited* One per block,
occur with multi-
resent-from - see 3.6.6

resent-to 0 unlimited* One per block -
3.6.6

resent-cc 0 unlimited* One per block -
3.6.6

resent-bcc 0 unlimited* One per block -
3.6.6

resent-msg-id 0 unlimited* One per block -
3.6.6

orig-date 1 1

from 1 1 See sender and 3.6.2



Resnick Standards Track [Page 19]

RFC 2822 Internet Message Format April 2001


sender 0* 1 MUST occur with multi
address from - see 3.6.2

reply-to 0 1

to 0 1

cc 0 1

bcc 0 1

message-id 0* 1 SHOULD be present -
3.6.4

in-reply-to 0* 1 SHOULD occur in
replies - see 3.6.4

references 0* 1 SHOULD occur in
replies - see 3.6.4

subject 0 1

comments 0

keywords 0

optional-field 0

The exact interpretation of each field is described in
sections

3.6.1. The origination date

The origination date field consists of the field name "Date"
by a date-time specification

orig-date = "Date:" date-time

The origination date specifies the date and time at which the
of the message indicated that the message was complete and ready
enter the mail delivery system. For instance, this might be the
that a user pushes the "send" or "submit" button in an
program. In any case, it is specifically not intended to convey
time that the message is actually transported, but rather the time
which the human or other creator of the message has put the
into its final form, ready for transport. (For example, a
computer user who is not connected to a network might queue a




Resnick Standards Track [Page 20]

RFC 2822 Internet Message Format April 2001


for delivery. The origination date is intended to contain the
and time that the user queued the message, not the time when the
connected to the network to send the message.)

3.6.2. Originator

The originator fields of a message consist of the from field,
sender field (when applicable), and optionally the reply-to field
The from field consists of the field name "From" and
comma-separated list of one or more mailbox specifications. If
from field contains more than one mailbox specification in
mailbox-list, then the sender field, containing the field
"Sender" and a single mailbox specification, MUST appear in
message. In either case, an optional reply-to field MAY also
included, which contains the field name "Reply-To" and
comma-separated list of one or more addresses

from = "From:" mailbox-list

sender = "Sender:" mailbox

reply-to = "Reply-To:" address-list

The originator fields indicate the mailbox(es) of the source of
message. The "From:" field specifies the author(s) of the message
that is, the mailbox(es) of the person(s) or system(s)
for the writing of the message. The "Sender:" field specifies
mailbox of the agent responsible for the actual transmission of
message. For example, if a secretary were to send a message
another person, the mailbox of the secretary would appear in
"Sender:" field and the mailbox of the actual author would appear
the "From:" field. If the originator of the message can be
by a single mailbox and the author and transmitter are identical,
"Sender:" field SHOULD NOT be used. Otherwise, both fields
appear

The originator fields also provide the information required
replying to a message. When the "Reply-To:" field is present,
indicates the mailbox(es) to which the author of the message
that replies be sent. In the absence of the "Reply-To:" field
replies SHOULD by default be sent to the mailbox(es) specified in
"From:" field unless otherwise specified by the person composing
reply

In all cases, the "From:" field SHOULD NOT contain any mailbox
does not belong to the author(s) of the message. See also
3.6.3 for more information on forming the destination addresses for
reply



Resnick Standards Track [Page 21]

RFC 2822 Internet Message Format April 2001


3.6.3. Destination address

The destination fields of a message consist of three possible fields
each of the same form: The field name, which is either "To", "Cc",
"Bcc", followed by a comma-separated list of one or more
(either mailbox or group syntax).

to = "To:" address-list

cc = "Cc:" address-list

bcc = "Bcc:" (address-list / [CFWS])

The destination fields specify the recipients of the message.
destination field may have one or more addresses, and each of
addresses indicate the intended recipients of the message. The
difference between the three fields is how each is used

The "To:" field contains the address(es) of the primary recipient(s
of the message

The "Cc:" field (where the "Cc" means "Carbon Copy" in the sense
making a copy on a typewriter using carbon paper) contains
addresses of others who are to receive the message, though
content of the message may not be directed at them

The "Bcc:" field (where the "Bcc" means "Blind Carbon Copy")
addresses of recipients of the message whose addresses are not to
revealed to other recipients of the message. There are three ways
which the "Bcc:" field is used. In the first case, when a
containing a "Bcc:" field is prepared to be sent, the "Bcc:" line
removed even though all of the recipients (including those
in the "Bcc:" field) are sent a copy of the message. In the
case, recipients specified in the "To:" and "Cc:" lines each are
a copy of the message with the "Bcc:" line removed as above, but
recipients on the "Bcc:" line get a separate copy of the
containing a "Bcc:" line. (When there are multiple
addresses in the "Bcc:" field, some implementations actually send
separate copy of the message to each recipient with a "Bcc:"
containing only the address of that particular recipient.) Finally
since a "Bcc:" field may contain no addresses, a "Bcc:" field can
sent without any addresses indicating to the recipients that
copies were sent to someone. Which method to use with "Bcc:"
is implementation dependent, but refer to the "
Considerations" section of this document for a discussion of each






Resnick Standards Track [Page 22]

RFC 2822 Internet Message Format April 2001


When a message is a reply to another message, the mailboxes of
authors of the original message (the mailboxes in the "From:" field
or mailboxes specified in the "Reply-To:" field (if it exists)
appear in the "To:" field of the reply since these would normally
the primary recipients of the reply. If a reply is sent to a
that has destination fields, it is often desirable to send a copy
the reply to all of the recipients of the message, in addition to
author. When such a reply is formed, addresses in the "To:"
"Cc:" fields of the original message MAY appear in the "Cc:" field
the reply, since these are normally secondary recipients of
reply. If a "Bcc:" field is present in the original message
addresses in that field MAY appear in the "Bcc:" field of the reply
but SHOULD NOT appear in the "To:" or "Cc:" fields

Note: Some mail applications have automatic reply commands
include the destination addresses of the original message in
destination addresses of the reply. How those reply commands
is implementation dependent and is beyond the scope of this document
In particular, whether or not to include the original
addresses when the original message had a "Reply-To:" field is
addressed here

3.6.4. Identification

Though optional, every message SHOULD have a "Message-ID:" field
Furthermore, reply messages SHOULD have "In-Reply-To:"
"References:" fields as appropriate, as described below

The "Message-ID:" field contains a single unique message identifier
The "References:" and "In-Reply-To:" field each contain one or
unique message identifiers, optionally separated by CFWS

The message identifier (msg-id) is similar in syntax to an angle-
construct without the internal CFWS

message-id = "Message-ID:" msg-id

in-reply-to = "In-Reply-To:" 1*msg-id

references = "References:" 1*msg-id

msg-id = [CFWS] "<" id-left "@" id-right ">" [CFWS

id-left = dot-atom-text / no-fold-quote / obs-id-

id-right = dot-atom-text / no-fold-literal / obs-id-

no-fold-quote = DQUOTE *(qtext / quoted-pair)



Resnick Standards Track [Page 23]

RFC 2822 Internet Message Format April 2001


no-fold-literal = "[" *(dtext / quoted-pair) "]"

The "Message-ID:" field provides a unique message identifier
refers to a particular version of a particular message.
uniqueness of the message identifier is guaranteed by the host
generates it (see below). This message identifier is intended to
machine readable and not necessarily meaningful to humans. A
identifier pertains to exactly one instantiation of a
message; subsequent revisions to the message each receive new
identifiers

Note: There are many instances when messages are "changed", but
changes do not constitute a new instantiation of that message,
therefore the message would not get a new message identifier.
example, when messages are introduced into the transport system,
are often prepended with additional header fields such as
fields (described in section 3.6.7) and resent fields (described
section 3.6.6). The addition of such header fields does not
the identity of the message and therefore the original "Message-ID:"
field is retained. In all cases, it is the meaning that the
of the message wishes to convey (i.e., whether this is the
message or a different message) that determines whether or not
"Message-ID:" field changes, not any particular syntactic
that appears (or does not appear) in the message

The "In-Reply-To:" and "References:" fields are used when creating
reply to a message. They hold the message identifier of the
message and the message identifiers of other messages (for example
in the case of a reply to a message which was itself a reply).
"In-Reply-To:" field may be used to identify the message (
messages) to which the new message is a reply, while
"References:" field may be used to identify a "thread"
conversation

When creating a reply to a message, the "In-Reply-To:"
"References:" fields of the resultant message are constructed
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 "
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
the parent messages, then the new message will have no "In-Reply-To:"
field






Resnick Standards Track [Page 24]

RFC 2822 Internet Message Format April 2001


The "References:" field will contain the contents of the parent'
"References:" field (if any) followed by the contents of the parent'
"Message-ID:" field (if any). If the parent message does not
a "References:" field but does have an "In-Reply-To:"
containing a single message identifier, then the "References:"
will contain the contents of the parent's "In-Reply-To:"
followed by the contents of the parent's "Message-ID:" field (
any). If the parent has none of the "References:", "In-Reply-To:",
or "Message-ID:" fields, then the new message will have
"References:" field

Note: Some implementations parse the "References:" field to
the "thread of the discussion". These implementations assume
each new message is a reply to a single parent and hence that
can walk backwards through the "References:" field to find the
of each message listed there. Therefore, trying to form
"References:" field for a reply that has multiple parents
discouraged and how to do so is not defined in this document

The message identifier (msg-id) itself MUST be a globally
identifier for a message. The generator of the message
MUST guarantee that the msg-id is unique. There are
algorithms that can be used to accomplish this. Since the msg-id
a similar syntax to angle-addr (identical except that comments
folding white space are not allowed), a good method is to put
domain name (or a domain literal IP address) of the host on which
message identifier was created on the right hand side of the "@",
put a combination of the current absolute date and time along
some other currently unique (perhaps sequential) identifier
on the system (for example, a process id number) on the left
side. Using a date on the left hand side and a domain name or
literal on the right hand side makes it possible to
uniqueness since no two hosts use the same domain name or IP
at the same time. Though other algorithms will work, it
RECOMMENDED that the right hand side contain some domain
(either of the host itself or otherwise) such that the generator
the message identifier can guarantee the uniqueness of the left
side within the scope of that domain

Semantically, the angle bracket characters are not part of
msg-id; the msg-id is what is contained between the two angle
characters









Resnick Standards Track [Page 25]

RFC 2822 Internet Message Format April 2001


3.6.5. Informational

The informational fields are all optional. The "Keywords:"
contains a comma-separated list of one or more words
quoted-strings. The "Subject:" and "Comments:" fields
unstructured fields as defined in section 2.2.1, and therefore
contain text or folding white space

subject = "Subject:" unstructured

comments = "Comments:" unstructured

keywords = "Keywords:" phrase *("," phrase)

These three fields are intended to have only human-readable
with information about the message. The "Subject:" field is the
common and contains a short string identifying the topic of
message. When used in a reply, the field body MAY start with
string "Re: " (from the Latin "res", in the matter of) followed
the contents of the "Subject:" field body of the original message
If this is done, only one instance of the literal string "Re: "
to be used since use of other strings or more than one instance
lead to undesirable consequences. The "Comments:" field contains
additional comments on the text of the body of the message.
"Keywords:" field contains a comma-separated list of important
and phrases that might be useful for the recipient

3.6.6. Resent

Resent fields SHOULD be added to any message that is reintroduced
a user into the transport system. A separate set of resent
SHOULD be added each time this is done. All of the resent
corresponding to a particular resending of the message SHOULD
together. Each new set of resent fields is prepended to the message
that is, the most recent set of resent fields appear earlier in
message. No other fields in the message are changed when
fields are added

Each of the resent fields corresponds to a particular field
in the syntax. For instance, the "Resent-Date:" field corresponds
the "Date:" field and the "Resent-To:" field corresponds to the "To:"
field. In each case, the syntax for the field body is identical
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
identical to "Resent-From:".



Resnick Standards Track [Page 26]

RFC 2822 Internet Message Format April 2001


resent-date = "Resent-Date:" date-time

resent-from = "Resent-From:" mailbox-list

resent-sender = "Resent-Sender:" mailbox

resent-to = "Resent-To:" address-list

resent-cc = "Resent-Cc:" address-list

resent-bcc = "Resent-Bcc:" (address-list / [CFWS])

resent-msg-id = "Resent-Message-ID:" msg-id

Resent fields are used to identify a message as having
reintroduced into the transport system by a user. The purpose
using resent fields is to have the message appear to the
recipient as if it were sent directly by the original sender,
all of the original fields remaining the same. Each set of
fields correspond to a particular resending event. That is, if
message is resent multiple times, each set of resent fields
identifying information for each individual time. Resent fields
strictly informational. They MUST NOT be used in the
processing of replies or other such automatic actions on messages

Note: Reintroducing a message into the transport system and
resent fields is a different operation from "forwarding".
"Forwarding" has two meanings: One sense of forwarding is that a
reading program can be told by a user to forward a copy of a
to another person, making the forwarded message the body of the
message. A forwarded message in this sense does not appear to
come from the original sender, but is an entirely new message
the forwarder of the message. On the other hand, forwarding is
used to mean when a mail transport program gets a message
forwards it on to a different destination for final delivery.
header fields are not intended for use with either type
forwarding

The resent originator fields indicate the mailbox of the person(s)
system(s) that resent the message. As with the regular
fields, there are two forms: a simple "Resent-From:" form
contains the mailbox of the individual doing the resending, and
more complex form, when one individual (identified in
"Resent-Sender:" field) resends a message on behalf of one or
others (identified in the "Resent-From:" field).

Note: When replying to a resent message, replies behave just as
would with any other message, using the original "From:",



Resnick Standards Track [Page 27]

RFC 2822 Internet Message Format April 2001


"Reply-To:", "Message-ID:", and other fields. The resent fields
only informational and MUST NOT be used in the normal processing
replies

The "Resent-Date:" indicates the date and time at which the
message is dispatched by the resender of the message. Like
"Date:" field, it is not the date and time that the message
actually transported

The "Resent-To:", "Resent-Cc:", and "Resent-Bcc:" fields
identically to the "To:", "Cc:", and "Bcc:" fields respectively
except that they indicate the recipients of the resent message,
the recipients of the original message

The "Resent-Message-ID:" field provides a unique identifier for
resent message

3.6.7. Trace

The trace fields are a group of header fields consisting of
optional "Return-Path:" field, and one or more "Received:" fields
The "Return-Path:" header field contains a pair of angle
that enclose an optional addr-spec. The "Received:" field contains
(possibly empty) list of name/value pairs followed by a semicolon
a date-time specification. The first item of the name/value pair
defined by item-name, and the second item is either an addr-spec,
atom, a domain, or a msg-id. Further restrictions may be applied
the syntax of the trace fields by standards that provide for
use, such as [RFC2821].

trace = [return
1*

return = "Return-Path:" path

path = ([CFWS] "<" ([CFWS] / addr-spec) ">" [CFWS]) /
obs-

received = "Received:" name-val-list ";" date-time

name-val-list = [CFWS] [name-val-pair *(CFWS name-val-pair)]

name-val-pair = item-name CFWS item-

item-name = ALPHA *(["-"] (ALPHA / DIGIT))

item-value = 1*angle-addr / addr-spec /
atom / domain / msg-



Resnick Standards Track [Page 28]

RFC 2822 Internet Message Format April 2001


A full discussion of the Internet mail use of trace fields
contained in [RFC2821]. For the purposes of this standard, the
fields are strictly informational, and any formal interpretation
them is outside of the scope of this document

3.6.8. Optional

Fields may appear in messages that are otherwise unspecified in
standard. They MUST conform to the syntax of an optional-field
This is a field name, made up of the printable US-ASCII
except SP and colon, followed by a colon, followed by any text
conforms to unstructured

The field names of any optional-field MUST NOT be identical to
field name specified elsewhere in this standard

optional-field = field-name ":" unstructured

field-name = 1*

ftext = %d33-57 / ; Any character
%d59-126 ; controls, SP,
; ":".

For the purposes of this standard, any optional field
uninterpreted

4. Obsolete

Earlier versions of this standard allowed for different (usually
liberal) syntax than is allowed in this version. Also, there
been syntactic elements used in messages on the Internet
interpretation have never been documented. Though some of
syntactic forms MUST NOT be generated according to the grammar
section 3, they MUST be accepted and parsed by a conformant receiver
This section documents many of these syntactic elements. Taking
grammar in section 3 and adding the definitions presented in
section will result in the grammar to use for interpretation
messages

Note: This section identifies syntactic forms that any
MUST reasonably interpret. However, there are certainly
messages which do not conform to even the additional syntax given
this section. The fact that a particular form does not appear in
section of this document is not justification for computer
to crash or for malformed data to be irretrievably lost by
implementation. To repeat an example, though this document
lines in messages to be no longer than 998 characters,



Resnick Standards Track [Page 29]

RFC 2822 Internet Message Format April 2001


discarding the 999th and subsequent characters in a line
warning would still be bad behavior for an implementation. It is
to the implementation to deal with messages robustly

One important difference between the obsolete (interpreting) and
current (generating) syntax is that in structured header field
(i.e., between the colon and the CRLF of any structured
field), white space characters, including folding white space,
comments can be freely inserted between any syntactic tokens.
allows many complex forms that have proven difficult for
implementations to parse

Another key difference between the obsolete and the current syntax
that the rule in section 3.2.3 regarding lines composed entirely
white space in comments and folding white space does not apply.
the discussion of folding white space in section 4.2 below

Finally, certain characters that were formerly allowed in
appear in this section. The NUL character (ASCII value 0) was
allowed, but is no longer for compatibility reasons. CR and LF
allowed to appear in messages other than as CRLF; this use is
shown here

Other differences in syntax and semantics are noted in the
sections

4.1. Miscellaneous obsolete

These syntactic elements are used elsewhere in the obsolete syntax
in the main syntax. The obs-char and obs-qp elements each add
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-
provides for "empty" elements in a comma-separated list of phrases

Note: The "period" (or "full stop") character (".") in obs-phrase
not a form that was allowed in earlier versions of this or any
standard. Period (nor any other character from specials) was
allowed in phrase because it introduced a parsing
distinguishing between phrases and portions of an addr-spec (
section 4.4). It appears here because the period character
currently used in many messages in the display-name portion
addresses, especially for initials in names, and therefore must