How to Install Zimbra 9 on Ubuntu

Zimbra Mail Server on ubuntu

Mail Server is one of the important and critical Server for any organization as most of business communication done via emails only. which provides services such as LDAP, SMTP, POP and IMAP, webmail client, calendaring, tasks, antivirus, antispam and others. In this i am going to you how to install Install Open Source Zimbra Mail Server on Ubuntu.

Prerequisites of Zimbra Mail Server (ZCS)

  • Ubuntu Vps
  • Memory – Minimum 8GB, recommended 16 GB.
  • CPU – 4-core CPU or 4 vCPUs.
  • Storage space – 10 GB of free hard disk space.
  • DNS Records – FQDN with MX and A DNS-records

Vps Provider With Port 25 Open

The second thing you will need is a VPS server. a public server to install & Setup SMTP.

In My Post i Am Using Digitalocean Vps Server.

Here is a list of some companies:

  1. OVH.
  2. Contabo.
  3. Turnkey internet.
  4. Vpsbg
  5. Hostwinds

DNS Setup

You need to create few records for domain to get started. They are as follows.

TypeHostValue
A@Your IP address
AmailYour IP address
MX@mail.yourdomain.com 10
TXT@v=spf1 a mx ip4:138.68.14.182 ~all
TXT_dmarc“v=DMARC1;p=none;sp=none;pct=100;adkim=r;aspf=r;rua=mailto:[email protected];ruf=mailto:[email protected];ri=86400;fo=1”

Set up zimbra mail server on Ubuntu

Update your system packages before installations

sudo apt-get update
sudo apt-get upgrade

Download and run the script

curl -k https://raw.githubusercontent.com/imanudin11/zimbra-auto-install/master/setup-zimbra-ubuntu18.sh > /tmp/setup-zimbra-ubuntu18.sh
chmod +x /tmp/setup-zimbra-ubuntu18.sh
/tmp/setup-zimbra-ubuntu18.sh

The script will ask for the hostname, domain, and IP address that will be used by Zimbra. The following is an example answer

[INFO] : Configuring hostname, /etc/hosts and resolv.conf
Please insert your Hostname. Example mail : mail
Please insert your Domain name. Example vkttech.com : vkttech.com
Please insert your IP Address : 152.156.2.17

Now, you can install Zimbra. Download, extract, and run install.sh script

cd /opt/
wget -c https://s3.beezim.fr/beebot/upload/1a4ba286-a177-4c02-9757-3adc42ef9e02/zcs-9.0.0_GA_1.UBUNTU18_64.20200416221446.tgz
tar -zxvf zcs-9.0.0_GA_1.UBUNTU18_64.20200416221446.tgz
cd zcs-9.0.0_GA_1.UBUNTU18_64.20200416221446
./install.sh

Once we run above install script then we will get text-based installation wizard, to Accept the license, press Y

Do you agree with the terms of the software license agreement? [N] y
Use Zimbra’s package repository [Y] y

Now Configure the Zimbra package repository and select the all Zimbra Components to install.

Press Y to modify the System,

Select the packages to install

Install zimbra-ldap [Y] y
Install zimbra-logger [Y] y
Install zimbra-mta [Y] y
Install zimbra-dnscache [Y] N
Install zimbra-snmp [Y] y
Install zimbra-store [Y] y
Install zimbra-apache [Y] y
Install zimbra-spell [Y] y
Install zimbra-memcached [Y] y
Install zimbra-proxy [Y] y
Install zimbra-drive [Y] y
Install zimbra-imapd (BETA - for evaluation only) [N] N
Install zimbra-chat [Y] 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

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

After pressing Y, it will download the Zimbra related packages and it can take time depending upon on your internet speed.

Once all the Zimbra packages are installed in the backend then we will get the below window,

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

Beginning Installation - see /tmp/install.log.92OcKO6s for details...

                          zimbra-core-components will be downloaded and installed.
                          zimbra-common-core-jar will be installed.
                         zimbra-common-core-libs will be installed.
                         zimbra-common-mbox-conf will be installed.
                   zimbra-common-mbox-conf-attrs will be installed.
                    zimbra-common-mbox-conf-msgs will be installed.
                  zimbra-common-mbox-conf-rights will be installed.
                           zimbra-common-mbox-db will be installed.
                         zimbra-common-mbox-docs will be installed.
                   zimbra-common-mbox-native-lib will be installed.
                            zimbra-timezone-data 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-dnscache-components will be downloaded and installed.
                                 zimbra-dnscache will be installed.
                          zimbra-snmp-components will be downloaded and installed.
                                     zimbra-snmp will be installed.
Last metadata expiration check: 0:00:56 ago on Sat 01 Aug 2020 01:56:00 AM EDT.
                       zimbra-jetty-distribution will be downloaded and installed.
                         zimbra-store-components will be downloaded and installed.
                   zimbra-mbox-admin-console-war will be installed.
                                zimbra-mbox-conf will be installed.
                                 zimbra-mbox-war will be installed.
                             zimbra-mbox-service will be installed.
                          zimbra-mbox-store-libs will be installed.
                       zimbra-mbox-webclient-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.
Last metadata expiration check: 0:01:07 ago on Sat 01 Aug 2020 01:56:00 AM EDT.
                                zimbra-memcached will be downloaded and installed.
                         zimbra-proxy-components will be downloaded and installed.
                                    zimbra-proxy will be installed.
Last metadata expiration check: 0:01:18 ago on Sat 01 Aug 2020 01:56:00 AM EDT.
                                    zimbra-drive will be downloaded and installed (later).
                                    zimbra-imapd will be installed.
Last metadata expiration check: 0:01:20 ago on Sat 01 Aug 2020 01:56:00 AM EDT.
                                    zimbra-patch will be downloaded and installed (later).
Last metadata expiration check: 0:01:22 ago on Sat 01 Aug 2020 01:56:00 AM EDT.
                                zimbra-mta-patch will be downloaded and installed (later).
Last metadata expiration check: 0:01:23 ago on Sat 01 Aug 2020 01:56:00 AM EDT.
                              zimbra-proxy-patch will be downloaded and installed (later).
Last metadata expiration check: 0:01:27 ago on Sat 01 Aug 2020 01:56:00 AM EDT.
                                     zimbra-chat will be downloaded and installed (later).

Downloading packages (11):
   zimbra-core-components
   zimbra-ldap-components
   zimbra-mta-components
   zimbra-dnscache-components
   zimbra-snmp-components
   zimbra-jetty-distribution
   zimbra-store-components
   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 (11):
   zimbra-core-components
   zimbra-ldap-components
   zimbra-mta-components
   zimbra-dnscache-components
   zimbra-snmp-components
   zimbra-jetty-distribution
   zimbra-store-components
   zimbra-apache-components
   zimbra-spell-components
   zimbra-memcached
   zimbra-proxy-components
      ...

if you get a message like below, press enter or type Yes and change the domain name

DNS ERROR resolving MX for mail.vkttech.com
It is suggested that the domain name have an MX record configured in DNS
Change domain name? [Yes] Yes
Create domain: [mail.vkttech.com] vkttech.com
1) Status:                                  Enabled
   2) Create Admin User:                       yes
   3) Admin user to create:                    [email protected]
** 4) Admin Password                           UNSET
   5) Anti-virus quarantine user:              [email protected]
   6) Enable automated spam training:          yes
   7) Spam training user:                      [email protected]
   8) Non-spam(Ham) training user:             [email protected]
   9) SMTP host:                               mail.centos7.lan
  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://mail.centos7.lan:7780/aspell.php
  19) Enable version update checks:            TRUE
  20) Enable version update notifications:     TRUE
  21) Version update notification email:       [email protected]
  22) Version update source email:             [email protected]
  23) Install mailstore (service webapp):      yes
  24) Install UI (zimbra,zimbraAdmin webapps): yes

Select, or 'r' for previous menu [r] 4 # Select 4 to set admin password Password for [email protected] (min 6 characters): [54mE0RmqN] enter admin password here

Now Press 7 and then 4 to set admin user password,

Main menu

   1) Common Configuration:
   2) zimbra-ldap:                             Enabled
   3) zimbra-logger:                           Enabled
   4) zimbra-mta:                              Enabled
   5) zimbra-dnscache:                         Enabled
   6) zimbra-snmp:                             Enabled
   7) zimbra-store:                            Enabled
   8) zimbra-spell:                            Enabled
   9) zimbra-proxy:                            Enabled
  10) Default Class of Service Configuration:
   s) Save config to file
   x) Expand menu
   q) Quit

*** CONFIGURATION COMPLETE - press 'a' to apply

Now press “r” to go to previous menu and then press “a” to apply the changes.

Once all the changes are applied and Zimbra related services are started then we will get the output something like below,

*** CONFIGURATION COMPLETE - press 'a' to apply
Select from menu, or press 'a' to apply config (? - help) a
Save configuration data to a file? [Yes] Yes
Save config in file: [/opt/zimbra/config.1450] press key enter
Saving config in /opt/zimbra/config.1450...done.
The system will be modified - continue? [No] Yes
Operations logged to /tmp/zmsetup.20200619-013402.log

Access Zimbra Admin Portal & Web Mail Client

To access the Zimbra Admin Portal, type below URL in Web Browser

https://mail.vkttech.com:7071/

To access Zimbra Mail Web Client, type the following URL in the browser

https://mail.vkttech.com.com

Enter Your Username And PassWord

Note: For both the URLs we can use user name as “admin” and password that we set during the installation

Step:6) Troubleshooting Zimbra Services and Logs

There can be some scenarios where some zimbra services might be stopped, to find zimbra services status from command line, run the following command,

[root@mail ~]# su - zimbra
Last login: Sun Oct  7 14:59:48 IST 2018 on pts/0
[zimbra@mail ~]$ zmcontrol status
Host mail.vkttech.com
        amavis                  Running
        antispam                Running
        antivirus               Running
        dnscache                Running
        imapd                   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
[zimbra@mail ~]$

To restart the Zimbra Services use the following command,

[zimbra@mail ~]$ zmcontrol restart
Host mail.vkttech.com
        Stopping zmconfigd...Done.
        Stopping imapd...Done.
        Stopping zimlet webapp...Done.
        Stopping zimbraAdmin webapp...Done.
        Stopping zimbra webapp...Done.
        Stopping service webapp...Done.
        Stopping stats...Done.
        Stopping mta...Done.
        Stopping spell...Done.
        Stopping snmp...Done.
        Stopping cbpolicyd...Done.
        Stopping archiving...Done.
        Stopping opendkim...Done.
        Stopping amavis...Done.
        Stopping antivirus...Done.
        Stopping antispam...Done.
        Stopping proxy...Done.
        Stopping memcached...Done.
        Stopping mailbox...Done.
        Stopping logger...Done.
        Stopping dnscache...Done.
        Stopping ldap...Done.
Host mail.vkttech.com
        Starting ldap...Done.
        Starting zmconfigd...Done.
        Starting dnscache...Done.
        Starting logger...Done.
        Starting mailbox...Done.
        Starting memcached...Done.
        Starting proxy...Done.
        Starting amavis...Done.
        Starting antispam...Done.
        Starting antivirus...Done.
        Starting opendkim...Done.
        Starting snmp...Done.
        Starting spell...Done.
        Starting mta...Done.
        Starting stats...Done.
        Starting service webapp...Done.
        Starting zimbra webapp...Done.
        Starting zimbraAdmin webapp...Done.
        Starting zimlet webapp...Done.
        Starting imapd...Done.
[zimbra@mail ~]$

All the log files for Zimbra server are kept under the folder “/opt/zimbra/log”

Leave a Comment

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply