I have a client who needs to migrate his email accounts to G Suite. For Webmail, I can use Horde, but it only allows export of one email account and a single email box at a time. This client has dozens of email accounts. Is there a way I can automate the process using phpMyAdmin or other tool?
Everything I have found recommends using Horde to export each box of each email separately. This is far too time-consuming.
Web Host: site5
CMS: WordPress
Any help would be greatly appreciated. Many thanks in advance!
cPanel stores its emails in the following location:
/home/$USER/mail/$DOMAIN ## all email accounts
/home/$USER/mail/$DOMAIN/$email_account ## specific email account
Those emails are, by default, stored in maildir format.
Gmail doesn't use maildir for their emails. It will not be possible to simply copy-paste the files for the migration.
Is there a way I can automate the process using phpMyAdmin or other tool?
phpMyAdmin is a tool, written in PHP that provides a Graphic Interface for you to interact with a MySQL Database.
phpMyAdmin is not associated with the emails stored in your cPanel account and can't be used for your purpose.
Everything I have found recommends using Horde to export each box of each email separately. This is far too time-consuming.
This could work, however, as you will need to see how (if possible) your Mail Client Application can be used to import those emails back to Gmail.
Point the second domain to your cPanel account
Freenom Nameservers -> cPanel Nameservers
Add the domain in your cPanel account. If your Package doesn't allow multiple domains - add it as an Alias. We need to be able to create email accounts for that domain.
Create the exact same email accounts. If your old domain is original.com and your Freenom is free.tk
user@original.com -> user@free.tk
Your original.com's emails are present in
/home/$USER/mail/original.com/
Copy them to (after you have re-created all original.com's emails for free.tk!)
/home/$USER/mail/free.tk/
Add each email account for free.tk to your Mail Client.
Have your client switch over his emails for original.com to Gmail.
Add each Gmail account to your Mail Client.
Drag and Drop each free.tk email account's content to the corresponding Gmail account.
Note: This works in Thunderbird, I'm not familiar with other email clients.
This is far too time-consuming.
There's no fast way to migrate emails from a cPanel server to Gmail.
I've migrated multiple email accounts by following the above steps and didn't have any issues.
The only thing that you should be aware of is that during the time that your Client switches over to Gmail - his emails will not be transferred yet and will not be available in his/hers inbox.