Re: macro for mailman moderation?
On Thu, Jul 20, 2006 at 05:31:02PM -0700, William Yardley wrote:
> 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>"
Couple questions:
1) When (accidentally) running on a message that is NOT a mailman
confirm message, and which has only one MIME part, this macro fails (you
end up getting
"Save to file: <exit>"
Any way around this?
2) My "quit" feature (from the script above) doesn't quite work. I
worked around it by making it rename the original message tempfile,
which confuses mutt and at least doesn't send the message. But how can I
make my script cause the editor to abort?
w