I installed dnspython and used one of their example to resolve MX records:
Quote:
import dns.resolver
answers = dns.resolver.query('free.kindle.com', 'MX')
for rdata in answers:
print 'Host', rdata.exchange, 'has preference', rdata.preference
|
and it works fine:
Quote:
paul@paul-laptop:~$ python test.py
Host smtp-fw-2101.amazon.com. has preference 10
Host smtp-fw-4101.amazon.com. has preference 10
Host smtp-fw-9101.amazon.com. has preference 10
|