diff options
author | Mark Sapiro <mark@msapiro.net> | 2015-02-06 12:06:55 -0800 |
---|---|---|
committer | Mark Sapiro <mark@msapiro.net> | 2015-02-06 12:06:55 -0800 |
commit | c0a5c55fee93f32176338d116b30d2f06866045d (patch) | |
tree | f006abfe941ac650c536aaa8002d5b417cf3a699 /Mailman | |
parent | 43c25066a4560a6b956dc4c97fbda78bd2caf90f (diff) | |
download | mailman2-c0a5c55fee93f32176338d116b30d2f06866045d.tar.gz mailman2-c0a5c55fee93f32176338d116b30d2f06866045d.tar.xz mailman2-c0a5c55fee93f32176338d116b30d2f06866045d.zip |
Remove Organization: header from anonymized posts.
Handle regexps with trailing ':' in ANONYMOUS_LIST_KEEP_HEADERS.
Diffstat (limited to 'Mailman')
-rw-r--r-- | Mailman/Handlers/Cleanse.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Mailman/Handlers/Cleanse.py b/Mailman/Handlers/Cleanse.py index c3e7aa43..c684cd19 100644 --- a/Mailman/Handlers/Cleanse.py +++ b/Mailman/Handlers/Cleanse.py @@ -1,4 +1,4 @@ -# Copyright (C) 1998-2013 by the Free Software Foundation, Inc. +# Copyright (C) 1998-2015 by the Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -29,6 +29,8 @@ from Mailman.Handlers.CookHeaders import uheader cres = [] for regexp in mm_cfg.ANONYMOUS_LIST_KEEP_HEADERS: try: + if regexp.endswith(':'): + regexp = regexp[:-1] + '$' cres.append(re.compile(regexp, re.IGNORECASE)) except re.error, e: syslog('error', @@ -65,6 +67,7 @@ def process(mlist, msg, msgdata): del msg['from'] del msg['reply-to'] del msg['sender'] + del msg['organization'] del msg['return-path'] # Hotmail sets this one del msg['x-originating-email'] |