Good day,
I am having trouble getting dovecot to authenticate using postgresql. For some reason, it fails on a PAM error, although I have specified pgsql as authentication?
Here my setups:
dovecot.conf: -- snip-- (not sure if you need teh rest) auth = digest_md5 auth_mechanisms = plain digest-md5 auth_userdb = pgsql /etc/dovecot-pgsql.conf auth_passdb = pgsql /etc/dovecot-pgsql.conf auth_user = root
dovecot-pgsql.conf: connect = host=localhost dbname=postfix user=postfix password=postfix default_pass_scheme = MD5 password_query = SELECT password FROM mailbox WHERE username = '%u' user_query = SELECT '/var/spool/vmail/'||maildir AS home, uid, gid FROM mailbox WHERE username = '%u'
I get an authentication error trying to log in. It queries the database for the password, but it does not seem to query for user?
Logs: dovecot: dovecot-auth: Jul 05 05:14:41 Info: PAM: pam_authenticate(chrisj@topbilling.com) failed: Authentication failure
messages: Jul 5 05:14:39 tophat dovecot(pam_unix)[2928]: check pass; user unknown Jul 5 05:14:39 tophat dovecot(pam_unix)[2928]: authentication failure; logname= uid=0 euid=0 tty= ruser= rhost=
Any help will be greatly appreciated - the passwords are created using postfixadmin - I presume it is in MD5 format.
Kind regards Werner