> On 05/04/2024 15:53 EEST Marc via dovecot <dovecot@dovecot.org> wrote: > > > > > > > > > > > > > > > breaking the mail index > > > > > > > > > > > > > > Tangentially query: is Dveocot smart enough to optimize > > mailbox > > > > > > renaming > > > > > > > to do index renaming (i.e. does not try to copy or recreate > > > > indices)? > > > > > > > > > > > > > > > > > > > Dovecot is, if you use LAYOUT=index. This will use only mailbox > > GUID > > > > on > > > > > > disk, and the folder name is only in indexes (both list index and > > > > mailbox > > > > > > index for recovery purposes). > > > > > > > > > > > > I would recommend using 2.3.21 with LAYOUT=index to avoid > > problems. > > > > > > > > > > > > > > > > So you can just add this to an existing configuration, without the > > need > > > > to do anything? Like eg reindex or so? I always had the impression > > this > > > > affects how messages are stored. > > > > > > > > > > mail_location = mdbox:xxxxxx:INDEX=xxxxxx:CONTROL=/xxxxxxx > > > > > becomes: > > > > > mail_location = > > mdbox:xxxxxx:INDEX=xxxxxx:CONTROL=/xxxxxxx:LAYOUT:index > > > > > > > > > > Does this really speed things up? > > > > > > > > > > > > > You can't put it on existing setup just like that, you need to do > > storage > > > > format migration, or copy all the folders into their GUID folders > > when > > > > you do this. > > > > > > > > It will speed things up and will also allow you to use almost > > anything as > > > > mailbox name. > > > > > > > > > > I was in the process of setting up new server, it already had a few > > test mailboxes on it. > > > > > > why do you mention this specific version 2.3.21? el9 still is at > > 2.3.16. > > > > > > > Because we have fixed issues with index layout since 2.3.16. It will work > > with 2.3.16 too but there are issues you'd probably not want to deal > > with, most importantly: > > > > - LAYOUT=index List index rebuild was missing. > > - LAYOUT=index: Duplicate GUIDs were not detected. > > > > which were added in 2.3.17 and futher fixed in later versions. It's a > > chore to dig up specific versions, so I recommend using the latest. > > > > > So if I add the LAYOUT:index to mail_location for my mdbox setup, it > > only renames Drafts,INBOX,Junk etc to some uuid (I guess)? > > > > > > ├── mdbox > > > │ ├── dbox-alt-root > > > │ ├── mailboxes > > > │ │ ├── Drafts > > > │ │ │ └── dbox-Mails > > > │ │ ├── INBOX > > > │ │ │ ├── dbox-Mails > > > │ │ │ └── test > > > │ │ │ └── dbox-Mails > > > │ │ ├── Junk > > > │ │ │ └── dbox-Mails > > > │ │ ├── NotSpam > > > │ │ │ └── dbox-Mails > > > │ │ ├── Sent > > > │ │ │ └── dbox-Mails > > > │ │ └── Trash > > > │ │ └── dbox-Mails > > > │ └── storage > > > │ ├── m.1 > > > │ ├── m.2 > > > │ ├── m.3 > > > │ ├── m.4 > > > │ ├── m.5 > > > │ └── m.6 > > > > > > This server is offline any way. What would be the easiest way to do > > this migration? Something I can do directly on this server? > > > > If there are only few accounts, you can configure new mail location with > > LAYOUT=index and use doveadm sync / backup to migrate mails there, then > > move things over the old stuff - or copy old stuff elsewhere and do the > > same to current location as new. > > > > I tested with this > > doveadm sync -u testacc > 'mdbox:/home/testing/testacc/mdbox:INDEX=/home/testing/testacc/index:CONTROL=/home/testing/testacc/mail/control:LAYOUT=index' > > Which gives me the expectec result. But I have also an archive namespace and > an alt namespace that is going to be quite a lot of moving around on this > production server. Not to mention having all these messages copied. Is this > really the most efficient way to migrate to such id folders?
You said you are in process of migrating to new server. And yes, this is the safest way to do this change. You probably likely want to have a migration.conf file with **new** locations, and use doveadm -c /path/to/migration.conf sync -1R tcp:localhost:1234 to make it bit less horrible to migrate. Aki _______________________________________________ dovecot mailing list -- dovecot@dovecot.org To unsubscribe send an email to dovecot-le...@dovecot.org