Control Panel, CPanel / WHM

How to move email accounts from G-Suite to cPanel

In this guide I will be using IMAPSync tool to move emails from G-Suite to cPanel.


Step 1. Enable less secure apps on G-Suite

To move email accounts from G-Suite to cPanel first enable the “Allow users to manage their access to less secure apps” option in Google Admin.

Security > Access and data control > Less secure apps


Step 2. After you have enabled it, set the “Allow less secure apps: ON” for that email account: https://myaccount.google.com/lesssecureapps

Without this you will not be able to use IMAPSync tool to migrate emails from G-Suite to cPanel.


Step 3. Create email account on cPanel

This image has an empty alt attribute; its file name is image-131.png

Step 5. Install IMAPSync on the server

If you have root access to the server you can install the tool, otherwise, install it locally on your device that uses Linux.

yum install epel-release
yum install imapsync

Step 6. Create a imapsync command

Use the following to create a command

imapsync --host1 'imap.gmail.com'  \
	   --user1 'email@domain.com' 	    \
	   --password1 'passwordOnGsuite'  	    \
	   --ssl1			    \
	   --host2 'mail.cpanel-server.com'   \
	   --user2 'email@domain.com'	    \
	   --password2 'passwordOnCpanel'  \
	   --ssl2 

Step 7. Run the imapsync command

Copy the above command and run it in the terminal. It will go through all folders on G-Suite and copy all emails one by one.


Step 8. Change MX records

A mail exchanger record (MX record) specifies the mail server responsible for accepting email messages on behalf of a domain name. After you have copied all emails from G-Suite to cPanel, you should change the MX record for the domain, and point it to your cPanel server.