Chaining MX records illegal?

Merton Campbell Crockett mcc at CATO.GD-AIS.COM
Thu Nov 10 07:15:16 UTC 2005


On Wed, 9 Nov 2005, Gregory Hicks wrote:

> 
> > From: Barry Margolin <barmar at alum.mit.edu>
> > Subject: Re: Chaining MX records illegal?
> > Date: Thu, 10 Nov 2005 01:12:20 -0500
> > To: comp-protocols-dns-bind at isc.org
> > 
> > In article <dku9b6$20ih$1 at sf1.isc.org>,
> >  Chris De Young <chd at arizona.edu> wrote:
> > 
> > > Hi,
> > > Am I correct in my interpretation that chaining together MX records 
> is 
> > > illegal,
> > > despite the fact that it seems to mostly work?
> > > 
> > > For example:
> > > 
> > > chud.net	mx 10	mail.foobar.com.
> > > .
> > > .
> > > .
> > > mail.foobar.com	mx 10	smtp.yahoo.com.
> > > 
> > > is a no-no?
> > 
> > There's nothing invalid about it, but it won't do what I think you 
> > expect it to do.  Mail for chud.net will be delivered to 
> > mail.foobar.com, not smtp.yahoo.com.  After looking up an MX record, 
> the 
> > sending system will then look up the A record of the name it gets, it 
> > shouldn't look for an MX record of it.
> 
> To expand a bit...
> 
> As Barry said, that is not really "chaining" of MX records.  These are 
> two SEPARATE MX records.  They are not related to each other even though 
> the first points to the second.
> 
> This works as:
> 
> If you are sending mail to 'chud.net', my mail server is 
> "mail.foobar.com".  (look up A record)
> 
> If you are sending mail to a user at mail.foobar.com, my mail server is 
> smtp.yahoo.com...  (Look up A record).


What happens depends on the mail relay system being used.  The typical 
query is an "any" query.  If the MX record returned contains an A record 
in the "authoritative answer" section, there is no reason for the mail 
relay to search further.

At any rate, the recipient's name isn't going to be rewritten by the mail 
relay, i.e. mail to "user at chud.net" will not rewritten with the address 
"user at mail.foobar.com" just because you have an MX record defined.

The only way that you might possibly do this is to create a resource 
record for a pseudo-system.

	mail.foobar.com. IN MX 0 smtp.yahoo.com.

There must NOT be an A resource record associated with the name.  Also, 
smtp.yahoo.com would need to be configured to accept mail for 
"user at chud.net".

What's wrong with using a .forward file?

Merton Campbell Crockett

-- 
BEGIN:				vcard
VERSION:			3.0
FN:				Merton Campbell Crockett
ORG:				General Dynamics Advanced Information Systems;
				Intelligence and Exploitation Systems
N:				Crockett;Merton;Campbell
EMAIL;TYPE=internet:		mcc at CATO.GD-AIS.COM
TEL;TYPE=work,voice,msg,pref:	+1(805)497-5045
TEL;TYPE=work,fax:		+1(805)497-5050
TEL;TYPE=cell,voice,msg:	+1(805)377-6762
END:				vcard



More information about the bind-users mailing list