Hi, I'm having issues getting the multiple authentication methods of dovecot 1.0-test65 to work correctly on NetBSD. I am combining a MySQL database of virtual host accounts with the system password database of local machine accounts. Both work correctly when enabled on their own, but when enabled together only the one listed first in the "auth default" section of dovecot.conf works - the other logs the following error (line 5 below): Mar 29 21:56:50 rivendell dovecot: Dovecot v1.0-test65 starting up Mar 29 21:56:51 rivendell dovecot: auth(default): mysql: Connected to 127.0.0.1 (maildomains) Mar 29 21:56:51 rivendell dovecot: auth-worker(default): mysql: Connected to 127 .0.0.1 (maildomains) Mar 29 21:57:05 rivendell dovecot: auth-worker(default): BUG: PASSV had invalid passdb num Mar 29 21:57:38 rivendell dovecot: Killed with signal 2 To the client, dovecot locks up when a LOGIN command is issued for a user which can't be authenticated using the first method available (in my case, passwd). So for me, /etc/passwd users can still log in ok, but dovecot will lock up whenever a login with any other username is attempted. Script started on Tue Mar 29 22:07:59 2005 [root at rivendell ttyp3 ~]# telnet localhost 143 Trying ::1... telnet: connect to address ::1: Connection refused Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. * OK Dovecot ready. . LOGIN timshel secret . OK Logged in. . LOGOUT * BYE Logging out . OK Logout completed. Connection closed by foreign host. [root at rivendell ttyp3 ~]# telnet localhost 143 Trying ::1... telnet: connect to address ::1: Connection refused Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. * OK Dovecot ready. . LOGIN timshel at shels.net secret <dovecot locks up> . LOGOUT ^] telnet> quit Connection closed. [root at rivendell ttyp3 ~]# telnet localhost 143 Trying ::1... telnet: connect to address ::1: Connection refused Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. * OK Dovecot ready. . LOGIN dummyuser dummypass <dovecot locks up again> ^] telnet> quit Connection closed. [root at rivendell ttyp3 ~]# Script done on Tue Mar 29 22:09:03 2005 My dovecot.conf file is attached - can anyone shed any light on this and help me get going? Cheers, Timshel -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: dovecot.conf URL: <dovecot.org/pipermail/dovecot/attachments/20050329/e6df8f5e/attachment-0001.pl>
On Tue, 2005-03-29 at 22:15 +1000, Timshel Knoll-Miller wrote:> Mar 29 21:57:05 rivendell dovecot: auth-worker(default): BUG: PASSV had > invalid passdb numThis should fix it: Index: auth-worker-client.c ==================================================================RCS file: /var/lib/cvs/dovecot/src/auth/auth-worker-client.c,v retrieving revision 1.6 diff -u -r1.6 auth-worker-client.c --- auth-worker-client.c 24 Mar 2005 22:35:37 -0000 1.6 +++ auth-worker-client.c 2 Apr 2005 21:18:33 -0000 @@ -128,7 +128,7 @@ auth_request->mech_password p_strdup(auth_request->pool, password); - for (; num > 0; num++) { + for (; num > 0; num--) { auth_request->passdb = auth_request->passdb->next; if (auth_request->passdb == NULL) { i_error("BUG: PASSV had invalid passdb num"); -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: <dovecot.org/pipermail/dovecot/attachments/20050403/b9a35a7a/attachment-0001.bin>
Thanks very much - I downloaded today's nightly source and it fixes the problem. Now I can use both my virtual domains and local users! Very nice! Faithfully, Timshel Timo Sirainen wrote:>On Tue, 2005-03-29 at 22:15 +1000, Timshel Knoll-Miller wrote: > > >>Mar 29 21:57:05 rivendell dovecot: auth-worker(default): BUG: PASSV had >>invalid passdb num >> >> > >This should fix it: > >Index: auth-worker-client.c >==================================================================>RCS file: /var/lib/cvs/dovecot/src/auth/auth-worker-client.c,v >retrieving revision 1.6 >diff -u -r1.6 auth-worker-client.c >--- auth-worker-client.c 24 Mar 2005 22:35:37 -0000 1.6 >+++ auth-worker-client.c 2 Apr 2005 21:18:33 -0000 >@@ -128,7 +128,7 @@ > auth_request->mech_password > p_strdup(auth_request->pool, password); > >- for (; num > 0; num++) { >+ for (; num > 0; num--) { > auth_request->passdb = auth_request->passdb->next; > if (auth_request->passdb == NULL) { > i_error("BUG: PASSV had invalid passdb num"); > > >