I am currently working on a script for my client for backing up all their addressbooks for each of their respective users, where i have hit a wall.
This is what i am using to backup the contacts:
This is what i am using to backup the emailed contacts:
/opt/zimbra/bin/zmmailbox -z -m email@example.com getRestURL '/?fmt=csv&query=under:Contacts'
Now the contacts command is giving me the csv, but the emailed contacts one is NOT. It just gives me the below error
/opt/zimbra/bin/zmmailbox -z -m firstname.lastname@example.org getRestURL '/?fmt=csv&query=under:Emailed Contacts'
Whereas when i go to the web interface, i see contacts under "Emailed Contacts".
ERROR: service.FAILURE (system failure: GET from https://mail.domain.com:email@example.com/?fmt=csv&query=under:Emailed%20Contacts failed, status=404. no such item)
Any ideas on where i am going wrong ?
Also i need a way to be able to get a list of all addressbooks users have. Example: A user created "Internal Users Addressbook", "Client X List". Now i want my script to be able to backup all of them, but unless i know their names, its difficult to do so.
The command i pointed above doesn't work for anything but the contacts folder. There has to be a way to get a list and then back them up. Or back them up all together.
Any help would be appreciated.