def get_txt_Milter_dns(name):
    """Return a TXT record associated with a DNS name."""
    # Older pydns releases don't like a trailing dot.
    if name.endswith('.'):
        name = name[:-1]
    sess = Session()
    a = sess.dns(name,'TXT')
    if a: return b''.join(a[0])
    return None
Return a TXT record associated with a DNS name.
python/dkim/dnsplug.py