[Dovecot] From passwd-file to Postgresql database
Jonathan Ballet
multani at free.fr
Mon Aug 14 16:48:05 EEST 2006
Hello,
I have a working installation of Dovecot, which use passwd-file for both users
and passwords databases. My setup uses CRAM-MD5 for the authentification
mechanism and the password in my passwd-file was stored encoded with HMAC-MD5.
Now, I want to use Postgresql to replace those passwd-files. So I make the
necessary change in my dovecot.conf file :
=========================================
userdb sql {
args = /etc/dovecot/dovecot-sql.conf
}
passdb sql {
args = /etc/dovecot/dovecot-sql.conf
}
=========================================
In the dovecot-sql.conf file, I comment out the simplest query, and change the
default_pass_scheme to HMAC-MD5 (as in my previous setup).
I put my users from the passwd-file into my database, with the same user id, and
the same password (starting with {HMAC-MD5}) ...
... but it fails :( The log file says to me :
==========
dovecot: 2006-08-14 15:36:12 Info: auth(default): cram-md5(jon,xxx): password
mismatch
==========
I tried several other password schemes (DIGEST-MD5, PLAIN-MD5, PLAIN), but only
PLAIN seems to work (of course, I changed the password in the database
accordingly).
The documentation isn't very clear about this (or I don't find it ?) :
- in an "old" auth.txt, it is written that only PLAIN is supported, but I don't
knwo if I can trust it ?
- I've got an old dovecot-pgsql.conf (2004, maybe from dovecot 0.9x ?), which
said that supported scheme are "PLAIN, PLAIN-MD5, DIGEST-MD5, and CRYPT"
So, what I am doing wrong ? And what is correct (or not) in my previous search ?
Regards,
-- Jonathan
More information about the dovecot
mailing list