From ccd53bc99e5aa7bf6cc2565f6dca8762351767ec Mon Sep 17 00:00:00 2001 From: tkikuchi <> Date: Sat, 12 Feb 2005 14:31:45 +0000 Subject: Request from Brad Knowles. We need subject prefix stripped from the posts from mailling list for gatewaying to nntp. --- Mailman/Queue/NewsRunner.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'Mailman/Queue') diff --git a/Mailman/Queue/NewsRunner.py b/Mailman/Queue/NewsRunner.py index 2b40a3ca..be1dd93d 100644 --- a/Mailman/Queue/NewsRunner.py +++ b/Mailman/Queue/NewsRunner.py @@ -102,11 +102,14 @@ def prepare_message(mlist, msg, msgdata): del msg['approved'] msg['Approved'] = mlist.GetListEmail() # 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: + # messages? TK: We use stripped_subject (prefix stripped) which was + # crafted in CookHeaders.py to ensure prefix was stripped from the subject + # came from mailing list user. + stripped_subject = msgdata.get('stripped_subject') \ + or msgdaga.get('origsubj') + if not mlist.news_prefix_subject_too and stripped_subject is not None: del msg['subject'] - msg['subject'] = origsubj + msg['subject'] = stripped_subject # Add the appropriate Newsgroups: header ngheader = msg['newsgroups'] if ngheader is not None: -- cgit v1.2.3