Listadmin: command line mailman moderator queue manipulation
September 12th, 2007 edited by lucasArticle submitted by Kaerast. We are running out of articles ! Please help DPOTD and submit good articles about software you like !
You’ve ended up moderating many Mailman lists across multiple servers, you’re losing track of what you’re moderating, the emails asking you to moderate posts are either filling up your inbox or getting ignored. Luckily there’s a command line tool which will make your life much easier.
Listadmin is a command line tool to manipulate the queues of messages held for moderator approval by mailman. It is designed to keep user interaction to a minimum, in theory you could run it from cron to prune the queue. It can use the score from a header added by SpamAssassin to filter, or it can match specific senders, subjects, or reasons.
It can handle multiple list servers, using multiple passwords, and in more recent versions can cope with SSL too. To get started you need to edit the .listadmin.ini file in your home directory. Mine looks something like this:
username [email protected] spamlevel 8 default skip # example.org server adminurl https://{domain}/cgi-bin/mailman/admindb/{list} password "mypassword" [email protected] [email protected] [email protected] # example.com server adminurl https://{domain}/mailman/admindb/{list} password "myotherpassword" [email protected] password "mythirdpassword" [email protected]
This config files allows us to moderate queues on multiple lists using multiple passwords. With this configured, we can now run listadmin:
kaerast@bennet:~$ listadmin fetching data for [email protected] ... nothing in queue fetching data for [email protected] ... nothing in queue fetching data for [email protected] ... nothing in queue fetching data for [email protected] ... nothing in queue fetching data for [email protected] ... [1/1] ============== [email protected] ======================= From: [email protected] Subject: test Reason: Post by non-member to a members-only list Spam? 0 Approve/Reject/Discard/Skip/view Body/Full/jump #/Undo/Help/Quit [S] ? r Why do you reject? test messages aren’t allowed Submit changes? [yes]
Newer versions, ie. those in Lenny and Sid can also add and remove members from a list:
kaerast@hiro:~$ listadmin --add-member [email protected] [email protected] Ok
Listadmin is available in Ubuntu Feisty (universe) and all Debian versions. Only Debian Lenny and Sid have the add/remove subscribers functionality added.