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.

Author char.nikolaou
Recipients char.nikolaou
Date 2011-11-21.17:04:18
SpamBayes Score 1.1829309e-09
Marked as misclassified No
Message-id <1321895059.52.0.840142009955.issue13446@psf.upfronthosting.co.za>
In-reply-to
Content
I would like to report a misbehaviour on the fetch command of imaplib when used with mailboxes that have been opened as read-only. In such cases, when you fetch a message (using for instance RFC822), the mail is not marked as read (i.e., the flag of the respective message is not set to 'seen'). I have only tested with IMAP over SSL with the server of my organization on which I don't have administration permissions and gmail.

System details
----------------
Python: 2.5, 2.6, 2.7.2, 3.0, 3.1, 3.2
Server: Cyrus IMAP4 v2.1.18 and imap.gmail.com

Pseudocode to reproduce the problem:
---------------------------------------
imap = imaplib.IMAP4_SSL(imap_server)
imap.connect(user, pass)
imap.select(mailbox, readonly=True)
imap.search(None, 'Unseen')
imap.fetch(mid, 'RFC822')
imap.close()
imap.logout()

After executing the above code, the message with id mid will not have been marked as read, while it should have been.

Other relevant information:
-----------------------------
Access List for my readonly mailbox: group:1 lrsw group:2 p group:3 lrsp group:4 lrswip group:5 lrswipd group:6 lrswipd group:7 lrsw group:8 lrsw group:9 p group:10 p group:11 lrsp group:12 lrsp group:13 lrswip group:14 lrswip group:15 lrswipd group:16 lrswipd group:17 lrswipd group:18 lrswipd

I have to mention that the above access list is the same with the one of another mailbox which is read/write. I mention this just to make clear that the access list does not play any role in this problem.

Hope I haven't forgotten anything. In any case, ask me.
History
Date User Action Args
2011-11-21 17:04:19char.nikolaousetrecipients: + char.nikolaou
2011-11-21 17:04:19char.nikolaousetmessageid: <1321895059.52.0.840142009955.issue13446@psf.upfronthosting.co.za>
2011-11-21 17:04:18char.nikolaoulinkissue13446 messages
2011-11-21 17:04:18char.nikolaoucreate