I recently had a request from a client for a mass migration of Cpanel to Zimbra. I just wanted to share the following script in case anyone else has this same need.


Essentially the script queries for all email domains, accounts and passwords via the Cpanel API, resets to a temporary password for imapsync'ing, then reverts passwords back for seamless migration. Send me a message on github if you need any assistance.