summaryrefslogtreecommitdiff
path: root/src/mailman/rules/moderation.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/mailman/rules/moderation.py')
-rw-r--r--src/mailman/rules/moderation.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/mailman/rules/moderation.py b/src/mailman/rules/moderation.py
index fdecd1d5f..9c89cf0b2 100644
--- a/src/mailman/rules/moderation.py
+++ b/src/mailman/rules/moderation.py
@@ -42,8 +42,10 @@ class MemberModeration:
"""See `IRule`."""
for sender in msg.senders:
member = mlist.members.get_member(sender)
- action = (None if member is None
- else member.moderation_action)
+ if member is None:
+ return False
+ action = (member.moderation_action
+ or mlist.default_member_action)
if action is Action.defer:
# The regular moderation rules apply.
return False
@@ -112,7 +114,8 @@ class NonmemberModeration:
_record_action(msgdata, action, sender,
reason.format(action))
return True
- action = nonmember.moderation_action
+ action = (nonmember.moderation_action
+ or mlist.default_nonmember_action)
if action is Action.defer:
# The regular moderation rules apply.
return False