Current standard
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.
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
| Aspect | Detail |
|---|---|
| Purpose | Conformance criteria for MIME user agents, sending guidelines, canonical encoding model |
| Section 2 | Requirements for a MIME-conformant mail user agent |
| Section 3 | Eight guidelines for data that must survive gateways and old MTAs |
| Section 4 | Canonical encoding model: local form, canonical form, transfer encoding, insertion |
| Example | One complex multipart/mixed message in Appendix A |
| Obsoletes | RFC 1521, 1522 and 1590 (together with RFC 2045 to 2048) |
| Published | November 1996 |
The conformance requirements of section 2
| Topic | What a conformant user agent must do |
|---|---|
| MIME-Version | Always add MIME-Version: 1.0 to the messages it creates |
| Transfer encodings | Decode quoted-printable and base64; recognize 7bit, 8bit and binary; encode non-7bit data when the transport cannot carry it |
| Unknown Content-Transfer-Encoding | Treat the part as application/octet-stream, whatever its Content-Type says |
| Content-Type | Interpret 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 parameters | Ignore them |
| text | Display US-ASCII; for an unknown charset, treat the part as application/octet-stream |
| image, audio, video | Treat unknown subtypes as application/octet-stream |
| multipart | Support mixed, alternative (without showing redundant parts) and digest; treat unknown subtypes as multipart/mixed |
| message | Display at least message/rfc822, keeping its nested structure; treat unknown subtypes as application/octet-stream |
| Unknown Content-Type | Treat as application/octet-stream: offer to save it to a file or pass it to a program |
| Non-MIME mail | Never send anything beyond plain US-ASCII text without MIME headers |
| Encoded-words | Recognize =?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.
| # | Hazard | Still relevant in 2026? |
|---|---|---|
| 1 | The transfer encoding can change in transit, so CRLF may not stay a line break in binary data | Yes, for signed content: re-encoding breaks S/MIME and DKIM body hashes |
| 2 | Isolated CR or LF characters can be lost or converted | Yes: bare line feeds are now rejected by many receivers since the SMTP smuggling fixes |
| 3 | NUL characters may not survive | Yes: never put NUL in a text part |
| 4 | TAB characters may be turned into spaces | Rarely |
| 5 | Lines over 76 characters may be wrapped or cut | Yes: some gateways still wrap long lines, which is why HTML email should be quoted-printable or base64 encoded |
| 6 | Trailing spaces and tabs may be removed or added | Yes: one reason DKIM offers relaxed body canonicalization |
| 7 | Only 73 characters are safe across every gateway | Rarely, but it is why base64 uses such a small alphabet |
| 8 | A line containing only “.” or starting with “From ” can be corrupted | Yes: “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.
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
MIME-Version: 1.0 may be read as plain RFC 822 text by strict receivers. Emit it on every message.Related standards and further reading
- RFC 5322: Internet Message Format
- RFC 6152: 8BITMIME
- RFC 6376: DKIM and its own canonicalization
- Content-Type and MIME Structure: practical parsing guide
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 coffeeAbout the 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.