[Mailman-Users] Blocking entire domains
Mark Sapiro
msapiro at value.net
Sat Jul 8 21:05:53 CEST 2006
Martin Dennett (Gmail) wrote:
>Would that also be applicable to, for example, addresses after the @
>where more than one option exists? I'm thinking of "ms*.hinet.net" -
>I've got a lot of banned members where the "*" is a number, and I don't
>fancy having to block ms1.hinet.net, ms2.hinet.net, ms3.hinet.net etc.
You don't have quite the right syntax for regular expressions (they're
not wildcards). See <http://docs.python.org/lib/re-syntax.html>.
The above example can be coded as
^.*@.*\.hinet\.net
The start of the string (^) followed by any character (.) zero or more
times (*) followed by @ followed by zero or more of anything (.*)
followed by a literal . (\.) followed by hinet followed by a literal .
(\.) followed by net followed by anything. This would match
abcxyz at ms3.hinet.net, asdfg at qwe.hinet.net.ca and many others.
It could also be
^[^@]+ at ms[0-9]\.hinet\.net$
The start of the string followed by at at least one (+) non @ character
([^@]) followed by @ms followed by a digit ([0-9]) followed by
.hinet.net followed by the end of the string.
It could also be many other regexps depending on how tight or loose you
want to be.
--
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-Users
mailing list