Skip to main content
Version: 1.4

Multi server

This page updates MSH Zimbra Rules in a multi-server installation. On a single Zimbra server, see Single server.

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

Update order​

Update the hosts in this order:

  1. Every MTA server (node and milter), one at a time. The other MTA servers keep filtering mail meanwhile.
  2. The web admin server, after every MTA server runs the new version.
  3. The zimlets and the Zimbra extension on the mailbox servers, if you installed them.

The web admin goes last, so it never sends rules and settings to a server that is older than itself. While a server is older than the web admin, the Servers page shows it as Version mismatch. It keeps filtering mail with the rules and settings it received before, and gets the current ones as soon as it is updated.

Every MTA server​

Commands​

On every MTA server, one at a time:

sudo systemctl stop 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

Description​

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

sudo systemctl stop 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 node and the milter 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

Watch the logs to confirm a clean start before you go on with the next MTA server:

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

The web admin server​

Update it after every MTA server runs the new version.

Commands​

sudo systemctl stop msh-zr-web.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-web.service

Description​

The steps are those of an MTA server, for the web admin service only. Stopping the web admin does not affect mail: the milters keep working with the rules and settings they already have.

Watch the log to confirm a clean start:

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

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

The zimlets and the Zimbra extension, on the mailbox servers​

Skip this if you did not install them with Zimlets configuration. Their configuration in /opt/zimbra/conf/msh-zr-extension.properties is kept.

MSH Zimbra Rules is not installed on the mailbox servers, so take the new extension and zimlets from the new package. On every mailbox server, copy the new msh-zr-<VERSION>.tgz there and extract its zimbra/ directory to /tmp, as root. This creates /tmp/msh-zr/zimbra:

sudo tar zxvf msh-zr-<VERSION>.tgz -C /tmp msh-zr/zimbra

Make the extracted files readable by the zimbra user, as root:

sudo chmod -R a+rX /tmp/msh-zr

If a mailbox server is also an MTA server, it was updated above: skip these two commands there and use /opt/msh-zr/zimbra instead of /tmp/msh-zr/zimbra below.

Copy the new Zimbra extension over the old one, on every mailbox server, as root:

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

Restart mailboxd so it loads the new extension, on every mailbox server, 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, on one mailbox server, as the zimbra user:

sudo su - zimbra -c 'zmzimletctl deploy /tmp/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, on the same mailbox server, as the zimbra user:

sudo su - zimbra -c 'zmzimletctl deploy /tmp/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, on the same mailbox server, as the zimbra user. When updating from 1.3, this deploys them for the first time:

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

Clear the zimlet cache of mailboxd, so it serves the new zimlets, on the same mailbox server, 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, on the same mailbox server, or users do not get it:

sudo su - zimbra -c 'zmprov flushCache cos'

Remove the extracted package, on every mailbox server, as root:

sudo rm -rf /tmp/msh-zr

Additional resources​