When migrating user emails manually from an mbox server to a maildir server, it’s usually preferred to run a partial conversion using the convert2maildir script. However, in some cases you may want to do a mailbox individually to either do it quickly or to restore it to another location. cPanel has a built-in script for this:
/usr/local/cpanel/3rdparty/mb2md/mb2md -s /home/username/mail/domain.com/user/inbox -d /home/username/mail/domain.com/user/
The first first argument following the ‘-s’ switch will indicate the original mailbox file in mbox format. The second following the ‘-d’ switch will be the location of the folder in which to store the mail folder in it’s converted format.