On Wed, 11 Sep 2002 18:34:51 +0200, Matteo Gelosa wrote: > The examine command opens read-only a mailbox as the rfc reports. It says > also that the per-user data cannot be modified. We have an imap2001a with > a proprietary driver that in case of examine and fetch body[text] MODIFIES > the seen/recent flag. This should be wrong, isn't it? If yes as I suppose > is the driver software layer that has to check the read-only status of > the mailbox?
EXAMINE should never modify \Recent. Messages that are \Recent stay recent throughout the session (this is true of SELECT too), and in the case of EXAMINE they are recent in the next session as well. Only a SELECT session can turn off \Recent, and it can only do that for subsequent sessions. \Seen can be modified, even in the case of EXAMINE, but not permanently; that is, \Seen is removed from PERMANENTFLAGS and any changes to \Seen do not show up in subsequent sessions. This use of \Seen as a session flag is convenient since it gives the user doing the EXAMINE a clue as to what he's done. It is *ALSO* permissible, but not required, that \Seen be a static flag in the case of EXAMINE, and that attempts to alter it become no-ops. I think that this is less useful. So, in the case that you described, the proprietary driver is OK in as long as it does not make any permanent change to these flags. This means NO change to \Recent, and session-only change to \Seen.
