On 05/16/2014 08:36 PM, Bob Puff wrote:
> So guys... Is there a simple little hack we can do within MM 2.1 to try to
> mitigate this issue, by adding .invalid or some other extension?  I've got a
> few lists that are getting to the point where MM sends the probe email, and
> then figures it is not a bouncing address, but a lot of emails are not being
> delivered.


Exactly how to patch this depends on what Mailman version you're
starting with, but you basically want some code like this.

    name, addrs = parseaddr(msg.get('from'))
    addrs += '.invalid'
    del msg['from']
    msg['From'] = formataddr((name, addrs))

If you put it in Mailman/Handlers/Cleanse.py or
Mailman/Handlers/CookHeaders.py, parseaddr and formataddr are already
imported from email.Utils so the above 4 lines added to the
process(mlist, msg, msgdata) function are all you need.

-- 
Mark Sapiro <m...@msapiro.net>        The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan
_______________________________________________
Mailman-Developers mailing list
Mailman-Developers@python.org
https://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9

Reply via email to