[dovecot] Seen bug?

Simon Lindgren simon at lindgren.no
Tue Nov 12 15:27:33 EET 2002


Hi,

I'm using Kmail and dovecot for my IMAP pleasure, and have had some problems, 
which are evident from the following exchange with some kmail developers.

My patch to the imap protocol in KDE fixed my problem, but should dovecot be 
changed instead?

Thank you for any insight!

I've included the discussion on kmail-devel so far:

[ I wrote: ]
--
I've recently switched to IMAP for email (using dovecot as the server, 
http://dovecot.procontrol.fi/) and have a small problem:

Clicking a message brings it up, but doesn't seem to mark it read on the 
server. I need to select 'Message -> Mark Message -> Mark Message as Read' in 
order for it to "stay read" when I check for new mails on the server. 

Is anyone else seeing this behaviour? Is this a bug, or a feature?

I've assigned a shortcut key for 'Mark Message as Read' so I get by, but with 
a large number of messages and folders, it quickly becomes annoying.
--


[ Carsten Burghardt <burghardt at kde.org> wrote in reply: ]
--
As your imap-server is not really common you should check with ethereal the 
communication between kmail and your server.
--


[ I wrote in reply: ]
--
Thanks for the replies... snooping with ethereal, I get the following:
(quoting only the data sent from kmail)

When viewing a mail in kmail:
UID FETCH 203 (UID RFC822)

When specifically flagging it as 'read' in kmail: 
UID STORE 203 -FLAGS.SILENT (\SEEN \ANSWERED \FLAGGED \DRAFT)
UID STORE 203 +FLAGS.SILENT (\SEEN)

It would seem that my problem would be solved if kmail also sent the +FLAGS 
stuff when viewing a message... but I don't know if this would be according 
to the IMAP specification - or if the server should flag the message as 
'seen' when the client does the 'fetch' ?

I do have 'Mark selected message as read after 0 sec' checked - and the 
message is flagged in kmail as read, but without specifically marking it as 
read in kmail, it's still 'unread' after the next 'check mail' run. I hope 
I'm being clear.

If you still think this is a bug with my (non standard, I agree!) IMAP server 
I'll try another one.
--

[ I wrote another reply: ]
--
I made a change to imap4.cc, and it magically works for me - I've not tested 
this one very much, but it seems to do the trick so far.

I would be very interested if someone knowledgeable would tell me just how 
wrong this piece of code is, as I'm working on learning these things.

--- imap4.cc    Tue Oct 15 21:52:43 2002
+++ imap4.cc    Tue Nov 12 01:36:05 2002
@@ -289,6 +289,11 @@
       }
 
       completeQueue.removeRef (cmd);
+
+         if (aSection.find ("ENVELOPE", 0, false) == -1) {
+               doCommand (imapCommand::
+                                  clientStore (aSequence, "+FLAGS.SILENT", 
"\\SEEN"));
+         }
     }
   }
--

[ Carsten Burghardt <burghardt at kde.org> wrote: ]
--
No, everything is alright here, you should check a different server.
--

[ Bo Thorsen <bo at sonofthor.dk> wrote: ]
--
It is definately a bug in the server. The IMAP RFC specifies that a server 
must only once serve a file flagged as new. So your server violates this 
principle.





More information about the dovecot mailing list