From: Brian Candler Date: 2009-03-02T00:24:50+09:00 Subject: Re: DNS MX lookup issue: local machine returned as MX for an non-existant domain! Yves-Eric wrote: > But I have gather some interesting data, thanks to your suggestion of > using tcpdump. Indeed, I can see a difference in activity (see dump > pasted below), but I am not quite sure what to make of it... It looks > like > Resolv::DNS does proceed properly at first, sending an MX query and > getting an NXDOMAIN response. But apparently, it is not satisfied by > that NXDOMAIN reply, and from there, Resolv::DNS continues with 3 > other queries: PTR, [|domain], and another PTR. > > Have we stumbled upon a bug in Resolv::DNS? Possibly - you have the source, so you can trace it / debug it, at simplest just by adding STDERR.puts at interesting places. It looks like the PTR records are just the library (or Ruby) doing reverse DNS lookups on IP addresses of the DNS servers themselves. There is a knob you can set which might minimise this noise, if it's Ruby doing it: Socket.do_not_reverse_lookup = true -- Posted via http://www.ruby-forum.com/.