diff options
| author | Mark Sapiro | 2017-07-26 08:11:33 -0700 |
|---|---|---|
| committer | Mark Sapiro | 2017-07-26 08:11:33 -0700 |
| commit | bea94cb9538a55b1376afd42c2ce751efce62cfe (patch) | |
| tree | 5fba570b0c6f4c0919009cb6f455c18bc732192a /src/mailman/rules/no_subject.py | |
| parent | 02826321d0430d7ffc1f674eeff4221941689ef7 (diff) | |
| download | mailman-bea94cb9538a55b1376afd42c2ce751efce62cfe.tar.gz mailman-bea94cb9538a55b1376afd42c2ce751efce62cfe.tar.zst mailman-bea94cb9538a55b1376afd42c2ce751efce62cfe.zip | |
Diffstat (limited to 'src/mailman/rules/no_subject.py')
| -rw-r--r-- | src/mailman/rules/no_subject.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/mailman/rules/no_subject.py b/src/mailman/rules/no_subject.py index f4d2f6a5d..9793ca2a5 100644 --- a/src/mailman/rules/no_subject.py +++ b/src/mailman/rules/no_subject.py @@ -37,4 +37,11 @@ class NoSubject: # Convert the header value to a str because it may be an # email.header.Header instance. subject = str(msg.get('subject', '')).strip() - return subject == '' + if subject == '': + msgdata['moderation_sender'] = msg.sender + with _.defer_translation(): + # This will be translated at the point of use. + msgdata.setdefault('moderation_reasons', []).append( + _('Message has no subject')) + return True + return False |
