[Bug 1287604] Re: Enhancement: Sanity Check Subscribers MX Record

John Howe johnhowe at arashi.com
Wed Mar 5 09:05:42 CET 2014


dragon at quantum:/usr/local/mailman/Mailman
$ python
Python 2.7.3 (default, Jan  2 2013, 13:56:14) 
[GCC 4.7.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> print sys.path
['', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-linux2', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages', '/usr/lib/pymodules/python2.7']

I symlinked /usr/lib/python2.7/site-packages to /usr/lib/python2.7/dist-
packages, since /usr/lib/python2.7/site-packages  didn't exist on my

I ended up using python-dnspython 1.10.0-1, as it seems cleaner.

Here is what works for me now:

dragon at quantum:/usr/local/mailman/Mailman
$ diff Utils.py.org Utils.py
> import dns.resolver
>     # MX Record sanity checks
>     try:
> 	    mx_domain = '.'.join(domain_parts)
>         mx_query = dns.resolver.query(mx_domain)
>         if len(mx_query) < 1:
> 		raise Errors.MMHostileAddress, s
>     except:
>         raise Errors.MMHostileAddress, s

Thanks for the assistance!

You received this bug notification because you are a member of Mailman
Coders, which is subscribed to GNU Mailman.

  Enhancement: Sanity Check Subscribers MX Record

To manage notifications about this bug go to:

More information about the Mailman-coders mailing list