Bug 483771 - imap retriever marks mail as read
Summary: imap retriever marks mail as read
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: getmail
Version: 9
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Dean Mander
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-02-03 15:19 UTC by David Woodhouse
Modified: 2009-02-04 15:52 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-02-04 15:52:48 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description David Woodhouse 2009-02-03 15:19:57 UTC
By fetching '(RFC822)' we implicitly mark mail as read on the server. We should probably use (BODY.PEEK[]) instead...


--- _retrieverbases.py.orig	2009-02-03 15:19:10.000000000 +0000
+++ _retrieverbases.py	2009-02-03 15:19:21.000000000 +0000
@@ -820,7 +820,7 @@ class IMAPRetrieverBase(RetrieverSkeleto
 
     def _getmsgbyid(self, msgid):
         self.log.trace()
-        return self._getmsgpartbyid(msgid, '(RFC822)')
+        return self._getmsgpartbyid(msgid, '(BODY.PEEK[])')
 
     def _getheaderbyid(self, msgid):
         self.log.trace()

Comment 1 Dean Mander 2009-02-03 19:31:22 UTC
Hi David,

in the options you can choose to leave mail read or unread,
so from end-user perspective it shouldn't be different.

Nevertheless I've asked some advice from upstream.

Stay tuned!

Comment 2 Dean Mander 2009-02-04 15:52:48 UTC
Feedback from upstream: 

Retrieving the message *is* reading the message, and therefore it should be marked as read by the server (if that's what the particular server does when you retrieve a message).  I don't see any reason why getmail should be trying to get around that by using BODY.PEEK instead when it retrieves the message.

Note that this is different from getmail's idea of whether it has seen the
message before or not.


Note You need to log in before you can comment on or make changes to this bug.