Code which supports cyrus SASL library (src/auth/mech-cyrus-sasl2.c) is broken. Following is the workaround patch for Dovecot Rel 0.99.11, and it worked fine on FreeBSD 4.10 BOX. It will not work with current development version. Application for that version might not be so difficult. Recently I found the CVS log which appeals that cyrus SASL support is discontinued. It's very sad. Regards Nobuaki ITO : banb@j-link.ne.jp --- src/auth/mech-cyrus-sasl2.c.orig Wed Jun 25 08:26:43 2003 +++ src/auth/mech-cyrus-sasl2.c Tue Oct 19 21:07:03 2004 @@ -39,6 +39,7 @@ struct auth_login_reply reply; const char *serverout; unsigned int serveroutlen; + const char *authenid, *default_realm; int ret; ret = sasl_server_step(cyrus_request->conn, data, request->data_size, @@ -55,6 +56,12 @@ reply.result = AUTH_LOGIN_RESULT_SUCCESS; cyrus_request->success = TRUE; + ret = sasl_getprop(cyrus_request->conn, SASL_USERNAME, (const void **) &authenid); + if (ret != SASL_OK || ! authenid) { + i_warning("sasl_getprop() failed: %s", sasl_errstring(ret, NULL, NULL)); + return FALSE; + } + serverout = mech_auth_success(&reply, auth_request, serverout, serveroutlen); } else { @@ -200,6 +217,8 @@ cyrus_sasl_auth_continue; cyrus_request->auth_request.auth_free = cyrus_sasl_auth_free; + + cyrus_request->conn = sasl_conn; reply.result = AUTH_LOGIN_RESULT_CONTINUE;