Subject: rfc822_encode_body_7bit() problem

From: Tomas Styblo <[email-masked]>
Date: Mon, 11 Mar 2002 16:21:49 +0100

Hello.

I found that rfc822_encode_body_7bit() in rfc822.c calls fatal() when it
encounters a message/* attachment. This leads to coredumps on our
Apache/PHP server. We encode these attachments to quoted-printable encoding.

Relevant section of the function's code is:

case TYPEMESSAGE:     /* encapsulated message */
    switch (body->encoding) {
        case ENC7BIT:
            break;
        case ENC8BIT:
            MM_LOG ("8-bit included message in 7-bit message body",WARN);
             break;    
        case ENCBINARY: 
             MM_LOG ("Binary included message in 7-bit message body",WARN);
             break;
        default:
            fatal ("Invalid rfc822_encode_body_7bit message encoding");
    }    

-- 
Tomas Styblo
Programmer

Czech On Line, a.s.
U nakladoveho nadrazi 8,
130 00 Praha 3, Czech Republic
-- 
------------------------------------------------------------------
 For information about this mailing list, and its archives, see: 
 http://www.washington.edu/imap/c-client-list.html
------------------------------------------------------------------

---

From: Mark Crispin <[email-masked]>
Date: Mon, 11 Mar 2002 10:56:24 -0800 (PST)

> Apache/PHP server. We encode these attachments to quoted-printable encoding.

That only happens when sending (not reading) a message.  Neither BASE64 or
QUOTED-PRINTABLE are not valid encodings for MESSAGE or MULTIPART MIME types,
and c-client rightly objects to being told to create such a message.

In other words, it's a bug in your code.  You can't use QUOTED-PRINTABLE.