[Mailman-Users] Injecting a global reject into all lists
Mark Sapiro
msapiro at value.net
Mon Jul 10 00:13:37 CEST 2006
Steven Jones wrote:
>
>I want to ban a particular email address from all lists..
>
>eg
>
>spammer at gmail.com
Save the following as bin/add_banned.py
cut here -----------------------------------------------
"""Add an email address or regexp to ban_list for all lists.
Save as bin/add_banned.py
Run via
bin/withlist -a -r add_banned -- <address_to_ban>
where <address_to_ban> is the actual email address or regexp
to be added to ban_list for all lists.
"""
def add_banned(mlist, address):
if not mlist.Locked():
mlist.Lock()
mlist.ban_list.append(address)
mlist.Save()
mlist.Unlock()
cut here -----------------------------------------------
and then run
bin/withlist -a -r add_banned -- spammer at gmail.com
--
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