On Fri, 2004-08-27 at 11:23, Michael Parker wrote:
> On Fri, Aug 27, 2004 at 11:05:56AM -0500, Nick Bright wrote:
> > Greetings all,
> > 
> >  I am trying to set up SA3 with Bayes, User-Prefs, and AWL all stored in
> > a postgres database. I'm using a RedHat EL3 server for this application,
> > with the version of postgres that comes with RHEL3. I set up all the SQL
> > tables and such with the *.sql scripts in the SA3 distrib file, and SA's
> > local.cf according to the README's therein.
> > 
> > 
> >  When I send a message through the scanner, the following debug level
> > output is observed:
> > 
<log trimmed for brevity>
> >  
> > 
> > Starting from the top, I've examined this output to mean:
> > 
> > 1) SQL User-Prefs are being queried, but I don't know how to put
> > specific prefs in so I can't really test it (advice, please?).
> > 
> 
> insert into userprefs (username,preference,value) values 
> ('yourusername','required_score','15');
> etc etc etc
> 
Thanks, that should do nicely. I just tested it and it showed what it
should have, so my userprefs are certinly working.

> > 2) SQL Bayes is being queried, but not correctly. The log states "bayes:
> > Not available for scanning, only 0 spam(s) in Bayes DB < 200" but I've
> > used sa-learn to train in about 500 spams and about 500 hams, it should
> > be trained well enough to at least try working (I do see this
> > information in the database tables for bayes).
> > 
> 
> Are you sure you ran sa-learn as the same user who is receiving the
> mail?  What user does userid 4 correspond to in your bayes_vars table?
> 
I ran sa-learn as root. . . userid 4 corrisponds to the user I'm
submitting the test mail as, I see some other things in the table too.
In specific, I see root with the spam_count and ham_count I expected to
see.

I assume, then, that I am doing something wrong WRT bayes. I want all
bayes information to be global, for all users. Can this be accomplished?
I can't just have it always use the same username to run under, as I am
also doing user_prefs. . .

> > 3) AWL isn't using the SQL DB: "debug: open of AWL file failed: lock:
> > 19782 cannot create tmp lockfile
> > /home/vpopmail/.spamassassin/auto-whitelist.lock.sanford.19782 for
> > /home/vpopmail/.spamassassin/auto-whitelist.lock: No such file or
> > directory", however it should be using SQL for this. There are zero rows
> > on the awl table in postgres.
> 
> Did you set:
> auto_whitelist_factory Mail::SpamAssassin::SQLBasedAddrList
> ?

No as a matter of fact, I did not. I put that in my local.cf, and AWL in
SQL is now working. Perhaps that should be in the sql/README.awl file?

> > 
> > Note the lack of user_awl_table and user_scores_table, the default
> > values are being used (in fact, i had to remove it to make user_scores
> > work).
> > 
> 
> Odd, user_scores_table was removed, but it shouldn't have broken
> anything and user_awl_table should not interfere, can you confirm that
> this breaks things and submit a bug
> (http://bugzilla.spamassassin.org/) if it does?

I put the line back in, and the user pref still queried, I must have
been doing something else wrong that caused the problem. 

> 
> > 
> > What I'd like to get accomplish is to have AWL work through the database
> > properly, and get bayes to realize that there *is* stuff in the
> > database. sa-learn put it there, so spamd should be able to read it!
> > Also, what is the format I should use for user prefs in the database? Is
> > there a php application known that will put these prefs into postgres? I
> > googled around and didn't find one.
> 
> Does:
> http://www.peregrinehw.com/downloads/SpamAssassin/old/
> work for you?

I found that URI in my searching, but I saw only
"php-sa-mysql-<version>.tar.gz", so I assumed that it would only work
with MySQL and not PostgreSQL. The newest file is also more than a year
old, so I didn't think that it would work well and decided not to even
try it.

I noticed that if you go up one level, there is a much more recent
version of the php-sa-mysql available, but I don't see one for pgsql
still.

However, now that I know how to put the prefs into the DB, I should be
able to write my own php-sa-pgsql application, or beg someone I know to
do it for me :)

> 
> Michael
-- 
- Nick Bright
  Terraworld, Inc
  http://home.terraworld.net | 888-332-1616

Reply via email to