[issue18153] python imaplib - error 'unexpected repsonse'

R. David Murray report at bugs.python.org
Fri Jun 7 03:13:59 CEST 2013


R. David Murray added the comment:

I think that technically the server is out of spec with the RFC.  It isn't 100% clear, though since while the RFC says extra spaces are invalid, it also says that an untagged response is formed by "prefixing the token '*'", without otherwise mentioning it in the BNF.  So one assumes, based on the rest of the document, that a single space follows the '*', and anything else is invalid.

Now, the RFC says the server MUST reject malformed commands from the client, but does not speak to what the client should do given malformed responses from the server.  So, it might indeed be reasonable to "fix" imaplib to handle an arbitrary number of spaces after the '*'.

IMO Davmail should be fixed, though.  IMAP is a finicky protocol.

----------
versions: +Python 3.3, Python 3.4

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue18153>
_______________________________________


More information about the Python-bugs-list mailing list