Re: duplicate mailboxes upon migrating (different name forms)

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

 



Hi Brian,

Quoting brian ally <zijn.digital@xxxxxxxxx>:

On Mon, Aug 23, 2021 at 3:51 PM Michael Menge <
michael.menge@xxxxxxxxxxxxxxxxxxxx> wrote:

Where do you see these two different mailboxes, both in cyradm?
If you have seen it in the reconstruct error message, this is a "problem"
of
reconstruct using the "normal" and "internal" mailbox name in the same
output.

So if you see "user.foo@xxxxxxxxxxx" in cyradm and
user^foo@example^com in the filesystem
or some error logs this is only one mailbox

Yes, I only saw that in the reconstruct msg. The output of cyradm lm looks
fine. The fact that I'd had unixhierarchysep different in each config
caused me to believe that something else had gone wrong. Other than what it
appears has gone wrong, i mean.

If you have lost/did not copy the files from the configdirectory you
are missing the mailboxes.db .


I do not have this.


There used to by a "-m" option for reconstruct that would by very
handy now but

>
> -m     NOTE: CURRENTLY UNAVAILABLE
>
>              Rebuild  the  mailboxes file.  Use whatever data in the
existing
>              mailboxes file it can scavenge, then scans all partitions
listed
>              in the imapd.conf(5) file for additional mailboxes.

Perhaps I could uninstall cyrus and reinstall with the latest version that
includes -m. I'd be grateful if someone can point me to any discussion
about both how this works or why it was removed.


As Ellie has written this option was removed a long time ago.


you are still using the "unixhierarchysep: yes" and it seems that you
mailboxes.db has been
"recreated" with only one mailbox using the wrong seperator regarding
the seperator used by
the filesystem.


Yes. I'd switched it to "no" and that was cleared up.


> Oh, dear. Let's list the mailboxes:
>
> bally@server:~$ cyradm --user cyrus --server localhost
> Password:
> localhost> lm
> user.foo@xxxxxxxxxxx (\HasNoChildren)

If you did not use acls, the mailboxes.db could be recreated from the
files in the "partition-default:" directory, by hand but you are
missing mailbox subscriptions, seen status (can't remember if this was
still
stored in "$configdirectory/users/$hash/*.seen" in cyrus 2.4"), and
sieve scripts.


 The seen status is not crucial.


How many users/mailboxes do you have?

Only five.


Also before you do anything else, stop cyrus, and check your old
configuration and new configuration for any other changes  (e.g.
hashimapspool:, fulldirhash:)


Both cyrus and postfix are disabled.

Both configs have hashimapspool: true

So to restore your mailboxes.db, I would do the following.

0. stop cyrus.

1. create a list of all mailbox names and positions on the filesystem.
   (e.g. by using "find . -name "cyrus.header" )

2. rename the imapspool (aka "partition-default:")
   and recreate an empty "imapspool" directory with the same owner/permissions


3. delete the mailboxes.db (we want to start with a empty mailboxes.db)

4. start cyrus so that only you can access cyrus via cyradm

5. create the folders via cyradm

6. verify that the list of newly created folders matches the position
   of the folders created in step 1.


7. stop cyrus


8. move the new imapspool with empty mailboxes away,
   and move the old imapspool moved in step 2 back

9. run "reconstruct -r -f user*" and "reconstruct -v max  user*"


10. start cyrus





--------------------------------------------------------------------------------
Michael Menge                          Tel.: (49) 7071 / 29-70316
Universität Tübingen                   Fax.: (49) 7071 / 29-5912
Zentrum für Datenverarbeitung mail: michael.menge@xxxxxxxxxxxxxxxxxxxx
Wächterstraße 76
72074 Tübingen


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




[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