| Path : /proc/self/root/usr/share/doc/python-dns-1.12.0/examples/ |
| Current File : //proc/self/root/usr/share/doc/python-dns-1.12.0/examples/mx.py |
#!/usr/bin/env python
import dns.resolver
answers = dns.resolver.query('nominum.com', 'MX')
for rdata in answers:
print 'Host', rdata.exchange, 'has preference', rdata.preference