The scenario:
I'm trying to write a shell script that automates the creation of email signatures on a Zimbra server. Most users have added their information and their photo to the domain's GALsync account. Ideally I would like the image as base64, but a public URI would be better. The image must be sourced from the GALsync upload, and this process of automating signature creation should run from the server.
I can pull all individual user information I need for creating the signatures by exporting and processing the contact list for [email protected] as a CSV, however this file doesn't make any reference to the images uploaded by the users.
The command used for this export was:
zmmailbox -z -m [email protected] -t 0 getRestURL "//contacts?fmt=csv"
What I've tried so far:
I've looked at Zimbra's documentation and haven't found useful for this exact scenario.
I've run the above export command as all available export types - no image references.
I've tried exporting from the web interface - no luck.
I've also exported all accounts in the [email protected] - no usable image data, but found accounts without images uploaded are missing an extra file, however this file just contains metadata about the account.
Out of curiosity, I SSH'd into the server and had a further look at the DB and can reference a couple users to individual .msg files located in store/0/{mboxid}/msg/0, and in the respective .msg there is raw data of the image I can extract and convert - not ideal but better than nothing I guess. The issue with this is that only a few user's images are in these .msg files so this won't work for all users on the domain.
I'm relatively new to managing Zimbra servers so any thoughts would be greatly appreciated. The server is running Zimbra release 9.0.0 Patch 9.0.0_P33