Page tree
Skip to end of metadata
Go to start of metadata

For cPanel & WHM version 64


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

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

  • /usr/local/cpanel/scripts/convert_mdbox_to_maildir — Converts mailboxes from mdbox format to maildir format.
  • /usr/local/cpanel/scripts/convert_maildir_to_mdbox — Converts mailboxes from maildir format to mdbox format.

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]


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


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


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

Convert a single email account.


Use one of the following email account formats:

  • username
--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