Re: Balsa 1.1.7 having trouble w/ mbox parsing?



On Mon, 16 July 01:14 Jonas Anden wrote:
> You can forget that last message, it has nothing to do with the 1.1.6 ->
> 1.1.7 upgrade. I found the reason: no disk space left on the /tmp
> partition.
> 
> But while I'm on the subject -- why does balsa need space on the /tmp
> partition to display the message contents? Shouldn't it decode to memory?

Not that easy.  When parsing incorrectly nested multipart MIME documents,
the boundary of the outermost part terminates that part and *everything*
nested inside it.  This makes MIME difficult to parse in streaming format.

An easy solution is to decode each part in the topmost multipart, then having
put it in a temporary file, parse that if it is also of type multipart/*
On very large documents this takes a lot of tempfile space.  I'm assuming
(I haven't looked) that this is how libmutt works.

A solution that would be better suited to in-core parsing would be to maintain
a stack of MIME boundary strings and check that every time a MIME boundary
is detected.  As the code works its way up the stack, terminate the parts
that haven't matched.  Just to be complicated, if none of the stacked
boundaries match the string that looked like a MIME boundary, then it was
not actually a boundary after all and the correct action is to continue to
collect data for the current part.  Needless to say, this is tricky to code.

Brian Stafford




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]