Steven Jones wrote:
>
>I want to ban a particular email address from all lists..
>
>eg
>
>[EMAIL PROTECTED]


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 -- [EMAIL PROTECTED]

-- 
Mark Sapiro <[EMAIL PROTECTED]>       The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan

------------------------------------------------------
Mailman-Users mailing list
[email protected]
http://mail.python.org/mailman/listinfo/mailman-users
Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py
Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-users/archive%40jab.org

Security Policy: 
http://www.python.org/cgi-bin/faqw-mm.py?req=show&amp;file=faq01.027.htp

Reply via email to