[Dovecot] Authentification with PostgreSQL

Felix.Schwarz at web.de Felix.Schwarz at web.de
Thu Jul 22 15:22:39 EEST 2004


Hi all,

I found Dag Wieers' Fedora Core 2 rpm on
http://dag.wieers.com/packages/dovecot/ and installed it. Now
dovecot-auth isn't complaining anymore about an unknown userdb type
but I can't get authentication working.

/etc/dovecot.conf
(...)
# Authentication process name.
auth = default
#   plain digest-md5 anonymous
auth_mechanisms = plain
auth_userdb = pgsql /etc/dovecot-pgsql.conf
auth_userdb = pgsql /etc/dovecot-pgsql.conf
auth_user = root
auth_verbose = yes
(...)

/etc/dovecot-pgsql.conf
connect = host=localhost dbname=xams-dovecot user=dovecot password=hallo
default_pass_scheme = PLAIN
password_query = SELECT password FROM users WHERE username = '%u'
user_query = SELECT home, uid, gid FROM users WHERE username = '%u'


If I try to login over imap (no ssl) with Mozilla Mail,
authentification will always fail (username: felix at schwarz-online.org,
password: "hallo").

/var/log/syslog
Jul 22 15:48:47 steinchen postgres[2057]: [30-1] DEBUG:  forked new backend, pid=2198 socket=10
Jul 22 15:48:47 steinchen postgres[2198]: [31-1] DEBUG:  Passwortpaket erhalten
Jul 22 15:48:47 steinchen postgres[2198]: [32-1] LOG:  Verbindung authorisiert: Benutzer=dovecot Datenbank=xams-dovecot
(...)
Jul 22 15:51:15 steinchen dovecot(pam_unix)[2210]: check pass; user unknown
Jul 22 15:51:15 steinchen dovecot(pam_unix)[2210]: authentication failure; logname= uid=0 euid=0 tty= ruser= rhost=

/var/log/dovecot.log
dovecot: Jul 22 15:48:46 Info: Dovecot starting up
dovecot-auth: Jul 22 15:51:18 Info: PAM: pam_authenticate(felix at schwarz-online.org) failed: Authentication failure


$ psql -d xams-dovecot dovecot
xams-dovecot-> SELECT password FROM users WHERE username = 'felix at schwarz-online.org';
 password
----------
 hallo
 
xams-dovecot=> SELECT home, uid, gid FROM users WHERE username = 'felix at schwarz-online.org';
   home   | uid | gid
----------+-----+-----
 /home/fs | 500 | 500


What is wrong? Password encryption? Is there a possibility to see what
dovecot gets from Mozilla and what are the expected results of the sql
queries? I am stuck as I don't know exactely why authentification
failes...

thanks for your help
-- 
Felix




More information about the dovecot mailing list