diff options
| author | bwarsaw | 1999-11-10 17:50:07 +0000 |
|---|---|---|
| committer | bwarsaw | 1999-11-10 17:50:07 +0000 |
| commit | 8c188aca6fc1ff5fb6b1cbaeae3bb2e1b0788422 (patch) | |
| tree | 060ec5d4b0e53b584968c75d6bb3a9b05dc0f6cc | |
| parent | 2b0ff9421a8e0b6c6d3cc8452e95f0176f5f4cb2 (diff) | |
| download | mailman-8c188aca6fc1ff5fb6b1cbaeae3bb2e1b0788422.tar.gz mailman-8c188aca6fc1ff5fb6b1cbaeae3bb2e1b0788422.tar.zst mailman-8c188aca6fc1ff5fb6b1cbaeae3bb2e1b0788422.zip | |
New pipeline delivery module
"""Cleanse certain headers from all messages."""
| -rw-r--r-- | Mailman/Handlers/Cleanse.py | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/Mailman/Handlers/Cleanse.py b/Mailman/Handlers/Cleanse.py new file mode 100644 index 000000000..d03a8a760 --- /dev/null +++ b/Mailman/Handlers/Cleanse.py @@ -0,0 +1,35 @@ +# Copyright (C) 1998 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 +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +"""Cleanse certain headers from all messages.""" + + +def process(mlist, msg): + # Always remove this header from any outgoing messages, but be sure to do + # this before the information on the header is actually used. + del msg['approved'] + # + # We remove other headers for anonymous lists + if mlist.anonymous_list: + del msg['reply-to'] + del msg['sender'] + msg['From'] = mlist.GetAdminEmail() + msg['Reply-To'] = mlist.GetListEmail() + # + # Some headers can be used to fish for membership + del msg['return-receipt-to'] + del msg['disposition-notification-to'] + del msg['x-confirm-reading-to'] |
