Finding mail exchangers
Anthony Baxter
anthony at interlink.com.au
Mon May 13 23:47:50 EDT 2002
>>> "Steve Holden" wrote
> You need to submit a query to a DNS server and decode the reply.
Look at the code in pydns.sf.net - there's a function in the lazy module
called "mxlookup". For instance,
>>> import DNS
>>> DNS.DiscoverNameServers() # win or unix, initialise resolver.
>>> DNS.mxlookup('interlink.com.au')
[(0, 'mx1.interlink.com.au'), (50, 'mx2.interlink.com.au')]
> I have code that does this if you'd like a copy (it uses the dnslib code,
> which I can also provide).
How does your dnslib differ from Guido's original code?
Anthony
--
Anthony Baxter <anthony at interlink.com.au>
It's never too late to have a happy childhood.
More information about the Python-list
mailing list