View previous topic :: View next topic |
Author |
Message |
gentoome Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
![](images/avatars/gallery/Monkey Island/Monkey_Island_-_Lechuck.gif)
Joined: 18 Jul 2005 Posts: 78
|
Posted: Wed May 17, 2006 9:37 am Post subject: postgres + spamassassin woes |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
bin-doph Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/19876762173f66421e4e903.gif)
Joined: 23 May 2003 Posts: 302
|
Posted: Fri May 19, 2006 2:00 pm Post subject: Re: postgres + spamassassin woes |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
bin-doph Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/19876762173f66421e4e903.gif)
Joined: 23 May 2003 Posts: 302
|
Posted: Fri May 19, 2006 2:01 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
gentoome Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
![](images/avatars/gallery/Monkey Island/Monkey_Island_-_Lechuck.gif)
Joined: 18 Jul 2005 Posts: 78
|
Posted: Sun May 21, 2006 11:03 am Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
|