There are some scenarios you want to migrate emails from G Suite to cPanel server. Here in this article, that explains the steps to migrate emails from G Suite to cPanel.
First, we need the below details:
- G Suite email account username and password.
- cPanel mail account user account and password.
Note: If you have not enabled IMAP settings in Gmail, enable it before proceeding with the migration process.
Steps to Enable IMAP Settings in Gmail
- Login to your Gmail account.
- Go to Settings >> Click on “Forwarding and POP/IMAP”
- Browse for the “IMAP Access”
- Then Enable the IMAP, if its disabled.
For ON Less Secure Apps Settings
- Click on Logo >>Manage your Gmail account >>Security >>Scroll down to the page to Less Secure App
- Click to Turn it ON.
If you do not have the imapsync tool, then please install it with the below command:
sudo yum install imapsync
Starting the Migration Process
You can now start the migration process inside the screen terminal using the below command (Run command on cPanel server)
imapsync --host1 imap.gmail.com --port1 993 --ssl1 --user1 email@example.com --passfile1 /home/gaurav/pass1 --host2 eternity.herosite.pro --port2 993 --ssl2 --user2 firstname.lastname@example.org --passfile2 /home/gaurav/pass2
Now you need to replace gaurav to the account username.
/home/gaurav/pass1 – Store your gmail account password in this file
/home/gaurav/pass2 – Store your cpanel account password in this file
This is how you can successfully migrate from G Suite to cPanel!