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

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

D G Teed wrote:
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).
The above statement is not completely correct. It is true that if queries.py is located in Mailman's home directory, it will work, but it will also work if it is in the directory containing withlist (normally Mailman's bin directory).
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
participants (2)
-
D G Teed
-
Mark Sapiro