preserving flags for shared mailbox when migrating from cyrus to dovecot
Dear all,
Despite all the progress we are making in our attempt to make the migration as smooth and transparent for our users there are still some important unsolved issues. One thing that I can't figure out is how to preserve a user's flags that s/he has for mail in a shared mailbox.
So far we tried 'doveadm backup -R' as well as the cyrus2dovecot script from here [1]. Both work well for individual mailboxes but do not migrate subscriptions for shared mailboxes and -- more importantly -- flags for mail in a shared mailbox. Reconstructing subscriptions is quite easy but I have no clue on how to reconstruct a user's flags.
Any hint is greatly appreciated!
[1] http://cyrus2dovecot.sw.fu-berlin.de/index.html
j.hofmüller
mur.sat -- a space art project http://sat.mur.at/
On 20 Aug 2014, at 13:39, Jogi Hofmüller jogi@mur.at wrote:
Despite all the progress we are making in our attempt to make the migration as smooth and transparent for our users there are still some important unsolved issues. One thing that I can't figure out is how to preserve a user's flags that s/he has for mail in a shared mailbox.
So far we tried 'doveadm backup -R' as well as the cyrus2dovecot script from here [1]. Both work well for individual mailboxes but do not migrate subscriptions for shared mailboxes and -- more importantly -- flags for mail in a shared mailbox. Reconstructing subscriptions is quite easy but I have no clue on how to reconstruct a user's flags.
I think you can first migrate the shared mailbox's mails as whatever user. Then use doveadm sync -1 (and maybe -m shared/foo to sync only the one mailbox) to migrate the message flags. You need to run that separately for all the users who have access to the shared mailbox. Of course Dovecot will also need to be configured properly to have private seen flags for users (only private seen flags are currently possible in Dovecot, I'm not sure how they are in Cyrus).
Hi,
Am 2014-08-20 14:16, schrieb Timo Sirainen:
I think you can first migrate the shared mailbox's mails as whatever user. Then use doveadm sync -1 (and maybe -m shared/foo to sync only the one mailbox) to migrate the message flags.
Just to make sure I got you right:
The shared mailbox has been migrated to dovecot correctly. I call it 'sharedbox' for now.
The user's mail has also been migrated correctly. Let's call her/him 'user'.
Then I would run
doveadm sync -1 -u user -m shared.sharedbox imapc:
to sync the flags for user 'user'. Correct?
You need to run that separately for all the users who have access to the shared mailbox.
Makes sense.
Of course Dovecot will also need to be configured properly to have private seen flags for users (only private seen flags are currently possible in Dovecot, I'm not sure how they are in Cyrus).
We have individual flags for shared mailboxes now and configured dovecot accordingly (see dovecot -n output attached).
Thanks so far! I hope this will work!
Cheers,
J.Hofmüller
Im Übrigen bin ich der Meinung, das Joanneum muss zerschlagen werden! - Barbara Fischer
Hi Timo, all,
Am 2014-08-20 14:16, schrieb Timo Sirainen:
I think you can first migrate the shared mailbox's mails as whatever user. Then use doveadm sync -1 (and maybe -m shared/foo to sync only the one mailbox) to migrate the message flags.
Well, I tried that in several different ways, all without any success. Let's assume the user is called jane and she has a subscription for the shared mailbox doe I tried the following:
doveadm sync -1 -R -u jane -m shared.doe imapc:
I also tried using the namespace switch:
doveadm sync -1 -R -u jane -n shared imapc:
again no success. The shared mailbox stays available and working but the flags will not be synced to the state they had on the original server. I also tried it without -R but that didn't get me anywhere either and should be wrong anyways AFAICT.
Any further ideas anyone or should I prepare our shared mailbox users that all their email will be unread after migration?
Cheers,
j.hofmüller
We are all idiots with deadlines. - Mike West
Hello
again no success. The shared mailbox stays available and working but the flags will not be synced to the state they had on the original server. I also tried it without -R but that didn't get me anywhere either and should be wrong anyways AFAICT.
Any further ideas anyone or should I prepare our shared mailbox users that all their email will be unread after migration? I looked at the dovecot -n output attached to your previous mail and I think I spotted some issues. namespace { hidden = no inbox = no
On 09/10/2014 02:20 PM, Jogi Hofmüller wrote: list = children location = maildir:/srv/vmail/%%u/Maildir:INDEX=/srv/vmail/%u/shared/%%u:CONTROL=/srv/vmail/%u/shared/%%u:INDEXPVT=/srv/vmail/%u/shared/%%u prefix = shared.%%u. separator = . subscriptions = yes type = shared }
The INDEX and INDEXPVT are identical, which means there is no private index. Having the CONTROL defined is also questionable. I suggest you try defining location like this:
location = maildir:/srv/vmail/%%u/Maildir:INDEXPVT=/srv/vmail/%u/shared/%%u
Also, to make subscriptions work sensibly, set the shared namespace subscriptions = no and then add a placeholder namespace with an empty prefix to contain just the private subscriptions:
namespace { prefix = hidden = yes list = no subscriptions=yes }
Please read http://wiki2.dovecot.org/SharedMailboxes/Public?highlight=%28INDEXPVT%29#Mai... for further details.
br, Teemu Huovila
Hi Teemu, all,
Am 2014-09-10 13:49, schrieb Teemu Huovila:
I looked at the dovecot -n output attached to your previous mail and I think I spotted some issues. (...) The INDEX and INDEXPVT are identical, which means there is no private index. Having the CONTROL defined is also questionable. I suggest you try defining location like this:
location = maildir:/srv/vmail/%%u/Maildir:INDEXPVT=/srv/vmail/%u/shared/%%u
Did that, and didn't change anything. I still have now way to sync flags for shared mailboxes from the old mail server.
Also, to make subscriptions work sensibly, set the shared namespace subscriptions = no and then add a placeholder namespace with an empty prefix to contain just the private subscriptions:
namespace { prefix = hidden = yes list = no subscriptions=yes }
Alright, thanks for the hint.
Cheers,
J.Hofmüller
Im Übrigen bin ich der Meinung, das Joanneum muss zerschlagen werden! - Barbara Fischer
participants (3)
-
Jogi Hofmüller
-
Teemu Huovila
-
Timo Sirainen