Free trial The cheapest email marketing platform: try Moosend free for 30 days, no credit card. Don't miss your seat. The cheapest email marketing platform Start free trial →
BLACK FRIDAY 2026ONE-TIME OFFER Lifetime deal. Pay once. Credits refilled every year, for life. From $99. ENDS IN   Claim yours →

RFC 2049: MIME Part Five: Conformance Criteria and Examples

RFC 2049 defines MIME conformance: the fallback rules for unknown types and encodings, eight rules for data that survives gateways, the canonical encoding model, and what is still relevant in 2026.

Alaa Touil
Email infrastructure specialist, 8+ years in SMTP and deliverability
8 min read Updated Nov 9, 2026 226 views
RFC 2049 MIME Part Five: Conformance Criteria and Examples - SMTPedia reference
RFC 2049
MIME Part Five: Conformance Criteria and Examples

Current standard

Domain
MIME
Published
November 1996
Obsoletes
RFC 1521, 1522, 1590
SMTP relevance
Medium

↗ Read on rfc-editor.org

What this RFC defines

RFC 2049 is the fifth and last document of the MIME set (RFC 2045 to 2049). It does not add new formats. It answers one question: what must a mail program do to call itself MIME-conformant? It has four parts: a list of conformance requirements (section 2), guidelines for sending data that survives old gateways (section 3), the canonical encoding model that explains how a body becomes a MIME part (section 4), and one complete example message (Appendix A).

Where you see it in practice

Every time a mail client shows an attachment it cannot open as a downloadable file instead of crashing, or shows the plain text version of a multipart/alternative message because it cannot render HTML, it is following the fallback rules of RFC 2049. The same rules explain why a strange attachment from an exotic mailer still reaches you as “unknown file”: the client is required to treat unknown types as application/octet-stream.

The fallback rules that keep mail readable

The heart of section 2 is a set of “when in doubt” rules. They are the reason a 1996 standard still lets 2026 mail clients cope with formats they have never seen.

Quick Reference

RFC 2049 (November 1996) closes the MIME family (2045, 2046, 2047, 2048, 2049). It lists what a MIME-conformant user agent must do: add MIME-Version, decode base64 and quoted-printable, fall back to application/octet-stream for anything unknown, treat unknown multipart subtypes as multipart/mixed, and handle encoded-words in headers. It also gives eight rules for data that must survive gateways, and the four-step canonical encoding model.

RFC 2049 at a glance

AspectDetail
PurposeConformance criteria for MIME user agents, sending guidelines, canonical encoding model
Section 2Requirements for a MIME-conformant mail user agent
Section 3Eight guidelines for data that must survive gateways and old MTAs
Section 4Canonical encoding model: local form, canonical form, transfer encoding, insertion
ExampleOne complex multipart/mixed message in Appendix A
ObsoletesRFC 1521, 1522 and 1590 (together with RFC 2045 to 2048)
PublishedNovember 1996

The conformance requirements of section 2

TopicWhat a conformant user agent must do
MIME-VersionAlways add MIME-Version: 1.0 to the messages it creates
Transfer encodingsDecode quoted-printable and base64; recognize 7bit, 8bit and binary; encode non-7bit data when the transport cannot carry it
Unknown Content-Transfer-EncodingTreat the part as application/octet-stream, whatever its Content-Type says
Content-TypeInterpret it, never show raw non-text data to the user, and send at least text/plain (with a charset parameter if not US-ASCII)
Unknown parametersIgnore them
textDisplay US-ASCII; for an unknown charset, treat the part as application/octet-stream
image, audio, videoTreat unknown subtypes as application/octet-stream
multipartSupport mixed, alternative (without showing redundant parts) and digest; treat unknown subtypes as multipart/mixed
messageDisplay at least message/rfc822, keeping its nested structure; treat unknown subtypes as application/octet-stream
Unknown Content-TypeTreat as application/octet-stream: offer to save it to a file or pass it to a program
Non-MIME mailNever send anything beyond plain US-ASCII text without MIME headers
Encoded-wordsRecognize =?charset?B?...?= and =?charset?Q?...?= in headers, with both B and Q encodings (see RFC 2047)

Section 3: eight rules for data that must survive the trip

In 1996, mail crossed gateways to X.400, BITNET and other systems that rewrote messages. RFC 2049 lists what could be damaged on the way. Most of these hazards are rare on today’s internet, but several still bite, in mailing lists, security gateways and badly written relays.

#HazardStill relevant in 2026?
1The transfer encoding can change in transit, so CRLF may not stay a line break in binary dataYes, for signed content: re-encoding breaks S/MIME and DKIM body hashes
2Isolated CR or LF characters can be lost or convertedYes: bare line feeds are now rejected by many receivers since the SMTP smuggling fixes
3NUL characters may not surviveYes: never put NUL in a text part
4TAB characters may be turned into spacesRarely
5Lines over 76 characters may be wrapped or cutYes: some gateways still wrap long lines, which is why HTML email should be quoted-printable or base64 encoded
6Trailing spaces and tabs may be removed or addedYes: one reason DKIM offers relaxed body canonicalization
7Only 73 characters are safe across every gatewayRarely, but it is why base64 uses such a small alphabet
8A line containing only “.” or starting with “From ” can be corruptedYes: “From ” at the start of a line is still escaped by systems that store mail in the mbox format, and quoted-printable avoids it with =46rom

Section 4: the canonical encoding model

RFC 2049 describes how any body becomes a MIME part, in four steps. It is a conceptual model, not code, but it explains many real bugs.

The four steps, and where bugs happen
1. Local form the text or file as the system stores it
(local charset, local line endings such as LF)
2. Canonical form converted to a standard charset and, for text,
CRLF line endings
3. Transfer encode quoted-printable or base64 if the data is not
7-bit safe
4. Insert wrapped in a MIME part with its headers, then
into the multipart or message

Typical bug: skipping step 2, then base64-encoding a text file
that still has LF endings. The recipient decodes it and gets
text with the wrong line breaks.

This canonical form is a MIME concept. DKIM does not use it: DKIM defines its own canonicalization modes (simple and relaxed) in RFC 6376, applied to the message exactly as it is transmitted.

Common MIME conformance failures

Crashing or hiding the message on an unknown type. A parser that refuses a message because of Content-Type: application/x-unusual-format breaks section 2. Treat the part as application/octet-stream, offer it as a download, and keep rendering the other parts.
Treating an unknown multipart subtype as an error. RFC 2049 says to treat it as multipart/mixed: show every part in order. A client that shows nothing for multipart/related or multipart/report, because it does not know them, fails this rule.
Showing both versions of multipart/alternative. A conformant agent shows the best version it can render, not the plain text and the HTML one after the other. Users then see the same message twice.
Omitting MIME-Version. Messages that use MIME features without MIME-Version: 1.0 may be read as plain RFC 822 text by strict receivers. Emit it on every message.
Sending long unencoded lines. HTML generated on one line of several thousand characters breaks the 998-octet SMTP line limit and the 76-character guideline of section 3. Use quoted-printable or base64 for HTML parts; good mail libraries do this automatically.
MIME family RFCs

  • RFC 2045: MIME headers and transfer encodings
  • RFC 2046: Media types and multipart structure
  • RFC 2047: Encoded-words in headers
  • RFC 2048: Media type registration (replaced by RFC 6838 and RFC 4289)
MIME in the broader email context

Frequently asked questions

How do I test whether my MIME parser is RFC 2049 conformant?

Walk through the section 2 table above and build one test message per rule: an unknown Content-Type, an unknown multipart subtype, an unknown transfer encoding, an unknown charset, encoded-words with both B and Q encoding, a message/rfc822 attachment containing its own multipart. Then parse the complex example of Appendix A. Finally, feed it real messages from Gmail, Outlook, Apple Mail and Thunderbird. A parser that crashes or hides content on any of these is not conformant.

Does RFC 2049 contain a test suite?

No. It contains one complete example, the multipart/mixed message of Appendix A (two text parts, a multipart/parallel with audio and image, a text/enriched part and an attached message in ISO-8859-1), plus short snippets in sections 3 and 4. The requirements of section 2 are what you test against.

Why does a mail client show an attachment as “unknown file”?

Because RFC 2049 tells it to. When the Content-Type is unknown, or the transfer encoding is unknown, the client must treat the part as application/octet-stream and offer to save it, rather than guessing or refusing the message.

Is RFC 2049 related to DKIM canonicalization?

Only indirectly. RFC 2049’s canonical form describes how a body is prepared before transfer encoding. DKIM has its own simple and relaxed canonicalization, defined in RFC 6376 and applied to the message as transmitted. The section 3 hazards (changed whitespace, wrapped lines, re-encoding) are, however, exactly the kinds of transit changes that break DKIM body hashes.

Is there a successor to RFC 2049?

No. The other MIME documents have been updated in places (RFC 2048 was replaced by RFC 6838 and RFC 4289, RFC 2231 extended parameters), but RFC 2049 is still the reference for MIME conformance.

Did this guide save you time?

SMTPedia is free and independent. A coffee helps keep every guide accurate.

Buy SMTPedia a coffee

See SMTPedia first on Google

Add us as a preferred source in Top Stories.

Add as preferred source

About the Author

Alaa - SMTPedia author

Alaa · LinkedIn

Email infrastructure specialist with 8+ years of hands-on experience in SMTP, deliverability, and email verification. I’ve configured and troubleshot mail systems across Postfix, Exchange, and cloud relays, managed IP reputation and warmup campaigns, and built verification pipelines processing millions of addresses. My work spans DNS authentication (SPF, DKIM, DMARC, BIMI), bounce handling, blocklist monitoring, and compliance frameworks including CAN-SPAM and GDPR. I write every article on SMTPedia to give email professionals, developers, and marketers the accurate, RFC-grounded reference they need.


About SMTPedia

SMTPedia is an independent email industry reference covering SMTP, IMAP, POP3, email deliverability, marketing platforms, DNS authentication, and email verification. Every article is researched from official provider documentation, IETF RFCs, and industry best practices. Settings and configurations are verified quarterly.

We are cited as a source by ChatGPT, Microsoft Copilot, and thousands of email professionals worldwide. Learn more about our editorial process.