Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
postgres + spamassassin woes
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
gentoome
Tux's lil' helper
Tux's lil' helper


Joined: 18 Jul 2005
Posts: 78

PostPosted: Wed May 17, 2006 9:37 am    Post subject: postgres + spamassassin woes Reply with quote

Hi all,

I followed the gentoo-wiki's virtual mailhistong howto to the letter. Everything works like a charm except spamassassin's integration with postgres. I alwasy get the same error with spamassassin :

Code:
auto-whitelist: sql-based unable to connect to database (DBI:Pg:dbname=amavis_spamassassin:host=localhost:port=5432) : FATAL:  database "amavis_spamassassin:host=localhost:port=5432" does not exist


This, of course, means it can connect to the DB, because it does not exist. The thing is, it exists. I think it can't connect to the pgsql server itself, but I can't figure out why.

My secrets.cf reads as follows :
Code:

#(Tell Spamassassin to use MySQL for bayes data
bayes_store_module              Mail::SpamAssassin::BayesStore::SQL
bayes_sql_dsn                       DBI:Pg:dbname=amavis_spamassassin:host=localhost:port=5432
bayes_sql_username              amavis
bayes_sql_password              $pass

#(Tell Spamassissin to use MySQL for AWL data
auto_whitelist_factory          Mail::SpamAssassin::SQLBasedAddrList
user_awl_dsn                      DBI:Pg:dbname=amavis_spamassassin:host=localhost:port=5432
user_awl_sql_username           amavis
user_awl_sql_password           $pass


(Of course, $pass is replaced with my actual pasword !)

I checked the variables like a thousand time, and I can connect to the db with the psql command line tool.

I am completely lost, Help ! ;)

Thanks in advance,

Jonathan
Back to top
View user's profile Send private message
bin-doph
Guru
Guru


Joined: 23 May 2003
Posts: 302

PostPosted: Fri May 19, 2006 2:00 pm    Post subject: Re: postgres + spamassassin woes Reply with quote

gentoome wrote:
Hi all,

Code:
auto-whitelist: sql-based unable to connect to database (DBI:Pg:dbname=amavis_spamassassin:host=localhost:port=5432) : FATAL:  database "amavis_spamassassin:host=localhost:port=5432" does not exist


Code:

#(Tell Spamassassin to use MySQL for bayes data
...
bayes_sql_dsn                       DBI:Pg:dbname=amavis_spamassassin:host=localhost:port=5432

...
user_awl_dsn                      DBI:Pg:dbname=amavis_spamassassin:host=localhost:port=5432
...


Your DSN is wrong

it should be

Code:
DBI:Pg:dbname=amavis_spamassassin;host=localhost;port=5432


notice the semicolons instead of the colons after dbname & host.

hth
-fe
_________________
perl -e '$_=q;4a75737420616e6f74686572205065726c204861636b65720as;;for(s;s;s;s;s;s;s;s;s;s;s;s){s;(..)s?;qq qprint chr 0x$1 and \161 ssq;excess;}'
Back to top
View user's profile Send private message
bin-doph
Guru
Guru


Joined: 23 May 2003
Posts: 302

PostPosted: Fri May 19, 2006 2:01 pm    Post subject: Reply with quote

have a look at perldoc DBD::Pg for more information about that driver.
_________________
perl -e '$_=q;4a75737420616e6f74686572205065726c204861636b65720as;;for(s;s;s;s;s;s;s;s;s;s;s;s){s;(..)s?;qq qprint chr 0x$1 and \161 ssq;excess;}'
Back to top
View user's profile Send private message
gentoome
Tux's lil' helper
Tux's lil' helper


Joined: 18 Jul 2005
Posts: 78

PostPosted: Sun May 21, 2006 11:03 am    Post subject: Reply with quote

Thanks bin-doph, it was indeed the semi-colons. I think I need to buy glasses ! I was following the gentoo-wiki on virtual mailhosting, and I just checked, the syntax is correct there.

BTW, I love your sig !

-- Jonathan
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum