Hello,
I was seeing an odd behavior in a proxy-only configuration of dovecot. When a user entered an incorrect password in either IMAP or POP3, the Dovecot connection would be immediately dropped, sometimes with the auth failure message, sometimes without (a timing issue).
I believe I have tracked down the cause to the code commented out in the attached diff. It appears that the proxy handlers are giving the client the go-ahead to attempt authorization again and then dismantling the proxy session. I believe the correct behavior would be to allow LOGOUT or QUIT to end the session and do the tear-down in client_destroy. The commented code all gets executed (with more error checking) in client_destroy, so there shouldn't be any memory leaks that I can see.
Please advise if this seems correct or let me know of a different method of fixing. Thunderbird does 'Bad Things (tm)' when the connection is dropped without an authorization failed message... It doesn't re-prompt for the password and the user appears to have correctly authenticated, but the session just sits and no mail can be retrieved.
Thanks,
Bruce
Bruce M. Walter Senior Network Manager Rho, Inc 6330 Quadrangle Drive Suite 500 Chapel Hill, NC 27517 T: 919.408.8000 x332 F: 919.408.0999