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 14 comment(s)
Filed under:

Comments

ooglek said:

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

# June 17, 2008 11:42 AM

gmail cname said:

Pingback from  gmail cname

# July 16, 2008 8:07 AM

check mx records said:

Pingback from  check mx records

# July 24, 2008 10:43 PM

Ayande said:

Hi!

When I try to set my priority to "0" it doesnt work with the control panel Im using. I can only set it to "1". Will it still work setting that valu instead?

PS: Very nice tutorial

# September 14, 2008 11:55 PM

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
Leave a Comment

(required) 

(required) 

(optional)

(required)