adding second MX record screw up

jeroman8

Well-Known Member
Mar 14, 2003
410
0
166
Hi,

I need to add another mx record for a domain.

The regular mx record: "domain.com MX 0 domain.com"
and another one going to a remote mailserver so it would be called: sec.domain.com

I add it like this:

"sec MX 0 remote.mailserver.com"

BUT when I check it (dnsstuff.com) it turns out like this: remote.mailserver.com.domain.com

?? - so it add the remote mailserver but then on top of it it adds my domain also ??

ANY help appreciated please
 

sjackson909

Well-Known Member
Jun 8, 2004
113
0
166
Columbus, OH
Looks like your missing your "." at the end of your mx record. Should be

domain.com MX 0 domain.com.

sec.domain.com MX 0 sec.domain.com.

Thanks
-Seth
 

chirpy

Well-Known Member
Verifed Vendor
Jun 15, 2002
13,441
31
473
Go on, have a guess
You really ought to have different values for your MX records. The primary (where the mail ends up) should be lower than the secondary.
 

sjackson909

Well-Known Member
Jun 8, 2004
113
0
166
Columbus, OH
sjackson909 said:
domain.com MX 0 domain.com.
sec.domain.com MX 0 sec.domain.com.
yep, bad example on my part! you will want to incres your weight by at least one, or you can play with some nutty round-robin mail-servers.

Thanks
-Seth
 

jeroman8

Well-Known Member
Mar 14, 2003
410
0
166
Yes, I added 0 for the main and then 10 for the other one.

But what is these numbers anyway ??
 

chirpy

Well-Known Member
Verifed Vendor
Jun 15, 2002
13,441
31
473
Go on, have a guess
They're essential for routing the mail correctly ;)

The lower numbered MX record is the ultimate destination for email delivery. The higher numbered MX record will queue any email sent to it until the lower numbered MX record is available and then deliver the queued email to that IP address.
 

SarcNBit

Well-Known Member
Oct 14, 2003
1,007
3
168
jeroman8 said:
Yes, I added 0 for the main and then 10 for the other one.

But what is these numbers anyway ??
It is the "preference value". MTAs will initially attempt to send mail via the host with the lowest preference value.

Mail routing is described in IETF RFC 974
 
Last edited:

jeroman8

Well-Known Member
Mar 14, 2003
410
0
166
Help

I have setup 2 MX records as above.

sub.domain.com MX 10 mailserver
domain.com MX 0 localmailserver

Now when sending mail with reply address as "sub.domain.com" you can't
send to the local "domain.com" adress.

Sender Verify Fail error

The sub.domain.com's adresses is offcourse setup on another mailserver
but it looks like exim is checking to verify the adress locally.

Can this be because there's an A record for the sub.domain.com as well as MX record.
Should I remove the Sub domain (A record) ??

Or can I setup something in exim, relay stuff....??