[Mailman-Users] mutt script / macro for mailman moderation?

William Yardley mailman at veggiechinese.net
Mon Jul 24 21:36:17 CEST 2006


In case it's helpful to anyone, I put the first draft of a little script
for mutt to simplify moderation tasks. Feedback welcome. Thought I'd
post here in case it's useful to anyone.

http://veggiechinese.net/mutt_mailman_approve.txt

It's a perl script; it requires File::Copy, File::Temp and
Term::ReadLine, which should all be pretty standard, I think. I'm sure
it could be done in other languages too... this is just how I ended up
doing it.

Basically, to use this for approving / rejecting messages from the
Mailman list manager, setup macros for the pager / index like the
following:

 macro index M ":set editor=~/bin/mutt_mailman_approve.pl<enter> \
<view-attachments><last-entry><search-reverse>message/rfc822<enter> \
<reply><send-message>:set editor=\"vim +'/^$/+2'\"<enter><exit>"

(where ~/bin/mutt_mailman_approve.pl is the path to the script)
- replacing "vim ...." with your normal editor.

This macro doesn't work quite perfectly if you try and use it on a
message that isn't a Mailman confirm message, if the message is a
single-part one. Let me know if you come up with an improved version of
this macro.

You could also presumably use message-hooks so that just hitting "r"
would run this. It would be pretty easy to allow it to take a password
as the second argument; in my case, I am the site admin for all of the
lists I moderate, but I guess things could get a little more complicated
if you moderate a lot of lists with different passwords.

w




More information about the Mailman-Users mailing list