Re: Mutt and Spamassassin
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Wednesday, June 7 at 05:56 PM, quoth Chris Willard:
> I can see that I need to assign a key to run spamassassin -d and
> somehow pipe the email through it!
So, the thing is that you're looking for a way to *edit* the message,
which is not particularly easy.
One way (that is not macro) is to use the <edit-message> function
(normally bound to "e") and use your editor (e.g. vim) to pipe the
message to spamassassin, save the message, and exit.
This, of course, points the way to how to do it in a more automated
fashion. The <edit-message> function uses the value of the $editor
setting, which you can twiddle in your macro. For example:
macro index S '<enter-command>set
editor="~/.unspam.sh"<enter><edit-message><enter-command>set
editor="$EDITOR"<enter>'
(all one line, of course)
Now of course the question is: what goes inside that script file,
~/.unspam.sh?
Perhaps something like this (I haven't tested this, but it should be
pretty close to correct):
#!/bin/sh
spamassassin -d < "$1" > "$1.tmp"
mv "$1.tmp" "$1"
Hope that helps.
~Kyle
- --
The test of our progress is not whether we add more to the abundance
of those who have much; it is whether we provide enough for those who
have too little.
-- Franklin D. Roosevelt
-----BEGIN PGP SIGNATURE-----
Comment: Thank you for using encryption!
iD8DBQFEhzfFBkIOoMqOI14RAkxKAKC1Nfw9HhY1lEAITJwIQA/UbwiXXgCg2khU
uIJn8maJavLaMVMcW84/VgA=
=/Rv1
-----END PGP SIGNATURE-----