I need delete old messages from zimbra account.
by command:
zmmailbox -z -m mail@domain.com s -t message -l 999 "before:1/1/14" |awk '{ if (NR!=1) {print}}'| grep mess | awk '{ print $2 "," }' | tr -d '\n'
I can recieve ID messages and I can delete message by ID
zmmailbox -z -m mail@domain.com deleteMessage $ID
But between these two command, I would like to save the message in. tar.gz
Best Answer
You can create an backup with a command like:
Where -t sets the timeout to infinity. You are creating a REST command to Zimbra, so you can extend this with compatible commands. For example, you can add a query to this to select message before a specific date: