This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: imaplib cannot handle mailboxes with ACL: lrs
Type: behavior Stage: test needed
Components: email, Library (Lib) Versions: Python 3.6, Python 3.4, Python 3.5, Python 2.7
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: barry, chaoflow, r.david.murray
Priority: normal Keywords: patch

Created on 2007-07-07 07:52 by chaoflow, last changed 2022-04-11 14:56 by admin.

Files
File name Uploaded Description Edit
python-imaplib.patch chaoflow, 2007-07-07 07:52
Messages (2)
msg32455 - (view) Author: Florian Friesdorf (chaoflow) Date: 2007-07-07 07:52
The imaplib in python 2.4 and 2.5 is not able to handle a mailbox with ACL set to lrs correctly, as it treats it the same as a mailbox opened with EXAMINE. A mailbox with lrs can save \Seen flags, a mailbox opened with EXAMINE cannot.

The attached patch is giving a proposal on how to fix it.

The current select raises an exception, in case the server tells READ-ONLY in a response. However, for lrs this is the case, but nevertheless, it is possible to save per-use state information.

With the patch this is not the case anymore. A readonly exception is only raised in case of an lr mailbox, as that is an equivalent to a mailbox opened with EXAMINE, i.e. select(..., readonly=True). A READ-ONLY in the response to a select is saved in self.is_readonly. Programs who relied on an exception being raised during select, would now need to query that variable.

In case the state was not READ-ONLY during select, but becomes at some later point during command execution, still a readonly exception is raised.

The patched imaplib was tested successfully with a slightly adapted offlineimap.
msg116701 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2010-09-17 18:19
@Florian this won't go anywhere unles the patch includes doc and unit test changes.
History
Date User Action Args
2022-04-11 14:56:25adminsetgithub: 45154
2015-10-24 14:59:22serhiy.storchakasetnosy: + barry, r.david.murray
components: + email
2015-10-24 14:58:26serhiy.storchakasetversions: + Python 3.4, Python 3.5, Python 3.6, - Python 3.1, Python 3.2
2014-02-03 19:43:17BreamoreBoysetnosy: - BreamoreBoy
2010-09-17 18:19:13BreamoreBoysetnosy: + BreamoreBoy
messages: + msg116701
2010-07-10 15:48:32BreamoreBoysetcomponents: + Library (Lib), - Extension Modules
versions: + Python 3.1, Python 2.7, Python 3.2, - Python 2.6
2009-04-06 10:32:01ajaksu2setkeywords: + patch
stage: test needed
type: behavior
versions: + Python 2.6
2007-07-07 07:52:44chaoflowcreate