Ok this one took me a little while to figure out, and I’m pretty sure some mail was lost in the process (I saw it bounce in the logs).

I use a paid EditDNS subscription to manage my DNS. They’re usually very reliable, and the interface is the best I’ve come accross. I recently shifted a bunch of domains for my clients that expired into the EditDNS system. This enlarged my name database enough that I needed some system to keep track of what was going to point where. I decided to minimise the amount of administrative overhead by using CNAME records when I knew the IP’s were dynamically dependent on the IP of another record.

For instance, I like to map the domain record to the www record like this:

;; QUESTION SECTION:
;test.com.au. IN A

;; ANSWER SECTION:
test.com.au. 84644 IN CNAME www.test.com.au.
www.test.com.au. 84644 IN CNAME client.sirtech.com.au.
client.sirtech.com.au. 270 IN A 208.78.99.104

But for some reason I found that using a CNAME for the domain record actually breaks the MX resolution. I mean, when I do an MX lookup, I get this:

;; QUESTION SECTION:
;test.com.au. IN MX

;; ANSWER SECTION:
test.com.au. 84578 IN CNAME www.test.com.au.
www.test.com.au. 84578 IN CNAME client.sirtech.com.au.

Now, I would expect this to cause sending mail to test.com.au to fail. It doesn’t. What it does is when I send to user@test.com.au, it rewrites the address to user@www.test.com.au, connects to the correct MX record, and attempts to process!
So that fails usually because I don’t map users to www.test.com.au, I map them to test.com.au.

As soon as I change the domain record back to an A record, it works. I still don’t know why this is, I guess I will have to read more about DNS sigh.

Written on January 11th, 2008 , Informative

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

SirSpanky.com – The Secret Diary of James Pearce Aged 20-Something is proudly powered by WordPress and the Theme Adventure by Eric Schwarz
Entries (RSS) and Comments (RSS).

SirSpanky.com – The Secret Diary of James Pearce Aged 20-Something

Personal jorunal of a professional geek – James Pearce in Perth, Australia