<div><br></div><div>I'm writing a backend to interface with a custom database.</div><div>The database has a domain (we'll call it foobar here) and in response to</div><div><br></div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">
<div>dig @<a href="http://127.0.0.1">127.0.0.1</a> <a href="http://foobar.com">foobar.com</a> mx</div></blockquote><div><br></div><div><br></div><div>The backend is returning the following (and some nameservers not shown) in response to pdns's ANY lookup</div>
<div><br></div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><div><div>Apr 25 13:02:49 returning <a href="http://foobar.com">foobar.com</a> <a href="http://ghs.google.com">ghs.google.com</a>. CNAME</div>
</div><div><div>Apr 25 13:02:49 returning <a href="http://foobar.com">foobar.com</a> <a href="http://aspmx.l.google.com">aspmx.l.google.com</a>. MX</div></div><div><div>Apr 25 13:02:49 returning <a href="http://foobar.com">foobar.com</a> <a href="http://alt1.aspmx.l.google.com">alt1.aspmx.l.google.com</a>. MX</div>
</div><div><div>Apr 25 13:02:49 returning <a href="http://foobar.com">foobar.com</a> <a href="http://alt2.aspmx.l.google.com">alt2.aspmx.l.google.com</a>. MX</div></div><div><div>Apr 25 13:02:49 returning <a href="http://foobar.com">foobar.com</a> <a href="http://aspmx2.googlemail.com">aspmx2.googlemail.com</a>. MX</div>
</div><div><div>Apr 25 13:02:49 returning <a href="http://foobar.com">foobar.com</a> <a href="http://aspmx3.googlemail.com">aspmx3.googlemail.com</a>. MX</div></div><div><div>Apr 25 13:02:49 returning <a href="http://foobar.com">foobar.com</a> <a href="http://aspmx4.googlemail.com">aspmx4.googlemail.com</a>. MX</div>
</div><div><div>Apr 25 13:02:49 returning <a href="http://foobar.com">foobar.com</a> <a href="http://aspmx5.googlemail.com">aspmx5.googlemail.com</a>. MX</div></div></blockquote><div><br></div><div>Upon return the code in packethandler.cc notes the CNAME and asks the backend about <a href="http://ghs.google.com">ghs.google.com</a>. </div>
<div><br></div><div>Since the backend returns false when subsequently asked about <a href="http://google.com">google.com</a> pdns returns to dig the cname and servfail, and does not return the MX records.</div><div><br></div>
<div>Is that correct? Am I doing something wrong? Do I have wrong expectations? :-)</div><div><br></div><div>(I can work around this by looking at the qtype in the dns packet, rather than using the the qtype passed explicitly.)</div>
<div><br></div><div>tia!</div><div><br></div><div><br></div>