From 85a978ef9eb2af1bc8accbceb0e8ba4b0bdf949c Mon Sep 17 00:00:00 2001 From: bwarsaw Date: Wed, 31 Jul 2002 18:42:49 +0000 Subject: Allow postings gatewayed to Usenet to inhibit the Subject: field munging, separate from the mail list. This actually restores the original Subject: field which is stashed away in the metadata when it's munged in CookHeaders. Closes SF patch #573508. prepare_message(): Restore the original Subject: header if news_prefix_subject_too is false. --- Mailman/Queue/NewsRunner.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Mailman/Queue/NewsRunner.py b/Mailman/Queue/NewsRunner.py index 54f97359e..6fdfe641e 100644 --- a/Mailman/Queue/NewsRunner.py +++ b/Mailman/Queue/NewsRunner.py @@ -85,6 +85,12 @@ class NewsRunner(Runner): def prepare_message(mlist, msg, msgdata): + # Should we restore the original, non-prefixed subject for gatewayed + # messages? + origsubj = msgdata.get('origsubj') + if not mlist.news_prefix_subject_too and origsubj is not None: + del msg['subject'] + msg['subject'] = origsubj # Add the appropriate Newsgroups: header ngheader = msg['newsgroups'] if ngheader is not None: -- cgit v1.3.1