changing the subject line when rejected
Hello,
When a message is rejected it keeps the same subject line as what was sent. If the user dows not read the message saying the post was rejected, the user assumes it went out to the list. How do I change a rejected email subject to what I see in the ListAdmin.py
# add in original message, but not wrap/filled
if origmsg:
text = NL.join(
[text,
'---------- ' + _('Original Message') + ' ----------',
str(origmsg)
])
subject = _('Request to mailing list %(realname)s rejected')
I expected that the above would be the subject of a rejected notice but it is not.
Thank you,
Mark
Mark Heer wrote:
When a message is rejected it keeps the same subject line as what was sent. If the user dows not read the message saying the post was rejected, the user assumes it went out to the list. How do I change a rejected email subject to what I see in the ListAdmin.py
# add in original message, but not wrap/filled if origmsg: text = NL.join( [text, '---------- ' + _('Original Message') + ' ----------', str(origmsg) ]) subject = _('Request to mailing list %(realname)s rejected')
I expected that the above would be the subject of a rejected notice but it is not.
What you quote above is from the __refuse() method which is only used internally within ListAdmin to process moderator rejections of posts and (un)subscribes.
Messages which are rejected by a Handler because of things like a match in reject_these_nonmembers or member_moderation_action or generic_nonmember_action set to refuse are processed by the BounceMessage() method in Mailman/Bouncer.py and as you've observed, it sets the subject of the notice to the subject of the rejected message.
If you want, you can replace
subject = msg.get('subject', _('(no subject)'))
in the definition of BounceMessage() with the two lines
realname = self.real_name
subject = _('Request to mailing list %(realname)s rejected')
-- Mark Sapiro mark@msapiro.net The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
participants (2)
-
Mark Heer
-
Mark Sapiro