[Imap-protocol] FLAGS reply

Timo Sirainen tss at iki.fi
Sat Dec 1 23:53:43 PST 2007


On Sat, 2007-12-01 at 23:42 -0800, Mark Crispin wrote:

> On Sun, 2 Dec 2007, Timo Sirainen wrote:

> > I see that when adding a new keyword, most servers send:

> > * FLAGS (hello \Answered \Flagged \Deleted \Draft \Seen)

> > * OK [PERMANENTFLAGS (hello \* \Answered \Flagged \Deleted \Draft \Seen)] Permanent flags

> > before sending the FETCH FLAGS:

> > * 1 FETCH (FLAGS (hello))

>

> This confirms the creation of the flag and whether or not it is a

> permanent flag. It needs to be sent.


How about when keywords are removed? Is this valid:

1 fetch 1 flags
* 1 FETCH (FLAGS (\Seen hello))
1 ok
[[ here another connection expunges message 1 ]]
2 fetch 2 flags
* 2 FETCH (FLAGS ())
* FLAGS (\Answered \Flagged \Deleted \Draft \Seen)
* OK [PERMANENTFLAGS (\* \Answered \Flagged \Deleted \Draft \Seen)] Permanent flags
2 ok

This session still sees that message 1 contains "hello", but it's no
longer in FLAGS. Should the server instead have sent:

* 1 FETCH (FLAGS (\Seen))
* 2 FETCH (FLAGS ())
* FLAGS ...
* OK [PERMANENTFLAGS ..

(Or just avoided sending FLAGS/PERMANENTFLAGS until message 1 was seen
expunged.)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 196 bytes
Desc: This is a digitally signed message part
URL: <http://mailman13.u.washington.edu/pipermail/imap-protocol/attachments/20071202/cc235f80/attachment.sig>


More information about the Imap-protocol mailing list