[Dovecot] automatic flag updates

Aaron VanDevender sig at netdot.net
Tue Nov 30 05:07:24 EET 2004


On Mon, 2004-11-29 at 05:36 +0200, Timo Sirainen wrote:
> On 17.11.2004, at 02:34, Aaron VanDevender wrote:
> 
> > Is there a way to get dovecot to send automatic flag updates? I notice
> > that when I have two clients connected and one of them reads a new
> > message, the server sends a status update which contains the number of
> > unseen messages, but doesn't specifically say which ones have changed.
> > I think the solution to this problem, while not wasting bandwidth, is 
> > to
> > issue a unilateral FETCH FLAGS response whenever a flag changes. There
> > doesn't seem to be a way to get dovecot (I'm using 0.99.10) to do this.
> > Can the 1.0-test versions do this?
> 
> Dovecot has done this always. Most clients are just too stupid to do 
> anything with them.

I don't think this is true. I've included the relevant parts IMAP
session below while doing the following:

1. Sent an email to myself.
2. Waited for client A (evolution) to do a SELECT INBOX.
3. Went over to client B (squirrelmail) and read the new message.
4. Waited for client A to do another SELECT INBOX or similar.

at this point I expect client A to change the status of the mail in
question to SEEN, but it stays as UNSEEN. The session below is from
client A. Command A00069 reports [UNSEEN 16265] and command A00077
reports 0 unseen messages, so client B clearly read the message between
these two points, and the SEEN flag has changed. Yet no FETCH FLAGS
response indicates that change. In addition to the STATUS (UNSEEN 0)
response, there should also be a FETCH FLAGS response under command
A00077 which lets client A know that message 16265 has been seen.



A00057 SELECT INBOX
* FLAGS (\Answered \Flagged \Deleted \Seen \Draft)
* OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft \*)]
Flags permitted.
* 16265 EXISTS
* 1 RECENT
* OK [UNSEEN 16265] First unseen.
* OK [UIDVALIDITY 1095611075] UIDs valid
* OK [UIDNEXT 18918] Predicted next UID
A00057 OK [READ-WRITE] Select completed.
A00058 FETCH 16264 UID
* 16264 FETCH (UID 18916)
A00058 OK Fetch completed.
A00059 UID FETCH 18917:* (FLAGS RFC822.SIZE INTERNALDATE BODY.PEEK
[HEADER.FIELDS.NOT (RECEIVED)])
* 16265 FETCH (UID 18917 FLAGS (\Recent) INTERNALDATE "29-Nov-2004
21:19:54 -0500" RFC822.SIZE 1043 BODY[HEADER.FIELDS.NOT (RECEIVED)]
{467}
)
A00059 OK Fetch completed.
A00069 SELECT INBOX
* FLAGS (\Answered \Flagged \Deleted \Seen \Draft)
* OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft \*)]
Flags permitted.
* 16265 EXISTS
* 0 RECENT
* OK [UNSEEN 16265] First unseen.
* OK [UIDVALIDITY 1095611075] UIDs valid
* OK [UIDNEXT 18918] Predicted next UID
A00069 OK [READ-WRITE] Select completed.
A00070 FETCH 16265 UID
* 16265 FETCH (UID 18917)
A00070 OK Fetch completed.
A00071 UID FETCH 18917 BODY.PEEK[]
* 16265 FETCH (UID 18917 BODY[] {1043}
)
A00071 OK Fetch completed.
A00077 STATUS INBOX (MESSAGES UNSEEN)
* STATUS "INBOX" (MESSAGES 16265 UNSEEN 0)
A00077 OK Status completed.
A00078 SELECT INBOX
* FLAGS (\Answered \Flagged \Deleted \Seen \Draft)
* OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft \*)]
Flags permitted.
* 16265 EXISTS
* 0 RECENT
* OK [UIDVALIDITY 1095611075] UIDs valid
* OK [UIDNEXT 18918] Predicted next UID
A00078 OK [READ-WRITE] Select completed.
A00079 FETCH 16265 UID
* 16265 FETCH (UID 18917)
A00079 OK Fetch completed.




More information about the dovecot mailing list