Google Apps for Domain-Specific Email

Easily configure GA’s Standard Edition for catch-all@anydomain.com webmail, plus POP and IMAP email delivery to your desktop mail client.
Whether you want this as a standalone email solution, else to compliment your shared, virtual private or dedicated server, GA saves buckets of time and kicks spam into touch.
This tutorial takes you from initial sign up to configuring DNS and retrieving email on your PC or Mac.
Setup Unmanaged VPS: The Ubuntu-Nginx Guide
Take your virtual private server from zero to hero
.. from blank box to cute-as server ..
with this easy-to-follow copy/paste guide.
22+ parts with video, here’s the index.
What is Google Apps?
In a nutshell, it’s pretty Gmail. Or rather, it’s Gmail, except that instead of 1address@gmail, you get to use unlimited-addresses@your-domain.
Why Google Apps?
For a start, I’m cheap and it’s free. (Well, Google Apps Standard is free.) Then there’s the multi-gig storage, that familiar Gmail interface, the bundled calendar and other G-wares. But what I really like is this lot:-
- simple setup
- domain-specific
- POP & IMAP options
- superb resource saving
- immediate hassle-free spam control
Let’s look at those points in a bit more detail, ‘cos they’re worth it.
Setup
Setting up GA takes 10 minutes, or maybe 25 the first time, with this guide and the links. And it’s darned simple to do. For sure, easier than configuring a mail server like Courier or Dovecot.
Domain-Specific
This isn’t Hotmail, it’s Google Apps. None of that john1973@prettyHorrible.com. Use your domain. In fact, use anything-you-like@yourdomain.com, because there’s a catch-all facility too.
POP & IMAP Options
Personally, I’m not a big webmail fan. I like my mail kinda like my pub – local. With GA, besides the remote access, we can POP or IMAP.
Resource Saving
For webmasters, the most important reason to use an external mail mod is maybe this one: to filter every last bit of VPS resource towards your web sites and blogs.
Spam
And here’s the big bonus. Have you ever set up SpamAssassin? Yikes! Betcha don’t want to have to go through all that again. With GA, near as damn it, spam is a non-configurable non-story, full-stop. Do nothing, be spam-free, and spend more time on the beach. For many, this is the #1 reason to use GA and not bother with your own mail server. Besides that, spam is a resource hog.
And?
I daresay there are other reasons. Lemme know.
Why Not Google Apps?
There are anonymity concerns over Google’s keyword research for targetted ads and, hey, who knows what other big brother tactics. If you’ve got something to hide, GA isn’t for you.
Being something of a conspiracy buff myself, I’d be particularly interested to hear your thoughts. Unless your email address contains the letters ‘cia’, please chip in.
Can’t Find the Google Apps Free Edition?
Talking of conspiracy, the GA freebie is pretty well hidden, huh
Google Google Apps and you’ll be taken to the biz version, Google Apps Premier, which used to have an obscure link to the free service, Google Apps Standard Edition. That link has since mysteriously disappeared. Google something like free Google Apps and the no-cost package isn’t even in the page results (and my Google page is set up to return the top 100 results!)
Hey, I guess it’s just got a pap pagerank. Hmmn, you be the judge.
But don’t fret, pet ..
How to Setup Google Apps
There are 2 methods. First, let’s look at what I do which, fortunately, is the hassle-free method.
Go here to sign up for the free Standard Edition. If you want to weigh up the business account, that’s over here, and costs $50 pa.
For most of us, including small to mid-sized businesses, the freebie service is superbly sufficient. And, I may add, a big cheers to the almighty G for a great ging-gang Googly gift. Cool sarcasm aside, briefly, I appreciate it.
Google Apps Premiere vs Standard Editions
Dunno. I’m freelance and have never set up Premiere for a client. If you employ a few dozen people, enjoy Premiere and care to let me know, I’ll add some detail. I did read somewhere that they add some API’s, so that’s nice.
Signing Up to GA
Check Administrator, Enter your domain name and click Get Started
On the Sign up for Google Apps Standard Edition page, fill out the administrative details and click Continue.
On the Create your first administrator account page, Choose a username, a password, and Continue by accepting the T’s & C’s.
Verify Domain Ownership
Directed to your GA Dashboard, next to a warning sign you’ll see a message ..
“To activate Google Apps services you must verify that you own your domain – somedomain.com.”
.. and next to that, a link to Verify domain ownership, so click through that.
On the verification page, under Choose verification method in the drop-down menu, you have 2 options to proove you own your domain; either by creating a CNAME record, else by uploading an html page for Google to check.
To keep it easy:-
1. Upload an HTML File
This is simpler. Unless: either you have a domain name but no website, else you cannot access the website backend; in either case, skip to the CNAME option, applying those settings to your domain registrar account.
Click the HTML option and Google generates a code.
Now, crack out a standard html page template or, hey, just use this:-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<!-- ADD GOOGLE APPS CODE HERE -->
</body>
</html>
…and in the ‘body’ section, as I’ve pinpointed above, add Google’s code.
Save that file as googlehostedservice.html and upload to your site root.
If you want to get all complicato, you can instead opt to ..
2. Create a CNAME Record
This is fairly easy, tho’ it can require a little webhost-specific research ‘cos the process and jargon varies from host to host. Google spell it out for some hosts, so I suggest you take a look at this.
For a general idea, watch this video.
Video: Set Up CNAME for Google Apps
Watch the, er, guvideo for a better idea of how to do this.
Some Pointers
- Not all shared hosts allow users direct CNAME access. If you can’t find them, maybe you have to make a special request, then waitttttt.
- If in doubt, check out your hosting provider forum or, hey, just set up the html page as above.
- CNAME’s take up to 48 hours to propogate. The email option takes maybe an hour, in my experience.
Verify Your Verification
Whether you chose to claim domain name ownership using the html page or a CNAME record, don’t forget to tab back to the Google Apps page and click on Verify, under the drop-down.
And wait.
Accessing Email with Google Apps
Access your new GA account by heading to https://www.google.com/a/yourdomain.tld, swapping yourdomain.tld for your domain.
If the domain hasn’t been verified, probably because the process needs more time, you’ll see a notification. Try again later.
When it has been verified:-
Click on Inbox (in the top menu, so not the Email link) to check your mail (or personalised Gmail), and maybe send some test mails.
And customise whatever other GA settings to suit.
POP or IMAP to Your Mail Client – Outlook, Thunderbird etc
POP. IMAP. What Gives?
Give or take, blessed if I know! But these splendid folks do, so thank you very much:-
| POP | IMAP |
|---|---|
| Post Office Protocol | Internet Messaging Access Protocol |
| Best if you use only one computer to check email | Best if you use many different computers to check your email |
| Downloads your email to the particular computer you are checking it on | Your mail is always on the server |
| Allows you to keep a large backlog of email messages only limited by the size of your computer. | You are limited by your mailbox size quota for how many messages you keep, although you can archive old messages and save them onto your computer manually. |
| Does not have a web interface (Some webmail companies, such as Yahoo, will let you check POP mail) | Has a web interface. If you are using NCF Webmail, you are using IMAP. |
| New messages are downloaded in their entirety, you have to wait for the message to download. | New message headers are downloaded so you see all your mail faster, the message you want to read is not downloaded to your computer until you click on it. |
Activating POP
With Google Apps, as with Gmail, POP is already activated. So if you don’t want IMAP, just the POP protocol, head here for instructions relevant to your specific mail client.
Hey, I’m not kopping out on the instructions. Google’s instructions cover a bunch of email clients, and they have some pretty pics too.
Activating IMAP
Do this lot:-
- From your Google Apps Dashboard, click on Inbox
- Now in Gmail, click on Settings in the top menu
- Click on Forwarding and POP/IMAP
- Next to IMAP Access, checkmark Enable IMAP
- Save Changes
- For your specific mail client IMAP setup instructions, click here.
Ditto above in the POP section. Google’s instructions cover a wide range of email clients, and I can’t improve on them, plus they’ve got pretty pics.
Booting Up Next ..
So that’s the email sorted. And for webmaestros there’s no more than a trace resource footprint on the VPS.
In Moving Day! How to Move Your Blog or Site we’ll work through the best procedure for a smooth transition to your new server, be it shared, VPS or dedicated.
I’ll wrap this VPS Bible series with an appendice or two, linking to a handy bunch of Linux resources and administration guides geared to maintaining your Nginx-powered web server.
Meantime, here’s that index ..
Setup Unmanaged VPS: The Ubuntu-Nginx Guide
Take your virtual private server from zero to hero
with this easy-to-follow copy/paste guide.
“My local PC runs Windows” Show me for Linux/Mac
“My local machine is Linux/Mac” Show me for Windows
22+ parts with video, here’s the index ..
-
Setup Unmanaged VPS: The Ubuntu-Nginx Guide
Introducing vpsBible’s how-to guide for setting up a super-charged unmanaged VPS featuring Ubuntu and Nginx.
-
VPS (Virtual Private Server) vs Shared vs Dedicated
Before getting stuck in, let’s compare the web host types in detail and weigh up the differences between managed & unmanaged VPS.
-
Set Up a VPS Linux Distribution
Opening a VPS hosting account, we’ll choose, configure & launch a Linux server ‘distribution’.
-
Set Up Command Line Interface (CLI) using PuTTY
Now we’ve got a server to play with, we’ll connect to it, using the ’ssh’ protocol for a super-secure link.
-
Create a Linux User & Set Permissions
Initially you’ve logged into your remote Linux machine as ‘root’. We’ll add you as a user now, with root or SuperUser permissions.
-
Encrypt Data with OpenSSH & Auto-Login with PuTTY
Now we can use ‘authentication keys’ to shore up our connection while simplifying login to an automated, password-free yet secure process.
-
Harden the Secure Shell (SSH) & Create a Firewall
The final security step: galvanizing the OpenSSH protocol and setting up an ‘iptables’ firewall. Now the server is rock ruddy solid.
-
Edit bashrc for User-Friendly Linux, plus System Updates
We use the terminal a whole lot so let’s cut ourselves a break and create some command shortcuts, then update the server.
-
Add a Domain Zone to Your VPS
To make your server aware of yourDomain.com you’ll need a few ‘DNS’ records. Damn this is simple I’m practically asleep!
-
Prepare Linux Server for Email with Postfix
In order to send and receive email from our web applications we’ll install some software and tweak the ‘RDNS’ record.
-
Install PHP5 & MySQL – The One-Stop FastCGI Index Page
Add PHP5 & MySQL, but which FastCGI method is best? Here’s the benchmarking, 4 ways to install/compile, add caching modules & more.
-
Nginx (better than Apache) Web Server
Let’s install this supersonic web server, tweaking its file structure & adding default configuration files.
-
Setup FileZilla for Secure FTP (SFTP)
There’s FTP, and then there’s ‘Secure FTP’. We’ll set up FileZilla using SFTP – and those authentication keys – for secure file transfers.
-
Serve Multiple Sites & Blogs with Virtual Hosts
We want a website folder structure, some permissions, some site-specific configuration files and, hey, we’ll hook up ‘FastCGI’.
-
Adding Sub-Domains with Nginx
Need a sub-domain? If you do, here’s how to add subDomain.yourSite.com with an ‘A record’ and a configuration file.
-
Integrate A CMS Like WordPress, WP MU, Drupal etc
For those of you wanting to use a specific content framework, such as a CMS, blogging or forum software, pop in here and we’ll sort that out.
-
Google Apps for Domain-Specific Email
GA’s free Standard Edition for catchall webmail – POP-ping or IMAP-ped to your desktop client – saves precious server resources for your webs.
-
Moving Day! How to Move Your Blog or Site
Nearly there. Here’s the web site or blog migration guide, relocating to your VPS with minimal or no downtime.
Manage Unmanaged VPS: Ubuntu-Nginx Administration
Already set it up? We’d best maintain it then.
Toggle to the .. Ubuntu-Nginx Admin Index
Manage Unmanaged VPS: Ubuntu-Nginx Administration
Maintain your virtual private server with ..
.. cheatsheets, tutorials, tips & guides.
Head back to the .. Ubuntu-Nginx Installation Index
-
Nginx Control Panel: Here’s the Deal
You’re migrating shared-to-VPS and want a GUI like cPanel? No you don’t, not after you read this! What’s more, you don’t need one either.
-
Nginx Control Panel Workarounds
For every control panel module there’s an equivalent (and faster) terminal command. Let’s compare these.
-
Upgrade to Nginx Latest Version with ZERO Downtime
Keep Nginx up-to-date – and optimized for security. This guide shows precisely how *with no missed server requests*.
-
Compile an Advanced Nginx Module Configuration
Need special web server functions? Here’s how to install or upgrade Nginx with bespoke required modules & parameters.
-
Add Web Sites Nginx Cheatsheet
Once you’ve set up your first site, adding more gets easier. Especially when you refer to this. (Let’s face it, I’m just too good to you.)
-
Adding Sub-Domains with Nginx
Rather than add somesite.tld, maybe you want some.subsite.tld? Here’s how to set your A record using a DNS manager and the vhost file for Nginx.
-
Add/Delete MySQL Database from Command Line
Need a database? Want to bin an old db? This tutorial shows you how using the terminal command line console whatnot.
-
Configure phpMyAdmin for Nginx to Maintain MySQL
Rather than have to crunch databases via the command line, we can make life easier by adding this splendid tool to manage them.
-
Backup/Export MySQL DB with CLI & mysqldump
Here’s how to backup a database from the command line using the handy mysqldump utility.
-
Import MySQL Database using Command Line
Import data to a new database with this simple mysqldump guide .. great for reinstating an old backed-up db, for instance.
-
Batch Replace/Delete Data in MySQL Database
Change repetitive db data with a single command. Rather than manually find & alter each instance, isolate the lot & update multiple content.
-
LOST a MySQL Password? How to RESET it
Lost your MySQL password? That’s a bit of a bummer .. or it would be if you didn’t have this new password setup guide, huh.
-
Backup or Upload with Secure Copy SCP (Linux to Linux)
Never mind FTP m8! Save time and download/upload your files using encrypted SCP (secure copy), the #1 Linux-Linux file transfer solution.
-
Backup or Upload with PuTTY PSFTP (Windows/Linux)
Equivalent to the above, how to transfer your files if you’re unlucky enough to be running Windows for your local PC. Not that I’m biased.
-
*USEFULLY* Park A Spare Domain with Nginx
Got a spare domain name sat around doing nothing? Put it to some use, have it point its traffic at your primary domain. Here’s the deal ..
-
Password Protect Nginx Web Files/Directories
Maybe you want a hidden website directory, say, for projects, or are developing a site and want it off-limits ’till launch day. Top tip ..
-
Redirect Web Pages with Nginx Rewrite Rule
Here’s the syntax to point a site or blog to another domain. That way, for instance, traffic from a passive site benefits an active one.
-
Nginx Error & Access Logs
Need to troubleshoot some error, or want to find out who’s trying to hack your site? Here’s a start .. those tell-tale logs.
-
Subversion for Easy CMS Updates ie WordPress/Drupal/etc
A brief introduction to install and know about the power of Subversion, the version control system to keep scripts and platforms up-to-date.
-
You Tell Me …
Something missing? Probably. Let me know what you’d like included. And if it’s listed below, shout out anyhow and I’ll try to bump it.
Nginx Admin: In the Works ..
This lot’s marked for addition already:-
- Setup or Edit DNS using Bind
- Network Tools Troubleshooting Guide
- The Comprehensive Permissions Guide
- Configuring Nginx Rewrites
- Custom Website Error Page
- Setting up Cron Jobs
- Rsync for Incremental Remote-to-Local Backup
- Cron & Rsync for Automatic Backup
- Cron & mysqldump for Auto DB Backup
- Safeguard Bandwidth with Hotlink Protection
- Block Access with Nginx’ IP Deny
Got a Question? Want to Comment?
This site has no comments system. We've got a better system!
Please use the link at the top of the post and goto this topic's forum thread:-
- to help build community
- for a superior knowledge base
- to keep info in one place, not diluted between forum & comments.
For those posts ported from Guvnr.com (pre-Feb/2010), archive comments remain.
Handy info from these comments is in the process of being ported to the forum and attributed to the original author.
If you think this idea sucks, let me know.
Thank you.





















Ashesh August 27th, 2009 at 8:54 pm
Hi Guv,
I have not worked out this chapter but I have few questions to ask if you may please answer:
1. There is no mention of how to setup MX records for google in DNS manager. I am wondering why?
2. IN DNS manger there is already an entry mail.domainname.com 10. Do I have to delete it before adding the google server?
3. For reverse DNS we had set mail.domainname.com. Would that have any effect if we change MX records?
I am sure after going through these questions you would have understood how much of a newbie I am
It would be really great if you could add something regarding MX setup in DNS manger for Google Apps.
Thanks
the_guv August 28th, 2009 at 1:50 pm
Hey Ashesh,
Sorry for delay .. was cooking a mobile ROM, or rather heating one up in the microwave, and how fiddly was that
“There is no mention of how to setup MX records for google in DNS manager. I am wondering why?”
.. ‘cos this is a newbie guide, that complicates the issue, varies from VPS provider to VPS provider and just really isn’t necessary. This method is simpler, and faster to propagate.
“IN DNS manger there is already an entry mail.domainname.com 10. Do I have to delete it before adding the google server?”
.. don’t touch it. Did I say to touch it?
“3. For reverse DNS we had set mail.domainname.com. Would that have any effect if we change MX records?”
.. No. If you wanna go get complicato and change MX records, or if you don’t, your RDNS won’t be affected.
“I am sure after going through these questions you would have understood how much of a newbie I am
”
.. No. You’re right to question these things, I reckon. While this guide is intended as a copy and paste and you need know nothing, it’s obviously better if you have some idea of what’s what and why.
“It would be really great if you could add something regarding MX setup in DNS manger for Google Apps.”
.. refer above. Really truly scrumptious, it’s not necessary here, and would lead to more problems than it’s worth. If it made any difference to security or performance, I’d add it.
Tx for all your comments Anesh, Bible-wide. I’m sure they’ll answer some q’s for a few folks. Appreciated, Sir.
sagar kumar sutar September 17th, 2009 at 6:57 am
Please tell me how to add my website link with google app and my requirement is to log in my mail directly over website.
Thanks in advance.
sagar
the_guv September 18th, 2009 at 7:11 am
@sagar .. hi to you. but sorry, I’m not sure what you’re asking, exactly.
“add my website link with google app” – guide covers that, no? (maybe it’s covered from one of the GA links in the post.)
“requirement to log in my mail directly over website” – can you flesh that out please, and I’ll try to help.
Mart September 23rd, 2009 at 3:22 am
Hi Guv,
I like your series. Just want to comment here that Google’s automatic spam settings are a big negative in my opinion. I find that it has far too many false positives making the service too unreliable. It would be great if you could simply turn it off but Google doesn’t allow that.
Cheers
Mart
the_guv September 23rd, 2009 at 10:24 am
@Mart .. thank you, Sir. Jolly kind.
Tell me, how do you know about the false positives?! Pls tell me more.
Brett J September 30th, 2009 at 8:14 am
Hi Guvnr, first off, your guide is great! It covers so many area’s, and really appreciate the depth you go in solving usual bits that can go wrong.
I’m giving the Google Apps a try here, and am currently at the point of setting the MX records up. Although every vps provider have there own way of setting things up, one option not listed is a webmin route, which means you install bind on your server, and go by that.
When using a stock webmin install, they can edit or copy paste settings into their domain file. I’m trying to set up brettjames.au.com , and that would be in “/etc/bind/brettjames.au.com.hosts”
Currently though I’m having trouble putting in the settings, here is how my mx records are setup:
http://pastie.org/636278
Could you suggest a change in order to have it appear in a lookup?
As a sidenote, Google recommends using dnsstuff, because it updates live, instead of a cached response. Example:
http://www.dnsstuff.com/tools/legacy/?ToolFormName=googlemx&domain=brettjames.au.com&r=235660
That would main any changes would be noticed straight away, avoiding you having to change, wait, then change again if needed..
the_guv October 6th, 2009 at 6:18 am
@Brett .. you are a lovely man.
sorry for delay .. damn, been rebuilding both my boxes, well out of the loop. bloody motherboard cracked on one, the other, well, i just wanted the hassle.
you sorted? looked at yer pastie. thing is, it varies from web host to host .. you need to ask them or the forum there. personally, i don’t bother going that route anymore, which probably is terribly unprofessional, but it’s just so easy to scp an authentication page, way quicker than logging into and navigating my manager. my manager gets lonely, i think. that’s got to be a good sign
webmin, you say .. webmin CP with Nginx – last i heard there was veeeeeeeeeery sluggish development going on with any nginx-mod. i like webmin tho, nice and light, as cp’s go. if or when (i’d guess when) that is available, or more reluctantly any other cp, i’ll for sure be adding a bunch of tuts about installing and using it.
kevinayP December 16th, 2009 at 2:36 am
Hi Guv,
I got Google Apps working, including mail, verified, etc. But the address to go to read my mail from Google Apps is “http://mail.google.com/a/mydomain.com”. Google said that to change it to “http://mail.mydomain.com/” I’d have to modify the CNAME records for “mail” and a verification string. I already have a mail A/AAAA record – would that affect things up? I’d also like to add that I actually haven’t installed Postfix yet. And I haven’t changed my reverse DNS. I want Google Apps to manage my e-mail from “http://mail.mydomain.com/” – how can I do that and what should I do next?
Thanks,
Kevin
Brett December 17th, 2009 at 3:19 pm
Hey! Remembered I had a comment on it to go from. For the original note I left, it turned out to be a waiting game – just had to wait it out. I’m on a vps, so I didn’t need a working.
I’ve differed slightly in some of my settings for the postfix section of the guide on here (that’s part 10). The webserver will be serving multiple domainnames, so I thought that it wouldn’t be as simple as setting the hostname to resolve to a singular name.
Besides that though, I havn’t been able to get the mail() function to work (receiving an email sent via it internally or externally). Worse is that I’ll get no errors and just a success in the console when trying it as well.
I first found out that the sending of email via the php for me wasn’t working when a phpbb3 board never sent out emails – doh!
Setup & Configure Postfix Email: VPS BIBLE - vpsBible April 23rd, 2010 at 4:36 pm
[...] and every domain using the name of each domain *. For incoming email, we’ll be setting up Google Apps later in this series, which is free, easy, saves time and your system resources, and can be popped [...]
Install/Upgrade WORDPRESS with SUBVERSION: VPS BIBLE - vpsBible July 7th, 2010 at 6:31 pm
[...] wrap up the Ubuntu-Nginx Unmanaged VPS Bible series by showing how and why to setup Google Apps in Google Apps for Domain-Specific Email, which keeps our VPS server resources focussing jealously on our sites and blogs, before running [...]
STACKSCRIPT! Auto-Install LEMP with PHP-FPM: VPS BIBLE - vpsBible September 20th, 2010 at 6:49 pm
[...] your server can process your website’s email using the recommendable, free and spam killing Google Apps. Check out those links for the detail and to see how to set up Google Apps after running the [...]
STACKSCRIPT! Auto-Install LEMP (Debian/Nginx/PHP-FPM): VPS BIBLE - vpsBible September 21st, 2010 at 5:48 pm
[...] your server can process your website’s email using the recommendable, free and spam killing Google Apps. Check out those links for the detail and to see how to set up Google Apps after running the [...]