[Mailman-Users] Injecting a global reject into all lists
Steven Jones
Steven.Jones at vuw.ac.nz
Mon Jul 10 01:26:42 CEST 2006
Great thanks....!
:D
Regards
Steven
-----Original Message-----
From: Mark Sapiro [mailto:msapiro at value.net]
Sent: Monday, 10 July 2006 10:14 a.m.
To: Steven Jones; Mailman - Users
Subject: Re: [Mailman-Users] Injecting a global reject into all lists
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