Cyrus Murder - Move mailbox with user connected -

Dave McMurtrie dave64 at andrew.cmu.edu
Thu May 12 19:26:14 EDT 2011


On 5/12/11 7:06 PM, Lucas Zinato Carraro wrote:
>
> I can move mailboxes between servers with a user connected  ?

Generally, yes, but I'm not 100% sure that there aren't edge cases. 
Actually, I'm going to assume that there are probably edge cases.  Also, 
newer versions should be somewhat better than older versions at dealing 
with this.

At the very least, if you're running any version more recent than 2.3.15 
you'll want to make sure you set disconnect_on_vanished_mailbox to true 
in imapd.conf.  If you don't set this, the client will remain connected 
to proxyd on the frontend and proxyd will remain connected to imapd on 
the backend.  After the move, there will be no mail on that backend 
server and the user will see an empty mailbox.  Setting 
disconnect_on_vanished_mailbox will cause imapd to disconnect proxyd and 
hence, the client.  Depending on the client, it may silently reconnect 
and the user won't notice.  That behavior varies by client.


> Exist a way to block the connection until the operation finish ?

Cyrus takes care of this for you by setting the mailbox state to 
MBTYPE_RESERVE during the move.  Note that this happens per-folder as 
each one is being moved, and not for the entire mailbox hierarchy.

If an IMAP client attempts to access a folder while it's in reserved 
state it will get either a BAD or NO (I didn't look to see which) 
"Mailbox is currently reserved" back.

hth,

Dave


More information about the Info-cyrus mailing list