Hello,

you do not want to do this, since ctl_mboxlist does not export all
fields in the database.  So if you export, modify and import, some
fields are gone.  Moreover I do not think this shall be modified on the
murder server.  Rather the instances shall put changes to the murder
server, when it comes to the mboxlist.

On this occasion you might want to
apply https://github.com/cyrusimap/cyrus-imapd/pull/3384 to modify your
ctl_mboxlist and see if the patch makes problems.

I cannot tell you why is ->server empty.  You can try with cvt_cyrusdb
and convert to flat.  It is not specific to the mailbox database and
extracts whatever is in the store.

Version 2.5.10 was released in 2016.  I recommend you to see if more
recent versions can handle your case.

Greetings
  Дилян

On Tue, 2021-03-30 at 02:05 -0400, i...@illusion.hu wrote:
> Hi,
> 
> I have a discrete cyrus setup with two frontends, several backends
> and a single murder.
> 
> On the murder server I would like to dump out the mailboxes.db into a
> plain file, for doing sed/grep modifications then push it back. I'm
> facing with an inconsistence where the dump made on murder does not
> contains the backend's hostname.
> 
> on murder :
> ctl_mboxlist -d |grep 'my own mailbox'
> illusion.hu!user.imre   1 common i...@illusion.hu       lrswipkxtecda
> It tells me that is a remote (1) mailbox on partition common. But on
> which backend host?
> 
> on backend:
> ctl_mboxlist -d
> illusion.hu!user.imre   0 common i...@illusion.hu       lrswipkxtecda
> looks good, it's a local mailbox on common partition
> 
> on frontend:
> ctl_mboxlist -d
> illusion.hu!user.imre   1 cyrus-common!common i...@illusion.hu 
> lrswipkxtecda
> looks good, it's remote (1) on host 'cyrus-common' on partition
> 'common'
> 
> On murder the mailboxes.db does contain the missing information. I
> converted to db file to flat, got this:
> illusion.hu!user.imre   1 cyrus-common!common
> i...@illusion.hu<FF><89>lrswipkxtecda<FF><89>
> 
> On murder I'm using 2.5.10-3ubuntu1.1 version (ubuntu Bionic build)
> 
> I digged into the code, imap/ctl_mboxlist.c +183:
>     case DUMP:
>         if (!d->partition || !strcmpsafe(d->partition, mbentry-
> >partition)) {
>             printf("%s\t%d ", mbentry->name, mbentry->mbtype);
>             if (mbentry->server) printf("%s!", mbentry->server);
>             printf("%s %s\n", mbentry->partition, mbentry->acl);
>             if (d->purge) {
>                 mboxlist_delete(mbentry->name);
>             }
>         }
> 
> how can the mbentry->server be empty in my case?
> 
> The site is operational, it works fine in live, but after a
> dump/undump in murder all my clients started to complain about
> dissappeared mailboxes. That made evidence that the frontend
> configurated properly, using the murder's database as a master.
> 
> This problem is serious for us:
>  - one of our backend has destroyed, we need to purge the unused
> mailboxes from database
>  - we want to change the hostname of a backend and want to avoid
> mailbox deletion after 'mupdate -m'
>  - our mailboxes.db backup on murder is useless.
> 
> Please give me advices how to handle this case. If any detailed
> information is needed I'm happy to send.
> Cyrus / Devel / seediscussions +participants +delivery
> optionsPermalink

------------------------------------------
Cyrus: Devel
Permalink: 
https://cyrus.topicbox.com/groups/devel/T211a174b49161d76-Mba07d34d6d186f1de898d492
Delivery options: https://cyrus.topicbox.com/groups/devel/subscription

Reply via email to