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:
/scripts/convert2maildir
Mail Directory (maildir) Conversion System
maildir is not active, this system is using mbox
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 finshed 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.
>
26th June 2007, 08:13
Two caveats on this script, one small one large:
1) Webmail users will need to re-subscribe to any IMAP folders they’re watching. Not a big deal.
2) POP users will end up downloading duplicate copies of all messages living on the server once the conversion is complete.
#2 (for me) was a big deal. I had a lot of pissed off users, especially since I had told them the transition would be transparent. Why did I tell them this? Because neither the forum threads at cpanel.net nor the conversion script make any mention of POP users having to download everything all over again. The problem is due to a limitation in the POP protocol and is not the script’s fault, but cPanel *really* should be warning admins to expect and warn about the implications.
27th June 2007, 00:13
Scot,
Thanks for you comment. I agree with your notes.
- on #2… i don’t think it is possible to keep the state of the mails read. You can explain the users like you did, or hope to have users not keeping their emails on the server and they will not even notice this.
- you are correct this is not the script fault and in fact the script is running just fine.
Thanks,
- Marius -
28th June 2007, 08:54
You might also note that the conversion to maildir will break many existing procmail scripts that ran perfectly with mbox
13th September 2009, 09:48
[...] follow below mentioned URL which seems to resolve your issue. CPanel MBOX to MAILDIR migration: convert2maildir | MDLog:/sysadmin __________________ Windows Hosting | Host Directory Cheapest Website Hosting | US [...]