Bruce Walter
2007-Jan-05 16:48 UTC
[Dovecot] Failed proxy auth drops connection for IMAP/POP3 proxy in 1.0-RC15
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
Bruce Walter
2007-Jan-05 16:50 UTC
[Dovecot] Failed proxy auth drops connection for IMAP/POP3 proxy in 1.0-RC15
Ahh, the joys of Friday... Diff now attached. - Bruce Bruce Walter wrote:> 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 -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: dovecot_proxy_connection_dropped.diff URL: <http://dovecot.org/pipermail/dovecot/attachments/20070105/085d0704/attachment.pl>