[Mailman-Users] Regexp for blocking addresses
Mark Sapiro
mark at msapiro.net
Thu Sep 24 21:05:17 CEST 2015
On 9/24/15 1:47 PM, Matthew Saltzman wrote:
>
> 1. Could someone show me the right syntax to catch all embedded
> dots in the part before the '+'?
^.*\..*\+.*@
for any domain or
^.*\..*\+.*@gmail.com$
for only gmail.com.
> 2. Is there a way to script removing all my experimentation from
> the ban lists on multiple mailing lists? Things are looking
> pretty cluttered by now on the privacy admin pages.
See the withlist script at
<https://www.msapiro.net/scripts/add_banned.py>. In that script, replace
the line
mlist.ban_list.append(address)
with
mlist.ban_list = []
For that script, you would still need to supply an 'address_to_ban'
argument even though it's ignored. You could make an even simpler
withlist script along the lines of
def init_ban_list(mlist):
if not mlist.Locked():
mlist.Lock()
mlist.ban_list = []
mlist.Save()
mlist.Unlock()
--
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