D. J. Bernstein
Internet mail
SMTP: Simple Mail Transfer Protocol

The 8BITMIME extension

Users send billions of 8-bit messages every year. As far as I know, all servers can handle 8-bit messages. A few years ago I was able to find a few hosts running ancient 7-bit versions of sendmail, but I don't see any now.

Most clients will send 8-bit messages upon request. This is the behavior of qmail, for example, and exim, and sendmail, starting from version 6.57 in 1993.

Exception: sendmail, starting from version 8.7 in 1995, applies Q-P conversion to an 8-bit message if the message contains MIME header fields, the 8 flag (popular in Europe but not the default) is not set, and the SMTP server has not taken the protective measures described below.

Q-P conversion has mixed results. It eliminates message corruption in the rare case that the server is a 7-bit server and the recipient's mailer supports MIME. However, it creates new message corruption in the much more common case that the server is an 8-bit server and the recipient's mailer does not support MIME.

The 8BITMIME extension has two effects in practice:

Recommendations for 8-bit support

7-bit mailers are obsolete. Do not attempt to deploy a 7-bit mailer on the Internet. The fact that you are complying with IETF standards is irrelevant; users will not tolerate a 7-bit mailer.

Do not implement Q-P conversion in an SMTP client. You will find that simply sending an 8-bit message is much more successful than attempting Q-P conversion, whether or not the server announces 8BITMIME.

Announce 8BITMIME in your server, to prevent Q-P conversion from sendmail without the 8 flag. Ignore the BODY information.

The 8BITMIME fantasy network

8BITMIME was introduced in RFC 1425, published in 1993. RFC 1425 was replaced by RFC 1652, published in 1994.

The view of 8BITMIME in those documents is very different from the practical view explained above. It is perhaps best captured by the following absurd comment from Mark Crispin: ``7-bit MTA's will never go away. Ever. Mail goes on many paths besides IP, some of which are forever 7-bits. You will always have to solve the problem of getting your 8-bit mail into 7-bits for some 7-bit MTA.''

RFC 821 envisioned a network of 7-bit hosts; it prohibited 8-bit messages. RFC 1652 envisioned building a new network of 8-bit hosts, identified by the 8BITMIME extension, with a guarantee that 8-bit messages would never be sent to 7-bit hosts. Each machine inside the network would promise to apply Q-P conversion to any 8-bit message leaving the network. Within the network, 8-bit messages would be transmitted without change.

In fact, this network has been subverted by thousands of hosts that announce 8BITMIME but that never do Q-P conversion: e.g., qmail, or sendmail with the 8 flag set.