Help with sa-learn
Mike Burger
mburger at bubbanfriends.org
Mon Dec 27 19:59:17 UTC 2004
On Mon, 27 Dec 2004, Benjamin J. Weiss wrote:
> I've got my home email server running, with spamassassin's spamc being
> called via procmail. So far, so good. Now I'm trying to get bayesian
> filtering to work.
>
> I've only got four email accounts on my home server. I get a bunch of
> ham (email lists. :) ) and not much spam. My mom gets a bunch of spam,
> and not much ham. So, since the bayesian system needs both to learn the
> difference, I'd like to set it up so that a root cron job learns from
> all of our maildirs at night. Then, when procmail calls spamc, I'd like
> for the spamc/spamd to use the bayesian stuff that root learned.
>
> I hope that made sense. LOL
>
> From what I've been able to gather on the internet, I'll know when it's
> working because I'll start seeing BAYES_XX tests in the X-Spam-Status
> header, which I haven't seen. And I've run a few thousand emails
> through this thing now, so I'm beginning to wonder.
>
> Here's the cron job that I've been running at night:
>
<SNIP>
>
> Any ideas?
>
> Thanks!
When procmail runs/calls SA, it calls it as the user to which the mail is
being delivered, not as root. As a result, the root bayes database
doesn't enter into play.
Instead, your cron job should be run either A) as the user for whom you
wish to train the database or B) call the sa-learn through something like:
su user "-c sa-learn --ham/spam/etc /path/to/ham-spam-etc.file
--
Mike Burger
http://www.bubbanfriends.org
Visit the Dog Pound II BBS
telnet://dogpound2.citadel.org or http://dogpound2.citadel.org
To be notified of updates to the web site, visit
http://www.bubbanfriends.org/mailman/listinfo/site-update, or send a
message to:
site-update-request at bubbanfriends.org
with a message of:
subscribe
More information about the redhat-list
mailing list