How to Install Zimbra Mail Server in Ubuntu 20.04|18.04|16.04

How to Install Zimbra Mail Server in Ubuntu 20.04|18.04|16.04

Zimbra is Mail server software that can be hosted locally or hosted by the Zimbra team. Exist in a variety including Network Edition and Zimbra collaboration which is free and open-source community software. In this guide am going to take you through how to install Zimbra Collaboration in Ubuntu 20.04, 18.04, and 16.04. Therefore you will need to have either of the OS running on your system and the server should be accessible via SSH with the user who owns sudo privileges. You will also need a local DNS server like Dnsmasq or Bind DNS.

System Requirements.

Your Zimbra server will have to meet below minimum requirements to be able to support at least up to 50 users.

  • 8GB RAM
  • 4vCPUs
  • 50GB available storage
  • DNS server

Step 1: Set up DNS Records for Zimbra Mail Server

Go to the control panel where you have hosted your domain and create the A record and MX record which we will be using in our installation.

======================================================================== 
FQDN Name                   DNS Record Type          Value
========================================================================
zimbra.techiescode.com             A                192.168.0.103
techiescode.com                    MX               zimbra.techiescode.com

Step 2: Install and Configure Dnsmasq

Update your system.

$ sudo apt update && sudo apt upgrade -y

If you have not yet installed Dnsmasq please follow up to step 2 of Best Way How to Install and Configure Dnsmasq in Ubuntu 22.04|20.04|18.04 and have everything set in place.

After installation, set the following variables in the /etc/dnsmasq.conf file to match your server.

$ sudo mv /etc/dnsmasq.conf /etc/dnsmasq.conf.bak
$ sudo vim /etc/dnsmasq.conf
server=8.8.8.8
listen-address=127.0.0.1
domain=zimbra.techiescode.com  # Define domain
mx-host=zimbramx.techiescode.com
address=/zimbra.techiescode.com/192.168.0.103

Set the hostname of your mail server corresponding to you A record created

sudo hostnamectl set-hostname zimbra.techiescode.com
$exec bash

Set server hostname in /etc/hosts file. 

$ vim /etc/hosts
192.168.0.103   zimbra.techiescode.com

When done restart Dnsmasq to apply the changes

$ sudo systemctl restart dnsmasq

Step 3: Download Zimbra Collaboration Open Source Edition To Your Server

Visit Zimbra’s official download page to download the latest or preferred version of Zimbra. In this case, we are using version 8.8.15.

# Ubuntu 20.04
cd /tmp
wget https://files.zimbra.com/downloads/8.8.15_GA/zcs-8.8.15_GA_4179.UBUNTU20_64.20211118033954.tgz
# Ubuntu 18.04
cd /tmp
wget https://files.zimbra.com/downloads/8.8.15_GA/zcs-8.8.15_GA_3869.UBUNTU18_64.20190918004220.tgz
# Ubuntu 16.04
cd /tmp
wget https://files.zimbra.com/downloads/8.8.15_GA/zcs-8.8.15_GA_3869.UBUNTU16_64.20190918004220.tgz

Extract files with help of below command

$ tar xvf zcs-8.8.15_GA_*.tgz

Navigate to the extracted directory with Zimbra files. 

$ cd zcs*/

Run installation script to start the installation process. 


$ ./install.sh
Operations logged to /tmp/install.log.QUjypo01
Checking for existing installation...
zimbra-drive...NOT FOUND
zimbra-imapd...NOT FOUND
zimbra-patch...NOT FOUND
zimbra-mta-patch...NOT FOUND
zimbra-proxy-patch...NOT FOUND
zimbra-license-tools...NOT FOUND
zimbra-license-extension...NOT FOUND
zimbra-network-store...NOT FOUND
zimbra-network-modules-ng...NOT FOUND
zimbra-chat...NOT FOUND
zimbra-talk...NOT FOUND
zimbra-ldap...NOT FOUND
zimbra-logger...NOT FOUND
zimbra-mta...NOT FOUND
zimbra-dnscache...NOT FOUND
zimbra-snmp...NOT FOUND
zimbra-store...NOT FOUND
zimbra-apache...NOT FOUND
zimbra-spell...NOT FOUND
zimbra-convertd...NOT FOUND
zimbra-memcached...NOT FOUND
zimbra-proxy...NOT FOUND
zimbra-archiving...NOT FOUND
zimbra-core...NOT FOUND
----------------------------------------------------------------------
PLEASE READ THIS AGREEMENT CAREFULLY BEFORE USING THE SOFTWARE.
SYNACOR, INC. ("SYNACOR") WILL ONLY LICENSE THIS SOFTWARE TO YOU IF YOU
FIRST ACCEPT THE TERMS OF THIS AGREEMENT. BY DOWNLOADING OR INSTALLING
THE SOFTWARE, OR USING THE PRODUCT, YOU ARE CONSENTING TO BE BOUND BY
THIS AGREEMENT. IF YOU DO NOT AGREE TO ALL OF THE TERMS OF THIS
AGREEMENT, THEN DO NOT DOWNLOAD, INSTALL OR USE THE PRODUCT.
License Terms for this Zimbra Collaboration Suite Software:
https://www.zimbra.com/license/zimbra-public-eula-2-6.html
----------------------------------------------------------------------

Accept Zimbra licensing terms to continue with the installation.

Do you agree with the terms of the software license agreement? [N]Y

Accept use of Zimbra package repo for installation.

Use Zimbra's package repository [Y]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 Zimbra packages to install.

Install zimbra-ldap [Y] 
Install zimbra-logger [Y]
Install zimbra-mta [Y] 
Install zimbra-dnscache [Y] N
Install zimbra-snmp [Y]
Install zimbra-store [Y]
Install zimbra-apache [Y]
Install zimbra-spell [Y]
Install zimbra-memcached [Y]
Install zimbra-proxy [Y]
Install zimbra-drive [Y]
Install zimbra-imapd (BETA - for evaluation only) [N]
Install zimbra-chat [Y]
Checking required space for zimbra-core
Checking space for zimbra-store
Checking required packages for zimbra-store
zimbra-store package check complete.
Installing:
zimbra-core
zimbra-ldap
zimbra-logger
zimbra-mta
zimbra-snmp
zimbra-store
zimbra-apache
zimbra-spell
zimbra-memcached
zimbra-proxy
zimbra-drive
zimbra-patch
zimbra-mta-patch
zimbra-proxy-patch
zimbra-chat

Allow your system to be modified for Zimbra to be installed. 

The system will be modified.  Continue? [N] Y

Beginning Installation - see /tmp/install.log.zfTL4GQK for details...
zimbra-core-components will be downloaded and installed.
zimbra-timezone-data will be installed.
zimbra-common-mbox-db will be installed.
zimbra-common-mbox-docs will be installed.
zimbra-common-core-jar will be installed.
zimbra-common-mbox-conf will be installed.
zimbra-common-mbox-conf-msgs will be installed.
zimbra-common-mbox-conf-attrs will be installed.
zimbra-common-mbox-native-lib will be installed.
zimbra-common-mbox-conf-rights will be installed.
zimbra-common-core-libs will be installed.
zimbra-core will be installed.
zimbra-ldap-components will be downloaded and installed.
zimbra-ldap will be installed.
zimbra-logger will be installed.
zimbra-mta-components will be downloaded and installed.
zimbra-mta will be installed.
zimbra-snmp-components will be downloaded and installed.
zimbra-snmp will be installed.
zimbra-store-components will be downloaded and installed.
zimbra-jetty-distribution will be downloaded and installed.
zimbra-mbox-war will be installed.
zimbra-mbox-conf will be installed.
zimbra-mbox-service will be installed.
zimbra-mbox-webclient-war will be installed.
zimbra-mbox-store-libs will be installed.
zimbra-mbox-admin-console-war will be installed.
zimbra-store will be installed.
zimbra-apache-components will be downloaded and installed.
zimbra-apache will be installed.
zimbra-spell-components will be downloaded and installed.
zimbra-spell will be installed.
zimbra-memcached will be downloaded and installed.
zimbra-proxy-components will be downloaded and installed.
zimbra-proxy will be installed.
zimbra-drive will be downloaded and installed (later).
zimbra-patch will be downloaded and installed (later).
zimbra-mta-patch will be downloaded and installed (later).
zimbra-proxy-patch will be downloaded and installed (later).
zimbra-chat will be downloaded and installed (later).

Now the process of downloading and installation of Zimbra packages will begin here.

Downloading packages (10):
zimbra-core-components
zimbra-ldap-components
zimbra-mta-components
zimbra-snmp-components
zimbra-store-components
zimbra-jetty-distribution
zimbra-apache-components
zimbra-spell-components
zimbra-memcached
zimbra-proxy-components
...done
Removing /opt/zimbra
Removing zimbra crontab entry...done.
Cleaning up zimbra init scripts...done.
Cleaning up /etc/security/limits.conf...done.
Finished removing Zimbra Collaboration Server.
Installing repo packages (10):
zimbra-core-components
zimbra-ldap-components
zimbra-mta-components
zimbra-snmp-components
zimbra-store-components
zimbra-jetty-distribution
zimbra-apache-components
zimbra-spell-components
zimbra-memcached
zimbra-proxy-components
...done
Installing local packages (25):
zimbra-timezone-data
zimbra-common-mbox-db
zimbra-common-mbox-docs
zimbra-common-core-jar
zimbra-common-mbox-conf
zimbra-common-mbox-conf-msgs
zimbra-common-mbox-conf-attrs
zimbra-common-mbox-native-lib
zimbra-common-mbox-conf-rights
zimbra-common-core-libs
zimbra-core
zimbra-ldap
zimbra-logger
zimbra-mta
zimbra-snmp
zimbra-mbox-war
zimbra-mbox-conf
zimbra-mbox-service
zimbra-mbox-webclient-war
zimbra-mbox-store-libs
zimbra-mbox-admin-console-war
zimbra-store
zimbra-apache
zimbra-spell
zimbra-proxy
...done
Installing extra packages (5):
zimbra-drive
zimbra-patch
zimbra-mta-patch
zimbra-proxy-patch
zimbra-chat
...done
Running Post Installation Configuration:
Operations logged to /tmp/zmsetup.20220514-205750.log
Installing LDAP configuration database...done.

Set Admin Password at this stage. This is the password you should use to access the admin console.

Main menu
1) Common Configuration:
2) zimbra-ldap:                             Enabled
3) zimbra-logger:                           Enabled
4) zimbra-mta:                              Enabled
5) zimbra-snmp:                             Enabled
6) zimbra-store:                            Enabled
+Create Admin User:                    yes
+Admin user to create:                 admin@zimbra.techiescode.com
******* +Admin Password                        UNSET
+Anti-virus quarantine user:           virus-quarantine._wit6hnqbb@zimbra.techiescode.com
+Enable automated spam training:       yes
+Spam training user:                   spam.0ccahhh6ix@zimbra.techiescode.com
+Non-spam(Ham) training user:          ham._xiijxfgz5@zimbra.techiescode.com
+SMTP host:                            zimbra.techiescode.com
+Web server HTTP port:                 8080
+Web server HTTPS port:                8443
+Web server mode:                      https
+IMAP server port:                     7143
+IMAP server SSL port:                 7993
+POP server port:                      7110
+POP server SSL port:                  7995
+Use spell check server:               yes
+Spell server URL:                     http://zimbra.techiescode.com:7780/aspell.php
+Enable version update checks:         TRUE
+Enable version update notifications:  TRUE
+Version update notification email:    admin@zimbra.techiescode.com
+Version update source email:          admin@zimbra.techiescode.com
+Install mailstore (service webapp):   yes
+Install UI (zimbra,zimbraAdmin webapps): yes
7) zimbra-spell:                            Enabled
8) zimbra-proxy:                            Enabled
9) Default Class of Service Configuration:
s) Save config to file
x) Expand menu
q) Quit
Address unconfigured (**) items  (? - help) 6

Store configuration
1) Status:                                  Enabled
2) Create Admin User:                       yes
3) Admin user to create:                    admin@zimbra.techiescode.com
** 4) Admin Password                           UNSET
5) Anti-virus quarantine user:              virus-quarantine._wit6hnqbb@zimbra.techiescode.com
6) Enable automated spam training:          yes
7) Spam training user:                      spam.0ccahhh6ix@zimbra.techiescode.com
8) Non-spam(Ham) training user:             ham._xiijxfgz5@zimbra.techiescode.com
9) SMTP host:                               zimbra.techiescode.com
10) Web server HTTP port:                    8080
11) Web server HTTPS port:                   8443
12) Web server mode:                         https
13) IMAP server port:                        7143
14) IMAP server SSL port:                    7993
15) POP server port:                         7110
16) POP server SSL port:                     7995
17) Use spell check server:                  yes
18) Spell server URL:                        http://zimbra.techiescode.com:7780/aspell.php
19) Enable version update checks:            TRUE
20) Enable version update notifications:     TRUE
21) Version update notification email:       admin@zimbra.techiescode.com
22) Version update source email:             admin@zimbra.techiescode.com
23) Install mailstore (service webapp):      yes
24) Install UI (zimbra,zimbraAdmin webapps): yes
Select, or 'r' for previous menu [r] 4

Password for admin@zimbra.techiescode.com (min 6 characters): [CQQfdsJ6u] myAdminSecurePassword
Store configuration
1) Status:                                  Enabled
2) Create Admin User:                       yes
3) Admin user to create:                    admin@zimbra.techiescode.com
4) Admin Password                           set
5) Anti-virus quarantine user:              virus-quarantine._wit6hnqbb@zimbra.techiescode.com
6) Enable automated spam training:          yes
7) Spam training user:                      spam.0ccahhh6ix@zimbra.techiescode.com
8) Non-spam(Ham) training user:             ham._xiijxfgz5@techies.novum.co.ke
9) SMTP host:                               zimbra.techiescode.com
10) Web server HTTP port:                    8080
11) Web server HTTPS port:                   8443
12) Web server mode:                         https
13) IMAP server port:                        7143
14) IMAP server SSL port:                    7993
15) POP server port:                         7110
16) POP server SSL port:                     7995
17) Use spell check server:                  yes
18) Spell server URL:                        http://techies.novum.co.ke:7780/aspell.php
19) Enable version update checks:            TRUE
20) Enable version update notifications:     TRUE
21) Version update notification email:       admin@zimbra.techiescode.com
22) Version update source email:             admin@zimbra.techiescode.com
23) Install mailstore (service webapp):      yes
24) Install UI (zimbra,zimbraAdmin webapps): yes
Main menu
1) Common Configuration:
2) zimbra-ldap:                             Enabled
3) zimbra-logger:                           Enabled
4) zimbra-mta:                              Enabled
5) zimbra-snmp:                             Enabled
6) zimbra-store:                            Enabled
7) zimbra-spell:                            Enabled
8) zimbra-proxy:                            Enabled
9) Default Class of Service Configuration:
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.28218]
Saving config in /opt/zimbra/config.28218...done.
The system will be modified - continue? [No] Yes

The system will be modified as more files are being configured. When done, Zimbra services will be started automatically.

Installing common zimlets...
com_zimbra_email...done.
com_zimbra_tooltip...done.
com_zimbra_viewmail...done.
com_zimbra_url...done.
com_zimbra_ymemoticons...done.
com_zimbra_adminversioncheck...done.
com_zimbra_bulkprovision...done.
com_zimbra_proxy_config...done.
com_zimbra_srchhighlighter...done.
com_zimbra_attachmail...done.
com_zimbra_attachcontacts...done.
com_zextras_drive_open...done.
com_zextras_chat_open...done.
com_zimbra_date...done.
com_zimbra_clientuploader...done.
com_zimbra_phone...done.
com_zimbra_mailarchive...done.
com_zimbra_cert_manager...done.
com_zimbra_webex...done.
Finished installing common zimlets.
Restarting mailboxd...done.
Creating galsync account for default domain...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_3869_UBUNTU18_64)
The ADMIN EMAIL ADDRESS created (admin@zimbra.techiescode.com)
Notify Zimbra of your installation? [Yes]
Notifying Zimbra of installation via http://www.zimbra.com/cgi-bin/notify.cgi?VER=8.8.15_GA_3869_UBUNTU18_64&MAIL=admin@zimbra.techiescode.com
Checking if the NG started running...done.
Setting up zimbra crontab...done.
Moving /tmp/zmsetup.20220514-205750.log to /opt/zimbra/log
Configuration complete - press return to exit

Zimbra installation is now complete. Confirm that all services are running. 

$ sudo su - zimbra -c "zmcontrol status"
Host zimbra.techiescode.com
amavis                  Running
antispam                Running
antivirus               Running
ldap                    Running
logger                  Running
mailbox                 Running
memcached               Running
mta                     Running
opendkim                Running
proxy                   Running
service webapp          Running
snmp                    Running
spell                   Running
stats                   Running
zimbra webapp           Running
zimbraAdmin webapp      Running
zimlet webapp           Running
zmconfigd               Running

To access the Zimbra admin web interface, use the URL https://ServerIP/hostname: 7071

Login with your admin user and the password you set during installation. 

From the above, you can now add Domain and user accounts to your mail server and start using them.

Conclusion

We have successfully managed to install Zimbra Collaboration Open Source Edition in Ubuntu 20.04|18.04|16.04. Should you encounter any error do let us know and assist in troubleshooting. You can set up a mail server and run it on any cloud platform like Angani Limited or on-prem servers. Share, comment, and explore more on our platform.

Learn How to Configure Nginx Server-Blocks in Ubuntu 22.04|20.04|18.04

Best Tools To Use In Monitor Linux Systems Performance

How to install TeamViewer in Ubuntu 18.04|20.04

Leave a Reply

Your email address will not be published. Required fields are marked *

three × three =