------------------------------------------------------------
revno: 1622
fixes bug: https://launchpad.net/bugs/1549420
committer: Mark Sapiro <m...@msapiro.net>
branch nick: 2.1
timestamp: Thu 2016-02-25 20:45:44 -0800
message:
  Further refactoring of the Organizational Domain fix.
modified:
  Mailman/Defaults.py.in
  Mailman/Utils.py
  NEWS


--
lp:mailman/2.1
https://code.launchpad.net/~mailman-coders/mailman/2.1

Your team Mailman Checkins is subscribed to branch lp:mailman/2.1.
To unsubscribe from this branch go to 
https://code.launchpad.net/~mailman-coders/mailman/2.1/+edit-subscription
=== modified file 'Mailman/Defaults.py.in'
--- Mailman/Defaults.py.in	2016-02-08 04:56:06 +0000
+++ Mailman/Defaults.py.in	2016-02-26 04:45:44 +0000
@@ -1130,6 +1130,13 @@
 # The total time to spend trying to get an answer to the question.
 DMARC_RESOLVER_LIFETIME = seconds(5)
 
+# A URL from which to retrieve the data for the algorithm that computes
+# Organizational Domains for DMARC policy lookup purposes.  This can be
+# anything handled by the Python urllib2.urlopen function.  See
+# https://publicsuffix.org/list/ for info.
+DMARC_ORGANIZATIONAL_DOMAIN_DATA_URL = \
+'https://publicsuffix.org/list/public_suffix_list.dat'
+
 # Should the list server auto-moderate members who post too frequently
 # This is intended to stop people who join a list and then use a bot to
 # send many spam messages in a short interval.  These are default settings

=== modified file 'Mailman/Utils.py'
--- Mailman/Utils.py	2016-02-26 03:08:37 +0000
+++ Mailman/Utils.py	2016-02-26 04:45:44 +0000
@@ -1162,7 +1162,6 @@
 # algorithm at https://publicsuffix.org/list/ to find the "Organizational
 # Domain corresponding to a From: domain.
 
-URL = 'https://publicsuffix.org/list/public_suffix_list.dat'
 s_dict = {}
 
 def get_suffixes(url):
@@ -1205,7 +1204,7 @@
 Domain which may be the same as the input."""
     global s_dict
     if not s_dict:
-        get_suffixes(URL)
+        get_suffixes(mm_cfg.DMARC_ORGANIZATIONAL_DOMAIN_DATA_URL)
     hits = []
     d = domain.split('.')
     d.reverse()

=== modified file 'NEWS'
--- NEWS	2016-02-25 07:24:26 +0000
+++ NEWS	2016-02-26 04:45:44 +0000
@@ -52,7 +52,10 @@
   Bug fixes and other patches
 
     - If DMARC lookup fails to find a policy, also try the Organizational
-      Domain.  (LP: #1549420)
+      Domain.  Associated with this is a new mm_cfg.py setting
+      DMARC_ORGANIZATIONAL_DOMAIN_DATA_URL which sets the URL used to
+      retrieve the data for the algorithm that computes the Organizational
+      Domain.  See https://publicsuffix.org/list/ for info.  (LP: #1549420)
 
     - Modified contrib/mmdsr to correctly report No such list names that
       contain ".

_______________________________________________
Mailman-checkins mailing list
Mailman-checkins@python.org
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org

Reply via email to