diff options
Diffstat (limited to 'src/mailman/chains/headers.py')
| -rw-r--r-- | src/mailman/chains/headers.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mailman/chains/headers.py b/src/mailman/chains/headers.py index 6fc061fe4..01ba96971 100644 --- a/src/mailman/chains/headers.py +++ b/src/mailman/chains/headers.py @@ -105,6 +105,11 @@ class HeaderMatchRule: if isinstance(value, Header): value = value.encode() if re.search(self.pattern, value, re.IGNORECASE): + msgdata['moderation_sender'] = msg.sender + with _.defer_translation(): + # This will be translated at the point of use. + msgdata.setdefault('moderation_reasons', []).append( + (_('Header "{}" matched a header rule'), str(value))) return True return False |
