I have a strange, strange problem. We have about 350 accounts on an 18.104.22.168 server, the server itself is debian 64bit, 16gig ram, 8 cores, fibrechannel connection.
I wrote a small backup/rsync solution which is able to do hotbackups on our opensource zimbra.
Now, the backup solution works really nice and well, we were even able to use the machine we backup to as an cold-standby server, but we have problems with ONE account.
This account is a catchall account which receives every mail which is delivered to the system.
now, regarding to ajcodys understanding the structure wiki  I did the calculations for the path as:
mail_item.id >> 12 (actually it's a mail_item.id >> v.mailbox_bits as it is a SQL query and I have joined mail_item with zimbra.volume)
If i do it with perl (which is the same as the SQL query delivers) for the given id i'l get:
perl -e 'print 1688603 >> 12 ; print "\n"'
Now, basically I'l have a list of all calculated paths for this account, and I'l do an rsync over this list and rsync tells me that the directory
amongst lot's of others is not existing!!
searching for the ID in the store i find this particular message in:
find ./ -name "*1688603*"
So, in the wiki and with my SQL and Perl calculations I'l get for ID 1688603 the path 412, whereas in real-life it's filed in directory 156, which I can not understand why.
Out of the 350 accounts we have only the catchall (thus far) exhibits this behavior. It might have to do with the fact that the ID is very high, (over a million) because it's used as a catchall box ...
Does anyone have any idea what's going on there? Do I have to change the behavior of the calculation if the ID reaches some point? Like you do with the mailboxgroup number (if mailboxid % 100 = 0, groupnr = 100 else groupnr = mailboxid % 100) ...
Hope someone might have an idea ...
 Account mailbox database structure - Zimbra :: Wiki