[Mailman-Users] private lists with real name signatures

Mark Sapiro mark at msapiro.net
Wed May 26 19:34:17 CEST 2010


Stephen J. Turnbull wrote:

>Mark Sapiro writes:
>
> > Sure. A somewhat more complete handler (and perhaps more Pythonic as
> > well) would be:
> > 
> > 
> > from email.Utils import parseaddr
> > def process(mlist, msg, msgdata):
> >     poster_name, addrs = parseaddr(msg['from'])
> >     if not poster_name and mlist.isMember(addrs):
> >         poster_name = mlist.getMemberName(address) or ''
>                                                 A
>oops-y here, I think ----------------------------+


<blush> Of course you are correct; that should be 'addrs', not
'address'. One day, I'll learn that every time I write more than two
lines of code in a mail list post, they will contain at least one typo.


> >     msgdata.setdefault('decoration-data', {}).update(
> >                                   poster_name=poster_name)


-- 
Mark Sapiro <mark at msapiro.net>        The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan



More information about the Mailman-Users mailing list