Skip to main content
Version: 1.4

Single server

This page updates MSH Zimbra Rules on a single Zimbra server. For a Zimbra installation with several servers, see Multi server.

Before you start, read what the update keeps and back up /opt/msh-zr/etc. While the milter is stopped, Postfix applies milter_default_action to new mail, see Mail flow during the update.

Commands​

Here are the commands needed to update the application. They can be invoked one by one in the terminal. If you would like to have a description of each command, please refer to the Description section below.

sudo systemctl stop msh-zr-web.service msh-zr-node.service msh-zr-milter.service
sudo tar zxvf msh-zr-<VERSION>.tgz -C /opt --exclude='msh-zr/etc/*'
sudo sh /opt/msh-zr/lib/fixperms.sh
sudo systemctl daemon-reload
sudo systemctl start msh-zr-node.service msh-zr-milter.service msh-zr-web.service

Description​

Stop the services. From this point until the milter is started again, mail on this host is handled according to milter_default_action (see Mail flow during the update).

sudo systemctl stop msh-zr-web.service msh-zr-node.service msh-zr-milter.service

Unpack the new package over the existing tree, keeping the live etc/ directory as-is.

sudo tar zxvf msh-zr-<VERSION>.tgz -C /opt --exclude='msh-zr/etc/*'

Re-apply ownership and permissions.

sudo sh /opt/msh-zr/lib/fixperms.sh

Reload systemd to pick up any changes to the service unit files.

sudo systemctl daemon-reload

Start the services again. The order does not matter. If you temporarily switched milter_default_action to tempfail for the update, set it back to accept now.

sudo systemctl start msh-zr-node.service msh-zr-milter.service msh-zr-web.service

Verify​

Watch the logs to confirm a clean start:

journalctl -u msh-zr-node.service -u msh-zr-milter.service -u msh-zr-web.service -f

Then open the Servers page of the web admin. The server must show the new version in the Version column and the state Up to date.

Zimbra extension and zimlets​

Skip this if you did not install them with Zimlet configuration. They are not updated by the commands above; the new extension and zimlets are now in /opt/msh-zr/zimbra. Their configuration in /opt/zimbra/conf/msh-zr-extension.properties is kept.

Copy the new Zimbra extension over the old one, as root:

sudo install -o zimbra -g zimbra -m 644 /opt/msh-zr/zimbra/extension/msh-zr-extension.jar /opt/zimbra/lib/ext/msh-zr/

Restart mailboxd so it loads the new extension, as the zimbra user:

sudo su - zimbra -c 'zmmailboxdctl restart'

Deploy the new Change User Info for the Classic web client over the old one, as the zimbra user:

sudo su - zimbra -c 'zmzimletctl deploy /opt/msh-zr/zimbra/zimlets/com_mshsoftware_change_user_info.zip'

Deploy the new Change User Info for the Modern web client over the old one, as the zimbra user:

sudo su - zimbra -c 'zmzimletctl deploy /opt/msh-zr/zimbra/zimlets/mshsoftware-zimlet-change-user-info.zip'

Deploy the new Message Notices for the Classic and the Modern web client over the old ones, as the zimbra user. When updating from 1.3, this deploys them for the first time:

sudo su - zimbra -c 'zmzimletctl deploy /opt/msh-zr/zimbra/zimlets/com_mshsoftware_message_notices.zip'
sudo su - zimbra -c 'zmzimletctl deploy /opt/msh-zr/zimbra/zimlets/mshsoftware-zimlet-message-notices.zip'

Clear the zimlet cache of mailboxd, so it serves the new zimlets, as the zimbra user:

sudo su - zimbra -c 'zmprov flushCache zimlet'

After deploying a zimlet for the first time, also clear the class of service cache, or users do not get it:

sudo su - zimbra -c 'zmprov flushCache cos'

Additional resources​