You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Brian Wong <bw...@gmail.com> on 2005/09/19 20:39:52 UTC

Bayes configuration syntax error?

When running sa-learn with debugging I get 

[28037] dbg: bayes: using username: amavisd
[28037] dbg: bayes: unable to connect to database: missing "=" after
"spamassassin:pgsql.domain.tld" in connection info string
[28037] dbg: config: score set 1 chosen.
[28037] dbg: learn: initializing learner
[28037] dbg: bayes: bayes journal sync starting
[28037] dbg: bayes: bayes journal sync completed
[28037] dbg: bayes: expiry starting
[28037] dbg: bayes: unable to connect to database: missing "=" after
"spamassassin:pgsql.domain.tld" in connection info string
[28037] dbg: bayes: expiry completed

My bayes configuration in /etc/mail/spamassassin/local.cf

use_bayes 1
use_bayes_rules 1
bayes_auto_learn 1

bayes_sql_override_username amavisd
bayes_store_module Mail::SpamAssassin::BayesStore::PgSQL
bayes_sql_dsn DBI:Pg:spamassassin:pgsql.domain.tld
bayes_sql_username spamassassin
bayes_sql_password <password>

Can someone please point out what is wrong with my DSN?

Re: Bayes configuration syntax error?

Posted by Michael Parker <pa...@pobox.com>.
Brian Wong wrote:

>bayes_sql_override_username amavisd
>bayes_store_module Mail::SpamAssassin::BayesStore::PgSQL
>bayes_sql_dsn DBI:Pg:spamassassin:pgsql.domain.tld
>bayes_sql_username spamassassin
>bayes_sql_password <password>
>
>Can someone please point out what is wrong with my DSN?
>
>  
>
You should read the documentation for the DBD::pg driver.  The DSN
syntax for DBD::Pg uses key=value pairs.  So it should be something like
dbname=pgsql.domain.tld, but that is off the top of my head so double
check the docs to be sure.

Michael