[Mailman-Users] Finding all unmoderated users in a list

D G Teed donald.teed at gmail.com
Wed Nov 19 21:38:50 CET 2008


Here is a solution I received from Jerry Stratton using withlist command
from the command line...

Create a file to use with "withlist".

==============snip=========================
from Mailman import mm_cfg
def unmoderated(mlist):
       memberCount = 0
       for member in mlist.getMembers():
               if not mlist.getMemberOption(member, mm_cfg.Moderate):
                       print member
                       memberCount = memberCount + 1

       print "Unmoderated members found:", memberCount
==============snip=========================

If this is called "queries.py", then you can use the following command to
list all unmoderated members of a mailing list:

withlist -r queries.unmoderated LISTNAME

Note that the file queries.py must be located in the home directory
of mailman (not in bin).

This is exactly what I needed.  Thanks to Jerry for this solution.

--Donald


More information about the Mailman-Users mailing list