How It Is

Moving cPanel email to Gmail

I finally switched to Gmail for my email… And I don’t regret it.

There should be a collective gasp here.

It’s no big secret I dislike Google. I don’t trust them at all. I think Cory Doctorow’s story Scroogled is pretty much on the ball. But I also have been struggling with handling my server’s email and spam situations and if there’s one thing Google has turned out to be pretty good at, it’s spam. Also having my email separate from my hosting means if the site goes down, I’ll still get emails… Which is sort of important.

So I bit the bullet, sorted out I needed to pay for three emails (making it $15 a month) and a boat load of secondary domains and filters. Since I’d dropped the cost of my hosting by $20 a month, this worked out alright.

The Setup The Setup

This part is the easy one. Go to and put in your information. If, like me, you have multiple domains, pick one to be your ‘master’ domain. I chose because that’s my main domain in Multisite and there’s some parity going on here. Since this is geared to businesses, you do need to give your business a name. Sorry.

Next you’ll pick your users. Like I said, I have three: Me, my wife, and my admin account. Why does admin need it’s own account? It doesn’t. But it might. For now I had them email me at my personal gmail (I can always resend later) since I don’t want them to be alerted to things just yet as I planned to import all their old email.

Finally it does the “Verify your domain and set up email” step. Which failed. And took 50 minutes. Unfunny. Originally I did the TXT domain setup, and when that failed I did CNAME. Longest ‘about 50 minutes’ ever. And that failed too. Finally I did the damned ‘file verification’ which was ridiculous and stupid but that worked and it still took another 50 minutes to set up my emails.

Eventually, after talking to Google, my web host, and my domain registrar, it turned out there was a glitch in my domain servers… There was no A record for my nameservers. Thank you Carol, Samuel, and Tatyana for helping that one.

Top ↑

Migrating Data Migrating Data

I mentioned I have three accounts. They have around 30 megs of email each. But I also have secondary accounts which are basically the same accounts only not… And to be honest I don’t know why I have so many. This was a chance to combine everything, so I set up those three accounts and then I used the IMAP importer to pull in everything. And it worked. That simple.

Top ↑

Configuring Accounts Configuring Accounts

Now that I have three accounts, I needed to add in my ‘other’ emails. I have a lot of weird aliases. I used to have separate accounts for each email but … well that’s a pain in the ass. So instead of that, I set up folders. I made a folder for each domain alias and then set up redirects. If email was sent to the domain, then it went to a folder called ‘HalfElf.’ Originally I had a whole mess of weird redirects going on, like if it was from WP then it went to a WordPress folder and so on, but unraveling that and going simple seemed like a wise choice.

I went into the cPanel backups page and downloaded all my forwarder information as well and set up email forwards! Well. Not forwards. Aliases. Same idea really. And it was nice, since I added all my domains as aliases, ipstenu@[anydomain] would now work! I set up a lot of filters to keep things out of my inbox and in their proper, attention needing, spots.

Top ↑

Blocking Users Blocking Users

Finally it was time for my soon to be favorite step. Blocking users. Blocking senders for every domain is possible in Gmail and in my opinion, it’s huge. I have a list of 66 emails that I block on all my servers. This is for myriad reasons, but primarily is these are people who don’t know how the shut the hell up and leave me alone. Since I’m under no obligation to talk to these people, I blocked them.

Exporting that list from cPanel was un-fun. You can either manually copy it out, line by line, or you can find the filter rules. They are, sadly, stored in the /etc/vfilters directory, so you need root access (which I have), but it’s not easy to get at. BUT! As of the latest version of cPanel, if you go into backups you can export your filters. They’re in a YAML format, but that’s easier than copy/pasta.

Top ↑

Cleaning up cPanel Cleaning up cPanel

So now that everything is on gmail, do I even need to run email on the server? Yes. I have to be able to send email. I did go through and delete all the accounts, though, freeing up a bit of space, and I turned off Greylisting (I know, I just did that!), and I hid the ability to add new accounts.

5 replies on “Moving cPanel email to Gmail”

I’ve been doing something similar for my clients just using gmail.
In gmail you can have up to 4 or 5 (I forget the limit) “other” emails come in to your gmail account by going to “Settings” and then “Account & Import”. You just need to enter your mail account settings for each address (send and receive), just as you would for any email client program. Works great!

Very timely, I’ve been considering the same thing and for similar reasons.

Did you consider other services than Gmail? In my research, Gmail is one of the more expensive ones, with comparable services from other companies (Rackspace, Zoho) coming in at less than half the price (which starts to matter as your number of email addresses increases). Even Amazon and Microsoft have slightly cheaper services, and with more space.

(There are also some really cheap services — like $0.50 / month! — but they wouldn’t cut it with trust / reliability / spam coverage)

@Ross McKay: I did look into quite a few other possibilities. The cost of $5 an email did give me pause as well, but the benefits of the work Gmail has done and the fact that they do charge for it is a good thing. Also no one is quite as good as they are at spam, and spam was 100% the driving force here. Amazon’s interface is a pile of crap, too.

I do wish they had smaller and cheaper options ($5 for 5 accounts and no Google Docs).

@Ipstenu (Mika Epstein): thanks for the follow up. Gmail does seem to be good value, ultimately. Am testing a couple of services with free accounts before I plonk down the dough, but Gmail is certainly a strong offering.

Re: Amazon and its interface — wow, what a surprise! 🙂

Comments are closed.