[Mailman-Developers] broken mbox?

Christopher Lindsey lindsey@ncsa.uiuc.edu
Tue, 12 Oct 1999 12:39:45 -0500 (CDT)


> Hmm..but this is what I'm saying...none of these messages start with From.
> The From you saw is taken from the header of the next message (none of the
> sentences in the message body start with From).  That's the problem I'm
> talking about...every message (if I run the script and watch it go
> throught the first 10 or 20 messages in the mbox file) is read wrong or
> something by the mailbox module, as requesting their message bodies always
> has this fragment of the header from the following message.

Try preprocessing your mailbox with formail (part of the procmail suite,
available at procmail.org).  It will automatically generate missing
From_ headers for you or rebuild broken ones (like you have). Something like

   formail -I"Content-Length:" -I"From " < inbox | formail -m 6 -des > outbox

might do the trick.  You'll need to play with the numeric value -- it
is the number of headers that must appear in a row for the matching
lines to be considered part of a new email message.  The higher you
can set it, the better because lower values may match on headers 
within attachments (i.e. Content-Disposition, etc.)

Chris