On Tue, Aug 23, Carsten Hoeger wrote: > I'm unable to do a successfull PLAIN authentication with timsieved on > cyrus-imapd 2.2 (tried with 2.2.3 and 2.2.12).
[...] Well, I found the culprit. My test user did not have a mailbox and therefor timsieved was unwilling to perform. Unfortunately, there's no hint to the real problem nowhere. Additinally, there's a bug in timsieved/parser.c. There's this code: r = mboxlist_detail(inboxname, &type, &server, NULL, NULL, NULL); if(r) { /* mboxlist_detail error */ *errmsg = "mailbox unknown"; return FALSE; } Problem: 1. errmsg now contains a usefull error message, but this message does not reach anybody. 2. the old sasl will be reused without beeing cleared. That's why I see this message in the log: "attempting server step after doneflag" and then the server segfaults Attached is a patch, that does the following: 1. log the "mailbox missing" information to syslog 2. reset the sasl connection The patch applies against 2.2.12. I'll also open a bug in bugzilla.andrew.cmu.edu. -- With best regards, Carsten Hoeger
--- timsieved/parser.c +++ timsieved/parser.c 2005/08/24 09:14:42 @@ -664,8 +664,14 @@ if(r) { /* mboxlist_detail error */ - *errmsg = "mailbox unknown"; - return FALSE; + syslog(LOG_ERR, error_message(r)); + + if(reset_saslconn(&sieved_saslconn, ssf, authid) != SASL_OK) + fatal("could not reset the sasl_conn_t after failure", + EC_TEMPFAIL); + + ret = FALSE; + goto cleanup; } if(type & MBTYPE_REMOTE) {
pgpa4YCJtODiF.pgp
Description: PGP signature
---- Cyrus Home Page: http://asg.web.cmu.edu/cyrus Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html