Bug 65005 - mails in imap folders are marked as read automatically
Summary: mails in imap folders are marked as read automatically
Status: RESOLVED FIXED
Alias: None
Product: kmail
Classification: Applications
Component: IMAP (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Till Adam
URL:
Keywords:
: 51508 70143 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-09-26 18:45 UTC by Ferdinand Gassauer
Modified: 2004-01-07 00:22 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
IMAP_read.png (4.58 KB, image/png)
2003-10-14 09:16 UTC, Ferdinand Gassauer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ferdinand Gassauer 2003-09-26 18:45:47 UTC
Version:           1.5.9 (using KDE 3.1.92 (alpha2, CVS >= 20030921), compiled sources)
Compiler:          gcc version 3.3 20030226 (prerelease) (SuSE Linux)
OS:          Linux (i686) release 2.4.20-4GB

Hi!
the messages are marked as read automatically and unpredictably.
Example
I leave kmail (3.1.4) in the office with unread messages
and open kmail (CVS HEAD) at home - the unread messages are gone.

IMHO this hapens also in the reverse situation.
We use SuSE Openexchange 4 as imap server

But I think it's kmail from CVS HEAD which marks messages as read unpredictably
(I have turned off automatic marking as read)

cu
ferdinand
Comment 1 Ferdinand Gassauer 2003-09-26 18:47:13 UTC
changed component to imap 
Comment 2 Carsten Burghardt 2003-10-13 20:01:34 UTC
I don't understand why this behaviour is unpredictable. Are they only marked as 
read sometimes? Kmail marks them as read once you click on them and only then 
so to what kind of emails are you referring? To mails that you already read? 
Comment 3 Ferdinand Gassauer 2003-10-14 08:23:23 UTC
other example: I see 1 new mail in the folder tree, but non in the headers. 
I can click refresh  - nothing happens 
Actually there is no _new_ mail in this folder, I have deletet the new message - 
without marking it as read - may be this causes the problem?  
Comment 4 Ferdinand Gassauer 2003-10-14 09:16:44 UTC
Subject: Re:  mails in imap folders are marked as read automatically

On Monday 13 October 2003 20:01, you wrote:
> ------- You are receiving this mail because: -------
> You reported the bug, or are watching the reporter.
>      
> http://bugs.kde.org/show_bug.cgi?id=65005     
> 
> 
> 
> 
> ------- Additional Comments From burghardt@kde.org  2003-10-13 20:01
> -------
 I don't understand why this behaviour is unpredictable. Are they
> only marked as read sometimes? Kmail marks them as read once you click on
> them and only then so to what kind of emails are you referring? To mails
> that you already read? 
I have configured that kmail marks the mails as read only if I click the icon 
"Mark selected as read"
So I leave the important messages as unread (KMAIL HEAD at home) - go to the 
office - and there the mails are not unread/new any more.

Even if the message is marked as new, they are not counted in the folder tree.



Created an attachment (id=2773)
IMAP_read.png
Comment 5 Markus Schmidt 2003-10-15 21:05:27 UTC
the same here. i have unchecked "automatically mark read after x seconds", but kmail marks a message read on the server when viewing it. strange thing is, that the green dot in kmail stays (telling that the mail is unread), but when i simultaneously check the imap server via webmail, the mails i viewed are marked as read. after closing kmail and starting it again, all green dots of all previously viewed messages disappear.

i'm using kmail 1.5.4 from gentoo kde-base/kdenetwork-3.1.4
together with courier imapd 1.7.3 from gentoo net-mail/courier-imap-1.7.3-r1

Comment 6 Carsten Burghardt 2003-10-16 13:38:06 UTC
The settings from "mark as read after x seconds" currently do not affect the handling of imap messages as the server marks them as read automatically. This has to be changed but it's not trivial.
Comment 7 Ferdinand Gassauer 2003-10-16 13:48:02 UTC
Subject: Re:  mails in imap folders are marked as read automatically

On Thursday 16 October 2003 13:38, you wrote:
> ------- You are receiving this mail because: -------
> You reported the bug, or are watching the reporter.
>
> http://bugs.kde.org/show_bug.cgi?id=65005
>
>
>
>
> ------- Additional Comments From burghardt@kde.org  2003-10-16 13:38
> ------- The settings from "mark as read after x seconds" currently do not
> affect the handling of imap messages as the server marks them as read
> automatically. This has to be changed but it's not trivial.
I understand, but IMHO a vital function.
It happens to me more then once, that I "forgot" a new mail, because of this.
Comment 8 Till Adam 2003-12-28 13:05:17 UTC
*** Bug 51508 has been marked as a duplicate of this bug. ***
Comment 9 Till Adam 2003-12-28 13:08:44 UTC
I have a patch for kio_imap and kmail that makes it not set the \seen flags implicitely anymore which should resolve this issue. We'll test it some more for possible side effects and then commit it. Hopefully before 3.2 Assigning to myself so I remember it.
Comment 10 Till Adam 2003-12-28 14:07:29 UTC
*** Bug 70143 has been marked as a duplicate of this bug. ***
Comment 11 Till Adam 2004-01-07 00:23:00 UTC
Subject: kdepim/kmail

CVS commit by tilladam: 

Use BODY.PEEK instead of FETCH because the latter implicitly sets the \seen
flag. Instead, explicitly set the message to read (set \seen flag) on the
server when it is marked as read locally. The reasons being:

o the local and remote status don't go out of sync leading to incorrect
  unread counts
o it makes using the same imap account with multiple clients possible
o fixes a couple of bugs with the external reader window as a side effect

CCMAIL: 71596-done@bugs.kde.org
CCMAIL: 65005-done@bugs.kde.org


  M +3 -1      imapjob.cpp   1.38
  M +9 -7      kmreaderwin.cpp   1.733


--- kdepim/kmail/imapjob.cpp  #1.37:1.38
@@ -234,6 +234,8 @@ void ImapJob::slotGetNextMessage()
       path += ";SECTION=HEADER";
     } else {
-      path += ";SECTION=" + mPartSpecifier;
+      path += ";SECTION=BODY.PEEK[" + mPartSpecifier +"]";
     }
+  } else {
+      path += ";SECTION=BODY.PEEK";
   }
   url.setPath( path );

--- kdepim/kmail/kmreaderwin.cpp  #1.732:1.733
@@ -1408,7 +1408,9 @@ void KMReaderWin::slotTouchMessage()
   if (message())
   {
-    if (message()->isNew() || message()->isUnread() || message()->isRead())
-      message()->setStatus(KMMsgStatusRead);
-    if ( message()->isNew() || message()->isUnread() ) {
+    SerNumList serNums;
+    if (message()->isNew() || message()->isUnread()) {
+      serNums.append( message()->getMsgSerNum() );
+      KMCommand *command = new KMSetStatusCommand( KMMsgStatusRead, serNums );
+      command->start();
       KMMessage * receipt = message()->createMDN( MDN::ManualAction,
                                                   MDN::Displayed,


Comment 12 Ferdinand Gassauer 2004-01-07 08:00:15 UTC
Subject: Re:  mails in imap folders are marked as read automatically

thanks !!!