>     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

_______________________________________________
Mailman-Developers mailing list
[email protected]
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