[Mailman-Users] accept_these_nonmbers Regular Expression

Mark Sapiro mark at msapiro.net
Fri Apr 9 17:27:12 CEST 2010


Barry Finkel wrote:

>I have a question about regular expressions and
>accept_these_nonmembers.  If I want any address in
>
>     anl.gov
>or
>     example.com
>
>to be able to post, is this correct for the accept_these_nonmembers box?
>
>     ^.*anl\.gov
>     ^.*example\.com
>
>Do I need a "$" at the end of each regular expression?


No, you don't need a '$', but consider that "^.*anl\.gov" will not only
match all the addresses you want to match but also addresses such as
manl.governance at spammer.invalid spammer at zanl.gov and
spammer at anl.gov.cc. I suggest either

  ^.*[@.]anl\.gov$

if you want to also accept sub domains like mail.anl.gov or

  ^.*@anl\.gov$

if you don't.

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