Migrate from cPanel/Plesk to Zimbra Collaboration 8.0.x or 8.x: Difference between revisions
(Created page with "{{BC|Certified}} __FORCETOC__ <div class="col-md-12 ibox-content"> =Migrate from cPanel/Plesk to Zimbra Collaboration 8.0.x 8.x= {{KB|{{ZC}}|{{ZCS 8.6}}|{{ZCS 8.5}}|{{ZCS 8.0}...") |
(No difference)
|
Latest revision as of 17:55, 2 October 2015
Migrate from cPanel/Plesk to Zimbra Collaboration 8.0.x 8.x
Purpose
Technical Process to migrate from cPanel to Zimbra Collaboration using the zmztomig Tool.
Resolution
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){ tdList.push($(subItem).text()); }); returnString += tdList + "\n"; }); console.log(returnString);
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"?> <ZCSImport> <ImportUsers> <User> <sn>Sample</sn> <givenName>Sam</givenName> <displayName>Sam Sample</displayName> <RemoteEmailAddress>ssample@example.com</RemoteEmailAddress> <password>test123</password> <zimbraPasswordMustChange>TRUE</zimbraPasswordMustChange> </User> <User> <sn>Zackry</sn> <givenName>Zak</givenName> <displayName>Zak Zackry</displayName> <RemoteEmailAddress>zzackry@example.com</RemoteEmailAddress> <password>test123</password> <zimbraPasswordMustChange>TRUE</zimbraPasswordMustChange> </User> </ImportUsers> </ZCSImport>
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"?> <ZCSImport> <IMAPHost>imap.gmail.com</IMAPHost> <IMAPPort>143</IMAPPort> <ConnectionType>cleartext</ConnectionType> <UseAdminLogin>0</UseAdminLogin> <ImportUsers> <User> <sn>Sample</sn> <givenName>Sam</givenName> <displayName>Sam Sample</displayName> <RemoteEmailAddress>sam@example.com</RemoteEmailAddress><RemoteIMAPLogin>sam@example.com</RemoteIMAPLogin><remoteIMAPPassword>test123</remoteIMAPPassword> </User> <User> <sn>Zackry</sn> <givenName>Zak</givenName> <displayName>Zak Zackry</displayName> <RemoteEmailAddress>zzackry@example.com</RemoteEmailAddress><RemoteIMAPLogin>sam@example.com</RemoteIMAPLogin><remoteIMAPPassword>test123</remoteIMAPPassword> </User> </ImportUsers> </ZCSImport>
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