I need to export all one specific account e-mails in "raw" format from Zimbra server. POP3 is not an option because it is needed for legal department usage and they insist that they want users maildir :)
I presume they are located in store folder, but store folder contains a lot of folders (server has about ~200 Gb email) and I fail to see correlation between user name and folder location. User has ~4 Gb of emails.
I would use zmmboxsearch on the command line is a really easy way to dump messages. So if you wanted to dump all the messages in the inbox, as the zimbra user do:
zmmboxsearch -d /tmp/user/ -m [email protected] -l 10000 -q "in:inbox"
This will dump all the raw messages that match the query for user in /tmp/user. The "-l" is the limit, by default it only searches for 1000 matches, so you have to set this to some number greater than the number of actual messages.
If you want to get all messages from all folders, you could do a query that would match everything like "after:1/1/00"
If you actually want to get the raw files as the message lives on the server, it is more difficult because all those details are kept in the MySQL database and broken out into mailbox groups. This document may point you in the right direction for getting those.