On 08/18/2016 04:48 AM, Richard Hipp wrote: > > It would be great if there were some way to send a message where the >>From field of each recipient was slightly different, and different in > a way that was traceable back to the list member. That would allow me > to identify the leaker.
There are various things such as VERP and full personalization that add recipient specific information to the envelope sender and headers such as Sender:, Errors-To: and even To:, but these probably won't help. Altering the From: based on recipient can be done by modifying the code. Say you have a message "From: Ann User <a...@example.com>" and you want to change that to "From: Ann User <ann+...@example.com>" where xxx is a unique code for each recipient. First, ensure that either VERP_DELIVERY_INTERVAL = 1 is in mm_cfg.py to enable VERP or that the list's Non-digest options -> personalize is Yes or Full personalization. This will make SMTPDirect.py use the verpdeliver function to deliver a separate message to each recipient. Then you need to create a mapping from list members to the 'xxx' codes. You can for example create a file with one line per list member of the form: memb...@example.com code1 memb...@example.com code2 ... with a single space between the member address and the code. Finally, at the beginning of Mailman/Handlers/SMTPDirect.py, following the line DOT = '.' put import re CODES = {} for line in open('path/to/above/file'): addr, code = line.split(' ') CODES[addr.lower()] = code And then at the end of the verpdeliver function just before the line bulkdeliver(mlist, msgcopy, msgdata, envsender, failures, conn) put code = CODES[recip.lower()] msgfrom = msgcopy['from'] del msgcopy['from'] msgcopy['From'] = re.sub('@', '+' + code + '@', msgfrom) to add the +code to the From: address. -- Mark Sapiro <m...@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan ------------------------------------------------------ Mailman-Users mailing list Mailman-Users@python.org https://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://wiki.list.org/x/AgA3 Security Policy: http://wiki.list.org/x/QIA9 Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/ Unsubscribe: https://mail.python.org/mailman/options/mailman-users/archive%40jab.org