Great, thanks, that worked. I read about the USE_ENVELOPE_SENDER, but it did not seem that it applied, a little confused there.
Thanks -Rob -----Original Message----- From: Mark Sapiro [mailto:[EMAIL PROTECTED] Sent: Friday, September 29, 2006 12:42 PM To: Rob Jackson; [email protected] Subject: Re: [Mailman-Users] I need to get "Sender:" address Rob Jackson wrote: >I have messages coming from a Gatewayed Message board to mailman. >There is an extra field To: field and a Sender: field and I need to get >the Sender e-mail address. > >I have tried modifying the SENDER_HEADERS to >('sender','from',None,'reply-to'), so sender is before from, but it >still grabs the "From" even if "Sender exists." Which headers are searched and in which order depends on several things including context. You probably need to set USE_ENVELOPE_SENDER to Yes in mm_cfg.py. Here are the details: There are two Mailman.Message.Message methods for getting the sender. They are get_sender() and get_senders(). If USE_ENVELOPE_SENDER is Yes or True, get_sender() returns the first address found from the headers Sender:, From:, and the unixfrom or envelope sender. Otherwise the search order is From:, Sender:, unixfrom. OTOH, get_senders() returns a list of all the addresses found in all the headers listed in SENDER_HEADERS. Thus, changing SENDER_HEADERS has no effect on the address returned by get_sender() and reordering SENDER_HEADERS only affects the order of the addresses returned by get_senders(). The distinction is important, because in some contexts (e.g. determining whether the sender is a list member), get_senders() is used to get a list of addresses, whereas in other contexts (e.g. determining if the sender is in *_these_nonmembers), get_sender() is used to get a single address. -- 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://www.python.org/cgi-bin/faqw-mm.py Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/ Unsubscribe: http://mail.python.org/mailman/options/mailman-users/archive%40jab.org Security Policy: http://www.python.org/cgi-bin/faqw-mm.py?req=show&file=faq01.027.htp
