Hi,
I noticed someone else is also having this problem, but I couldn't see
any solution suggested, so I thought I'd post what I've found so far:
I'm currently using PostgreSQL 7.2.3 and Courier IMAP 1.6.1.
I can't seem to get the authpgsql module to successfully connect to my
PostgreSQL database, when the pg_hba.conf entry for the connection
requires an MD5 password.
I created the DB user and specified to use encrypted passwords, so for
me, trying 'password' or 'crypt' authentication methods won't work, I
get messages logged on the DB stating this. (This differs from what the
other poster mentions).
I've briefly tried setting the pg_hba.conf entry to 'trust' and it all
works fine, I can log in to IMAP, webmail, etc.
I can use the psql CLI tool and get into the database fine, with the
same user/password, and triggering the same pg_hba.conf entry.
There's definetly only one set of libpq libraries on the system, and
PHP/Horde is having no problems connecting to the same database server
using a similar pg_hba.conf entry with MD5 authentication.
I've tried enabling some of the debug in the authpgsqllib.c and it is
getting the correct password from authpgsqlrc as far as I can see.
I also tried changing the PQsetdbLogin() to PQconnectdb() as a last
resort but that made no difference to the situation.
I'm now a tad confused as to why this doesn't work when all of the
connection information appears to be correct.
Matt