> I have a directory (actually, a few hundred directories....) containing a
> bunch of files. Each file contains a single e-mail message, in RFC822
> format. Can anyone point me to a utility to gather up all those files,
> and convert them to a single "mbox" format file, suitable for feeding into
> Hypermail?
>
> I do have to be able to preserve the message dates, so any solution
> must get the message date from the RFC822 "Date:" header, and put it into
> the mbox "From_" line.
Ouch. That's a crude way of doing it... If they're in RFC822 format, I see no reason why you can't just cat them all into a single file? And for that matter, you can just use a command line for that.
for file in * ; do cat $file >> mbox ; echo "" >> mbox ; done (this is done under sh/bash)
...this would just cat each file, with a blank line between them, to another file called mbox (or whatever you want to call it).
I -think- this would work. I don't have anything loose like that right now that I can try for you, but this wouldn't hurt to try, specially since you won't mess up anything. You're not deleting any files, just catting them into a different one. Then try parsing that big mbox file through hypermail see what it does. There's another test for hypermail.
AMK4
-- W | | Digital information lasts forever, or five years | - whichever comes first. |____________________________________________________________________ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Ashley M. Kirchner <ashley_at_pcraft.com> . 303.442.6410 x130 SysAdmin / Websmith . 800.441.3873 x130 Photo Craft Laboratories, Inc. . eFax 248.671.0909 http://www.pcraft.com . 3550 Arapahoe Ave .................. . . . . Boulder, CO 80303Received on Thu 28 Oct 1999 07:46:16 PM GMT
This archive was generated by hypermail 2.3.0 : Sat 13 Mar 2010 03:46:11 AM GMT GMT