Sunday, November 22, 2026
TR
Open Source

Install Zimbra Multi Server on Ubuntu 20.04 (Part 3)

Install Zimbra Multi Server on Ubuntu 20.04 (Part 3)
Contents
  1. Before Installing the Zimbra MTA Multi Server
  2. Preparation:
  3. Install the Zimbra MTA
  4. Final Touch
  5. Set Up the SSH Keys
  6. Final touch
  7. Set Up the SSH Keys
  8. Enabling Server Statistics Display
  9. On ALL Mailbox Servers
  10. On the Proxy Server
  11. HTTP to HTTPS Redirect
  12. Change the Admin Notification

This is the last in a series of Zimbra multi-server installation steps on Ubuntu 20.04. Okay, let's install the Zimbra MTA + memcache + Proxy + Anti Spam + Antivirus in the multi-server scheme. We can list the sequence of the Zimbra multi-server installation below:

Note: We call this server the Zimbra MTA. This is because its basic function is as a Mail Transport Agent. On this Zimbra MTA, the Memcached, Proxy, Anti Spam and Antivirus services will be running.

Before Installing the Zimbra MTA Multi Server

Basically, as with the Zimbra LDAP and mailbox preparation, we can repeat the same steps, so that this article does not get too long. I will write a summary here.

Preparation:

  1. Set the IP address to static and configure /etc/hosts.
  2. Set the Hostname and Date/Time.
  3. Disable the firewall.
  4. Install the NTP Server. In the /etc/ntp.conf file, disable all servers and add  "server 192.168.100.100 iburst".
  5. By default, Ubuntu 20/04 ships with  systemd-resolved. Edit /etc/systemd/resolved.conf and set it as follows .
[Resolve]
DNS=192.168.100.100
#FallbackDNS=
Domains=kerimkoc.local

After that, test the lookup against the other server. It should be answered according to the IP address in the DNS field. As we know, port 127.0.0.53 is the system resolver.

root@mta:~# nslookup ldap.kerimkoc.local
Server:         127.0.0.53
Address:        127.0.0.53#53

Non-authoritative answer:
Name:   ldap.kerimkoc.local
Address: 192.168.100.100

root@mta:~# nslookup mail.kerimkoc.com
Server:         127.0.0.53
Address:        127.0.0.53#53

Non-authoritative answer:
Name:   mail.kerimkoc.com
Address: 192.168.100.102

Next, test the NTP client to see whether it can query the NTP server 192.168.100.100. Use the command  ntpq -c sysinfo. Look at the red-line flag sync_ntp. This flag indicates that it can properly query the ntp server 192.168.100.100.

root@mta:~# ntpq -c sysinfo
associd=0 status=0614 leap_none, sync_ntp, 1 event, freq_mode,
system peer:        ldap.kerimkoc.local:123
system peer mode:   client

Install the Zimbra MTA

After the preparation is finished, install the next Zimbra package.

Note: If you need the LDAP passwords, run this command on the Zimbra LDAP server to retrieve the Zimbra LDAP passwords.

su - zimbra
zmlocalconfig -s | grep ldap_amavis_password
zmlocalconfig -s | grep ldap_nginx_password
zmlocalconfig -s | grep ldap_postfix_password
zmlocalconfig -s | grep ldap_replication_password
zmlocalconfig -s | grep ldap_root_password
zmlocalconfig -s | grep zimbra_ldap_password

After you get the passwords, save or copy them. Then enter them later when needed while the installation is running.

wget https://files.zimbra.com/downloads/8.8.15_GA/zcs-8.8.15_GA_4179.UBUNTU20_64.20211118033954.tgz
tar -zxvf zcs-8.8.15_GA_4179.UBUNTU20_64.20211118033954.tgz
cd zcs-8.8.15_GA_4179.UBUNTU20_64.20211118033954
./install.sh

Operations logged to /tmp/install.log.v39fi0HW
Checking for existing installation...
    zimbra-drive...NOT FOUND
    zimbra-imapd...NOT FOUND
    ...
---CUT---
    ...  
----------------------------------------------------------------------
Do you agree with the terms of the software license agreement? [N] y
Use Zimbra's package repository [Y]

Warning: apt-key output should not be parsed (stdout is not a terminal)
Importing Zimbra GPG key
Configuring package repository
Checking for installable packages

Found zimbra-core (local)
Found zimbra-ldap (local)
Found zimbra-logger (local)
Found zimbra-mta (local)
Found zimbra-dnscache (local)
Found zimbra-snmp (local)
Found zimbra-store (local)
Found zimbra-apache (local)
Found zimbra-spell (local)
Found zimbra-memcached (repo)
Found zimbra-proxy (local)
Found zimbra-drive (repo)
Found zimbra-imapd (local)
Found zimbra-patch (repo)
Found zimbra-mta-patch (repo)
Found zimbra-proxy-patch (repo)

Select the packages to install

Install zimbra-ldap [Y] n
Install zimbra-logger [Y] n
Install zimbra-mta [Y]
Install zimbra-dnscache [Y] n
Install zimbra-snmp [Y]
Install zimbra-store [Y] n
Install zimbra-apache [Y] n
Install zimbra-spell [Y] n
Install zimbra-memcached [Y]
Install zimbra-proxy [Y]
Checking required space for zimbra-core

Installing:
    zimbra-core
    zimbra-mta
    zimbra-snmp
    zimbra-memcached
    zimbra-proxy
    zimbra-mta-patch
    zimbra-proxy-patch

The system will be modified.  Continue? [N] Y
Beginning Installation - see /tmp/install.log.IwwYpbem for details...
   ...
---CUT---
   ...  

Checking for port conflicts

Main menu

   1) Common Configuration:
        +Hostname:                             mta.kerimkoc.com
******* +Ldap master host:                     UNSET
        +Ldap port:                            389
******* +Ldap Admin password:                  UNSET
        +LDAP Base DN:                         cn=zimbra
        +Store ephemeral attributes outside Ldap: no
        +Secure interprocess communications:   yes
        +TimeZone:                             America/Los_Angeles
        +IP Mode:                              ipv4
        +Default SSL digest:                   sha256

   2) zimbra-mta:                              Enabled
        +Enable Spamassassin:                  yes
        +Enable Clam AV:                       yes
        +Enable OpenDKIM:                      yes
        +Notification address for AV alerts:   admin@mta.kerimkoc.com
******* +Bind password for postfix ldap user:  UNSET
******* +Bind password for amavis ldap user:   UNSET

   3) zimbra-snmp:                             Enabled
   4) zimbra-proxy:                            Enabled
   s) Save config to file
   x) Expand menu
   q) Quit

Address unconfigured (**) items  (? - help) 1


Common configuration

   1) Hostname:                                mta.kerimkoc.com
** 2) Ldap master host:                        UNSET
   3) Ldap port:                               389
** 4) Ldap Admin password:                     UNSET
   5) LDAP Base DN:                            cn=zimbra
   6) Store ephemeral attributes outside Ldap: no
   7) Secure interprocess communications:      yes
   8) TimeZone:                                America/Los_Angeles
   9) IP Mode:                                 ipv4
  10) Default SSL digest:                      sha256

Select, or 'r' for previous menu [r] 2

Please enter the ldap server hostname: ldap.kerimkoc.local

Common configuration

   1) Hostname:                                mta.kerimkoc.com
   2) Ldap master host:                        ldap.kerimkoc.local
   3) Ldap port:                               389
** 4) Ldap Admin password:                     UNSET
   5) LDAP Base DN:                            cn=zimbra
   6) Store ephemeral attributes outside Ldap: no
   7) Secure interprocess communications:      yes
   8) TimeZone:                                America/Los_Angeles
   9) IP Mode:                                 ipv4
  10) Default SSL digest:                      sha256

Select, or 'r' for previous menu [r] 4

Password for ldap admin user (min 6 characters): 7CB7xJe_4O
Setting defaults from ldap...done.

Common configuration

   1) Hostname:                                mta.kerimkoc.com
   2) Ldap master host:                        ldap.kerimkoc.local
   3) Ldap port:                               389
   4) Ldap Admin password:                     set
   5) LDAP Base DN:                            cn=zimbra
   6) Store ephemeral attributes outside Ldap: yes
   7) Value for zimbraEphemeralBackendURL:     ldap://default
   8) Secure interprocess communications:      yes
   9) TimeZone:                                Asia/Bangkok
  10) IP Mode:                                 ipv4
  11) Default SSL digest:                      sha256

Select, or 'r' for previous menu [r]

Main menu

   1) Common Configuration:
        +Hostname:                             mta.kerimkoc.com
        +Ldap master host:                     ldap.kerimkoc.local
        +Ldap port:                            389
        +Ldap Admin password:                  set
        +LDAP Base DN:                         cn=zimbra
        +Store ephemeral attributes outside Ldap: yes
        +Value for zimbraEphemeralBackendURL:  ldap://default
        +Secure interprocess communications:   yes
        +TimeZone:                             Asia/Bangkok
        +IP Mode:                              ipv4
        +Default SSL digest:                   sha256

   2) zimbra-mta:                              Enabled
        +Enable Spamassassin:                  yes
        +Enable Clam AV:                       yes
        +Enable OpenDKIM:                      yes
        +Notification address for AV alerts:   admin@mta.kerimkoc.com
******* +Bind password for postfix ldap user:  UNSET
******* +Bind password for amavis ldap user:   UNSET

   3) zimbra-snmp:                             Enabled
   4) zimbra-proxy:                            Enabled
        +Enable POP/IMAP Proxy:                TRUE
        +Enable strict server name enforcement? TRUE
        +IMAP server port:                     7143
        +IMAP server SSL port:                 7993
        +IMAP proxy port:                      143
        +IMAP SSL proxy port:                  993
        +POP server port:                      7110
        +POP server SSL port:                  7995
        +POP proxy port:                       110
        +POP SSL proxy port:                   995
******* +Bind password for nginx ldap user:    Not Verified
        +Enable HTTP[S] Proxy:                 TRUE
        +Web server HTTP port:                 8080
        +Web server HTTPS port:                8443
        +HTTP proxy port:                      80
        +HTTPS proxy port:                     443
        +Proxy server mode:                    https

   s) Save config to file
   x) Expand menu
   q) Quit

Address unconfigured (**) items  (? - help) 2


Mta configuration

   1) Status:                                  Enabled
   2) Enable Spamassassin:                     yes
   3) Enable Clam AV:                          yes
   4) Enable OpenDKIM:                         yes
   5) Notification address for AV alerts:      admin@mta.kerimkoc.com
** 6) Bind password for postfix ldap user:     UNSET
** 7) Bind password for amavis ldap user:      UNSET

Select, or 'r' for previous menu [r] 5

Notification address for AV alerts: [admin@mta.kerimkoc.com] admin@kerimkoc.com

Mta configuration

   1) Status:                                  Enabled
   2) Enable Spamassassin:                     yes
   3) Enable Clam AV:                          yes
   4) Enable OpenDKIM:                         yes
   5) Notification address for AV alerts:      admin@kerimkoc.com
** 6) Bind password for postfix ldap user:     UNSET
** 7) Bind password for amavis ldap user:      UNSET

Select, or 'r' for previous menu [r] 6

Password for ldap Postfix user (min 6 characters): 7CB7xJe_4O

Mta configuration

   1) Status:                                  Enabled
   2) Enable Spamassassin:                     yes
   3) Enable Clam AV:                          yes
   4) Enable OpenDKIM:                         yes
   5) Notification address for AV alerts:      admin@kerimkoc.com
   6) Bind password for postfix ldap user:     set
** 7) Bind password for amavis ldap user:      UNSET

Select, or 'r' for previous menu [r] 7

Password for ldap Amavis user (min 6 characters): 7CB7xJe_4O

Mta configuration

   1) Status:                                  Enabled
   2) Enable Spamassassin:                     yes
   3) Enable Clam AV:                          yes
   4) Enable OpenDKIM:                         yes
   5) Notification address for AV alerts:      admin@kerimkoc.com
   6) Bind password for postfix ldap user:     set
   7) Bind password for amavis ldap user:      set

Select, or 'r' for previous menu [r] r

Main menu

   1) Common Configuration:
        +Hostname:                             mta.kerimkoc.com
        +Ldap master host:                     ldap.kerimkoc.local
        +Ldap port:                            389
        +Ldap Admin password:                  set
        +LDAP Base DN:                         cn=zimbra
        +Store ephemeral attributes outside Ldap: yes
        +Value for zimbraEphemeralBackendURL:  ldap://default
        +Secure interprocess communications:   yes
        +TimeZone:                             Asia/Bangkok
        +IP Mode:                              ipv4
        +Default SSL digest:                   sha256

   2) zimbra-mta:                              Enabled
   3) zimbra-snmp:                             Enabled
   4) zimbra-proxy:                            Enabled
        +Enable POP/IMAP Proxy:                TRUE
        +Enable strict server name enforcement? TRUE
        +IMAP server port:                     7143
        +IMAP server SSL port:                 7993
        +IMAP proxy port:                      143
        +IMAP SSL proxy port:                  993
        +POP server port:                      7110
        +POP server SSL port:                  7995
        +POP proxy port:                       110
        +POP SSL proxy port:                   995
******* +Bind password for nginx ldap user:    Not Verified
        +Enable HTTP[S] Proxy:                 TRUE
        +Web server HTTP port:                 8080
        +Web server HTTPS port:                8443
        +HTTP proxy port:                      80
        +HTTPS proxy port:                     443
        +Proxy server mode:                    https

   s) Save config to file
   x) Expand menu
   q) Quit

Address unconfigured (**) items  (? - help) 4


Proxy configuration

   1) Status:                                  Enabled
   2) Enable POP/IMAP Proxy:                   TRUE
   3) Enable strict server name enforcement?   TRUE
   4) IMAP server port:                        7143
   5) IMAP server SSL port:                    7993
   6) IMAP proxy port:                         143
   7) IMAP SSL proxy port:                     993
   8) POP server port:                         7110
   9) POP server SSL port:                     7995
  10) POP proxy port:                          110
  11) POP SSL proxy port:                      995
**12) Bind password for nginx ldap user:       Not Verified
  13) Enable HTTP[S] Proxy:                    TRUE
  14) Web server HTTP port:                    8080
  15) Web server HTTPS port:                   8443
  16) HTTP proxy port:                         80
  17) HTTPS proxy port:                        443
  18) Proxy server mode:                       https

Select, or 'r' for previous menu [r] 12

Password for ldap Nginx user (min 6 characters): [hlYBPeVyEF] 7CB7xJe_4O

Proxy configuration

   1) Status:                                  Enabled
   2) Enable POP/IMAP Proxy:                   TRUE
   3) Enable strict server name enforcement?   TRUE
   4) IMAP server port:                        7143
   5) IMAP server SSL port:                    7993
   6) IMAP proxy port:                         143
   7) IMAP SSL proxy port:                     993
   8) POP server port:                         7110
   9) POP server SSL port:                     7995
  10) POP proxy port:                          110
  11) POP SSL proxy port:                      995
  12) Bind password for nginx ldap user:       set
  13) Enable HTTP[S] Proxy:                    TRUE
  14) Web server HTTP port:                    8080
  15) Web server HTTPS port:                   8443
  16) HTTP proxy port:                         80
  17) HTTPS proxy port:                        443
  18) Proxy server mode:                       https

Select, or 'r' for previous menu [r]

Main menu

   1) Common Configuration:
   2) zimbra-mta:                              Enabled
   3) zimbra-snmp:                             Enabled
   4) zimbra-proxy:                            Enabled
   s) Save config to file
   x) Expand menu
   q) Quit

*** CONFIGURATION COMPLETE - press 'a' to apply
Select from menu, or press 'a' to apply config (? - help)

Main menu

   1) Common Configuration:
   2) zimbra-mta:                              Enabled
   3) zimbra-snmp:                             Enabled
   4) zimbra-proxy:                            Enabled
   s) Save config to file
   x) Expand menu
   q) Quit

*** CONFIGURATION COMPLETE - press 'a' to apply
Select from menu, or press 'a' to apply config (? - help) a
Save configuration data to a file? [Yes]
Save config in file: [/opt/zimbra/config.25834]
Saving config in /opt/zimbra/config.25834...done.
The system will be modified - continue? [No] Yes
Operations logged to /tmp/zmsetup.20220410-132027.log
Setting local config values...done.
You have the option of notifying Zimbra of your installation.
This helps us to track the uptake of the Zimbra Collaboration Server.
The only information that will be transmitted is:
        The VERSION of zcs installed (8.8.15_GA_4179_UBUNTU20_64)
        The ADMIN EMAIL ADDRESS created (admin@kerimkoc.com)
...
...
Configuration complete - press return to exit

After the installation is finished. Check the Zimbra status.

root@mta:~# su - zimbra
zimbra@mta:~$ zmcontrol status
Host mta.kerimkoc.com
        amavis                  Running
        antispam                Running
        antivirus               Running
        memcached               Running
        mta                     Running
        opendkim                Running
        proxy                   Running
        stats                   Running
        zmconfigd               Running

Final Touch

Set Up the SSH Keys

Final touch

Set Up the SSH Keys

To populate the SSH keys, do the following as the  zimbra user ( sudo su - zimbra) on every server:

zmupdateauthkeys

Enabling Server Statistics Display

For server statistics to be displayed in the administration console, the syslog configuration files must be modified.

Zimbra Collaboration supports the default syslog of a supported operating system. Depending on your operating system, the steps in this section may not be correct. See your operating system's documentation for specific information on how to enable syslog.

  1. On each server, as  root,type  /opt/zimbra/libexec/zmsyslogsetup_ This enables the server to display statistics.
  2. On the logger monitor host,   you must enable  syslog  or  rsyslog to log statistics from remote machines: For Syslog :
    1. Edit the  /etc/sysconfig/syslog file,  add -r to the SYSLOGD_OPTIONS setting,  SYSLOGD_options="-r -m 0".
    2. Stop the syslog daemon. Type  /etc/init.d/syslog stop.
    3. Start the syslog daemon. Type  /etc/init.d/syslog start.

For  syslog on  Debian  or   Ubuntu  :

  1. Edit the  /etc/default/syslogd file,  add -r to the SYSLOGD_OPTIONS setting, SYSLOGD_options="-r -m 0"
  2. Stop the syslog daemon. Type  /etc/init.d/sysklogd stop.
  3. Start the syslog daemon. Type start  /etc/init.d/sysklogd .

For  rsyslog :

  1. Uncomment the following lines in /etc/rsyslog.conf$modload imudp $UDPServerRun 514 
  2. Restart rsyslog

For  rsyslog on  RHEL  or   CentOS  : _

  1. Uncomment the following lines in  /etc/rsyslog.conf.# Provides UDP syslog reception #$ModLoad imudp #$UDPServerRun 514 # Provides TCP syslog reception #$ModLoad imtcp #$InputTCPServerRun 514

On ALL Mailbox Servers

Please note, run this command on all mailbox servers.

Please attention, run this command on all mailbox server.

/opt/zimbra/libexec/zmproxyconfig -e -m -H mailbox.node.service.hostname
zmcontrol restart

In my scenario, I will run it like this.

/opt/zimbra/libexec/zmproxyconfig -e -m -H mbox1.kerimkoc.com
zmcontrol restart

On the Proxy Server

/opt/zimbra/libexec/zmproxyconfig -e -m -H proxy.node.service.hostname
zmcontrol restart

In my case, run it like this.

/opt/zimbra/libexec/zmproxyconfig -e -m -H mta.kerimkoc.com
zmcontrol restart

HTTP to HTTPS Redirect

The HTTP proxy can support protocol modes for HTTP only or HTTPS only, both HTTP and HTTPS, mixed HTTP and HTTPS, or an HTTP to HTTPS redirect. Redirect is a popular configuration. This configuration must be made on the proxy servers.

zmprov ms proxy.server.name zimbraReverseProxyAdminEnabled TRUE
zmprov ms proxy.server.name zimbraReverseProxyMailMode redirect

In my case.

zmprov ms mta.kerimkoc.com zimbraReverseProxyAdminEnabled TRUE
zmprov ms mta.kerimkoc.com zimbraReverseProxyMailMode redirect

Change the Admin Notification

zimbra@mbox1:~$ zmlocalconfig -e smtp_source=admin@kerimkoc.com
zimbra@mbox1:~$ zmlocalconfig -e av_notify_user=admin@kerimkoc.com
zimbra@mbox1:~$ zmlocalconfig -e smtp_destination=admin@kerimkoc.com

Then, open the browser and type this URL.

https://mail.kerimkoc.com:9071/zimbraAdmin/

Kerim Koç

Systems and infrastructure engineer. I write about Linux, open source, high availability and security.