Dariusz on Software

Methods and Tools

About This Site

Software development stuff

Archive

Maildir -> mbox conversion
Mon, 31 Jan 2011 22:53:42 +0000

Maildir and mbox are two formats for storing e-mails locally. Both have strengths and disadvantages. If you want to convert all your mail from Maildir format to old, good mbox just issue the following script:

for a in .??*; do
    echo $a
    mb=${a/\./}
    for msg in $a/new/* $a/cur/*; do
        formail <$msg >>$mbs 

    done
done

You may ask: why revert to older, less flexible format? The answer is: speed (mbox is faster for many small messages).

Tags: linux.

Tags

Created by Chronicle v3.5