summaryrefslogtreecommitdiff
path: root/src/mailman/rules/dmarc.py
diff options
context:
space:
mode:
authorMark Sapiro2016-12-30 11:37:49 -0800
committerMark Sapiro2016-12-30 11:37:49 -0800
commitaf4f25a593c006c27321d9618c2ae2658777446b (patch)
tree1bfcd7f07d2ddc6f93faec4bab96e428b563920b /src/mailman/rules/dmarc.py
parenteba4d0767aa141dc631e433ac01a86302da233b5 (diff)
downloadmailman-af4f25a593c006c27321d9618c2ae2658777446b.tar.gz
mailman-af4f25a593c006c27321d9618c2ae2658777446b.tar.zst
mailman-af4f25a593c006c27321d9618c2ae2658777446b.zip
Diffstat (limited to 'src/mailman/rules/dmarc.py')
-rw-r--r--src/mailman/rules/dmarc.py19
1 files changed, 8 insertions, 11 deletions
diff --git a/src/mailman/rules/dmarc.py b/src/mailman/rules/dmarc.py
index dac1cd88c..90b874e32 100644
--- a/src/mailman/rules/dmarc.py
+++ b/src/mailman/rules/dmarc.py
@@ -43,8 +43,6 @@ def _get_suffixes(url):
# This loads and parses the data from the url argument into s_dict for
# use by _get_org_dom.
global s_dict
- if s_dict:
- return
if not url:
return
try:
@@ -199,17 +197,16 @@ def _DMARCProhibited(mlist, email, dmarc_domain, org=False):
policy = mo.group(1).lower()
else:
continue
- if policy == 'reject':
- vlog.info(
- """%s: DMARC lookup for %s (%s)
- found p=reject in %s = %s""",
- mlist.list_name, email, dmarc_domain, name, entry)
- return True
- if policy == 'quarantine':
+ if policy in ('reject', 'quarantine'):
vlog.info(
"""%s: DMARC lookup for %s (%s)
- found p=quarantine in %s = %s""",
- mlist.list_name, email, dmarc_domain, name, entry)
+ found p=%s in %s = %s""",
+ mlist.list_name,
+ email,
+ dmarc_domain,
+ policy,
+ name,
+ entry)
return True
return False