LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   MX Record (https://www.linuxquestions.org/questions/linux-general-1/mx-record-4571/)

minor 07-21-2001 10:53 PM

MX Record
 
MX record
I set the MX record like this,

domain.com IN MX 10 mail01.domain.com
IN MX 20 mail02.domain.com

does this record correct? If I would like to the first reply mail server is mail01.domain.com and mail02.domain.com is secord. And if right, what's the reply IP when I ping domain.com if the mail01.domain.com is down? Is it reply the mail01.domain.com IP or mail02.domain.com IP? Thanks!

jharris 07-22-2001 07:57 PM

Re: MX Record
 
Quote:

Originally posted by minor
MX record
I set the MX record like this,

domain.com IN MX 10 mail01.domain.com
IN MX 20 mail02.domain.com

I'd expect the above to look more like
Code:

domain.com. IN MX 10 mail01.domain.com.
domain.com. IN MX 20 mail02.domain.com.

note the trailing full stops if you are going to use the full machine name. If you forget this then Bind will append your domain again so you'll end up with MX records that point to places like mail02.domain.com.domain.com which tend to not work as you want!

Quote:

Originally posted by minor
And if right, what's the reply IP when I ping domain.com if the mail01.domain.com is down? Is it reply the mail01.domain.com IP or mail02.domain.com IP? Thanks!
You can't just ping domain.com - its a domain, hence doesn't really exist! If you were to lookup the MX records then you would get both machines returned, and it you were to ping them only the one what was up would respond (clearly!), redundant mail relays won't automatically switch your IP addresses around for you etc, when one server fails. The normal thing that happens is that mail01 would be used as the mail relay, if this fails to respone to an incomming SMTP transfer then mail02 would be used. Mail02 will queue the mail until mail01 comes back up, at which time all mail will be delievered back to mail01 from mail02 and become available for your users.

HTH

Jamie...

minor 07-23-2001 12:13 AM

How about this record
 
how about the this record, am I setting correct

$ORIGIN domain.com.
@ IN SOA dns01.dns.com. root.dns01.dns.com.
(
2001072301 ; serial number
10800 ; refresh
1800 ; retry
9600 ; expire
4800 ) ; minimum

IN NS dns01.dns.com.
IN A 192.168.1.48

mail01 IN A 192.168.1.48
mail02 IN A 192.168.1.62

domain.com IN MX 10 mail01.domain.com.
domain.com IN NX 20 mail02.domain.com.

according this record, I try to lookup and just reply one address. Am I set something wrong? I am sorry to make you trouble again!

jharris 07-23-2001 06:06 AM

I'd expect your record to look more like (I'm assuming you're using domain.com - you appear to have both dns.com and domain.com used below which is pretty wrong)
Code:

domain.com.              IN SOA dns01.domain.com.    root.dns01.dns.com.
(
2001072301      ; serial number
10800          ; refresh
1800            ; retry
9600            ; expire
4800 )          ; minimum

domain.com.    IN NS  dns01.dns.com.

mail01        IN A    192.168.1.48
mail02        IN A    192.168.1.62
domain.com.    IN MX  10      mail01.domain.com.
domain.com.    IN MX  20      mail02.domain.com.

The above will only give you lookups for names to address, you need another file to do reverse lookups (incase you didn't realise) so your name server chang change IP addresses back to names. Give it ago and see what happens.

HTH

Jamie...


All times are GMT -5. The time now is 09:32 PM.