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

Re: sa-learn wihin muttrc keybindings



René Clerc <rene@xxxxxxxx> wrote:
| Hi,
| 
| * mess-mate <messmate@xxxxxxx> [19-05-2005 18:13]:
| 
| > i'm trying to insert a macro to get sa-learn (spamassassin) if a
| > message is spam like this:
| > macro index \e7 "!sa-learn --spam  --no-sync\n" "sa-learn as spam"
| > # spamassassin classify as ham
| > macro pager \e7 "!sa-learn --spam  --no-sync\n" "sa-lear as spam"
| > 
| > Anyone get it worked ?
| > Thanks for your help
| 
| A different approach:
| 
| I let spamassassin learn from within a cron job.  I just save every
| spam I encounter that is not already in my spam mailfolder, *to* that
| spam mailfolder, and run this shell script from within a nightly
| cronjob:
| 
| #!/bin/sh
| 
| echo "Running $0.."
| 
| sa-learn --no-sync --showdots --mbox --spam /home/rene/mail/spam
| sa-learn --sync
| 
| (this will produce output and thus send me a daily mail)
| 
| This means that I don't have to wait each time I encounter a spam in
| mutt, which, on my machine, can be annoying since it is slow.
| 
| Maybe this is of use to you.
| 
Thanks guys, but i've don this :
macro index \e8 "|sa-learn --ham --no-sync --single\n" "Learns mail
as NOTSPAM"
macro index \e7 "|sa-learn --spam --no-sync --single\ns=spam\n$"
"Learns mail as SPAM"
macro pager \e8 "|sa-learn --ham --no-sync --single\n" "Learns mail
as NOTSPAM"
macro pager \e7 "|sa-learn --spam --no-sync --single\ns=spam\n$"
"Learns mail as SPAM"

and works well.
This way the message is also saved in the spam folder :)


mess-mate                                
--
The camel died quite suddenly on the second day, and Selena fretted
sullenly and, buffing her already impeccable nails -- not for the first
time since the journey begain -- pondered snidely if this would dissolve
into a vignette of minor inconveniences like all the other holidays spent
with Basil.
                -- Winning sentence, 1983 Bulwer-Lytton bad fiction contest.