<<< Date Index >>>     <<< Thread Index >>>

Re: Mutt and Spamassassin



* Chris Willard <chris@xxxxxxxxxxxxxxxxx> wrote:

> I am getting on OK apart from one little problem.  I am using
> SpamAssassin to identify spam. I have been looking for a way to
> remove the SpamAssassing markup from a reveived mail but can not
> find a simple solution. All I would like to do is press a key on a
> non-spam and have the spam markup removed.

Do you mean just the headers inserted by SA or those (rather
annoying) modifications of subjects like *****SPAM*****? I'm not
using SA anymore, so some SA-guru will most likely have a better
solution.


> I can see that I need to assign a key to run spamassassin -d and
> somehow pipe the email through it!

My macro definitions from back then when I used SA, most likely I got
the info from this list :-)


# Pressing a key will do this in the index:
# S (shift-s): Learn the message as spam; Copy message to spam
#              mailbox; Mark the (original) message to be deleted.
# H (shift-h): Learn the message as ham (_not_ spam)
# E (shift-e): Re-build the SpamAssassin database

# Bind a spam macro to do this for us:
#       1) Pipe the spam to sa-learn without rebuilding the database
#       2) Copy the message to the spam folder
#       3) Delete the message from the original folder
macro index S '<enter-command>unset
wait_key<enter><pipe-message>sa-learn -- spam --no-rebuild -D >>
~/Mail/.sa-learn.log 2>&1 &<enter><copy-message>~/Mail/in.spam/
<enter><enter><delete-message><enter-command>set wait_key=yes<enter>'
"pipe spam to sa-learn"

# now make another set, but for ham (not spam) messages.
# tell sa-learn to learn ham message. dont delete it or move it.
macro index H '<enter-command>unset
wait_key<enter><pipe-message>sa-learn -- ham --no-rebuild -D >>
~/Mail/.sa-learn.log 2>&1 &<enter><enter-command>set
wait_key=yes<enter>' "pipe no-spam msg to sa-learn"

# a macro that tells SA to rebuild its database
macro index E '<enter-command>unset wait_key<enter><shell-escape>sa-learn --
rebuild -D >> ~/Mail/.sa-learn.log 2>&1 &<enter><enter-command>set
wait_key=yes<enter>' "rebuild spam db"

HTH a bit...

-- 
left blank, right bald

Attachment: pgpTVK6ej326m.pgp
Description: PGP signature