[dev] Performance issues with IMP git

Michael M Slusarz slusarz at horde.org
Thu Jan 8 19:04:21 UTC 2009


Quoting Jan Schneider <jan at horde.org>:

> S (1231438991,2811): * OK [CAPABILITY IMAP4 IMAP4rev1 LITERAL+ ID
> STARTTLS AUTH=PLAIN SASL-IR] neo Cyrus IMAP4 v2.3.11 server ready
> C (1231438991,2817): 1 AUTHENTICATE PLAIN

Looking at this a bit deeper, another issue is why SASL-IR  
authentication is not being used?  If SASL-IR is supported, we should  
be sending a '1 AUTHENTICATE PLAIN *AUTHDATA*' request.

A-ha.  Looks like the issue has to do with caching of the capability  
string.  Reading the RFC's, it is clear that the server does not have  
to send a full list of capabilities before the user is authenticated.   
If this is the case, the server MUST send the full list once  
authenticated.  However, it is a bit unclear whether this full  
capability list must include ALL capabilities of the server (as every  
IMAP server I know of except Cyrus does) or only a list of  
capabilities not associated with authentication (as Cyrus does).  Even  
though I think the way Cyrus does it is incorrect, that is irrelevant  
for purposes of writing a client to interact.

So once we login, and Cyrus automatically sends the capability list as  
part of the response to the authentication list, we grab this list  
because we are assuming it to be the full list.  When the Imap ob is  
cached, this is the list that is used the next time it is  
unserialized.  We ignore the capability list given by the server on  
initial connect (since we already have the list of capabilities).   
Since the list doesn't include SASL-IR, this is why we default to  
regular authentication mode.  Still doesn't explain why the server is  
hanging there, but solves the issue why SASL-IR is not being used.

This would explain why the test script works fine but IMP doesn't (due  
to the serialization).  Try the fix I just committed to Socket.php.

michael

-- 
___________________________________
Michael Slusarz [slusarz at horde.org]



More information about the dev mailing list