3.61. How do I handle list moderation from the command-line?
Q: I've got a very big mailing list, or at least a list with a lot of messages held for moderation. The web interface is much too slow – I need a command-line tool that I can use. Can you help?
A: No such tool is currently provided out-of-the-box with Mailman. There are some things you can do to improve your situation, however:
In the posting by Skip Montanaro at http://mail.python.org/pipermail/python-announce-list/2004-June/003196.html, you will note a link to his "mmfold.py" script at http://orca.mojam.com/~skip/python/mmfold.py, which he uses to help moderate some of the lists that he manages on the python.org server. This is a tool that will use a web interface to grab the data from the server (as fast as the server can send it), then summarize the information and present to you a reduced interface that may be faster for you (via a command-line web client). If you run mmfold.py on the server where the list is hosted, you should have relatively few issues with the speed with which data is transmitted across the network, and the only real issue is likely to be how fast your command-line web client can page through all the queued messages.
However, even Skip's tool may be too slow for you, or you may be unable to use mmfold.py because your mailing list server uses a web server modification to cause all list interactions to be redirected to an HTTPS interface instead of HTTP (for security, such as outlined in FAQ 4.27 at 4.27 Securing Mailman's web GUI by using Secure HTTP-SSL), and your command-line web client doesn't support HTTPS. In this case, you may be able to make use of the "additional web administration tools" in FAQ 3.53 (see Additional web administration tools).
Alternatively, if it's an emergency and you want to just throw away all the currently held messages for a given list, then have the site administrator delete all the files in /usr/local/mailman/data/heldmsg-listname-*.pck (assuming that the Mailman data queue is in /usr/local/mailman/data, and that your list name is "listname"). When Mailman looks at the moderation queue next time, it will see that all the Python "pickle" files are gone, and will do any additional cleanup that is necessary. Note that list moderators don't usually have the necessary server command-line privileges necessary to delete these files – you will need to have someone with privileged site administrator access to perform this function.
We're still working on providing a better tool to handle this problem, one that you might be able to run on the command-line of the server and have it directly access the Python pickles, and which would completely skip all the web interaction issues.
We know that some of the larger Mailman installation sites have created such tools, we just need to get them to contribute their work back to the community.
See also: http://heim.ifi.uio.no/kjetilho/hacks/#listadmin .
Converted from the Mailman FAQ Wizard
This is one of many Frequently Asked Questions.