On 05/28/2015 08:25 AM, Allan Hansen wrote:
You’re right. AOL does not accept these messages with ‘invalid’ at the end.
You’re recommending this:
name, addr = parseadder(msg.get('from')) if addr.endswith('aol.com') or addr.endswith('yahoo.com'): # I forget what happens if it's a bare address name = "%s (%s) via list" % (name if name else "Anonymous", addr) addr = <list-post address> del msg['from’] msg['from'] = formataddr((name, addrs))
Can I copy this code directly into the file? Is <list-post address> valid syntax? (I have 40+ lists)
No, it is meant to be replaced with the actual list posting address, but is there some reasone you don't want to do what I posted at https://mail.python.org/pipermail/mailman-users/2015-May/079190.html?