diff options
| author | viega | 1998-06-11 14:36:06 +0000 |
|---|---|---|
| committer | viega | 1998-06-11 14:36:06 +0000 |
| commit | 7aa44b730acf90e653980dc1010e7ad585dcef2f (patch) | |
| tree | d1b1671a9156bec9708a9fe35c93bf44c5eef2d7 /Mailman/MailList.py | |
| parent | 40eea7f5744a54eac3834f98471e53236c005bec (diff) | |
| download | mailman-7aa44b730acf90e653980dc1010e7ad585dcef2f.tar.gz mailman-7aa44b730acf90e653980dc1010e7ad585dcef2f.tar.zst mailman-7aa44b730acf90e653980dc1010e7ad585dcef2f.zip | |
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.
Diffstat (limited to 'Mailman/MailList.py')
| -rw-r--r-- | Mailman/MailList.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Mailman/MailList.py b/Mailman/MailList.py index 13ef9c720..a0e366e84 100644 --- a/Mailman/MailList.py +++ b/Mailman/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." "<p> See also the <em>forbidden_posters</em> 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: |
