Zimbra Multi Server Install: 4 Roles, Order and Mistakes
A small company can run Zimbra "all-in-one" on one machine. When mail volume, user count or uptime needs grow, you split the roles: LDAP, MTA, proxy and mailbox each on their own server. This is a Zimbra multi server installation. In 2016 I built one in my lab with Zimbra 8.6 on CentOS 6 and four servers, and wrote one post per role. This page is the overview: the plan, the preparation I did on every node, and the install order. I have checked each step against the official Zimbra Collaboration Multi-Server Installation Guide (v8.8.15) and corrected what it contradicts.
Contents
What a Zimbra multi server setup splits
The installation guide describes the packages you spread over the servers of a Zimbra multi server:
- zimbra-ldap: OpenLDAP with the Zimbra schema; every account, domain and server setting lives here. The guide says "The Zimbra LDAP server must be configured before any other servers."
- zimbra-mta: Postfix, which "receives email via SMTP and routes each message to the appropriate Zimbra mailbox server using Local Mail Transfer Protocol (LMTP)", plus the anti-virus and anti-spam components.
- zimbra-proxy: an nginx reverse proxy for IMAP/POP/HTTP clients, "normally installed on the MTA server(s) or on its own independent server(s)". It brings zimbra-memcached with it. The guide adds: "Installing the Zimbra Proxy is required as of ZCS 8.7."
- zimbra-store (mailbox): Jetty web applications, the MariaDB data store, the message store and the Lucene index. Optional zimbra-logger "must be installed at the same time as the Zimbra Store package".
The benefit of a Zimbra multi server design is not speed by itself; it is that each role can be scaled or replaced on its own, for example a second MTA behind the MX records or more mailbox servers as users grow. The cost is more machines to patch and more network paths to keep open.
The Zimbra multi server lab plan
My lab used one network, a separate BIND DNS server at 192.168.131.10 (set up as in install BIND DNS server on CentOS) and four Zimbra nodes:
Zimbra LDAP ldap.huuphan.local 192.168.131.11
Zimbra MTA mta.huuphan.local 192.168.131.12
Zimbra Mailbox mailbox.huuphan.local 192.168.131.13
Zimbra Proxy proxy.huuphan.local 192.168.131.14

Two DNS facts decide whether the Zimbra multi server install goes smoothly. Every host name must resolve forward, from every node. And, in the guide's words, "the Zimbra MTA must be configured in DNS with both A and MX records"; the installer checks the MX record of the mail domain and shows an error if it is missing.
Prepare every server in the Zimbra multi server
I repeated these steps on all four nodes (CentOS 6 commands; adjust for your release). First a static address. One correction to my 2016 notes: the file I edited was ifcfg-eth0 but its content said DEVICE=eth1, and the device name inside must match the file. The resolver keys that network-scripts read are DNS1, DNS2:
# vim /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
TYPE=Ethernet
ONBOOT=yes
NM_CONTROLLED=no
BOOTPROTO=static
IPADDR=192.168.131.11
NETMASK=255.255.255.0
GATEWAY=192.168.131.2
DNS1=192.168.131.10
USERCTL=no
PEERDNS=no
Then the resolver, the full host name (the installer uses the server's fully qualified name, for example as the default mail domain) and a hosts file that lists every node, so the servers still find each other if DNS has a problem during the install:
# vim /etc/resolv.conf
search huuphan.local
nameserver 192.168.131.10
# vim /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=ldap.huuphan.local
# vim /etc/hosts
192.168.131.10 ns1.huuphan.local ns1
192.168.131.11 ldap.huuphan.local ldap
192.168.131.12 mta.huuphan.local mta
192.168.131.13 mailbox.huuphan.local mailbox
192.168.131.14 proxy.huuphan.local proxy
# service network restart
Dependencies, and stopping the services that would collide with Zimbra. The guide is strict here: "You cannot have any other web server, database, LDAP, or MTA server running, when you install Zimbra Collaboration."
# yum -y update
# yum -y install perl perl-core wget screen w3m elinks openssh-clients openssh-server unzip nmap sed nc sysstat libaio rsync telnet aspell ntp
# service sendmail stop; chkconfig sendmail off
# service postfix stop; chkconfig postfix off
# sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/sysconfig/selinux
# setenforce 0
Time is not optional on a Zimbra multi server: the guide says "Before you start, verify that the system clocks are synced on all servers." I used:
# ntpdate pool.ntp.org
# date -u
# service ntpd start
# chkconfig ntpd on
Do not create a zimbra user yourself; the guide warns against it because the installer creates the user and its environment.
Firewall: open the ports instead of stopping iptables
In the lab I stopped iptables and ip6tables to keep it simple. On anything reachable from outside, open the ports per role instead. From the guide's port mapping, the main ones:
- MTA: 25 (incoming SMTP), 587 (submission), 465 (SMTPS, legacy clients).
- Proxy (or mailbox without proxy): 80/443 web client, 110/995 POP3, 143/993 IMAP.
- Internal only: 389 LDAP, 7025 LMTP from MTA to mailbox, 7071 admin console, 7072/7073 lookup services used by the proxy and SASL, 7110/7143/7993/7995 backend POP/IMAP behind the proxy.
Allow the internal ports only between the nodes of the Zimbra multi server. The guide also notes that "The Zimbra Proxy package does not act as a firewall and needs to be behind the firewall". My iptables notes are in iptables how to.
Zimbra multi server install order
The guide's "Order of Installation" is: LDAP server(s), MTA server(s), Proxy server(s), then Mailbox server(s). On each node you unpack the same release, run ./install.sh and answer Y only for the packages of that role:
# tar xzvf [zcs.tgz]
# cd [zcs filename]
# ./install.sh
In a Zimbra multi server every node after the first needs the LDAP host name and the passwords that the LDAP install generated, so write them down at step 1. My four install sessions, with the real installer screens:
- Install Zimbra LDAP (zimbra-ldap only; the passwords for the other roles come from here). For a second LDAP master see Zimbra 8.6 multi-master LDAP.
- Install Zimbra MTA (zimbra-mta, pointed at the LDAP host).
- Install Zimbra mailbox (zimbra-store, logger on the same server).
- Install Zimbra proxy.
I installed the proxy last on 8.6, where it was still optional. On 8.7 and later, where the proxy is required, follow the guide's order and install it before the mailbox servers.
Final set-up of a Zimbra multi server
The guide lists two steps after all nodes are installed. Remote management and Postfix queue monitoring use SSH keys between the servers, so run this on each server as the zimbra user:
# su - zimbra
$ zmupdateauthkeys
If the logger is installed, run /opt/zimbra/libexec/zmsyslogsetup as root on each server so the server statistics appear in the admin console, and let the logger host accept remote syslog. Then check every node with zmcontrol status as the zimbra user. When a service shows "Stopped" on the status page even though it runs, in my lab the cause was this syslog chain; see Zimbra some services are not running.
Troubleshooting checklist
- DNS first. From each node, resolve every other node name and the MX record of the mail domain. Make sure no node maps its own full name to 127.0.0.1 in
/etc/hostsand that every node can reach the LDAP host by name. - Clock. Compare
date -uon all nodes. - Ports. From the MTA, test LMTP 7025 to the mailbox and 389 to LDAP before you blame Zimbra.
- Services.
zmcontrol statuson each node, then the logs (/var/log/zimbra.logand/opt/zimbra/log/).
FAQ
Which server do I install first in a Zimbra multi server? LDAP. Every other node registers itself in LDAP during its install.
Can I add servers to a Zimbra multi server later? Yes. The guide's rules for adding a mailbox server: same operating system and patch level, the same time on both machines, and the same ZCS version as the existing node.
Is the proxy optional? It was on 8.6, which this lab used. Since ZCS 8.7 the guide says it is required.
Is CentOS 6 still a good base? No; it is long out of support. Check the system requirements of your Zimbra release on zimbra.com and use a supported distribution. The steps and order above stay the same.
thanks for sharing, this is very helpful. :)
ReplyDeletethanks for reading :)
DeleteWe have 20 offices located different country, and use different domain name, eg: office A uses 'domain-A.com', office-B uses 'domain-B.com',...,etc.
ReplyDeleteNow we want to migrate all offices' domain name to one domain 'domain.com', i.e. each office uses 'domain.com' as their domain name on their zimbra servers. How to setup zimbra server?