Re: Cyrus Murder - Move mailbox with user connected -

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I make some tests and find problems moving mailboxes with users online:
( Cyrus 2.4.8 )

Move with

RENAME user/lucas.carraro user/lucas.carraro  server2.prevnet!default


In frontends and backends:

.........
allowusermoves: 1
disconnect_on_vanished_mailbox: 1
........

When i move from server1!default to server2!default

In server1  lock remains:

<config_directory>/lock/lucas.carraro.lock
<config_directory>/lock/lucas.carraro/Sent.lock
<config_directory>/lock/lucas.carraro/Project.lock
<config_directory>/lock/lucas.carraro/Trash.lock
<config_directory>/lock/lucas.carraro/Drafts.lock
<config_directory>/lock/lucas.carraro/IBM.lock

In server1 <spool_imap>/l/user/lucas^carraro/ remains with messages,
but subfolders are deleted.


* All mailboxes moves to server2 , and  all delivery continue normally in server2
all deleted mailboxes  DELETED/user/lucas.carraro/ moves normally to server2

If i try to move back: (server2 -> server1)

I receive a error: "Server unavaiable for this operation"

if i remove in server1  <config>/lib/imap/lock/lucas.carrar* and <spool>/imap/l/user/lucas^carraro/*
i can move all mailboxes from server2 to server1.

But locks and principal mailbox remains in sever2.


* Exist another parameter to force discconnect ?


Regards
Zinato


















 






On Thu, May 12, 2011 at 8:26 PM, Dave McMurtrie <dave64@xxxxxxxxxxxxxx> wrote:
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
----
Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/

----
Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/

[Index of Archives]     [Cyrus SASL]     [Squirrel Mail]     [Asterisk PBX]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [KDE]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux