Web Hosting Talk







View Full Version : MX Records for a Backup Mail Server


driverdave
11-20-2001, 03:52 AM
Everything I've read about this makes it look very easy, yet it doesn't want to work for me at all.

I have to raq4s on different IP's and networks. They are both running as nameservers and are listed as such for myexample.com

My main web/email server is called ns1.fake.com and my backup is called ns2.fake.com. Here is my DNS setup on ns1, which has IP of 111.111.111.111

A record myexample.com > 111.111.111.111
A record www.myexample.com > 111.111.111.111
MX record priority 20 myexample.com > www.myexample.com

Everything works fine with this. Now what I'd like to do is set up ns2 to hold the email for myexample.com, in case ns1 in unreachable.

So from what I've read at sendmail.org, I should do the following and ns2 will just hold my email till ns1 is available. It says all I have to do is allow relaying for whatever domains I am providing backup email holding for. So I try this on ns2

A record myexample.com > 111.111.111.111
A record www.myexample.com > 111.111.111.111
MX record priority 20 myexample.com > www.myexample.com
MX record priority 50 myexample.com > ns2.fake.com

Which works fine when ns1 is up and accepting email. But when I shut down sendmail on ns1, I get bounced email with the mail loop back to me? config error. I'm allowing relay for myexample.com on ns2.

Has anyone got this working, having one raq que up another's emails if it's down, then forward them when it goes back up?

I've seriously tried too many permutations of the above setup to list, I'm sure I just missed something simple.

muppie
11-20-2001, 04:25 AM
Hi,

1. both your ns1 and ns2 should be exactly the same, that means ns1 should also have that priority 50 entry in it.

2. You should also set an email server on your second machine (ns2.fake...) and also accepting mails for myexample.com domain

3. On the main machine (myexample.com) you should set up special transfer through ETRN to retrieve the mails from ns2.fake when it gets back up.

Cheers

driverdave
11-20-2001, 04:47 AM
Thanks for the Quick Reply!

1. both your ns1 and ns2 should be exactly the same, that means ns1 should also have that priority 50 entry in it.
- Yes, I thought about that, and since ns1 is my main web/email server, I just didn't bother putting in the higher priority MX, since it would never not find the lower priority mail server (itself). But I will do this.

2. You should also set an email server on your second machine (ns2.fake...) and also accepting mails for myexample.com domain.
- I tried that also. It failed untill the point of me entering myexample.com as an email server alias (in the Cobalt GUI) for this other email server. Then the email was simply bounced (user unknown) or, if I made a catch all for this web server, the email was simply delivered to the backup server, which is not what I want.

3. On the main machine (myexample.com) you should set up special transfer through ETRN to retrieve the mails from ns2.fake when it gets back up.
- I'll look into this. This would be ideal, because people could still read their email from the backup, but when the main server came back on line, the email would sync up. If you know how to set that up, could you post it?

Thanks again. I'm off to investagate this ETRN.

Quick Update - ETRN from my main webserver to the backup would only start the transfer of any queued messages. What I'm trying to figure out is how to keep them in the queue without getting bounced. Or maybe I don't understand ETRN completely. I'll read some more :)

muppie
11-20-2001, 05:30 AM
for (2) your backup email server needs to be configured as such, and not as normal email server. What it'll do is hold any incoming emails destined for myexample.com.

When the primary mail server came back up, it will query this backup email server and asks for the emails that were held.

I am not sure how it's done on the raq as I have never seen / used it, have to read the docs of whatever MTA it is using.

Yeah go read out there lots of docs I am sure :) Good luck :beer: