Zimlet configuration
This page installs the zimlets on a single server installation. In a multi-server installation, see Zimlets configuration.
The package carries, in /opt/msh-zr/zimbra/, what the users of the Zimbra web client need to reach MSH Zimbra Rules:
| File | What it is |
|---|---|
extension/msh-zr-extension.jar | Zimbra server extension |
extension/msh-zr-extension.properties.sample | Its configuration |
zimlets/com_mshsoftware_change_user_info.zip | Change User Info, for the Classic web client |
zimlets/mshsoftware-zimlet-change-user-info.zip | Change User Info, for the Modern web client |
With Change User Info users see their own attributes and change the ones you made editable on the User attributes page. The values they set are used in their signatures, disclaimers and autoresponders; the Zimbra directory does not change.
Run all commands below as a user with sudo rights: the zm... commands switch to the zimbra user with sudo su - zimbra -c, all other commands run as root through sudo.
The extension
Create the directory Zimbra loads the extension from. Zimbra loads every directory under /opt/zimbra/lib/ext/ as an extension; it is owned by the zimbra user, which runs mailboxd:
sudo install -d -o zimbra -g zimbra -m 755 /opt/zimbra/lib/ext/msh-zr
Copy the extension into it, readable by the zimbra user:
sudo install -o zimbra -g zimbra -m 644 /opt/msh-zr/zimbra/extension/msh-zr-extension.jar /opt/zimbra/lib/ext/msh-zr/
Create the extension's configuration from the sample. The file holds the token, so only the zimbra user can read it (mode 600):
sudo install -o zimbra -g zimbra -m 600 /opt/msh-zr/zimbra/extension/msh-zr-extension.properties.sample /opt/zimbra/conf/msh-zr-extension.properties
The configuration sample already calls the web admin on this server over plain HTTP (http://127.0.0.1:7081/); only the token is left to fill in. The web admin created the token in /opt/msh-zr/etc/zimlet-api.token on its first start. Copy it into the configuration, in place of REPLACE_WITH_ZIMLET_API_TOKEN in the web.token line:
sudo sed -i "s|REPLACE_WITH_ZIMLET_API_TOKEN|$(sudo cat /opt/msh-zr/etc/zimlet-api.token)|" /opt/zimbra/conf/msh-zr-extension.properties
Check the token is set:
sudo grep '^web.token=' /opt/zimbra/conf/msh-zr-extension.properties
The output looks like:
web.token=q3Zx8mL1vT0aYb7cRk2sNw9eHf4uJd6pGi5oCl0rEtA
Treat the token like a password: anyone who has it and can reach the web admin port can act as any Zimbra user towards MSH Zimbra Rules.
If you enabled HTTPS for the web admin, it no longer answers plain HTTP, so the extension has to call it over HTTPS and trust its certificate. Skip this step if you did not enable HTTPS.
Print the SHA-256 fingerprint of the certificate the web admin presents:
openssl s_client -connect 127.0.0.1:7081 </dev/null 2>/dev/null | openssl x509 -noout -fingerprint -sha256
The output looks like:
sha256 Fingerprint=AB:CD:EF:...:12
Switch web.url in the configuration to HTTPS and put the value after Fingerprint= into web.fingerprint. The command reads the fingerprint again and replaces any web.fingerprint line already in the file:
sudo sed -i -e 's|^web.url=.*|web.url=https://127.0.0.1:7081/|' -e '/^web.fingerprint=/d' -e "\$a web.fingerprint=$(openssl s_client -connect 127.0.0.1:7081 </dev/null 2>/dev/null | openssl x509 -noout -fingerprint -sha256 | cut -d= -f2)" /opt/zimbra/conf/msh-zr-extension.properties
Check both values are set:
sudo grep -E '^web\.(url|fingerprint)=' /opt/zimbra/conf/msh-zr-extension.properties
The output looks like:
web.url=https://127.0.0.1:7081/
web.fingerprint=AB:CD:EF:...:12
If web.fingerprint is empty, the web admin was not reachable on port 7081; check it is running and run the command again.
Restart mailboxd as the zimbra user:
sudo su - zimbra -c 'zmmailboxdctl restart'
Check the extension is loaded. Without a login it answers 401, not 404:
curl -sk -o /dev/null -w '%{http_code}\n' https://127.0.0.1/service/extension/msh-zr/me
The extension does not load until the token is filled in. A configuration that is missing or wrong stops it from loading as well; the reason is in /opt/zimbra/log/mailbox.log.
The zimlets
Deploy Change User Info for the Classic web client. zmzimletctl deploy installs the zimlet and enables it in the default class of service:
sudo su - zimbra -c 'zmzimletctl deploy /opt/msh-zr/zimbra/zimlets/com_mshsoftware_change_user_info.zip'
Deploy Change User Info for the Modern web client:
sudo su - zimbra -c 'zmzimletctl deploy /opt/msh-zr/zimbra/zimlets/mshsoftware-zimlet-change-user-info.zip'
Clear the zimlet cache of mailboxd, so it serves the new zimlets:
sudo su - zimbra -c 'zmprov flushCache zimlet'
Clear the class of service cache of mailboxd. It keeps serving the class of service it cached before the deploy, so without this a zimlet deployed for the first time stays missing for users:
sudo su - zimbra -c 'zmprov flushCache cos'