#480 IMAPproxy connection cleanup



in our setup we had a problem with imapproxy. The problem occurs if a user cancels a attachment download within squirrelmail. After that all folder seems empty and the user has to wait the configured time until imapproxy closes the connections. Debugging the situation we found out, that imapproxy preserves the closed connection and continue to send the attachment data within the next imap connection.

I have prepared a series of two patches to fix this issue:

The first patch renames the ICC_Logout function to ICC_Set_Logout_Time, that accepts a third parameter, that is the value to set the logouttime to. ICC_Logout is a simple wrapper of that function to set the logout time time to the current time (the same behavior as before).

The second patch closes the connection to the server (by setting the logouttime to 1) if an error occurs in the Raw_Proxy method (returning a status code less than 0). This is exactly the case if the client does close the connection within a transfer. The error that occurs is a write error on the closed client fd. If no error occurs the logouttime is set to the current time exactly as before.

The two patches fixes the problem for our setup.



  • Alexander

    Alexander - 2012-11-01
    • summary: IMAPproxy --> IMAPproxy connection cleanup
  • Paul Lesniewski

    Paul Lesniewski - 2012-11-01

    Hello. Thanks very much for your help/contribution. Personally I am walking out the door without time to review this, but wanted to make sure you were testing with the current SVN snapshot and not the last release. Is the patch against SVN?

    Thank you!


Log in to post a comment.