[Sussex] Ruby DNS library MX resolution problem

Ronan Chilvers ronan at thelittledot.com
Mon Jun 20 13:04:04 UTC 2005


On Mon, 20 Jun 2005 13:20:05 +0100
Thomas Adam <thomas at edulinux.homeunix.org> wrote:

<snip>
>   >> 
>   ?> d=Checker.new("foo at hotmail.com")
>   Checking hotmail.com
>   mx3.hotmail.com
>   mx4.hotmail.com
>   mx1.hotmail.com
>   mx2.hotmail.com
>   => #<Checker:0x403d6700 @domain="hotmail.com", @recipient="foo">
</snip>

So it works for one address, but what if you do

addresses = []

while lin = STDIN.gets
	addresses.push lin
end

for address in addresses
	d = Checker.new(address.to_s) # to_s added for completeness
end

results in 

ronan at rncubuntu:emailcheck $ cat 2test-email-list.csv | ./Checker.rb
Checking hotmail.com
DNS resolv error: hotmail.com
Checking yahoo.com
DNS resolv error: yahoo.com
Checking amazon.co.uk
DNS resolv error: amazon.co.uk
Checking sourceforge.net
DNS resolv error: sourceforge.net

None of addresses[] resolve on my system. FYI, this is ruby 1.8.2 on
Ubuntu.  And dig can resolve the MXs for all these domains from the
command line just fine, so my DNS resolution doesn't _seem_ to be the
problem (cautious note in voice).

Any ideas?

Ronan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mailman.lug.org.uk/pipermail/sussex/attachments/20050620/9709fe27/attachment.pgp 


More information about the Sussex mailing list