def mxlookup(name):
 if (Base.defaults['server'] == []):
  Base.DiscoverNameServers()
 a = Base.DnsRequest(name, qtype='mx').req().answers
 l = sorted(map((lambda x: x['data']), a))
 return l

def mxlookup ( name ) : if ( Base . defaults [ 'server' ] == [ ] ) : Base . DiscoverNameServers ( ) a = Base . DnsRequest ( name , qtype = 'mx' ) . req ( ) . answers l = sorted ( map ( ( lambda x : x [ 'data' ] ) , a ) ) return l
convenience routine for doing an mx lookup of a name .