On Mon, 27 Jan 2003 19:36:38 +0100 (CET), Andreas Aardal Hanssen wrote:
> >x store 1 flags ()
> >* 1 FETCH (FLAGS ())
> >x OK Completed
> OT, but why does the server return the FETCH update when no change has
> been made to the flags?

Very off-topic, since in the example above flags are being changed.

"STORE x FLAGS ()" does not make "no change to the flags".  It clears all
flags.

> "Note: regardless of whether or not the ".SILENT" suffix was
>  used, the server SHOULD send an untagged FETCH response if a
>  change to a message's flags from an external source is
>  observed."
>
> Doesn't this imply that the server need not send the untagged FETCH if no
> change has been detected?

How did you get that implication?

That paragraph talks about the case of "a change to a message's flags from an
external source"; and it refers to the necessity of announcing flag changes in
that case even if ".SILENT" was used.

It's a stretch to extend that to the case of "no change to a message flags
from any source" when ".SILENT" was not used, particularly when the previous
paragraph to the one you quoted in 6.4.6 is considered.

The reason why STORE sends the updated flags (and why ".SILENT" isn't as
useful as you may think) is that a server may have restricted write access to
certain flags.  It's almost impossible for a client to determine why a STORE
failed if the server says NO (consider what happens if multiple flags are
specified), so servers send OK along with the flags that actually got changed.
Consider:
        a001 STORE 1 +FLAGS (\Seen \Deleted)
        * 1 FLAGS (\Seen)
        a001 OK STORE \Seen done, but you can't set \Deleted

".SILENT" is mostly useful if you're doing something like this:
        a032 STORE 1:* +FLAGS (\Deleted)
        a032 OK deleted all 43,392 messages!
        a033 CLOSE
        a034 OK expunged and closed that maibox!
        a035 LOGOUT
        * BYE see ya later!
        a035 OK logged out

In this scenario, the combined use of ".SILENT" and CLOSE caused a substantial
reduction in network traffic to the client, at a cost of loss of confirmation
to the client that anything was actually deleted and expunged.

Reply via email to