diff options
| author | tkikuchi | 2005-08-28 05:31:27 +0000 |
|---|---|---|
| committer | tkikuchi | 2005-08-28 05:31:27 +0000 |
| commit | 067dc15b2432bb285ab5e4a3eac6f4dddd67ed19 (patch) | |
| tree | ceac72251ee33742bfff7626c99dde163d3da946 /Mailman/Handlers/Cleanse.py | |
| parent | bc1dad4f90a26ade7c4dd6d2863de88856e8b4b6 (diff) | |
| download | mailman-067dc15b2432bb285ab5e4a3eac6f4dddd67ed19.tar.gz mailman-067dc15b2432bb285ab5e4a3eac6f4dddd67ed19.tar.zst mailman-067dc15b2432bb285ab5e4a3eac6f4dddd67ed19.zip | |
Diffstat (limited to 'Mailman/Handlers/Cleanse.py')
| -rw-r--r-- | Mailman/Handlers/Cleanse.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Mailman/Handlers/Cleanse.py b/Mailman/Handlers/Cleanse.py index 059652568..65c5df69e 100644 --- a/Mailman/Handlers/Cleanse.py +++ b/Mailman/Handlers/Cleanse.py @@ -16,6 +16,11 @@ """Cleanse certain headers from all messages.""" +from email.Utils import formataddr + +from Mailman.Logging.Syslog import syslog +from Mailman.Handlers.CookHeaders import uheader + def process(mlist, msg, msgdata): # Always remove this header from any outgoing messages. Be sure to do @@ -26,12 +31,15 @@ def process(mlist, msg, msgdata): del msg['urgent'] # We remove other headers from anonymous lists if mlist.anonymous_list: + syslog('post', 'post to %s from %s anonymized', + mlist.internal_name(), msg.get('from')) del msg['from'] del msg['reply-to'] del msg['sender'] # Hotmail sets this one del msg['x-originating-email'] - msg['From'] = mlist.GetListEmail() + i18ndesc = str(uheader(mlist, mlist.description, 'From')) + msg['From'] = formataddr((i18ndesc, mlist.GetListEmail())) msg['Reply-To'] = mlist.GetListEmail() # Some headers can be used to fish for membership del msg['return-receipt-to'] |
