Backup emailaccounts with Zimbra zmmailbox

The following code makes it possible to loop through email addresses saved in the file /home/maarten/emailaccounts.txt. #!/bin/bash for i in $(cat /home/maarten/emailaccounts.txt); do zmmailbox -z -m $i getRestURL “//?fmt=tgz” > /backup/$i.$(date +%d-%m-%Y).tgz done For now the addresses have to be added manually to the file emailaccounts.txt, but with the zmprov command it’s possible to generate […]