Tristan Miller writes:
> Greetings.
>
> In article <
news:cone.1369662691....@monster.email-scan.com>,
> Sam wrote:
> > IMAP specifies a communication protocol between a client and a server.
> > IMAP does not specify what a client does when it's not connected to a
> > server, or what a server does when it's not connected to a client.
> >
> > So, this really falls outside the scope of IMAP.
>
> But surely the protocol specifies what happens if a client tells the server
> to do some operation on a message which doesn't exist (or at least doesn't
> exist where the client thinks it exists).
Yes, the client gets an error message.
> > But I don't even know of any IMAP client that has any kind of "offline"
> > mode that works this way. If an IMAP client is not connected to the
> > server, the most it will let you do is, perhaps, write a new message, and
> > save a draft of it, locally. It won't let you do anything with any
> > existing message in the mailbox, until it reconnects to the server.
>
> Really? Both the IMAP clients I use regularly (KMail and Thunderbird)
> allow messages to be moved between folders when the client is offline. The
> changes are then synchronized the next time the client connects to the
> server. I had simply assumed that most other IMAP clients would behave
> similarly.
Might very well be; however IMAP does not specify what client must or must
not do when it's not connected to the server. However, if you accept this
situation as your premise, then what happens when a server gets a request to
do "some operation on a message which doesn't exist" does not apply, for the
following reasons.
It's reasonable to conclude that when a client purports to implement some
kind of an offline funcitonality, the client will certainly be aware that
things might have changed, since the last time it was connected to the
server. So, for that reason, the client is not going to just blindly send
commands to the server, referencing messages that may not exist anymore,
when it reconnects. It's reasonable to conclude that the IMAP client, after
returning online, will make an effort to see what's going on in the mailbox
now, before doing anything. And, all I'm saying, what happens when things
don't look the same falls outside the scope of IMAP. It's up to the client
to figure out what to do, if someone else moved the same message, or even
removed it altogether. Or if another IMAP client removed or renamed the
folder the message was in. If an IMAP client renamed the folder, there's no
way another IMAP client can tell what happened to it, besides the fact that
it's gone. There may be a new folder somewhere else within the mailbox. The
other IMAP client may or may not see it, right away. And there is no
clear indication that the new folder is the same folder.
There are some things in IMAP that a client can use in this situation, but
the scope of those particular things is still limited to the "are things the
same, or are they different, and are not where they were before" scope.