------------------------------------------------------------ revno: 1703 committer: Mark Sapiro <m...@msapiro.net> branch nick: 2.1 timestamp: Tue 2017-05-23 12:45:06 -0700 message: Implement base64 encoded recipient header. modified: Mailman/Defaults.py.in Mailman/Handlers/SMTPDirect.py NEWS
-- lp:mailman/2.1 https://code.launchpad.net/~mailman-coders/mailman/2.1 Your team Mailman Checkins is subscribed to branch lp:mailman/2.1. To unsubscribe from this branch go to https://code.launchpad.net/~mailman-coders/mailman/2.1/+edit-subscription
=== modified file 'Mailman/Defaults.py.in' --- Mailman/Defaults.py.in 2017-05-12 19:38:40 +0000 +++ Mailman/Defaults.py.in 2017-05-23 19:45:06 +0000 @@ -629,6 +629,17 @@ # 3 -> always remove, rename and preserve original DKIM headers. REMOVE_DKIM_HEADERS = No +# If the following is set to a non-empty string, that string is the name of a +# header that will be added to personalized and VERPed deliveries with value +# equal to the base64 encoding of the recipient's email address. This is +# intended to enable identification of the recipient otherwise redacted from +# "spam report" feedback loop messages. For example, if +# RCPT_BASE64_HEADER_NAME = 'X-Mailman-R-Data' +# a header like +# X-Mailman-R-Data: dXNlckBleGFtcGxlLmNvbQo= +# will be added to messages sent to user@@example.com. +RCPT_BASE64_HEADER_NAME = '' + # All `normal' messages which are delivered to the entire list membership go # through this pipeline of handler modules. Lists themselves can override the # global pipeline by defining a `pipeline' attribute. === modified file 'Mailman/Handlers/SMTPDirect.py' --- Mailman/Handlers/SMTPDirect.py 2016-05-12 18:54:42 +0000 +++ Mailman/Handlers/SMTPDirect.py 2017-05-23 19:45:06 +0000 @@ -30,6 +30,7 @@ import time import socket import smtplib +from base64 import b64encode from types import UnicodeType from Mailman import mm_cfg @@ -371,6 +372,10 @@ del msgcopy['x-mailman-copy'] if msgdata.get('add-dup-header', {}).has_key(recip): msgcopy['X-Mailman-Copy'] = 'yes' + # If desired, add the RCPT_BASE64_HEADER_NAME header + if len(mm_cfg.RCPT_BASE64_HEADER_NAME) > 0: + del msgcopy[mm_cfg.RCPT_BASE64_HEADER_NAME] + msgcopy[mm_cfg.RCPT_BASE64_HEADER_NAME] = b64encode(recip) # For the final delivery stage, we can just bulk deliver to a party of # one. ;) bulkdeliver(mlist, msgcopy, msgdata, envsender, failures, conn) === modified file 'NEWS' --- NEWS 2017-05-12 19:38:40 +0000 +++ NEWS 2017-05-23 19:45:06 +0000 @@ -15,6 +15,13 @@ New Features + - There is a new RCPT_BASE64_HEADER_NAME setting. If this is set to a + non-empty string, that string is the name of a header that will be added + to personalized and VERPed deliveries with value equal to the base64 + encoding of the recipient's email address. This is intended to enable + identification of the recipient otherwise redacted from "spam report" + feedback loop messages. + - cron/senddigests has a new -e/--exceptlist option to send pending digests for all but a named list. (LP: #1619770)
_______________________________________________ Mailman-checkins mailing list Mailman-checkins@python.org Unsubscribe: https://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org