Overview 

cPanel & WHM version 58 introduced Dovecot's mdbox format for mail storage.

We added the following scripts to allow you convert mailbox formats:

Call the script

To run either of the scripts at the command line, run one of the following commands as the root user:

/usr/local/cpanel/scripts/convert_mdbox_to_maildir [options]
/usr/local/cpanel/scripts/convert_maildir_to_mdbox [options]

Options

When you run either script, you can specify the following options:

You must include either the --user= or the --email= option.

OptionDescriptionExample
--help

Displays the script's help message.

/usr/local/cpanel/scripts/convert_mdbox_to_maildir --help
/usr/local/cpanel/scripts/convert_maildir_to_mdbox --help
--userConvert a cPanel user and all of their email accounts.
/usr/local/cpanel/scripts/convert_mdbox_to_maildir --user=username
/usr/local/cpanel/scripts/convert_maildir_to_mdbox --user=username
--email

Convert a single email account.

Use one of the following email account formats:

  • username@example.com
  • username
  • _mainaccount@example.com
/usr/local/cpanel/scripts/convert_mdbox_to_maildir --email=username@example.com
/usr/local/cpanel/scripts/convert_maildir_to_mdbox --email=username@example.com
--delete-old-formatRemove the old files after successful conversion.
/usr/local/cpanel/scripts/convert_mdbox_to_maildir --user=username --delete-old-format
/usr/local/cpanel/scripts/convert_maildir_to_mdbox --user=username --delete-old-format

Additional documentation