On Sun, Feb 27, 2005 at 08:32:03PM +0100, Bernhard Kaindl wrote:
> Cryrus IMAPD rejects mails with a NUL characters in them,
> and offlineimap 4.0.9 crashes in the error from IMAP:

 [ snip ]

Can you clarify why you're uploading these messages to the IMAP server?
Are you doing an IMAP-to-IMAP sync?

[ snip ]

>   ui.debug('imap', 'savemessage: using date ' + str(date))
> - content = re.sub("(?<!\r)\n", "\r\n", content)
> + content = re.sub("(?<!\r)\n", "\r\n", content.replace("\0", "=00"))
>   ui.debug('imap', 'savemessage: initial content is: ' + repr(content))
> 
> works fine - you can choose to replace \0 with also with nothing,
> I choose =00 because it's the quoted-printable sequence for \0,
> so this does not fix something but clearly shows me that this
> message had a replaced \0 character, that's all.

Thanks for the patch.  But I won't apply it, since I consider changing
the content of messages to be unacceptable.  This could break mail for
people with working 8bit solutions.

Section 4.3.1 of RFC3501 addresses binary mail.  However, it's not clear
to me what it's suggesting; it reads as if it's suggesting that IMAP
clients must re-encode MIME commponents to base64, but I'm not sure if
it really is suggesting that.

Could you provide me with a (gzipped, perhaps) copy of a mail file that
has the embedded \0 characters?

Thanks,
John



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to