convert maildir to mbox a single domain

david510

Well-Known Member
Aug 22, 2004
473
0
166
I need to convert all mails on a single domain which is in maildir format to mbox. How can I do that? The server is having the mbox format and I transfered an account whose mail format is maildir. I need the mails of this account converted to mbox. The server is a cpanel server.
 

tweakservers

Well-Known Member
Mar 30, 2006
379
0
166
maildir is running as a global wise option as you may need the correct exim version installed which supports maildir. In order to run maildir, you will need to run it for all domains.
 

mitul

Well-Known Member
Feb 8, 2003
291
0
166
Below command could be also useful.

/usr/local/cpanel/3rdparty/mb2md/mb2md -s /home/username/mail/domain.com/user/inbox -d /home/username/mail/domain.com/user/
 

fcsnc

Well-Known Member
Mar 19, 2002
52
0
306
North Carolina
Thanks, I managed to write a script to individually convert this.
David, seriously, you could probably charge for such a script if it works dependably. If you can't share it here in the forums please PM me with a price.

I haven't had the occasion to try this (I'm still running mbox/UW-IMAP), but I understand that if you restore a cpanel backup of an mbox account, the restore process converts the mail from mbox to maildir if the server is running maildir/Courier. However, there are no reports that I can find of having this work the other way around.

Was chatting with someone yesterday who ran /scripts/convert2maildir and regretted it; then tried to go back to mbox with the same script (it appears to have that functionality as designed). However, as implemented, the script did a very poor job of backward conversion and left .cur and .tmp files and folders all over the place.

If cPanel can't get it right and you have, please share!