MBOX-Line: From tss at iki.fi  Fri Jun 11 15:23:02 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: <1276274718.22134.138.camel@kurkku.sapo.corppt.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>
	<1276274718.22134.138.camel@kurkku.sapo.corppt.com>
Message-ID: <30B328B7-4D1B-4C7E-96CA-E37F7919E2A6@iki.fi>

On 11.6.2010, at 17.45, Timo Sirainen wrote:

>> 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.

Here's an idea that makes it possible for servers to implement 1) and 3), and also make 2) somewhat easier for clients:

a COPY 1:100 elsewhere
b IF-OK STORE 1:100 +flags \deleted
c IF-OK EXPUNGE

where IF-OK executes the command only if previous command returned OK, otherwise it fails with NO.

As long as all of the commands are sent in one IP packet (pretty unlikely they would be broken), the server can read and parse the commands as one unit, and figure out that the client wants to move messages and optimize accordingly.


