How to convert mbox files to Maildir manually

Enter Your Query:
Use '%' for wildcards and quotes for "exact phrases"

Top Level » Email
Top Level » Email » Dovecot

How to convert mbox files to Maildir manuallyLast Modified: Mar 27, 2006, 9:51 pm
The mb2md script is a simple way to convert any mbox files over to Maildir.

First download the script from, eg

mv mb2md
chmod 755 mb2md

For simpliciy, we've renamed the script to mb2md.

Once setup, you can then convert the account.

Here is a sample for converting virtual pop acounts

./mb2md -s /var/spool/virtual/ -R -d /home/username/imap/
cd /home/username/imap/
chown username:mail *
chmod 660 *

To convert the main system account:

./mb2md -s /var/spool/mail/username -R -d /home/username/Maildir
cd /home/username/Maildir/cur
chown username:mail *
chmod 660 *

The same method can be used to convert the mbox imap folders as well, eg:

./mb2md -s /home/username/imap/ -R -d /home/username/imap/

More info here: Maildir conversion thread.  Includes a shell script to do this automatically for all users (posted by diradmin).

The Dovecot installation guide for DA with the automatic DA convertor can be found here:

2003 JBMC Software, Suite 173  3-11 Bellerose Drive, St Albert, AB  T8N 1P7  Canada.  Mon-Fri 9AM-5PM MST