Subject: [imap5] broken message/rfc822 handling

From: Brandon Long <[email-masked]>
Date: Thu, 23 Feb 2012 15:12:51 -0800

The bug was only happening on some messages, and kept falling behind
other work.  I've stolen it back and taken a look, and it was actually
a deliberate change in our parser to handle some types of broken
email, though I think the change was done incorrectly.

Basically, its broken if the message/rfc822 message has a
content-disposition of attachment, but works otherwise.  The example
message it was designed to fix attached an actual .eml file as
message/rfc822 but base64 encoded it.  base64 (or quoted-printable)
encoding of a message/* is illegal per RFC 2045 section 6, so the
correct solution was to consider the message/rfc822 not a multipart
container if it was encoded, not if it was of disposition attachment.
In theory, we could base64 decode the part, but that would be a much
bigger change to the parser.

Fix forthcoming.

Brandon

On Thu, Feb 23, 2012 at 7:43 AM, Tony Hansen <[email-masked]> wrote:
> Totally off topic: I wish I knew how to get them to fix that. I get bit by
> it regularly.
>
> On topic: because gmail messes up in this area doesn't mean that we should
> also mess things up in the same way.
>
> I am a firm believer in the use of message/rfc822 attachments.
>
>    Tony Hansen
>
>
> On 2/23/2012 9:51 AM, Jan Kundrát wrote:
>>
>> On 02/20/12 11:52, Tony Finch wrote:
>>>
>>> message/rfc822 is also good. IMO every message that is forwarded or
>>> top-post replied should use message/rfc822 attachments rather than doing
>>> some fucked up redaction of the original message.
>>
>> GMail still breaks [1] on such messages -- the web interface shows the
>> message source and the IMAP server returns invalid BODYSTRUCTURE which
>> doesn't allow accessing the attached message.
>>
>> Cheers,
>> Jan
>>
>> [1] http://permalink.gmane.org/gmane.mail.imap.general/2637
>
>
> _______________________________________________
> imap5 mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/imap5