[Mailman-Users] excessive bounces bug

Mark Sapiro msapiro at value.net
Sun Feb 19 07:28:17 CET 2006


Travis Derouin wrote:
>
>Cool, what's the best way of doing this?

Your earlier, rapid response with the number of bouncing members and
their domains leads me to believe you got that info with
bin/list_members, so here's a withlist script to do it.

--cut here-----------------------------------------------------
"""Enable delivery for all bouncing members.

Save as bin/reset_bounce.py

Run via

   bin/withlist -r reset_bounce <listname>

or

   bin/withlist -a -r reset_bounce

to do all lists.
"""

from Mailman import MemberAdaptor

def reset_bounce(mlist):
    if not mlist.Locked():
        mlist.Lock()
    count = 0
    for member in mlist.getMembers():
        if mlist.getDeliveryStatus(member) == MemberAdaptor.BYBOUNCE:
            mlist.setDeliveryStatus(member, MemberAdaptor.ENABLED)
            count += 1
    mlist.Save()
    mlist.Unlock()
    print 'List %s: Reset %d bouncing members.' % (mlist.real_name,
           count)
--cut here------------------------------------------------------

-- 
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