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 user@domain.com -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.