[Mailman-Developers] [ mailman-Bugs-1416853 ] Jan 14 change toHandlers/SpamDetect.pyisincomplete

Mark Sapiro msapiro at value.net
Sat Jan 28 19:23:06 CET 2006


Mark Sapiro wrote:
>
>Perhaps we could test if msg.get_sender() == mlist.GetOwnerEmail(), and
>discard in that case only, but I'd want a somewhat different test in
>case the sender's domain were not identical - something like
>
>    if msg.get_sender().split('@')[0] == \
>               mlist.GetOwnerEmail().split('@')[0]:

Nope. This won't do either. Consider that someone spoofs a message from
list1-owner to list2-owner and this matches a list2 reject rule.
Reject is sent from list2-owner (rejects come from -owner) to
list1-owner and this matches a list1 reject rule. Reject is sent from
list1-owner to list2-owner and we have a ping-pong loop.

If we're going to test sender, it would have to be something like

    if msg.get_sender().split('@')[0].endswith('-owner'):

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



More information about the Mailman-Developers mailing list