You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Roy Sigurd Karlsbakk <ro...@karlsbakk.net> on 2004/09/06 14:21:48 UTC

using a global bayesian database?

hi

I've  started to train SA with some old mail (running slowly), and, 
running this as root, SA generates the database under 
/root/.spamassassin/

Can I have spamassassin update a common database for all users on the 
whole system somehow?

thanks

roy


Re: using a global bayesian database?

Posted by Ulysses Cruz <ul...@ucruz.org>.
OK,

It looks like I forgot to mention that you also have to change the permissions
on your global directory so that it is also world writable.
-- 
Ulysses S. Cruz						ulysses@ucruz.org
"If it wasn't for the voices in my head, I'd go insane from loneliness"
		-Me, Myself and I

Re: using a global bayesian database?

Posted by Roy Sigurd Karlsbakk <ro...@karlsbakk.net>.
> Actually, it it entirely possible to use a global bayes database if 
> you use
> procmail. Just add these lines to your /etc/mail/spamassassin/local.cf 
> file:

I don't use procmail, I use postfix with cyrus imap, but postfix can be 
set up to pipe through spamassassin so that's fine

> use_bayes               1
> bayes_path              /etc/mail/spamassassin/bayes
> bayes_file_mode         777
>
> Also make sure that everyone uses the '-C /etc/mail/spamassassin' 
> option on
> sa-learn, so that they update the correct database.

thanks

I just tried, but it loks like the bayes_* files aren't updated :(
see below

roy

engang:/etc/spamassassin# sa-learn -C $PWD --showdots --spam 
/var/spool/cyrus/mail/r/user/roy/spam/non-flagged/
...........................................
Learned from 42 message(s) (43 message(s) examined).
engang:/etc/spamassassin# ls -l bay*
-rw-rw-rw-  1 root root   176128 Sep  6 14:23 bayes_seen
-rw-rw-rw-  1 root root 42049536 Sep  6 14:23 bayes_toks
engang:/etc/spamassassin# date
Tue Sep  7 10:08:18 CEST 2004



Re: using a global bayesian database?

Posted by Ulysses Cruz <ul...@ucruz.org>.
On Mon, Sep 06, 2004 at 09:54:43AM -0600, Lucas Albers whispered:
> This depends on how SA is integrated with your mail server.
> if all incoming mail is run under the same account, then you have a a
> global database, if it runs under each user, with procmail for example
> then you do not.

Actually, it it entirely possible to use a global bayes database if you use
procmail. Just add these lines to your /etc/mail/spamassassin/local.cf file:

use_bayes               1
bayes_path              /etc/mail/spamassassin/bayes
bayes_file_mode         777

Also make sure that everyone uses the '-C /etc/mail/spamassassin' option on
sa-learn, so that they update the correct database.

One big advantage of this configuration is that while the common database is
the default option for all users, any user can override this and use their own
private database if they want.

Ulysses
-- 
Ulysses S. Cruz						ulysses@ucruz.org
"If it wasn't for the voices in my head, I'd go insane from loneliness"
		-Me, Myself and I

Re: using a global bayesian database?

Posted by Lucas Albers <ad...@cs.montana.edu>.
Roy Sigurd Karlsbakk said:
> Can I have spamassassin update a common database for all users on the
> whole system somehow?

This depends on how SA is integrated with your mail server.
if all incoming mail is run under the same account, then you have a a
global database, if it runs under each user, with procmail for example
then you do not.
their are many sa+mta solutions that allow this, I for example use
SA+mimedefang, which allows a global database.
Just check look up the different integration methods for SA that work with
your existing mail server.


-- 
Luke Computer Science System Administrator
Security Administrator,College of Engineering
Montana State University-Bozeman,Montana