BuycPanel Blog

BuycPanel Blog

Latest news and updates

Converting mbox Accounts to Maildir

Posted by Allura on 25 07 2018.

A Brief Introduction

You can execute conversions on mail storage data using the /scripts/convert2maildir script. The only mail storage system that cPanel and WHM servers support is Maildir. Therefore, it is necessary for users to convert their mbox data to Maildir while migrating data into cPanel and WHM servers.

Caution:

  • This guide is only applicable for cPanel & WHM version 11.48 or older.
  • You have to use the Mailbox format conversion scripts for cPanel & WHM version 58 and later.
  • You can run the /usr/local/cpanel/scripts/setupmailserver script for for cPanel & WHM versions 11.50 till version 56.
  • Do not interrupt or cancel once the conversion process in on. The server’s mail system might break if there is any interference during the conversion.
  • It is highly recommend that your mail folders be backed up before starting the process.

Notes:

  • The conversion process might take as long as 24 hours. The number of accounts and your server’s hardware will determine the time required.
  • Incoming and outgoing mail services will be unavailable while the conversion is taking place. It is therefore suggested that this process is execute during an off time.

The Mail Directory Conversion System

You can access the Mail Directory Conversion System through the following commands:

/scripts/convert2maildir

The conversion methods that are accessible to you depends on whether the server uses a mbox or Maildir configuration.

 

mbox options

You will find the following options while running mbox on your server:

  • If you want to convert the server from mbox to the Maildir storage format with the mail server as Courier, type in 1 and press
  • If you want to convert the server from mbox to the Maildir storage format with the mail server as Dovecot, type in 2 and press
  • You can exit the script by entering an asterisk (*) and pressing Enter.

 

Maildir options

You will find the following options while running mbox on your server:

  • To finalise the mbox to Maildir conversion process on a partially-converted mail system type in 1 and press Enter. This option can be used if your server crashed while the conversion process was on or if you stopped the conversion process.
  • To complete a failed mbox to Maildir conversion attempt Enter 2 and press Enter.
  • You can exit the script by entering an asterisk (*) and pressing Enter.

A Concluding Statement

You must convert your mbox accounts to Maildir if you want to use them with cPanel and WHM.