CPanel MBOX to MAILDIR migration: convert2maildir

Traditionally CPanel has been using MBOX for the mailboxes storage and its internal pop3 server (cpop). It took them some time to realize that this was not the best solution and to offer a solution to migrate to MAILDIR and courier as the pop3/imap server. This has been available for a while (since Nov 2005) but it was never the default and because of that, not active on so many servers. The process to migrate to maildir is very simple, but it needs manual intervention and the sysadmin to know about this feature.

Personally I don’t see any reason why to not do this as it will provide by far better performance and reliability on the mailboxes of the users (especially noticeable on big to huge mailboxes). The fact that Neomail will no longer function is not such a big deal since it was IMO the worse webmail they had in CPanel, and you can always use SquirrelMail or Horde.

Enough talk… how can we do this? We just run the convert2maildir script:

Mail Directory (maildir) Conversion System
<strong>maildir is not active, this system is using mbox</strong>

1) Backup all mail folders on this server
2) Restore a mail backup
3) Start maildir conversion process
4) Request Technical Support
*) Exit
Enter Selection---]

I would definitely suggest to backup first the mailboxes using option 1. (if you don’t have a backup folder defined in cpanel you will need to do that first - so the script will know where to save the data). Once this is completed you can start the maildir conversion (using option 3). Depending on the size of your mailboxes this can take a long time to complete. You can watch the process by tailing the logfile that will be written by the script.

Once this is finished you should be all set and CPanel script has converted all the existing mbox files to maildir format, installed a compatible exim maildir version, and also installed and started courier-pop/imap. All done :-).

Note: mail will not be delivered during the conversion, it will be instead queued until the conversion is complete and then delivered.

comments powered by Disqus