Guy Barrette, Microsoft, Regional Director, Montreal, Canada, Visual Studio, .NET Expertise Using Gmail as a backup mail server - Guy Barrette

Guy Barrette

Microsoft Regional Director, Montreal, Canada

Using Gmail as a backup mail server

Let's face it, if you're a small shop, building a redundant Exchange infrastructure is way too hard and way too expensive.  So what if you have a simple Exchange setup with just a few users?  You can prey that you server will never go down and you can plan the reboots after the critical updates installs on Sunday mornings.

But why not leverage Gmail itself?  Yep, why not use Google's Gmail as the backup email server?  Sounds wacky?  It is but it works AND it's free!!!

OK, how you I do that?

First, you must have access to the domain's DNS entries because you'll have to modify them.

Point your browser to www.google.com/a, do a little reading and discover what is Google Apps.

Next, create an a free account.

Use your existing domain

Follow the steps that let Google verify that you really own the domain name.  That will involve either putting a text file in the root directory of your Website or adding a CNAME.

I use GoDaddy to register my domain names and they let you tweak the domain settings using their Total DNS Control Panel.  Check if your registrar let you do this.

After the domain ownership has been verified, you need to change the MX records (Mail Exchange).  Gmail lists instructions for a few registrars.

Basically, you need to add Gmail's MX records to the domain's MX records list.

The trick is to leave the one with PriorityValue 0 (zero) pointing to YOUR email server.

This way, mail will flow to your email server and Gmail will catch them only if your server is down.

The downside:
You'll have to create a Gmail account for each users.
You'll have to ask them to check their Google apps Gmail account when you have downtime.
The accounts are not synched.

To simplify this, you can add a CNAME to point directly to Google apps Gmail.  Something like gmail.mydomain.com
 

This is a great solution for small shops, best of all, it's free!

Posted: May 25 2008, 08:08 AM by guybarrette | with 19 comment(s)
Filed under:

Comments

ooglek said:

Excellent!  The Priority 0 for my mail server is the winner.  

# June 17, 2008 11:42 AM

guybarrette said:

Never tried a value of 1 but if it's a valid value for your provider, I guess that it should work.

# September 15, 2008 7:02 AM

isal lucu said:

currently our building is black out. no electricity. totally black out. How do I set so it can receive both  in office mail server and in google apps? What value shout I set for this redundant purpose?

thanks

# October 11, 2008 1:44 AM

Tom Sellers said:

It does not work for me. This is what I see when I set my server to 0 (also tried other sequences):

Your current MX records contain incorrect value(s):

MX Server address Priority

205.206.xxx.xxx. 0

aspmx.l.google.com. 1

alt1.aspmx.l.google.com. 5

alt2.aspmx.l.google.com. 5

aspmx2.googlemail.com. 10

aspmx3.googlemail.com. 10

aspmx4.googlemail.com. 10

aspmx5.googlemail.com. 10

# January 23, 2009 11:50 PM

Takaitra said:

Thanks for the article! I set up my domain with Google Apps and pointed its secondary MX records there. It worked like a charm.

# January 27, 2009 8:03 AM

Nico said:

this cannot work good, because some server uses a other priority and so the mails are saved on the google server and you have check your own server and the google server permanent.

# February 10, 2009 6:17 AM

Norf said:

Doesn't this also mean that any emails sent through gmails server will end up in the gmail boxes and not the exchange servers.

Also wouldn't it be easier to setup a catch-all on gamil and then get the exchange server to download this via a POP connector.

Or better yet pay the $60 or so per year it costs to get another company to act as a relay service.

# March 3, 2009 10:03 PM

choon said:

I have the same problem as Tom Sellers. Google throws this error to me.

Your current MX records contain incorrect value(s):

MX Server address Priority

mailserver.xxx.com.             0

ASPMX.L.GOOGLE.com.      10

ALT1.ASPMX.L.GOOGLE.com. 20

ALT2.ASPMX.L.GOOGLE.com. 30

ASPMX2.GOOGLEMAIL.com.   40

ASPMX3.GOOGLEMAIL.com.   50

How to solve this?

# April 29, 2009 11:51 AM

Shaun said:

If your primary mail server is down then any emails sent will go to the backup server (gmail) in this case. However what happens if the user tries to access their emails via their usual client, will the mx record point them to the backup sever and if they have their passwords in-sync what will happen?

I am thinking here of a client accessing via IMAP and am worried that the sync could cause major problems when the primary is back.

Thanks

Shaun

# June 25, 2009 11:33 AM

Orson said:

Thanks for this article - and the clear instructions.

What worked in our case was setting the MX mail server priority as follows

mailserver.xxx.com   (10)

ASPMX.L.GOOGLE.com.  (20)

ALT1.ASPMX.L.GOOGLE.com.  (30)

...etc.,

i.e., starting at 10, and increasing each value accordingly. We use Network Solutions for domain name hosting, and the DNS config utility had no problem with these values.

One thing to note: I've been checking my backup gmail account, and have found that a steady stream of junk has been landing in the gmail spam folder, and more sporadically, legitimate email in the gmail inbox - all of it addressed to/from groups, lists, or multiple recipients. This does not seem to have coincided with interruptions, and I suspect these are messages that were flagged as junk and tarpitted by our Exchange server, and were therefore rerouted by the originating servers to google servers. Anyone else had a similar experience?

Thanks,

Orson

# June 29, 2009 1:34 PM

Jason said:

This is a feasible alternative to something like DynDNS.com's MailHop Backup MX, because not only can you catch the mail, you can create/reply to email during the downtime.  We are migrating our equipment overseas, and need an interim solution until our Exchange server is in place there (about 2 to 3 weeks).  The problem is, I need the mail service to backfill my Exchange server once it comes online again.  Is this possible using this solution?  Talking about 100+ users.  The downside of having to create an account for each user is scary.

# July 16, 2009 6:06 PM

Jeremy said:

Jason, Why not just have a POP connector locked and loaded for when  your exchange comes back online? you can enable it for a few cycles, and this will bring all of your Gmails into your Exchange

# March 11, 2010 7:29 PM

Pooch said:

Great idea! I use a regular gmail account as my catch all client for a bunch of different email addresses. Since my primary mail server just forwards to that anyway I set up google apps as the backup and configured it so that my target email address is actually a Group and then I add my main gmail account as a recipient so no matter which server gets the message it's always forwarded to my master gmail account.

# August 13, 2010 5:15 AM

Ryan said:

When I do this email sent through Gmail go to the Google Boxes not to my mail server. Not sure why this is happening as MX is set properly.

# February 10, 2011 4:37 PM

Rokabear vps hosting said:

For those that like having a little more control over their mailer, a VPS may be a good option.  For a simple backup mailer you can get a cheap VPS from several providers and their easy to setup.

It gives you the flexibility to run whatever you want on your mail server.

# April 17, 2011 11:50 AM

guy said:

a more interesting idea is to setup an exchange pop3 connector for each mailbox - that way no user itervention is needed. you will need an ssl plugin for your win platform though as it is not supported by default and gmail uses only ssl

# May 2, 2011 3:44 PM

Jake said:

Does this still work? My registrar just told me that I am not able to have a secondary mx server, and my domain is expiring soon and I am looking transfer to GoDaddy based on this.

Please let me know, Thanks.

# June 13, 2011 10:38 PM