|
E with acute accent becomes Ï.
E with acute accent becomes É.
Try clicking
here.
9.2 Example with an absolute URI to an embedded GIF
The second example is an HTML message which includes a single image
referenced using the Content-Location mechanism
From: foo1@bar.
To: foo2@bar.
Subject: A simple
Mime-Version: 1.0
Content-Type: multipart/related; boundary="boundary-example";
type="text/html"; start="
--boundary-
Content-Type: text/html;charset="US-ASCII
Content-ID:
... text of the HTML document, which might contain a
referencing a resource in another body part, for
through a statement such as
Standards Track [Page 15]
RFC 2557 MIME Encapsulation of Aggregate Documents March 1999
ALT="IETF logo">
--boundary-
Content-Location
http://www.ietf.cnri.reston.va.us/images/ietflogo.
Content-Type: IMAGE/
Content-Transfer-Encoding: BASE64
R0lGODlhGAGgAPEAAP/////ZRaCgoAAAACH+PUNvcHlyaWdodCAoQykgMTk
NSBJRVRGLiBVbmF1dGhvcml6ZWQgZHVwbGljYXRpb24gcHJvaGliaXRlZC4
etc...
--boundary-example--
9.3 Example with relative URIs to embedded GIF
In this example, a Content-Location header field in the
heading will be a base to all relative URLs, also inside the
text being sent
From: foo1@bar.
To: foo2@bar.
Subject: A simple
Mime-Version: 1.0
Content-Location: http://www.ietf.cnri.reston.va.us
Content-Type: multipart/related; boundary="boundary-example";
type="text/html
--boundary-
Content-Type: text/html; charset="ISO-8859-1"
Content-Transfer-Encoding: QUOTED-
... text of the HTML document, which might contain
referencing resources in other body parts, for example
statements such as



Example of a copyright sign encoded with Quoted-Printable: =A
Example of a copyright sign mapped onto HTML markup: ¨
--boundary-
Content-Location
http://www.ietf.cnri.reston.va.us/images/ietflogo1.
; Note - Absolute Content-Location does not require
;
Palme, et al. Standards Track [Page 16]
RFC 2557 MIME Encapsulation of Aggregate Documents March 1999
Content-Type: IMAGE/
Content-Transfer-Encoding: BASE64
R0lGODlhGAGgAPEAAP/////ZRaCgoAAAACH+PUNvcHlyaWdodCAoQykgMTk
NSBJRVRGLiBVbmF1dGhvcml6ZWQgZHVwbGljYXRpb24gcHJvaGliaXRlZC4
etc...
--boundary-
Content-Location: images/ietflogo2.
; Note - Relative Content-Location is resolved by
; specified in the Multipart/Related Content-Location
Content-Transfer-Encoding: BASE64
R0lGODlhGAGgAPEAAP/////ZRaCgoAAAACH+PUNvcHlyaWdodCAoQykgMTk
NSBJRVRGLiBVbmF1dGhvcml6ZWQgZHVwbGljYXRpb24gcHJvaGliaXRlZC4
etc...
--boundary-
Content-Location
http://www.ietf.cnri.reston.va.us/images/ietflogo3.
Content-Transfer-Encoding: BASE64
R0lGODlhGAGgAPEAAP/////ZRaCgoAAAACH+PUNvcHlyaWdodCAoQykgMTk
NSBJRVRGLiBVbmF1dGhvcml6ZWQgZHVwbGljYXRpb24gcHJvaGliaXRlZC4
etc...
--boundary-example--
9.4 Example with a relative URI and no BASE
From: foo1@bar.
To: foo2@bar.
Subject: A simple
Mime-Version: 1.0
Content-Type: multipart/related; boundary="boundary-example";
type="text/html
--boundary-
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: QUOTED-
... text of the HTML document, which might contain a
referencing a resource in another body part, for
through a statement such as

Example of a copyright sign encoded with Quoted-Printable: =A
Example of a copyright sign mapped onto HTML markup: ¨
Palme, et al. Standards Track [Page 17]
RFC 2557 MIME Encapsulation of Aggregate Documents March 1999
--boundary-
Content-Location: ietflogo.
Content-Type: IMAGE/
Content-Transfer-Encoding: BASE64
R0lGODlhGAGgAPEAAP/////ZRaCgoAAAACH+PUNvcHlyaWdodCAoQykgMTk
NSBJRVRGLiBVbmF1dGhvcml6ZWQgZHVwbGljYXRpb24gcHJvaGliaXRlZC4
etc...
--boundary-example--
9.5 Example using CID URL and Content-ID header to an embedded
From: foo1@bar.
To: foo2@bar.
Subject: A simple
Mime-Version: 1.0
Content-Type: multipart/related; boundary="boundary-example";
type="text/html
--boundary-
Content-Type: text/html; charset="US-ASCII
... text of the HTML document, which might contain a
referencing a resource in another body part, for
through a statement such as
--boundary-
Content-Location: CID:something@else ; this header is
Content-ID:
Content-Transfer-Encoding: BASE64
R0lGODlhGAGgAPEAAP/////ZRaCgoAAAACH+PUNvcHlyaWdodCAoQykgMTk
NSBJRVRGLiBVbmF1dGhvcml6ZWQgZHVwbGljYXRpb24gcHJvaGliaXRlZC4
etc...
--boundary-example--
Palme, et al. Standards Track [Page 18]
RFC 2557 MIME Encapsulation of Aggregate Documents March 1999
9.6 Example showing permitted and forbidden references between
body
This example shows in which cases references are allowed
multiple multipart/related body parts in a message
From: foo1@bar.
To: foo2@bar.
Subject: A simple
Mime-Version: 1.0
Content-Type: multipart/related; boundary="boundary-example-1";
type="text/html
--boundary-example-1
Content-Type: text/html;charset="US-ASCII
Content-ID:
The image reference below will be resolved with the
in the next body part

The image reference below cannot be resolved within
MIME message, since it contains a reference from an
body part to an inside body part, which is not
by this standard
ALT="IETF logo with transparent background">
The anchor reference immediately below will be resolved
the nested text/html body part below
reference immediately below will be resolved
the nested text/html body part below
boundary-example-1
Content-Location
http://www.ietf.cnri.reston.va.us/images/ietflogo.
Content-Type: IMAGE/
Content-Transfer-Encoding: BASE64
R0lGODlhGAGgAPEAAP/////ZRaCgoAAAACH+PUNvcHlyaWdodCAoQykgMTk
NSBJRVRGLiBVbmF1dGhvcml6ZWQgZHVwbGljYXRpb24gcHJvaGliaXRlZC4
etc...
Palme, et al. Standards Track [Page 19]
RFC 2557 MIME Encapsulation of Aggregate Documents March 1999
--boundary-example-1
Content-Location
http://www.ietf.cnri.reston.va.us/more-
Content-Type: multipart/related; boundary="boundary-example-2";
type="text/html
--boundary-example-2
Content-Type: text/html;charset="US-ASCII
Content-ID:
The image reference below will be resolved with the
in the surrounding multipart/related above

The image reference below will be resolved with the
inside the current nested multipart/related below
ALT="IETF logo with transparent background">
--boundary-example-2
Content-Location: http:images/ietflogo2.
Content-Type: IMAGE/
Content-Transfer-Encoding: BASE64
R0lGODlhGAGgANX/ACkpKTExMTk5OUJCQkpKSlJSUlpaWmNjY2tra3Nzc3t7e
SEhIyMjJSUlJycnKWlpa2trbW1tcDAwM7Ozv/eQnNzjHNzlGtrjGNjhFpae1
etc...
--boundary-example-2--
--boundary-example-1
Content-Location
http://www.ietf.cnri.reston.va.us/even-more-
Content-Type: multipart/related; boundary="boundary-example-3";
type="text/html
--boundary-example-3
Content-Type: text/html;charset="US-ASCII
Content-ID: <4@foo@bar.net
The image reference below will be resolved with the
inside the current nested multipart/related below
ALT="IETF logo with shadows">
The image reference below cannot be resolved according
this standard since references between parallel multipart
related structures are not supported
ALT="IETF logo with transparent background">
Palme, et al. Standards Track [Page 20]
RFC 2557 MIME Encapsulation of Aggregate Documents March 1999
--boundary-example-3
Content-Location: http:images/ietflogo2d.
Content-Type: IMAGE/
Content-Transfer-Encoding: BASE64
R0lGODlhGAGgANX/AMDAwCkpKTExMTk5OUJCQkpKSlJSUlpaWmNjY2tra3
c3t7e4SEhIyMjJSUlJycnKWlpa2trbW1tb29vcbGxs7OztbW1t7e3ufn5+/
etc...
--boundary-example-3--
--boundary-example-1--
10. Character encoding issues and end-of-line
For the encoding of characters in HTML documents and other
documents into a MIME-compatible octet stream, the
mechanisms are relevant
- HTML [HTML2], [HTML-I18N] as an application of SGML [SGML]
characters to be denoted by character entities as well as
numeric character references (e.g. "Latin small letter a
acute accent" may be represented by "á" or "á") in
HTML markup
- HTML documents, in common with other documents of the
Content-Type "text", can be represented in MIME using one
several character encodings. The MIME Content-Type "charset
parameter value indicates the particular encoding used. For
exact meaning and use of the "charset" parameter, please
[MIME2] chapter 4.
Note that the "charset" parameter refers only to the
character encoding. For example, the string "á" can be
in MIME with "charset=US-ASCII", while the raw character "
small letter a with acute accent" cannot
The above mechanisms are well defined and documented, and
not further explained here. In sending a message, all the
mentioned mechanisms MAY be used, and any mixture of them MAY
when sending the document in MIME format. Receiving user
(together with any Web browser they may use to display the document
MUST be capable of handling any combinations of these mechanisms
Also note that
- Any documents including HTML documents that contain octet
outside the 7-bit range need a content-transfer-encoding
before transmission over certain transport protocols [MIME1,
Palme, et al. Standards Track [Page 21]
RFC 2557 MIME Encapsulation of Aggregate Documents March 1999
chapter 5].
- The MIME standard [MIME2] requires that e-mailed documents
"Content-Type: Text/ MUST be in canonical form before a Content
Transfer-Encoding is applied, i.e. that line breaks are encoded
CRLFs, not as bare CRs or bare LFs or something else. This is
contrast to [HTTP] where section 3.6.1 allows
representations of line breaks
Note that this might cause problems with integrity checks based
checksums, which might not be preserved when moving a document
the HTTP to the MIME environment. If a document has to be
in such a way that a checksum based message integrity check
invalid, then this integrity check header SHOULD be removed from
document
Other sources of problems are Content-Encoding used in HTTP but
allowed in MIME, and character sets that are not able to
line breaks as CRLF. A good overview of the differences between
and MIME with regards to Content-Type: "text" can be found in [HTTP],
appendix C
Some transport mechanisms may specify a default "charset"
if none is supplied [HTTP, MIME1]. Because the default differs
different mechanisms, when HTML is transferred through e-mail,
charset parameter SHOULD be included, rather than relying on
default
11. Security
11.1 Security considerations not related to
It is possible for a message sender to misrepresent the source of
multipart/related body part to a message recipient by labeling
with a Content-Location URI that references another resource
Therefore, message recipients should only interpret Content-
URIs as labeling a body part for the resolution of references
body parts in the same multipart/related message structure, and
as the source of a resource, unless this can be verified by
means
URIs, especially File URIs, if used without change in a message,
inadvertently reveal information that was not intended to be
outside a particular security context. Message senders should
care when constructing messages containing the new header fields
defined in this standard, that they are not revealing
outside of any security contexts to which they belong
Palme, et al. Standards Track [Page 22]
RFC 2557 MIME Encapsulation of Aggregate Documents March 1999
Some resource servers hide passwords and tickets (access tokens
information which should not be reveled to others) and
sensitive information in non-visible fields or URIs within
text/html resource. If such a text/html resource is forwarded in
email message, this sensitive information may be
revealed to others
Since HTML documents can either directly contain executable
(i.e., JavaScript) or indirectly reference executable content (
"INSERT" specification, Java). It is exceedingly dangerous for
receiving User Agent to execute content received in a mail
without careful attention to restrictions on the capabilities of
executable content
HTML-formatted messages can be used to investigate user behaviour
for example to break anonymity, in ways which invade the privacy
individuals. If you send a message with a inline link to an
which is not itself included in the message, the recipients mailer
browser may request that object through HTTP. The HTTP
will then reveal who is reading the message. Example: A person
wants to find out who is behind an anonymous user identity, or
which workstation a user is reading his mail, can do this by
a message with an inline link and then observe from where this
is used to request the object
11.2 Security considerations related to
There is a well-known problem with the caching of directly
web resources. A resource retrieved from a cache may differ from
re-retrieved from its source. This problem, also manifests
when a copy of a resource is delivered in a multipart/
structure
When processing (rendering) a text/html body part in an
multipart/related structure, all URIs in that text/html body
which reference subsidiary resources within the
multipart/related structure SHALL be satisfied by those resources
not by resources from any another local or remote source
Therefore, if a sender wishes a recipient to always retrieve an
referenced resource from its source, an URI labeled copy of
resource MUST NOT be included in the same multipart/
structure
In addition, since the source of a resource received in
multipart/related structure can be misrepresented (see 11.1 above),
if a resource received in multipart/related structure is stored in
cache, it MUST NOT be retrieved from that cache other than by
Palme, et al. Standards Track [Page 23]
RFC 2557 MIME Encapsulation of Aggregate Documents March 1999
reference contained in a body part of the same multipart/
structure. Failure to honor this directive will allow
multipart/related structure to be employed as a Trojan Horse.
example, to inject bogus resources (i.e. a misrepresentation of
competitor's Web site) into a recipient's generally accessible
cache
12. Differences as compared to the previous version of this
standard in RFC 2110
The specification has been changed to show that the formats
do not only apply to multipart MIME in email, but also to
MIME transferred through other protocols such as HTTP or FTP
In order to agree with [RELURL], Content-Location headers
multipart Content-Headings can now be used as a base to
relative URIs in their component parts, but only if no base URI
be derived from the component part itself. Base URIs in Content
Location header fields in inner headings have precedence over
URIs in outer multipart headings
The Content-Base header, which was present in RFC 2110, has
removed. A conservative implementor may choose to accept this
in input for compatibility with implementations of RFC 2110, but
never send any Content-Base header, since this header is not any
a part of this standard
A section 4.4.1 has been added, specifying how to handle the case
sending a body part whose URI does not agree with the correct
syntax
The handling of relative and absolute URIs for matching between
parts have been merged into a single description, by specifying
relative URIs, which cannot be resolved otherwise, should be
as if they had been given the URL "thismessage:/".
13.
Harald T. Alvestrand, Richard Baker, Isaac Chan, Dave Crocker,
J. Duerst, Lewis Geer, Roy Fielding, Ned Freed, Al Gilman,
Hoffman, Andy Jacobs, Richard W. Jesmajian, Mark K. Joseph,
Herlihy, Valdis Kletnieks, Daniel LaLiberte, Ed Levinson, Jay Levitt
Albert Lunde, Larry Masinter, Keith Moore, Gavin Nicol, Martyn W
Peck, Pete Resnick, Jon Smirl, Einar Stefferud, Jamie Zawinski,
Zilles and several other people have helped us with preparing
document. We alone take responsibility for any errors which may
be in the document
Palme, et al. Standards Track [Page 24]
RFC 2557 MIME Encapsulation of Aggregate Documents March 1999
14.
[ABNF] Crocker, D. and P. Overell, "Augmented BNF for
Specifications: ABNF", RFC 2234, November 1997.
[CONDISP] Troost, R. and S. Dorner, "Communicating
Information in Internet Messages: The Content
Disposition Header", RFC 2183, August 1997.
[HOSTS] Braden, R., Ed., "Requirements for Internet Hosts --
Application and Support", STD 3, RFC 1123,
1989.
[HTML-I18N] Yergeau, F., Nicol, G. Adams, G. and M. Duerst
"Internationalization of the Hypertext
Language", RFC 2070, January 1997.
[HTML2] Berners-Lee, T. and D. Connolly: "Hypertext
Language - 2.0", RFC 1866, November 1995.
[HTML3.2] Dave Raggett: HTML 3.2 Reference Specification, W3
Recommendation, January 1997, at
http://www.w3.org/TR/REC-html32.
[HTTP] Berners-Lee, T., Fielding, R. and H. Frystyk
"Hypertext Transfer Protocol -- HTTP/1.0", RFC 1945,
May 1996.
[IETF-TERMS] Bradner, S., "Key words for use in RFCs to
Requirements Levels", BCP 14, RFC 2119, March 1997.
[INFO] J. Palme: Sending HTML in MIME, an
supplement to the RFC: MIME Encapsulation
Aggregate Documents, such as HTML (MHTML), Work
Progress
[MD5] Rivest, R., "The MD5 Message-Digest Algorithm",
1321, April 1992.
[MIDCID] Levinson, E., "Content-ID and Message-ID
Resource Locators", RFC 2387, August 1998.
[MIME1] Freed, N. and N. Borenstein, "Multipurpose
Mail Extensions (MIME) Part One: Format of
Message Bodies", RFC 2045, December 1996.
Palme, et al. Standards Track [Page 25]
RFC 2557 MIME Encapsulation of Aggregate Documents March 1999
[MIME2] Freed, N. and N. Borenstein, "Multipurpose
Mail Extensions (MIME) Part Two: Media Types",
2046, December 1996.
[MIME3] Moore, K., "MIME (Multipurpose Internet
Extensions) Part Three: Message Header Extensions
Non-ASCII Text", RFC 2047, December 1996.
[MIME4] Freed, N., Klensin, J. and J. Postel, "
Internet Mail Extensions (MIME) Part Four
Registration Procedures", RFC 2048, January 1997.
[MIME5] Freed, N. and N. Borenstein, "Multipurpose
Mail Extensions (MIME) Part Five:
Criteria and Examples", RFC 2049, November 1996.
[NEWS] Horton, M. and R. Adams: "Standard for interchange
USENET messages", RFC 1036, December 1987.
[PDF] Tim Bienz and Richar Cohn: "Portable Document
Reference Manual", Addison-Wesley, Reading, MA, USA
1993, ISBN 0-201-62628-4.
[REL] Levinson, E., "The MIME Multipart/Related Content
Type", RFC 2389, August 1998.
[RELURL] Fielding, R., "Relative Uniform Resource Locators",
RFC 1808, June 1995.
[RFC822] Crocker, D., "Standard for the format of
Internet text messages." STD 11, RFC 822,
1982.
[SGML] ISO 8879. Information Processing -- Text and Office -
Standard Generalized Markup Language (SGML), 1986.
[SMTP] Postel, J., "Simple Mail Transfer Protocol", STD 10,
RFC 821, August 1982.
[URL] Berners-Lee, T., Masinter, L. and M. McCahill
"Uniform Resource Locators (URL)", RFC 1738,
1994.
[URLBODY] Freed, N. and K. Moore, "Definition of the URL
External-Body Access-Type", RFC 2017, October 1996.
Palme, et al. Standards Track [Page 26]
RFC 2557 MIME Encapsulation of Aggregate Documents March 1999
[VRML] Gavin Bell, Anthony Parisi, Mark Pesce: "
Reality Modeling Language (VRML) Version 1.0
Specification." May 1995,
http://www.vrml.org/Specifications/.
[XML] Extensible Markup Language, published by the
Wide Web Consortium, URL http://www.w3.org/XML
15. Authors'
For contacting the editors, preferably write to Jacob Palme
Jacob
Stockholm University and
Electrum 230
S-164 40 Kista,
Phone: +46-8-16 16 67
Fax: +46-8-783 08 29
EMail: jpalme@dsv.su.
Alex
Microsoft
One Microsoft
Redmond WA 98052
Phone: +1-425-703-8238
EMail: alexhop@microsoft.
Nick
Lotus Development
55 Cambridge
Cambridge MA 02142-1295
EMail: Shelness@lotus.
Working group chairman
Einar
EMail: stef@nma.
Palme, et al. Standards Track [Page 27]
RFC 2557 MIME Encapsulation of Aggregate Documents March 1999
16. Full Copyright
Copyright (C) The Internet Society (1999). All Rights Reserved
This document and translations of it may be copied and furnished
others, and derivative works that comment on or otherwise explain
or assist in its implementation may be prepared, copied,
and distributed, in whole or in part, without restriction of
kind, provided that the above copyright notice and this paragraph
included on all such copies and derivative works. However,
document itself may not be modified in any way, such as by
the copyright notice or references to the Internet Society or
Internet organizations, except as needed for the purpose
developing Internet standards in which case the procedures
copyrights defined in the Internet Standards process must
followed, or as required to translate it into languages other
English
The limited permissions granted above are perpetual and will not
revoked by the Internet Society or its successors or assigns
This document and the information contained herein is provided on
"AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET
TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED,
BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE
HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES
MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
Palme, et al. Standards Track [Page 28]
if you see any problems within the linking, don't worry be happy,
this is version 0.1 of the Relevance System and you gotta expect some crappy subroutines sometimes,
just be content we did not write this in Java, which would have made this "bigger and better" HAHAHHA.
RFC documents can be found at I.E.T.F.
Relevance System Copyright © 2002 Spectrum WorldResearch
other technical nosh by ServerMasters Corporation
collaboration of BobX