How to convert mbox files to Maildir manually

The mb2md script is a simple way to convert any mbox files over to Maildir.

First download the script from

http://batleth.sapienti-sat.org/projects/mb2md

, eg

wget http://batleth.sapienti-sat.org/projects/mb2md/mb2md-3.20.pl.gz
gunzip mb2md-3.20.pl.gz
mv mb2md-3.20.pl 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/domain.com/user -R -d /home/username/imap/domain.com/user/Maildir
cd /home/username/imap/domain.com/user/Maildir/cur
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/domain.com/user/mail -R -d /home/username/imap/domain.com/user/Maildir

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

 
email/maildir.txt · Last modified: 2010/03/01 19:55 by muscardin
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Noncommercial-Share Alike 3.0 Unported
Please visit Automatic Backlinks to start earning free backlinks Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki