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.
Seems the crux of the issue is that OpenVZ reports the physical machine's memory to Java, when it would be more appropriate to report the virtual machine's memory allocation. This leads to the Java Virtual Machines requesting more memory than is available on the virtual machine.
Examining the beancounters allows you to identify this issue. In my case, I was failing on the privvmpages
. My limit is 262144 (4k pages) which is approximately equal to 1GB. The kmemsize is reported as 2147483646 which is approximately equal to 2GB.
billy@cloud:~$ sudo cat /proc/user_beancounters
Version: 2.5
uid resource held maxheld barrier limit failcnt
325: kmemsize 6381046 11556684 2147483646 2147483646 0
lockedpages 0 1011 999999 999999 0
privvmpages 164893 262377 262144 262144 100797
shmpages 658 1972 131072 131072 0
dummy 0 0 0 0 0
I have not fully solved the issue yet, as I need to do further memory related tweaks to zimbra - but I have identified that this is the cause of my problem, and that the little tweaking I have done has allowed me to progress with my installation (although I do still run out of memory a little further down the line still).
I went about tweaking memory along the lines of this:
zmlocalconfig -e mailboxd_java_heap_memory_percent=14
zmlocalconfig -e mailboxd_java_heap_new_size_percent=9
and this
zmlocalconfig -e mysql_table_cache=250
And to get zimbra to even run the zmlocalconfig
, I removed zimbra
from /etc/init.d/
and just ran it manually after funning the config commands.
Hope this is helpful to someone else.
Best Answer
Not sure if you want to do this on a Zimbra server, but if it is a server you can use zmmailbox with a getRestUrl for almost all things that can be done in the web interface. Become the zimbra user
This is a basic csv export, mainly compatible with Zimbra. You can make the exports more compatible with other applications by replacing the csv with one of the following options:
To make an outlook 2003 compatible export you the command changes to:
To make an export from a different adressbook, you can use the name of that adressbook f.e.: