This happens reproducibly with the current pykolab 0.8.7 in Kolab 16.
to reproduce:
You have this setting in /etc/kolab/kolab.conf
primary_mail = %(givenname)s.%(surname)s@%(domain)s
You create a user with firstname test and surname test, the mailbox is created in /var/spool/imap/domain/.../t/user/test^test
Now you change the primary_mail in kolab.conf to %(surname)s@%(domain)s
Restart kolabd: systemctl restart kolabd
Now the mailbox has been moved to /var/spool/imap/domain/.../t/user/test
In our opinion, this is not wanted at all. It changes the login name for the user, and does not move the sieve scripts. It drops the secondary mail address if that is the same as the new primary address. So even when changing back the primary mail policy, you have lost information.
The primary mail policy should only take effect when creating mailboxes, but should not be enforced during the lifetime of a mailbox.
Did we overlook a usecase where this is desired behaviour to rename mailboxes?