On Mon, 14 Jul 2003, Tim Showalter wrote:
> > As a result of the above, "FETCH seq (FLAGS BODY[] FLAGS)" is equivalent
> > to "FETCH seq BODY[]".
> This ought to be the case, but it isn't, because it doesn't consolidate
> and it doesn't notify. The FETCH response, in fact, is of the form
> "FLAGS () BODY [] {XXX} ... FLAGS (\Seen)", which I found quite funny,
> given BODY.PEEK[] worked and I wasn't going to have to think of
> something else.
I agree that the response is amusing, but I doubt that server is the only
one that responds like that to "FETCH seq (FLAGS BODY[] FLAGS)". In fact,
UW imapd also behaves that way.
I think that the only non-silly way to treat such a response is to decide
that "rightmost" FLAGS wins. So in the end, \Seen is set. Similarly, I
also think that it is indeterminate whether "FETCH seq (FLAGS BODY[])"
will return the flags before the effect of the BODY[]; but it will
definitely return the flags after the effect of the BODY[].
Thus, the only way to guarantee that you get the flags before the effect
of the BODY[] is to do the flags fetch in a separate command.
> Sure. Now that I think about this a little more this behavior is
> really, really gross, but not strictly speaking noncompliant. The real
> issue is changing \Seen in EXAMINE--this change is permenant. The fact
> that it changed for the local session is unfortunate and I should have
> used BODY.PEEK[], but the servers I've tested with in the past did not
> apparently set \Seen for messages fetched with BODY[] under EXAMINE.
I agree. The most important reason for EXAMINE is that it would not alter
\Seen or \Recent flags, so would be suitable for backup, mirroring, or
spying.
-- Mark --
http://staff.washington.edu/mrc
Science does not emerge from voting, party politics, or public debate.
Si vis pacem, para bellum.