On 3/31/22 12:21, Andy Dorman wrote:
On 3/29/22 18:49, ellie timoney wrote:
On Tue, 29 Mar 2022, at 12:36 AM, Andy Dorman wrote:
FWIW, I noticed most of our servers never added a uuid storage directory
when they updated last weekend. Is there a setting I need to add in
imapd.conf to enable uuid storage and use relocate_by_id to move
mailboxes to it?
No, you don't need to do anything to enable uuid storage.
What might be confusing/surprising you is that no existing mailboxes
are moved to uuid storage at all, until you relocate_by_id them. But
new, top level mailboxes (e.g. new users) that you create after the
upgrade are created in uuid storage. (This is why the create brand
new mailboxes hierarchy -> copy files -> reconstruct trick worked.)
There is a new option "mailbox_legacy_dirs", which turns *off* uuid
storage /for newly created top level mailboxes only/. That is, if you
enable "mailbox_legacy_dirs", then any new top level mailboxes will be
created in the legacy storage instead of the uuid storage. This still
has no effect on existing mailboxes: existing mailboxes will remain
wherever they were, and new submailboxes are always created wherever
their parent is. You can always move mailboxes to uuid storage using
relocate_by_id, regardless of your "mailbox_legacy_dirs" setting.
It's usual in Cyrus for directories to be created as they're needed,
and not until. I don't know that this is definitely the case for the
uuid directory, but it is consistent with how we usually do things.
Given that you haven't created any new users since the upgrade, and
the mailboxes that already existed will stay where they are until you
relocate_by_id them, and any new mailboxes your existing users create
will be in the same place as their existing ones, it is not surprising
to me that there would not be a uuid directory yet on most of your
servers.
Cheers,
ellie
*Cyrus <https://cyrus.topicbox.com/latest>* / Info / see discussions
Thank you Ellie. That is very useful information.
So do you think the problem several of us are having with relocate_by_id
not apparently doing anything is because we need to create the base
mailbox in uuid and THEN run relocate_by_id to move the emails and
sub-folders to the uuid storage?
For example, should we be do these two steps to move foo@xxxxxxxxxxxx?
1. Use cyradm to create the base mailbox, foo@xxxxxxxxxxxx. Assuming we
haven't set mailbox_legacy_dirs, this should create the uuid storage for
the base mailbox. This of course assumes cyradm lets us create it and
doesn't complain about the mailbox already existing (in old storage).
2. Use relocate_by_id to move foo@xxxxxxxxxxxx emails and subfolders to
the newly created uuid storage.
Well I just tried the steps above and step 1 failed. I can't create the
mailbox in cyradm if it already exists in the old storage.
localhost.xxyyzz.com> cm user/foo@xxxxxxxxxxxx
createmailbox: Mailbox already exists
And FWIW, nothing, no syslog entries or anything that I can see, happens
when I try running relocate_by_id either as root or the cyrus user.
sudo -u cyrus /usr/lib/cyrus/bin/relocate_by_id user/foo@xxxxxxxxxxxx
Actually I take that back. It appears that a new directory, "stage.",
was created the first time I ran relocate_by_id. But there is nothing in it.
yorick:~# ls -al /var/spool/cyrus/mail/
total 132
drwxr-x--- 33 cyrus mail 4096 Sep 5 2010 .
drwxr-xr-x 5 cyrus mail 4096 Jul 12 2010 ..
...
...
drwx------ 9 cyrus mail 4096 Mar 2 2018 domain
...
drwxr-xr-x 2 cyrus mail 4096 Nov 15 2007 s
drwxr-xr-x 2 cyrus mail 4096 Mar 31 12:31 stage.
drwxr-xr-x 2 cyrus mail 4096 Nov 15 2007 t
...
drwxr-xr-x 2 cyrus mail 4096 Nov 15 2007 z
--
Andy
------------------------------------------
Cyrus: Info
Permalink: https://cyrus.topicbox.com/groups/info/T5afcf9b84bcaffec-Mcb0f205940a3f4fe05dfdb27
Delivery options: https://cyrus.topicbox.com/groups/info/subscription