When I signed up for Google Apps in 2009, it was free and came with fifty users per domain. Yes, you were allowed to create up to fifty email addresses for free. Time went by, and Google eventually stopped new signups for the free edition in 2012. Ten years down the line and two rebrands later, we now have Google Workspace. Unfortunately, Google has killed off the G Suite legacy free edition– you either start paying $6 per month or find an alternative.
On top of all the bills I have to pay monthly, adding a Google Workspace subscription wasn’t really something I wanted to do. I mean, I have to pay for VPS hosting, ManyChat, and several online tools I use from day to day. It’s getting to a point where I’m getting tired of subscriptions piling up and taking a big chunk of my income. I came up with an idea and thought it would be good to move my emails from Google Workspace to cPanel. However, cPanel does not have an in-built tool to do this, and Google does not offer an easy way to export your data to a platform like cPanel.
I eventually found two ways to do this. We will discuss those later in the article.
Wait! Is it a good idea to move your emails to cPanel?
I was in a bit of a dilemma after I successfully did this. While it’s understandable that cPanel puts you in control of your data, there are still disadvantages to be considered.
I have been with Interserver for about ten years and they’ve been a wonderful web host, but this does not negate the fact that things might still go wrong in the long run. Having your website and emails on the same web host is the perfect definition of putting all your eggs in the same basket. If your host experiences a pretty long downtime due to unforeseen circumstances, your website goes down along with your email server. Imagine a situation where you are unable to access your website and also unable to send or receive business emails.
Again, your server getting hacked will negatively affect your business website and emails since they are located on the same server.
Depending on the nature of your business and your willingness to take these risks, you might want to reconsider moving your emails to cPanel. Eventually, I settled for a much cheaper alternative to Google Workspace, Zoho. This lets me pay as little as $1.25 per user for custom emails. Although I moved my main business emails to Zoho, other not-so-important custom domain emails were moved to cPanel.
Moving Google Workspace Emails to cPanel
With that out of the way, let’s proceed with the main tutorial. As mentioned earlier, I found two ways to do this:
- The not-so-easy way using a command line tool
- The easy way using a tool with a GUI
Both methods work and whichever you choose might depend on your skill level or just convenience.
Prerequisites to get started
Before proceeding, it’s important your prepare your Google Workspace account and create email accounts on cPanel.
1. Log in to your Google Workplace admin dashboard and go to Security > Access and data control > Less secure apps > Allow users to manage their access to less secure apps. Turn on this option and save.
2. Disable 2FA on your Google Workspace user account by going to myaccount.google.com > Security > 2-Step Verification, and ensure it’s turned off.
3. Enable less secure apps by going to your Google Workspace account > Security > Less secure app access, and turn on the option.
4. Now log in to your Workspace Gmail account and go to Settings > Forward and POP/IMAP > Enable IMAP > Save Changes.
5. To ensure your Google Workspace account is fully prepared for this, you might also want to visit www.google.com/accounts/DisplayUnlockCaptcha and follow the on-screen instructions. I had to do this before I was able to proceed with the migration.
6. Create the same emails you have on Google Workspace on your cPanel account. To do this, log in to cPanel > Email > Email Accounts > Create.
Now that you’re done with the prerequisites, let’s dive in.
Method 1: Moving Workspace emails to cPanel using imapsync command line tool
This is recommended if you have root access to your server and understand simple SSH commands. If you don’t, installing this tool locally on your Linux system, too, works. If neither of these conditions is met, please jump to the second method.
1. Install imapsync and its dependencies with these commands:
yum install epel-release
yum install imapsync
2. Now start copying email data from Workspace to cPanel with this command:
imapsync \
--host1 imap.gmail.com --ssl1 --port1 993 --user1 user@domain.com --password1 workspacePassword \
--host2 mail.domain.com --ssl2 --port2 993 --user2 targetuser@domain.com --password2 cPanelPassword
In the command above, you are to change the following:
- user@domain.com: This is your email address on Workspace
- workspacePassword: This is your Workspace email password
- mail.domain.com: This is supposed to be your cPanel IMAP server
- targetuser@domain.com: The cPanel email address to copy the emails into. It’s most likely the same as it is on Workspace and you must have created this already.
- cPanelPassword: The password to the email account created on cPanel.
If your server does not support IMAP SSL connections on port 993, delete –ssl2 –port2 993 or adjust as required.
If it still doesn’t work for you, check the likely errors section below.
Method 2: Moving Workspace emails to cPanel using imapsync GUI tool
1. Go to https://imapsync.lamiral.info/X/
2. Fill in the details as shown below:
Change the details as shown below:
- user@domain.com: This is your email address on Workspace
- workspacePassword: This is your Workspace email password
- targetuser@domain.com: The cPanel email address to copy the emails into. It’s most likely the same as it is on Workspace and you must have created this already.
- cPanelPassword: The password to the email account created on cPanel.
- mail.domain.com: This is supposed to be your cPanel IMAP server.
3. Ht the Sync or resync! button to start the process.
Note that this tool limits you to only 3GB transfer. If you have a bigger mailbox, it’s a good idea to buy the tool to remove this restriction.
Note: There are similar tools that do the same. I’ve also installed imapsync with a custom GUI here. Here are some alternatives that do the same thing:
Likely errors you might encounter
If this tool does not work for you, and you are unable to login to Google Workspace, chances are that you have 2FA active, you haven’t enabled access to less secure apps, or your Gmail account does not have IMAP enabled. Please go through the prerequisites all over again. Whatever error pops up from the log, read to know exactly what caused it. it’s usually easy to fix.
If you have an existing mail.yourdomian.com CNAME record pointing to ghs.google.com, the script will be unable to log in to your email server through IMAP protocol. If you are unable to connect to your server, ensure the mail.yourdomain.com CNAME record points to yourdomain.com.
Updating MX records
Do not forget to update your MX records to point to cPanel. It’s best to delete all Google Workspace MX records and leave only the default record. In a lot of cases, it’s just a single yourdomain.com MX record pointing to yourdomain.com with priority 0. Again, please contact your web host if you’re not sure.
After fixing the MX records, go to Email > Email Routing, and select Local Mail Exchanger.
You might not be able to receive emails on cPanel until this is done.
What about other Google Workspace users?
Unfortunately, this tool does not move all emails from all Workspace at once. For other users, you have to repeat the process for everyone.