Search

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:

username kaerast@example.org
spamlevel 8
default skip

# example.org server
adminurl http://{domain}/cgi-bin/mailman/admindb/{list}
password "mypassword"
users@lists.example.org
process@lists.example.org
admin@lists.example.org

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

password "myotherpassword"
supporters@lists.example.com

password "mythirdpassword"
staff@lists.example.com

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 users@lists.example.org ... nothing in queue
fetching data for process@lists.example.org ... nothing in queue
fetching data for admin@lists.example.org ... nothing in queue
fetching data for supporters@lists.example.com ... nothing in queue
fetching data for staff@lists.example.com ...

[1/1] ============== staff@lists.example.com =======================
From:     kaerast@dodgit.com
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 kaerast@example.com
process@lists.example.com
Ok

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.