[Mailman-Developers] Moderation rules priority

Mark Sapiro mark at msapiro.net
Tue Mar 11 23:44:31 CET 2014


On 03/11/2014 03:14 PM, Barry Warsaw wrote:
> On Mar 11, 2014, at 06:25 PM, Aurelien Bompard wrote:
> 
>> What do you think about all that? Do you agree there's actually an
>> issue there? Any idea how to solve it? For example, make the NonMember
>> rule exit if a member is found amongst the senders (which would simply
>> be equivalent to making it yield to the Member rule). Bad idea?
> 
> Ah, an interesting case!  My immediate reaction is that nonmember-moderation
> should do exactly what you suggest: test for both membership and
> nonmembership.  If it's both, then return False as if the action were
> Action.defer.  This should allow the member-moderation rule to take
> precedence.
> 
> Can you think of a reason *not* to do this?


I think that's the right thing to do. In 2.1, a single module does both.
Addresses are tested from headers in a defined order, and the first
member address found determines the action. Only if no member address is
found, are non-member tests done.

I'm not sure about the architecture of the chain of rules, but maybe the
member-moderation rule could set a flag in the metadata to tell the
nonmember-moderation rule to take no action rather than testing for
membership, but this might be a bad idea as it would make the rules
order sensitive.

-- 
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-Developers mailing list