I think a good work around would be using LAYOUT=INDEX then you get folder names like this and you 'probably' do not have such conflicts. I think this layout is also better for when people start using 'weird' characters or long names. Bad thing is, you need to convert everything.
Hmm, interesting, so there is an abstraction layer between the folder names in the file system and what is reported when listing the folder via IMAP?
sort of, you can have multiple storage backends. I am using mdbox, looks like this
├── control │ ├── dovecot-uidvalidity │ ├── dovecot-uidvalidity.66410c64 │ └── subscriptions ├── mdbox │ ├── dbox-alt-root -> /home/altmail/xxxx │ ├── dovecot-acl-list │ ├── mailboxes │ │ ├── 36179613fa3330637557000052412a8e │ │ ├── 67b77b07fa3330635457000052412a8e │ │ ├── 7908061cf23330634d57000052412a8e │ │ ├── 80628213e4f562613b27000052412a8e │ │ ├── a2585d3ae5714e636229030052412a8e │ │ ├── b45e8a3819f662614d27000052412a8e │ │ └── c07dd6138d5d3063615b000052412a8e │ └── storage │ ├── m.2 │ ├── m.3 │ ├── m.4 │ ├── m.5 │ ├── m.8 │ └── m.9 ├── sieve │ ├── managesieve.sieve │ └── tmp └── whitelist.gdbm
Maybe an index file that got corrupted?
I don't know. I did not see such things. Maybe if you have busy server and io waits on the file system you run into such things. I don't really have a busy server.
If so, where is this file? Could it be safely deleted to have dovecot re-create it?
There is indeed a doveadm command to check/fix indexes. I would stick to doveadm operations, not touch files/dirs directly.