You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by "Paul R. Ganci" <ga...@nurdog.com> on 2005/10/16 20:53:41 UTC

Postgres Bayes Database

I was trying to convert my DBM bayes database to Postgres. I felt I was 
following the documention appropriately. I created a user/password 
combination. Created a database and then created the tables ala:

psql -U ganci -f bayes_pg.sql ganci_bayes

Then logged in as user ganci I tried to migrate the data to the Postgres 
data base via:

1.) sa-learn --backup >backup.txt
2.) Modified my /etc/mail/spamassassin/local.cf to include:

use_bayes               1
bayes_store_module      Mail::SpamAssassin::BayesStore::SQL
bayes_sql_dsn           DBI:Pg:dbname=ganci_bayes;host=localhost;
bayes_sql_username      ganci
bayes_sql_password      XXXXXXX

3.) sa-learn --restore -D backup.txt

The debug command shows the following:

[32010] dbg: bayes: using username: ganci
[32010] dbg: bayes: database connection established
[32010] dbg: bayes: found bayes db version 3
[32010] dbg: bayes: unable to initialize database for ganci user, aborting!

Why can I not "initialize database"? I am running 3.1.0 on a FC1 box if 
that matters.

-- 
Paul (ganci@nurdog.com)


Re: Postgres Bayes Database

Posted by "Paul R. Ganci" <ga...@nurdog.com>.
Paul R. Ganci wrote:

> [32010] dbg: bayes: unable to initialize database for ganci user, 
> aborting!
>
> Why can I not "initialize database"? I am running 3.1.0 on a FC1 box 
> if that matters.

I think the problem is due to an old Postgres. I just discovered that 
the Postgres bayes_pg.sql script fails. I have to look into updating the 
old version of Postgres and will see if that fixes the issue.

-- 
Paul (ganci@nurdog.com)