summaryrefslogtreecommitdiff
path: root/lib/dnspython/examples/mx.py
blob: 3036e70ddf3ead96df677600e8c199232573b83a (plain)
1
2
3
4
5
6
7
#!/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