Doug Gaff wrote: > >The request I'm getting from list members is to have their "Real Name" >displayed but not their email address. I see two ways to do this: > > > >1. The "on behalf of" text in the header could put the real name only >and not the email address.
The "on behalf of" text is just MS Outlook's (and some other MUAs lik Hotmail) way of displaying the From: header when there is a Sender: header. In any case, Mailman's way of handling the From: in an anonymous list is to make it "List description <list_posting_address>". Replacing the list description with the poster's name would require modifying the code in Mailman/Handlers/Cleanse.py. >2. An auto signature can be appended to the end of each sent message. Here you could create a custom handler (see the FAQ at <http://wiki.list.org/x/l4A9>). If the message's metadata contains a dictionary named decoration-data, that dictionary is used to update the replacements available for msg_header and msg_footer. Thus if the custom handler were in the pipeline prior to Cleanse, i.e. prior to the replacement of the From: header, it could be something like: from email.Utils import parseaddr def process(mlist, msg, msgdata): poster_name = parseaddr(msg['from'])[0] if 'decoration-data' in msgdata: msgdata['decoration-data']['poster_name'] = poster_name else: msgdata['decoration-data'] = {'poster_name': poster_name} This would add %(poster_name)s to the replacements available for msg_header and msg_footer, and its value would be the real name part of the From: address of the original post or the empty string if there wasn't a real name in the From: -- Mark Sapiro <[email protected]> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan ------------------------------------------------------ Mailman-Users mailing list [email protected] http://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://wiki.list.org/x/AgA3 Security Policy: http://wiki.list.org/x/QIA9 Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/ Unsubscribe: http://mail.python.org/mailman/options/mailman-users/archive%40jab.org
