aboutsummaryrefslogtreecommitdiffstats
path: root/Mailman/Handlers/Moderate.py
diff options
context:
space:
mode:
authorJim Popovitch <jimpop@gmail.com>2013-10-20 21:39:23 +0000
committerJim Popovitch <jimpop@gmail.com>2013-10-20 21:39:23 +0000
commita1bf240906a8774ae63f1c3299ebd1079c217cce (patch)
tree0ecad8555294b72ebc5a28d964d19855497101bc /Mailman/Handlers/Moderate.py
parent049bf74c65b72e5584d4f7879057fc33f9fce26b (diff)
downloadmailman2-a1bf240906a8774ae63f1c3299ebd1079c217cce.tar.gz
mailman2-a1bf240906a8774ae63f1c3299ebd1079c217cce.tar.xz
mailman2-a1bf240906a8774ae63f1c3299ebd1079c217cce.zip
Incorporated some feedback from Mark S.
Diffstat (limited to '')
-rw-r--r--Mailman/Handlers/Moderate.py16
1 files changed, 5 insertions, 11 deletions
diff --git a/Mailman/Handlers/Moderate.py b/Mailman/Handlers/Moderate.py
index 81b554e4..9b5f0600 100644
--- a/Mailman/Handlers/Moderate.py
+++ b/Mailman/Handlers/Moderate.py
@@ -57,13 +57,13 @@ def process(mlist, msg, msgdata):
sender = None
if sender:
if Utils.IsDmarcProhibited(sender):
- # Note that for dmarc_moderation_action, 0==Hold, 1=Reject,
- # 2==Discard
- if mlist.dmarc_moderation_action == 0:
+ # Note that for dmarc_moderation_action, 0 = Accept,
+ # 1 = Hold, 2 = Reject, 3 = Discard
+ if mlist.dmarc_moderation_action == 1:
msgdata['sender'] = sender
Hold.hold_for_approval(mlist, msg, msgdata,
ModeratedMemberPost)
- elif mlist.dmarc_moderation_action == 1:
+ elif mlist.dmarc_moderation_action == 2:
# Reject
text = mlist.dmarc_moderation_notice
if text:
@@ -72,14 +72,8 @@ def process(mlist, msg, msgdata):
# Use the default RejectMessage notice string
text = None
raise Errors.RejectMessage, text
- elif mlist.dmarc_moderation_action == 2:
+ elif mlist.dmarc_moderation_action == 3:
raise Errors.DiscardMessage
- else:
- assert 0, 'bad dmarc_moderation_action'
-
- # sender's domain has a 'p=reject' _dmarc TXT record,
- # we should NOT automatically reflect this email
- return
# If the member's moderation flag is on, then perform the moderation
# action.