spf-discuss
[Top] [All Lists]

Re: OT: DNS, MX Records and TTL

2004-03-08 09:59:58

On Mon, Mar 08, 2004 at 09:48:26AM -0500, Marc Alaia wrote:

Hey, everyone.  I have an 'off topic' DNS question and know you all can
help with the answer.  Specifically, how do MX records work with TTL?
And how does a mail sender know when to look for new records?

Example:
alaia.net has two MX records, but let's say I make a mistake and have
different TTL's
alaia.net MX 10 mx.spfproxy.com ; TTL=14400
alaia.net MX 20 gw.alaia.net ; TTL=86400

So, first email to alaia.net goes to mx.spfproxy.com, of course, but what
happens 5 hours later after MX 10 has expired?  Similarly, what if I add
another MX record with priority 5 immediately after an email is sent to
me? I presume that that sender would not check for new records until all
prior records have expired?


--"Arnold K." <aksup(_at_)voicenet(_dot_)com> wrote:
Marc,

A record can only have one TTL.  The TTL  either will be the lower
of the two or the first seen when the record is read-in have.  I am
inclined to say that it will be the first one seen, but have not tested
it.


I think it's correct that one record can have only one TTL, but in Marc's example there are two MX records. I don't actually know what happens at the cacheing server if one record expires and the other does not.

I could see having two different TTLs, maybe if the secondary doesn't change but the primary might change often. But, I would probably want to test this out, or else use the lower ttl for both to be on the safe side.

Also, you can have a long TTL time for the MX and a short TTL for the corresponding A records, which would allow you to change the IP address quickly if you need to.

--
Greg Connor <gconnor(_at_)nekodojo(_dot_)org>


<Prev in Thread] Current Thread [Next in Thread>