summaryrefslogtreecommitdiff
path: root/src/mailman/rules/loop.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/mailman/rules/loop.py')
-rw-r--r--src/mailman/rules/loop.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/mailman/rules/loop.py b/src/mailman/rules/loop.py
index ac4d00461..b50b55ed6 100644
--- a/src/mailman/rules/loop.py
+++ b/src/mailman/rules/loop.py
@@ -37,4 +37,11 @@ class Loop:
# Has this message already been posted to this list?
list_posts = set(value.strip().lower()
for value in msg.get_all('list-post', []))
- return mlist.posting_address in list_posts
+ if mlist.posting_address in list_posts:
+ msgdata['moderation_sender'] = msg.sender
+ with _.defer_translation():
+ # This will be translated at the point of use.
+ msgdata.setdefault('moderation_reasons', []).append(
+ _('Message has already been posted to this list'))
+ return True
+ return False