On 12/11/2015 05:42 AM, Kapetanakis Giannis wrote: > > The From: header is like this: > From: > =?iso-8859-7?B?1C7FLskuIMrRx9TH0ywg0NHPxcTRz9MgxS4gyuHw5fTh7dzq5/I=?=<[email protected]> > > > The system sees only a sender as ?.?.? instead of [email protected]
I think this is <https://bugs.launchpad.net/mailman/+bug/702516> fixed in MM 2.1.15. In any case, this From: is properly recognized in current Mailman. > Can I force the use of envelope address instead of from address? > I've tried setting > SENDER_HEADERS = (None,) > SENDER_HEADERS = ('from',) > without any luck. SENDER_HEADERS = (None,) is correct, to use only the envelope sender. SENDER_HEADERS = ('from',) will use only the From: header which is exactly what you don't want. But, these won't help. What you want is USE_ENVELOPE_SENDER = Yes but that may not help either. The issue is complicated. A Mailman Message instance has two methods, get_sender() and get_senders(). get_sender() returns a single address which is the first address found in the From: header, the Sender: header or the envelope sender in that order if USE_ENVELOPE_SENDER = No. If USE_ENVELOPE_SENDER = Yes, the order is Sender: header, From: header, envelope sender, so USE_ENVELOPE_SENDER is really a misnomer; it really means prefer Sender: over From:. get_senders() returns a list of all the addresses found in the places listed in SENDER_HEADERS searched in the order they appear there, so with SENDER_HEADERS = (None,), get_senders() will return a list containing only the envelope sender. The issue you have is because Mailman uses the addrersses returned by get_senders() to determine list membership. If one of those addresses is a list member, the post is determined to be a post from the first member address in get_senders(), but if none of those is a list member, only the address returned by get_sender() is checked against *_these_nonmembers. The bottom line here is the only way to address this with list settings is to set USE_ENVELOPE_SENDER = Yes and to ensure that the incoming post has a Sender: header with the sender's address. If you can't do that and you can't upgrade to at least Mailman 2.1.15, you could consider patching Mailman/Message.py to make get_sender() return the 'unixfrom', or you could install both patches at <http://bazaar.launchpad.net/~mailman-coders/mailman/2.1/revision/984> and <http://bazaar.launchpad.net/~mailman-coders/mailman/2.1/revision/1271> (rev 1271 is the fix, but it assumes rev 984). -- 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] https://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: https://mail.python.org/mailman/options/mailman-users/archive%40jab.org
