MBOX-Line: From tss at iki.fi  Fri Jun 11 09:45:18 2010
To: imap-protocol@u.washington.edu
From: Timo Sirainen <tss@iki.fi>
Date: Fri Jun  8 12:34:43 2018
Subject: [Imap-protocol] IMAP MOVE extension
In-Reply-To: <alpine.OSX.2.00.1006110910440.662@hsinghsing.panda.com>
References: <1768814180.483.1276267238967.JavaMail.root@dogfood.zimbra.com>
	<1276267479.22134.102.camel@kurkku.sapo.corppt.com>
	<alpine.OSX.2.00.1006110910440.662@hsinghsing.panda.com>
Message-ID: <1276274718.22134.138.camel@kurkku.sapo.corppt.com>

On pe, 2010-06-11 at 09:12 -0700, Mark Crispin wrote:
> On Fri, 11 Jun 2010, Timo Sirainen wrote:
> > As long as there is no requirement for MOVE to be atomic (i.e. it would
> > be allowed to emulate it with copy+expunge), there's no need to lock
> > multiple mailboxes simultaneously.
> 
> If MOVE is not atomic, then what is its point?

1) Allowing user to move messages between mailboxes in situations where
a COPY would bring user over quota.

2) Simplify the operation for clients, also drop one round trip wait. I
guess this mainly would benefit some custom webmail developers that
develop against a specific server..

3) Possibly improve performance with some server implementations.

Are these good enough reasons for the MOVE command? I don't know. Maybe
1) is helpful sometimes.

> If MOVE is not atomic, then how do you do the necessary error recovery?
> Or if you don't recover errors, how do you report them to the client?

It would behave essentially the same as COPY+STORE+EXPUNGE, except the
STORE part could be optimized away:

1. The COPY part either atomically succeeds or fails.
2. Now the messages are visible in both mailboxes
3. Server starts expunging the moved messages.

After the copying is successful, the only problem that can happen is if
expunging messages somehow fails, or if the server crashes. The same
problems exist with COPY already, there are short time windows when if
Dovecot crashes it has succeeded in only partially copying messages.

Atomic MOVE sounds nice, but what benefit does it really have? I doubt
clients or users care that much.


