From 7aa44b730acf90e653980dc1010e7ad585dcef2f Mon Sep 17 00:00:00 2001 From: viega Date: Thu, 11 Jun 1998 14:36:06 +0000 Subject: I added a variable 'anonymous_list' that, if set, causes From, Sender and Reply-To to get stripped out and replaced with: From: list-admin@... This one could potentially be something where if the admin enables anonymous posting, it could be a per-sender option. However, I added this because the guy from the Dave Matthews Band home office wants to be able to post to an announcement list without changing his email setup, yet not get email in his personal mailbox from tons of fans. I figure others may have similar needs. --- modules/maillist.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'modules/maillist.py') diff --git a/modules/maillist.py b/modules/maillist.py index 13ef9c720..a0e366e84 100644 --- a/modules/maillist.py +++ b/modules/maillist.py @@ -157,6 +157,7 @@ class MailList(MailCommandHandler, HTMLFormatter, Deliverer, ListAdmin, self.reminders_to_admins = mm_cfg.DEFAULT_REMINDERS_TO_ADMINS self.bounce_matching_headers = \ mm_cfg.DEFAULT_BOUNCE_MATCHING_HEADERS + self.anonymous_list = 0 self.real_name = '%s%s' % (string.upper(self._internal_name[0]), self._internal_name[1:]) self.description = '' @@ -460,6 +461,10 @@ class MailList(MailCommandHandler, HTMLFormatter, Deliverer, ListAdmin, " by escaping or bracketing it." "

See also the forbidden_posters option for" " a related mechanism."), + ('anonymous_list', mm_cfg.Radio, ('No', 'Yes'), 0, + 'Hide the sender of a message, replacing it with the list ' + 'address (Removes From, Sender and Reply-To fields)'), + ] config_info['nondigest'] = [ @@ -837,7 +842,10 @@ class MailList(MailCommandHandler, HTMLFormatter, Deliverer, ListAdmin, elif not re.match("(re:? *)?" + re.escape(self.subject_prefix), subj, re.I): msg.SetHeader('Subject', '%s%s' % (prefix, subj)) - + if self.anonymous_list: + del msg['reply-to'] + del msg['sender'] + msg.SetHeader('From', self.GetAdminEmail()) if self.digestable: self.SaveForDigest(msg) if self.archive: -- cgit v1.2.3-70-g09d2