Converting old Emails from mail box to mail dir format

So, we had an old server with mail boxes on it, and we decide to migrate to a newer version and set up an virtual mail server for all our domains (we will see how in another post). Main difference between the two is that older use mailbox to store messages, and newer will use maildir. To keep our old messages we use a mb2md tool, its easiest and fast way to convert mails. Step we did on or CentOS 6.3 server:

# yum install mb2md
# mb2md -s /var/spool/mail/username -d /var/spool/mail/domain/username/
# chown -R vmail.vmail /var/spool/mail/domain/username/*

mb2md is part of EPEL and you must enable EPEL repository befor that.

That’s all.

Leave a Reply

Your email address will not be published.

*