[ Bill Houle writes: ]
> I recently posted a patch to majordomo-users for 1.94.4 that would add
> subscribe/nosubscribe regexp arrays to the config:
> Addresses matched in the "nosubscribe" array would be bounced to the
> owner for approval, even if the list policy was "auto". This gives an
> easy way to establish a "ban" list.
> The "ban" function would be really cool if it allowed negated regexps.
> "Ban if thisdomain or thatdomain" can get messy when all you want to
> say is "ban if NOT mydomain.com".
> What I was wondering was, given the potential security problems we
> had earlier with the regexp eval for advertise/noadvertise (subsequently
> fixed by Oliver & Dave), what would be the safest way to code this
> negation feature into the eval loops?
Aside from the fact that if you have both subscribe and nosubscribe
regex lists, you already have a negation capability, Jason and I tried
this once for the taboo regexes but ran into serious problems because
of the implicit ORing of each regex (we didn't want to double all the
taboo lists to accomplish negation). It's fine for a single regex, but
it doesn't scale. It evaluates to "not A or not B", when what you really
want is "not A and not B". We tried coming up with things like grouping
and combination syntax, but finally agreed that it was better to leave
1.9x alone and do it right in Mj2.