Home > Support > HOWTO List > Postfix mbox to Maildir format conversion

Postfix mbox to Maildir format conversion

Often by default, postfix is configured to deliver email messages in mbox format. To convert mbox to Maildir

1. Edit /etc/postfix/main.cf and look for a line

# "Maildir/" for qmail-style delivery (the / is required).
home_mailbox = Maildir/

2. if procmail is used by postfix to deliver locally change /etc/procmailrc add a line

3. restart postfix

4. for new users to have Maildir/ after creation do

mkdir -p /etc/skel/Maildir/new
mkdir -p /etc/skel/Maildir/cur
mkdir -p /etc/skel/Maildir/tmp

5. convert all existing users to Maildir format using an effect perl script from qmail.org download it at http://www.qmail.org/convert-and-create

wget -c http://www.qmail.org/convert-and-create

then run it

sh convert-and-create

Note: for dovecot no need to change anything, it will autodetect mail box formats, very cool.