<<< Date Index >>>     <<< Thread Index >>>

Re: How to convert maildir to mbox format



* On 2004.06.18, in <E1BbW51-0002Ny-00@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
*       "Larry Alkoff" <labradley@xxxxxxxxxxxxxx> wrote:
> There are many mbox to maildir format conversion programs
> but I have not found one going the other way.
> 
> Does anyone know of such?

You can use formail (from the procmail package) for this.

cd maildir
: > ../mbox
for file in new/*; do
        formail -I Status: <"$file" >>../mbox
done
for file in cur/*; do
        formail -a "Status: RO" <"$file" >>../mbox
done


Alternatively, mutt will save a mailbox in any supported format to
any other supported format. Set $mbox_type in muttrc to control the
preferred save format. You can use mutt to batch-convert a bunch of
scripts, if you set various options to disable prompting, and use the -e
option to mutt to feed it commands at startup.

-- 
 -D.    dgc@xxxxxxxxxxxx                                  NSIT::ENSS
        No money,  no book.  No book,  no study.  No study, no pass.
        No pass, no graduate. No graduate, no job. No job, no money.
             T h e   U n i v e r s i t y   o f   C h i c a g o