Re: whitespace near boundarys

From: Bjarni R. Einarsson (
Date: Tue 16 Oct 2001 - 09:59:08 UTC

On 2001-10-16, 10:49:31 (+1000), Noel Clarkson wrote:
> Hi there,
> Using version 1.34 and every so often a mail message will come in and the
> whitespace (a single empty line) is removed before a boundary of and
> attachment which has either caused the mail in that users queue to become
> unfetchable or means that the mail client complains that it cannot
> understand the mail message and to put it as an attachment (ie all of the
> message and anny attachements are put in as one in an attachment making
> them useless).

This should actually never happen - as long as the boundaries etc. are on
seperate lines they should work just fine. Do you have any samples of such
messages? What mail clients are you using?

> It only happens now and then and I've just manually tested the backup of
> the mail file through the same setup as it is usually and it doesn't seem
> to remove the lines as it has. The probelm is very intermittant, and
> doesn't really seem to follow any patterns I can see (except it seems to be
> in emails with multiple attachments).

From the Changelog for revision 1.35:

    Modified multipart-MIME and Base64 code to properly preserve multipart
    pre- and postambles and whitespace near MIME boundaries.
Not sure what the status of this is in 1.44 - white space tends to fluctuate
a bit when I change minor things in the decoding/encoding routines.

Bjarni R. Einarsson                           PGP: 02764305, B7A3AB89                -><-    

Check out my open-source email sanitizer:

hosted by