[Mailman-Users] Prevent user subscription based on word pattern
Mark Sapiro
mark at msapiro.net
Tue Apr 8 23:10:29 CEST 2014
On 04/08/2014 01:58 PM, Hung Phan wrote:
> Can we add email address into the Ban List based on word pattern?
Yes. You may put any valid Python regular expression beginning with ^ in
the ban list. It will be matched case-insensitively.
> If we want to prevent any emails that contain the word "sexy", will this
> works?
> *sexy*
No. Regular expressions are not the same as globs. What you would need
in that case is
^.*sexy.*
or simply
^.*sexy
since you don't care what comes after sexy. See
<https://docs.python.org/2/library/re.html>
All this assumes that what you mean by 'prevent any emails that contain
the word "sexy"' is prevent any addresses containing the word "sexy"
from subscribing to the list.
--
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