[Mailman-Users] Change All Members to nomail

Mark Sapiro msapiro at value.net
Wed Feb 7 17:20:10 CET 2007

Karl Zander wrote:
>Is there a command I can run to change all members of a 
>list to a "nomail" setting?  And then change it back?  I 
>didn't see anything in the FAQ.  I do have root access on 
>the server.  Running MM 2.1.8.

You can do this with bin/withlist, but there are complications
depending on what you want to do with members who are already set to
nomail by themselves or by bounce or even by admin.

There is a nomail by unknown reason which is a conversion of a Mailman
2.0 nomail status that didn't have an associated reason. So I would
set all currently enabled members to nomail by unknown and then later
set the nomail by unknown members back to enabled, thus leaving the
admin, bounce and user settings alone.

To do this go to <http://veenet.value.net/~msapiro/scripts/> or
<http://fog.ccsf.edu/~msapiro/scripts/> and get the reset_bounce.py
script. Then find the lines

        if mlist.getDeliveryStatus(member) == MemberAdaptor.BYBOUNCE:
            mlist.setDeliveryStatus(member, MemberAdaptor.ENABLED)
            count += 1

and change them to

        if mlist.getDeliveryStatus(member) == MemberAdaptor.ENABLED:
            mlist.setDeliveryStatus(member, MemberAdaptor.UNKNOWN)
            count += 1

and run the script under withlist as described in the text at the front
of the script.

Then to set delivery back, change the lines to

        if mlist.getDeliveryStatus(member) == MemberAdaptor.UNKNOWN:
            mlist.setDeliveryStatus(member, MemberAdaptor.ENABLED)
            count += 1

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