imap deadlock bug in 0.7.65

Alan Batie alan at peak.org
Fri Apr 23 05:12:57 MSD 2010


At line 729 of ngx_mail_proxy_module.c, there is this check for how much
data was received from an imap server response:

    if (b->last - b->pos < 5) {
        return NGX_AGAIN;
    }

Our zimbra server, oddly enough, running nginx itself, returns "+ \r\n"
in response to the initial phase of a login.  As this is only 4
characters, nginx goes back for more, only there isn't any more coming,
resulting in a timeout.  Changing 5 to 4 fixes the problem, though
probably a "MIN_IMAP_RESPONSE" define would probably be better.




More information about the nginx mailing list