How do you secure Zimbra

Additionally secure Zimbra mailboxes accounts tar.gz

17th February 2017

In addition to generally excellent groupware, Zimbra also offers a great interface for performing administrative tasks both via a web API and command line tools.

In this article I would like to show how easy it is to automatically backup mailboxes in Zimbra - in addition to your own internal Zimbra backup.

As always, all information without guarantee and at your own risk :-)

root @ zimbra: / backup / ACCOUNTS # cat backup.sh
dn = / backup / ACCOUNTS / 'date "+% Y% m% d"'
mkdir -p $ dn
echo --- START --- >> $ dn / backup.log
date >> $ dn / backup.log
/ opt / zimbra / bin / zmmailbox -z -m [email protected] -t 0 getRestURL "/? fmt = tgz"> $dn/[email protected]
/ opt / zimbra / bin / zmmailbox -z -m [email protected] -t 0 getRestURL "/? fmt = tgz"> $dn/[email protected]
rm / backup / ACCOUNTS / latest
ln -s $ dn / backup / ACCOUNTS / latest
ls -alh $ dn / >> $ dn / backup.log
date >> $ dn / backup.log
echo --- END --- >> $ dn / backup.log

This script can be integrated into a cron job, for example.

First, a daily directory is created in generations. You have to implement automatic deletion yourself. A log is also saved.

With zmmailbox you can now directly backup entire mailboxes (accounts) of individual Zimbra users in a .tar.gz.

I wish you success!