Listadmin: command line mailman moderator queue manipulation

September 12th, 2007 edited by lucas

Article 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:

spamlevel 8
default skip

# server
adminurl http://{domain}/cgi-bin/mailman/admindb/{list}
password "mypassword"

# server
adminurl https://{domain}/mailman/admindb/{list}

password "myotherpassword"

password "mythirdpassword"

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 ... nothing in queue
fetching data for ... nothing in queue
fetching data for ... nothing in queue
fetching data for ... nothing in queue
fetching data for ...

[1/1] ============== =======================
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

Listadmin is available in Ubuntu Feisty (universe) and all Debian versions. Only Debian Lenny and Sid have the add/remove subscribers functionality added.

Posted in Debian, Ubuntu |

Comments are closed.