[Mailman-Developers] Regexp filtering

Adam McGreggor adam-mailman at amyl.org.uk
Tue Mar 1 07:36:28 EST 2016


On Tue, Mar 01, 2016 at 04:37:16AM +0900, Stephen J. Turnbull wrote:
> Barry Warsaw writes:
> 
>  > IBan would need to have a flag which indicate whether the `email`
>  > is a literal address or a pattern.  I don't think it's worth having
>  > two separate interfaces/models, but we might want to rename `email`
>  > to something more generic (`pattern` would be fine, with the
>  > understanding that is_regexp=False means the pattern is a literal).
> 
> Are regexps sufficiently slow that *always* using a regexp would hurt
> performance?[1]  The model I really had in mind was to always use
> regexps, and have a flag in the UI (Postorius) to regexp-quote when
> the user wants a literal.

Or could we meet user expectations (real users, not geeks), and just
interpret * and ? (for example) as being regexp values, as well as
letting power users use more complicated regexps?

Essentially the two classes:

Simples:
    *@mail.ru
    *@*mail.ru
    ?????@mail.ru

Power-user:
    ^.*\+.*?\d{3,}@
    \.*j\.*o\.*e\.*b\.*l\.*o\.*w\.*+.*@gmail\.com

    and the sort we saw in the threads around bot subscriptions and
    regexps on Mailman-user?
    

Off the top of my head, the syntax would define if it's an absolute
address (foo at example.com) vs a regexp.

-- 
"I never make predictions. I never have, and I never will."
    -- Tony Blair


More information about the Mailman-Developers mailing list