[Mailman-Developers] Fixing DMARC problems with .invalid munge
Bob Puff
bob at nleaudio.com
Sat May 17 07:56:50 CEST 2014
> 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.
Hey Mark,
I'm getting: NameError: global name 'parseaddr' is not defined
Should something else be imported?
Bob
More information about the Mailman-Developers
mailing list