You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by ri...@naturecoast.net on 2005/04/27 16:55:48 UTC
SA-Learn
Hello everyone,
I'm wondering if anyone has setup something similar to, like an email
address of mails that are considered spam, and cron out sa-learn or pipe
to a program that will do the same?
Other ideas on ways to feed sa-learn are appreciated.
Re: SA-Learn
Posted by Chris Frederick <cd...@cdf123.net>.
ricker@naturecoast.net wrote:
> Hello everyone,
> I'm wondering if anyone has setup something similar to, like an email
> address of mails that are considered spam, and cron out sa-learn or pipe
> to a program that will do the same?
>
> Other ideas on ways to feed sa-learn are appreciated.
>
I use this over IMAP:
$ cat ~/bin/sa-learn.sh
#!/bin/bash
for file in `ls -1 ~/.maildir/.sa-learn.spam/cur/`; do
cat ~/.maildir/.sa-learn.spam/cur/$file | sa-learn --spam
rm -f ~/.maildir/.sa-learn.spam/cur/$file
done
for file in `ls -1 ~/.maildir/.sa-learn.ham/cur`; do
cat ~/.maildir/.sa-learn.ham/cur/$file | sa-learn --spam
rm -f ~/.maildir/.sa-learn.ham/cur/$file
done
$ crontab -e
0 * * * * ~/bin/sa-learn.sh
With the sa-learn.[spam|ham] folders, the "." makes them collapsible in
Thunderbird, so helps keep it a little cleaner. Then when I get a spam
mail from anyone that fails the SA rules, I just move it to the
sa-learn.spam folder.
You could do the same thing with a reply to a specific address (e.g.
spam@your.host) but that won't preserve the headers of the email. The
script above running on an IMAP server will preserve all your spam email
headers for SA to learn from.
This is a quick and dirty way to run sa-learn. It works for my personal
mail server, but if you want this to run on a larger scale, I'd
recommend editing the script to do something besides removing the spam
mail, and checking to make sure sa-learn didn't error out for some reason.
Hope this helps
Chris Frederick
Re: SA-Learn
Posted by "Brian R. Jones" <bj...@castlejones.net>.
ricker@naturecoast.net wrote:
> Hello everyone,
> I'm wondering if anyone has setup something similar to, like an email
> address of mails that are considered spam, and cron out sa-learn or pipe
> to a program that will do the same?
>
> Other ideas on ways to feed sa-learn are appreciated.
>
>
Yes, I wrote one for a Linux pop server. It's in the Wiki @
http://wiki.apache.org/spamassassin/BayesFeedbackViaForwarding
My company uses this in conjunction with netscape/Mozilla/thunderbird
and outlook. It doesn't work as well for outlook though, because no
matter what you do, outlook won't send the right header info.
There are some others as well, just search the wiki for sa-learn.
--
Brian R. Jones
Ob. tagline:
"I never follow the herd.
Even when it's going the right direction."