procmail
[Top] [All Lists]

Re: Converting from MH to mbox?

2004-02-09 06:03:57
On Mon, Feb 09, 2004 at 04:22:15AM -0700, LuKreme wrote:
First question, is this a MH formatted directory?

Sounds like it, but an experiment to see would be trivial,
wouldn't it?  Using your test harness ("sandbox"), create
some MH-style folders and see if they're the same.

I've been playing around with:

cat /path/tp/MH/* > temp.box
formail -a Date: -ds < temp.box > newbox

but that yields an improperly formatted FROM_.  Though I've also tried
piping that through a procmail recipe to fix the FROM_ header.

I've had limited results, partly because the MH messages tend to
not have blank lines following the message, so messages tend to get
concatenated together into one "supermessage" and partly because
sometimes my FROM_ fix recipe seems to fail.

Sounds like you'd have much better luck with the -e option
rather than, or perhaps in addition to (but I doubt it) the
-d.  That said, however, if the problem is separating the
messages, well, don't stick them them in temp.box to start
with before processing.

     $ foreach m ( * )
     foreach? formail -a Date: < $m >>! newbox
     $ end

I don't know about that script you found, and maybe it's fine;
but for problems with badly formed Date headers that are leading
to the generation poor From_ lines, you could always (in
procmail) test the Date headers for compatibility first,
and any that fail could go in another special temp mbox to handle
later.

-- 
dman

_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail