Migrate from cPanel/Plesk to Zimbra Collaboration 8.0.x or 8.x

Migrate from cPanel/Plesk to Zimbra Collaboration 8.0.x 8.x

   KB 22379        Last updated on 2015-10-2  

(0 votes)


Technical Process to migrate from cPanel to Zimbra Collaboration using the zmztomig Tool.


Migrate from cPanel/Plesk to Zimbra Collaboration 8.0.x 8.x

cPanel or Plesk are the typical Hosting Software products, a lot of people use it for hosting Web Pages, Mail accounts, FTP, etc. But the email functionalities in this software are very limited, so the best option is split the services, let the Web Page in a cPanel or Plesk service, but put the email in a Zimbra Collaboration Server. In this Wiki we will see how to import all the cPanel/Plesk accounts trough IMAP protocol using the Account Migration tool that Zimbra include (Open Source and Network Edition)

Export the cPanel account list

>>Firebug needed. The first step is obtain a complete list of the users that we want to import into our Zimbra Collaboration server. cPanel doesn't have any easy way to export all the email accounts, and neither the email account with password, so we can select all of them and then copy/paste in a excel or follow these steps: Login into our cPanel account and go to the Mail section and click into Email accounts


Click into the right section and select 100 results, if we have more accounts, we need to repeat the next steps.


Open Firebug in the website and go into Console>Show command editor, and paste the next code in the right window, and press run.


   var rows = $("#table_email_accts tr.dt_info_row"),
   returnString = "";
   rows.each(function(i, item){
   var tdList = [];
   $(item).find('td:eq(0)').each(function(s, subItem){
   returnString += tdList + "\n";

We will obtain in plain-text all the email accounts in the left window, and we can copy paste into a notepad, we will use it later.

Creating the 2 main XML files

The Account Migration tool works perfect in Bulk if we prepare well two differents XML.

  • The first xml is for the Account provision
  • The second xml is for the IMAP data import

Account provision XML

The following example shows an XML file that is used to provision multiple email accounts without importing mail, we will use the email accounts list that we exported before:

<?xml version="1.0" encoding="UTF-8"?>
<displayName>Sam Sample</displayName>
<displayName>Zak Zackry</displayName>

In this Wiki example, the name of the account provision xml file is cPanel-IMAP-users.xml

IMAP data import xml

The second xml is the one that will include the information about the old IMAP server, so we need to take careful and introduce all the usernames and passwords correctly. The following example shows an XML file that is used to import email for one account via IMAP from a gmail account without provisioning the email account in ZCS. The account must be provisioned on ZCS before running this type of XML file.

<?xml version="1.0" encoding="UTF-8"?>
<displayName>Sam Sample</displayName>
<displayName>Zak Zackry</displayName>

In this Wiki example, the name of the account provision xml file is cPanel-IMAP-users3.xml

The Zimbra Account Migration Tool

Once we have everything prepared, and the xml correctly prepare, is time to use the Tool, in Admin Console, go Home>Tools and Migration>Account Migration


Click in the right corner and select the user Migration Tool, will starts the Wizard that we will use, select Generic IMAP Server, and both options; Provisionin accounts and Importing Mailboxes


In the next step, we will select the option Import from a XML file (use the first XML)



The wizard will detect all the accounts that we wrote in the XML file and will show a resume


Once the wizard provisioned all the accounts, we will see the result status


Now is time to import all the IMAP data in our new accounts, select now the second XML file


In this step we need to select the proper type of connction of our old IMAP server, clear text is the 143 default port without SSL.


So, we need to select the proper type hostname and port of our old IMAP Server


The wizard will show us a resume of the options that we've selected, press Next for start


And the process will start


If we go to console, we can check the status in the log /opt/zimbra/log/mailbox.log

   zimbra@zimbralab01:/root$ tail -f /opt/zimbra/log/mailbox.log
2014-10-25 21:48:35,785 INFO  [Thread-95] [] mailop - Adding Message: id=2552, Message-ID=<2a3cdaedd0c833@email.com>, parentId=-1, folderId=257, folderName=Trash.
2014-10-25 21:48:35,799 INFO  [Thread-95] [] mailop - Adding Message: id=2553, Message-ID=<ea211c82528531@email.com>, parentId=-1, folderId=257, folderName=Trash.
2014-10-25 21:48:35,819 INFO  [Thread-95] [] mailop - Adding Message: id=2554, Message-ID=<4f59d8aed0d9b95f@email.com>, parentId=-1, folderId=257, folderName=Trash.
2014-10-25 21:48:35,882 INFO  [Thread-95] [] mailop - Adding Message: id=2555, Message-ID=<b40b586d720c4a4e.squirrel@email.com>, parentId=-1, folderId=257, folderName=Trash.
2014-10-25 21:48:35,896 INFO  [Thread-95] [] mailop - Adding Message: id=2556, Message-ID=<6f5de1286203fcf10@email.com>, parentId=-1, folderId=257, folderName=Trash.
2014-10-25 21:48:35,915 INFO  [Thread-95] [] mailop - Adding Message: id=2557, Message-ID=<fa77cfe13ab00774@email.com>, parentId=-1, folderId=257, folderName=Trash.
2014-10-25 21:48:36,000 INFO  [Thread-95] [] mailop - Adding Message: id=2558, Message-ID=<b40b586d720c4a4e.squirrel@email.com>, parentId=-1, folderId=258, folderName=Sent.
2014-10-25 21:48:36,037 INFO  [Thread-95] [] datasource - Import completed for data source '__imap_import__'

In the Admin Console we can also see the status of the process


And once all account was imported, we can just login into our account and see all the imported emails, and folders.


Note We need to review the log for check what email or emails was fail during the import process.

Additional Content

  • No additional Content
Verified Against: Zimbra Collaboration 8.6, 8.5, 8.0 Date Created: 01/1/2015
Article ID: https://wiki.zimbra.com/index.php?title=Migrate_from_cPanel/Plesk_to_Zimbra_Collaboration_8.0.x_or_8.x Date Modified: 2015-10-02

Try Zimbra

Try Zimbra Collaboration with a 60-day free trial.
Get it now »

Want to get involved?

You can contribute in the Community, Wiki, Code, or development of Zimlets.
Find out more. »

Looking for a Video?

Visit our YouTube channel to get the latest webinars, technology news, product overviews, and so much more.
Go to the YouTube channel »

Wiki/KB reviewed by Jorge SME2 Copyeditor Last edit by Jorge de la Cruz
Jump to: navigation, search