Hi, I am currently installing doveot as POP and IMAP server, but I a have a few difficulties configuring it correctly. I use postgresql to store the user information. The passwords are stored SHA1 encrypted. Now I have the problem that dovecot isn't accepting the user. In dovecot-pgsql.conf I defined default_pass_scheme = SHA1 I am not quite sure about whether this is corrents, since it is not mentioned in the documentation, but it is mentioned in the wiki (under the name SHA) and it doesn't produce an error (as specifying SHA does). So I assume this is correct. But when I log in with a user I always geht the following log output: dovecot-auth: Dec 08 22:18:20 Info: PGSQL: Performing query: SELECT passwd FROM mailbox WHERE localpart = ?rwin' AND domainname ='poiu.de' dovecot-auth: Dec 08 22:18:20 Info: pgsql(erwin at poiu.de): Password mismatch imap-login: Dec 08 22:18:20 Info: Aborted login [82.82.66.4] dovecot-auth: Dec 08 22:18:20 Info: Login process 9 disconnected dovecot-auth: Dec 08 22:18:20 Info: Login process 9 connected dovecot-auth: Dec 08 22:18:20 Info: Login process 9 sent handshake: PID 22222 Is there a way to get a more excessive debugging? I already set auth_verbose and auth_debug to yes. Or does anyone have an idea what the problem can be here? Regards Marco -- It's better to be wanted for murder that not to be wanted at all. -- Marco Herrn _ ___ o ' (_)< _ _ _>(__'> o 0 (_X % >(_`> O o _; _;'7^'_ \;\ % (GnuPG/PGP-encrypted mail preferred) _;\ _.\ _.';;) ;,;_/; Key ID: 0x94620736 _ _'./_\('))_; );/\)}/`fsc
Hi Marco, The SQL query needs an apostrophe at the beginning of the localpart as well, this may be the problem. Regards Andrew On Wed, 2004-12-08 at 22:20 +0100, Marco Herrn wrote:> Hi, > > I am currently installing doveot as POP and IMAP server, but I a have > a few difficulties configuring it correctly. > > I use postgresql to store the user information. The passwords are > stored SHA1 encrypted. Now I have the problem that dovecot isn't > accepting the user. In dovecot-pgsql.conf I defined > default_pass_scheme = SHA1 > I am not quite sure about whether this is corrents, since it is not > mentioned in the documentation, but it is mentioned in the wiki (under > the name SHA) and it doesn't produce an error (as specifying SHA > does). So I assume this is correct. > > But when I log in with a user I always geht the following log output: > > dovecot-auth: Dec 08 22:18:20 Info: PGSQL: Performing query: SELECT > passwd FROM mailbox WHERE localpart = ?rwin' AND domainname ='poiu.de' > dovecot-auth: Dec 08 22:18:20 Info: pgsql(erwin at poiu.de): Password mismatch > imap-login: Dec 08 22:18:20 Info: Aborted login [82.82.66.4] > dovecot-auth: Dec 08 22:18:20 Info: Login process 9 disconnected > dovecot-auth: Dec 08 22:18:20 Info: Login process 9 connected > dovecot-auth: Dec 08 22:18:20 Info: Login process 9 sent handshake: PID 22222 > > Is there a way to get a more excessive debugging? I already set > auth_verbose and auth_debug to yes. > > Or does anyone have an idea what the problem can be here? > > Regards > Marco >-- Andrew Hutchings Systems Operator / Developer / Linux Guru Netserve Consultants Ltd. http://www.domaincity.co.uk/
On 8.12.2004, at 23:20, Marco Herrn wrote:> I use postgresql to store the user information. The passwords are > stored SHA1 encrypted. Now I have the problem that dovecot isn't > accepting the user. In dovecot-pgsql.conf I definedIn what exact SHA1 format? Salted or non-salted? Encoded to hex or base64? Dovecot's SHA1 is non-salted and base64 encoded. 1.0-test supports also salted ones. -------------- next part -------------- A non-text attachment was scrubbed... Name: PGP.sig Type: application/pgp-signature Size: 186 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20041209/c0bc9eb2/attachment-0001.bin>
On Thu, Dec 09, 2004 at 12:03:04AM +0200, Timo Sirainen wrote:> On 8.12.2004, at 23:20, Marco Herrn wrote: > > >I use postgresql to store the user information. The passwords are > >stored SHA1 encrypted. Now I have the problem that dovecot isn't > >accepting the user. In dovecot-pgsql.conf I defined > > In what exact SHA1 format? Salted or non-salted? Encoded to hex or > base64? Dovecot's SHA1 is non-salted and base64 encoded. 1.0-test > supports also salted ones.It is hex and non-salted. In fact the passwords are made by the python library and the following code: import sha sha.new('password').hexdigest() So the problem seems to be that dovecot is assuming base64 while mine are in hex. Is there a way to force dovecot to using hex encoded passwords? Regards Marco -- that you're not paranoid doesn't mean they aren't right behind you -- Marco Herrn _ ___ o ' (_)< _ _ _>(__'> o 0 (_X % >(_`> O o _; _;'7^'_ \;\ % (GnuPG/PGP-encrypted mail preferred) _;\ _.\ _.';;) ;,;_/; Key ID: 0x94620736 _ _'./_\('))_; );/\)}/`fsc