Hello all. Just about to migrate from courier to dovecot, and figured I would as well try and get this working so I could use non plaintext mechanisms as well. I would like to offer at least: plain login digest-md5 cram-md5 and maybe more Everything works but this and have a testdb in sql with passwords like userid, password But get "Password query returned multiple matches" which indicates it doesnt try using any prefix and just get a hit on all "passwords" for that user. Is there any variable I can use in the sql query to use an extra field that contains the password type? plain and login should be stored in some crypted form, probably as md5 or sha256 hashes. Thankful for any insight into this...
On Tue, 2008-08-26 at 13:42 +0800, R A wrote:> Is there any variable I can use in the sql query to use an extra field > that contains the password type?You could use %m which expands to the used mechanism name. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 197 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20080826/5b1ca035/attachment-0002.bin>
Hi again. Ok, tested now with 1.1.2 and also a nightly build with 1.2-UNSTABLE to make sure it isnt too old. password query to talk to database in dovecot-sql.conf is: password_query = SELECT id as user, passwd as password FROM passwds WHERE id = '%u' AND model = '%m' This constantly fails and %m is always empty according to sql logs. auth-worker is given the information about mechanism, so seems like the %m just isnt used? Any ideas? /Roger Timo Sirainen wrote:> On Tue, 2008-08-26 at 13:42 +0800, R A wrote: > >> Is there any variable I can use in the sql query to use an extra field >> that contains the password type? >> > > You could use %m which expands to the used mechanism name. > >