MX Backup (or how to backup your own domain email for free)
April 23rd, 2005
OK, so you’ve become a proud owner of an internet domain. You’ve built your website and also setup the email service so that you can send and receive messages from/to [you]@[yourdomain]. You’re all excited and everything seems to be perfect. That is, until people start telling you the email they sent you bounced back, or even worse, start asking why haven’t you replied to that important message they’ve sent. Well, you never recieved it. So you start scratching your head…
This post will explain what is happening in the background and how to fix the problem (for free). Don’t be discouraged by the length of the post, the process is quite simple.
When you setup your domain email you generally either forward it to another email address (FastMail, GMail, Yahoo, your ISP, etc), or you decide to take full control and go for the more advanced solution - host your own email, either at your webhost or on your own home machine. I’ll leave the forwarding case for another post and discuss the hosting solution here. So, the main question is, what happens when your mail server (or webhost) is down?
Very simplified, when someone sends an email to [you]@[yourdomain], the sending server checks the MX (Mail Exchange) DNS records for [yourdomain]. This record tells the sender where the email for [yourdomain] should be sent to. It gets the first one, resolves its IP address and tries to send the email to that server. All is fine if the server is up. Sometimes however, your server will be down for maintenance or other reasons and the sending server will either store the message and try again later or just discard the message completely. Huh, not exactly what you wanted!. So, how do you prevent this?
The first thing you should do is generate a report on DNS Report. Enter your domain name and click the “DNS Report” button. You will be presented with some useful information about your domain. Search for the “MX Record” field. How many MX records are defined? Only one? Read on.
If you have only one MX record defined, if the server that that record is pointing to is down, the sending server might try sending the message again later or might discard the message completely. To ensure that the email reaches you, you have to add backup MX records which will point to mail servers that will take over in case the primary MX server is down. In this case, if your primary mail server is down, the sending server will try to send the message to the backup servers instead.
You can define as many MX records as you want and prioritize them by assigning them numbers (lower numbers having higher priority), thus completely eliminating lost messages due to the “mail server down” problem. 3 MX records pointing to reliable servers in different locations is generally a good enough solution.
Once people are aware of this problem, the first question they ask is “Where do I define MX records?“. This usually depends on your domain registrar (that’s where you bought your domain). I buy my domains from Namecheap which provides an easy to use control panel where I can define all my domain records. Other registrars usually also allow you to setup MX records. Ask their support if you can’t find it. In brief, you set your MX records wherever your DNS is being hosted. This is usually your registrar (if you don’t have a clue, this is where it probably is), but could also be your webhost or an external service such as ZoneEdit.
The second question is “Where do I point my MX records to?“. Well, there are a bunch of services on the net that offer MX backup (try googling for that term). However, these services are quite overpriced for their purpose, since they are mainly targeted at small businesses. Remember, the backup server will only jump in when your main mail server is down. What I used to do until recently was buy a very cheap (~ $5/year) web hosting account which I used for MX backup only. However, I discovered Rollernet which offers MX backup for free (you have to register), evaluated it for a few months (very reliable!) and I’m now using it as my primary MX backup solution for my domains, with the exception of my most important domain which is hosted (and MX backed up) with FastMail. Rollernet provides a great feature - logging, which allows you to check what messages have passed through it and when. It is interesting that sometimes, even though SiteUptime doesn’t notice any “down” periods for my webhost, some messages are still being routed through the backup mail server (main mail server down). This service is provided free of charge, but consider donating, the guy behind it is doing a fantastic job and really deserves it.
As an example, MX records for one of my domains are defined like this:
IN MX 5 mail.example.com.
IN MX 15 mail.rollernet.us.
IN MX 15 mail2.rollernet.us.
This means that if mail.example.com is down, the mail will be routed to one of the MX 15 servers. The messages are stored there until your primary mail server is up. At that time the queued mail will be forwarded from the backup server to the primary one.
That’s it. Once you setup your two MX backup servers on rollernet.us, perform a new DNS report on your domain. You shouldn’t see a red boxed warning for MX records anymore. You can relax. All the mail that has been sent to you will reach you. That is, if your DNS is properly backed up. More on that some other time.
If you are interested in getting deeper into the subject of configuring your own perfect domain email backup, check out this great thread on EmailDiscussions.com. It is full of useful thoughts, approaches and concerns on MX and domain email backup in general, discussed by people who don’t tolerate losing one single mail (myself being one of them
).














Nice article - thanks for the links to rollernet.us and such, sounds like a great service. I just found your site accidentially looking to export my Thunderbird email to another Thunderbird client (imapsize) and stumbled across the blog. Glad you’re going with FOSS - hope imapsize can get ported to a free platform too!
Comment by Brian — May 11th, 2005 @ 6:23 pm
Question: In the event that your primary mail server goes down, and mail is routed to the secondary servers, how will the bacup mail servers know to forward mail on to the primary mail server when it goes back up again?
Comment by David Levin — January 16th, 2006 @ 7:31 pm
That is exactly the main feature of backup MX servers. Once they receive a message they monitor the status of the primary MX server and send the messages once it becomes available.
Comment by Ivan — January 16th, 2006 @ 8:06 pm
Wow. Just the solution I was looking for. Thank you! Another nice feature Roller Network has is its ability to identify and block known spams. Good stuff! Thank you.
Comment by Shun Chu — February 7th, 2006 @ 8:05 pm
Thanks a lot… i was looking desperately for something like this
Comment by dee — March 3rd, 2006 @ 1:09 am
i am very happy to see your blog… for that’s really what i need, but i want to say that Click ‘n Keep - Backup emails also a good tool to backup email.
http://www.yaodownload.com/utilites/backup/click-and-keep-backup-emails/
Comment by tom — April 17th, 2006 @ 5:36 am
I would like to know what you think of rollernet.us after all this while. reliable? Thanks.
Comment by Ashvin Jetpuria — May 14th, 2006 @ 5:43 pm
Yes, very reliable. The nice thing about rollernet is that it can show you the log of all the messages that pass through it, so it is fairly easy to get a good picture of how it performs.
Rollernet now handles the mail backup of two very important domains of mine, I think that speaks for itself.
Comment by Ivan — May 14th, 2006 @ 5:53 pm
Excellent info - just set it up and does indeed seem to work fine.
Thanks
Comment by SM — July 5th, 2006 @ 3:35 pm
[…] http://www.broobles.com/blog/posts/9 […]
Pingback by musc@> $daniele.rant | Out-Blog » Blog Archive » MX records and small servers — May 5th, 2007 @ 6:26 pm
[…] […]
Pingback by WordPress › Error — July 24th, 2007 @ 12:54 am
NEW UNIQUE MOBILE PHONE TEXT (SMS) SERVICE
“PretendAFriend” is a brand new Text (SMS) service that allows you to get text messages sent to yourself, when you want them, from who you want and say what you want. Think excuses, alibis, pranks and popularity.
Trackback by Sm Are The Service — February 19th, 2008 @ 5:57 am