On 3/31/22 19:43, ellie timoney wrote:
On Fri, 1 Apr 2022, at 4:42 AM, Andy Dorman wrote:
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?

No, I don't think that's the problem.  The "create the mailboxes first" thing 
that worked before was because the mailboxes were broken in such a way that they 
effectively didn't exist.  It's nothing to do with the usual relocate process.

It seems like maybe the mailbox name you provided to relocate_by_id is just not 
matching anything, so it does nothing (and succeeds at it).  Which I consider a 
bug -- if it doesn't find anything to do, it should say so, not successfully do 
nothing.

I'm not sure at a glance how it expects mailbox arguments to be spelled (whether in the "admin 
namespace" or "internal namespace").  Ideally it would be in the admin namespace, 
like the other tools, but my hunch is that it might be expecting internal namespace spelling.  If 
so, that's also a bug...

What if you use the -u option to specify users by username rather than by 
mailbox name?

Something like:  relocate_by_id -u [email protected]

It looks like that's what our tests do, and those are fine.  The only example 
in the man page also uses -u.  I guess we've assumed the tool will be mostly 
used on userids, and still have some rough edges left when invoked on 
mailboxes.  I've opened https://github.com/cyrusimap/cyrus-imapd/issues/4014 to 
get them smoothed off.  In the meantime, please just use the -u option and 
userids.

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.

That's what I'd expect.  This mailbox does already exist, so of course you 
can't create it again. :)

Cheers,

ellie


OK. We are making progress...  :)

Specifying the mailbox by username worked...up to a point. However it looks like relocate expects to find a xapianactive directory and it died when it didn't find it. Below is what I saw in the command line.

yorick:~# sudo -u cyrus /usr/lib/cyrus/bin/relocate_by_id -u [email protected]

Relocating: user/foobar/[email protected]
Renaming: /var/spool/cyrus/mail/domain/U/comehome.net/F/user/foobar/Trash -> /var/spool/cyrus/mail/uuid/7/1/716c6cdf5ba5253e

Relocating: user/foobar/[email protected]
Renaming: /var/spool/cyrus/mail/domain/U/example.net/F/user/foobar/Templates -> /var/spool/cyrus/mail/uuid/4/c/4cd9a8da5ba5253e

Relocating: user/foobar/[email protected]
Renaming: /var/spool/cyrus/mail/domain/U/example.net/F/user/foobar/Spam -> /var/spool/cyrus/mail/uuid/6/3/63f6c7ab5ba5253e

Relocating: user/foobar/[email protected]
Renaming: /var/spool/cyrus/mail/domain/U/example.net/F/user/foobar/Sent -> /var/spool/cyrus/mail/uuid/6/3/63ec415e5ba5253e

Relocating: user/foobar/[email protected]
Renaming: /var/spool/cyrus/mail/domain/U/example.net/F/user/foobar/Drafts -> /var/spool/cyrus/mail/uuid/6/2/62a142305ba5253e

Relocating: user/[email protected]
Failed to open activefile for /var/lib/cyrus/domain/U/example.net/user/F/foobar.xapianactive: Unknown code ____ 254


So, does this mean we have to convert to use xapian to use relocate? I think we would be fine with that, but we haven't yet moved from squatter to zapian.

Thanks.  Have a great weekend.

--
Andy


------------------------------------------
Cyrus: Info
Permalink: 
https://cyrus.topicbox.com/groups/info/T849687550993b005-M15655eb402fabb17e92fd079
Delivery options: https://cyrus.topicbox.com/groups/info/subscription

Reply via email to