From a1bf240906a8774ae63f1c3299ebd1079c217cce Mon Sep 17 00:00:00 2001 From: Jim Popovitch Date: Sun, 20 Oct 2013 21:39:23 +0000 Subject: Incorporated some feedback from Mark S. --- Mailman/Handlers/Moderate.py | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) (limited to 'Mailman/Handlers/Moderate.py') 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. -- cgit v1.2.3