Issue 18921: In imaplib, cached capabilities may be out of date after login
Issue18921
Created on 2013-09-04 14:27 by sjmurdoch, last changed 2022-04-11 14:57 by admin.
| Messages (4) | |||
|---|---|---|---|
| msg196920 - (view) | Author: Steven Murdoch (sjmurdoch) | Date: 2013-09-04 14:27 | |
When an IMAP server is behind a proxy, the proxy's capabilities may differ from that of the actual IMAP server. However, in Python imaplib, the client will ignore any updates to available capabilities in the response to the LOGIN command (see rfc3501, section 6.2.3). As a result, imaplib will incorrectly assume that certain features are not available (including the IDLE patch in issue 11245, and as implemented in getmail 4.43.0). imaplib should refresh its capability list either based on the result of the login command or by explicitly sending a CAPABILITY command following login. |
|||
| msg196925 - (view) | Author: R. David Murray (r.david.murray) * ![]() |
Date: 2013-09-04 15:17 | |
I agree that this would be a good idea, but it is not a bug in the current implementation. The only place imaplib itself uses the cached capabilities is *before* login, in the starttls method, and there it refreshes it after starttls succeeds. Although it isn't documented any more than the 'capabilities' attribute is (and therefor neither are part of the public API currently), you can call the capability command yourself if you need the refreshed capabilities in your own code. Good catch on the bug in the IDLE patch, though. |
|||
| msg315573 - (view) | Author: Matej Cepl (mcepl) * | Date: 2018-04-21 18:23 | |
Well, and would it be too much to refresh capabilities attribute in the end of login method? |
|||
| msg321954 - (view) | Author: STINNER Victor (vstinner) * ![]() |
Date: 2018-07-19 11:59 | |
See also bpo-33327: Add a method to move messages to IMAPlib. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:57:50 | admin | set | github: 63121 |
| 2018-07-19 11:59:03 | vstinner | set | nosy:
+ vstinner messages: + msg321954 |
| 2018-04-21 18:23:55 | mcepl | set | nosy:
+ mcepl messages: + msg315573 |
| 2014-12-30 09:52:03 | pitrou | set | versions: + Python 3.5, - Python 3.4 |
| 2013-09-04 15:18:59 | r.david.murray | link | issue11245 dependencies |
| 2013-09-04 15:17:11 | r.david.murray | set | versions:
- Python 2.6, Python 3.1, Python 2.7, Python 3.2, Python 3.3, Python 3.5 nosy: + r.david.murray messages: + msg196925 type: behavior -> enhancement |
| 2013-09-04 14:27:30 | sjmurdoch | create | |
