Step-by-Step Guide to Installing Zimbra 10 on Ubuntu 20.04

build-smtp-mail-server

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 Zimbra 10 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 10 on Ubuntu 20

Update your system packages before installations

root@mail:~# sudo apt-get update
root@mail:~# sudo apt-get upgrade

Set Timezone

root@mail:~#  timedatectl set-timezone Asia/kolkata

Set Hostname

root@mail:~# hostnamectl set-hostname mail.vkttech.com
root@mail:~# hostnamectl

After that, open file sudo nano /etc/hosts with text editor.

127.0.0.1 localhost
104.35.278.129 mail.vkttech.com mail

Download Zimbra 10

Download the Zimbra 10 installation package from the official Zimbra website. Navigate to the Zimbra Downloads page and get the URL for the latest Zimbra 10 version. license key send via email by zimbra team.

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

root@mail:~#  cd /opt/
root@mail:~#  wget https://files.zimbra.com/downloads/10.1.0_GA/zcs-NETWORK-10.1.0_GA_4633.UBUNTU20_64.20240610085557.tgz
root@mail:~#  tar -zxvf  zcs-NETWORK-10.1.0_GA_4633.UBUNTU20_64.20240610085557.tgz
root@mail:~#  cd zcs-NETWORK-10.1.0_GA_4633.UBUNTU20_64.20240610085557
root@mail:~#   ./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-license-daemon [Y] y

Install zimbra-store [Y] y

Install zimbra-apache [Y] y

Install zimbra-spell [Y] y

Install zimbra-convertd [Y] y

Install zimbra-memcached [Y] y

Install zimbra-proxy [Y] y

Install zimbra-archiving [N] y

Install zimbra-onlyoffice [Y] y
Checking required space for zimbra-core
Checking space for zimbra-store

Installing:
zimbra-core
zimbra-ldap
zimbra-logger
zimbra-mta
zimbra-snmp
zimbra-license-daemon
zimbra-store
zimbra-apache
zimbra-spell
zimbra-convertd
zimbra-memcached
zimbra-proxy
zimbra-archiving
zimbra-onlyoffice
zimbra-license-tools
zimbra-license-extension
zimbra-network-store
zimbra-modern-ui
zimbra-modern-zimlets
zimbra-zimlet-document-editor
zimbra-zimlet-classic-document-editor
zimbra-zimlet-classic-set-default-client
zimbra-patch
zimbra-mta-patch
zimbra-proxy-patch
zimbra-ldap-patch
zimbra-rabbitmq-server

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.aFTqrdpm for details...

                          zimbra-core-components will be downloaded and installed.
                            zimbra-timezone-data will be installed.
                          zimbra-common-core-jar will be installed.
                   zimbra-common-mbox-conf-attrs will be installed.
                    zimbra-common-mbox-conf-msgs will be installed.
                   zimbra-common-mbox-native-lib will be installed.
                  zimbra-common-mbox-conf-rights will be installed.
                         zimbra-common-mbox-conf will be installed.
                           zimbra-common-mbox-db will be installed.
                         zimbra-common-mbox-docs 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-license-daemon will be downloaded and installed.
                         zimbra-store-components will be downloaded and installed.
                       zimbra-jetty-distribution will be downloaded and installed.
                                zimbra-mbox-conf will be installed.
                                 zimbra-mbox-war will be installed.
                             zimbra-mbox-service will be installed.
                       zimbra-mbox-webclient-war will be installed.
                   zimbra-mbox-admin-console-war will be installed.
                          zimbra-mbox-store-libs will be installed.
                         zimbra-mbox-ews-service 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-license-tools will be installed.
                        zimbra-license-extension will be installed.
                            zimbra-network-store will be installed.
                                 zimbra-convertd will be installed.
                                zimbra-memcached will be downloaded and installed.
                         zimbra-proxy-components will be downloaded and installed.
                                    zimbra-proxy will be installed.
                                zimbra-archiving will be installed.
                               zimbra-onlyoffice will be downloaded and installed.
                                zimbra-modern-ui will be downloaded and installed (later).
                           zimbra-modern-zimlets will be downloaded and installed (later).
                   zimbra-zimlet-document-editor will be downloaded and installed (later).
           zimbra-zimlet-classic-document-editor will be downloaded and installed (later).
        zimbra-zimlet-classic-set-default-client 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-ldap-patch will be downloaded and installed (later).
                          zimbra-rabbitmq-server will be downloaded and installed.

Downloading packages (13):
   zimbra-core-components
   zimbra-ldap-components
   zimbra-mta-components
   zimbra-snmp-components
   zimbra-license-daemon
   zimbra-store-components
   zimbra-jetty-distribution
   zimbra-apache-components
   zimbra-spell-components
   zimbra-memcached
   zimbra-proxy-components
   zimbra-onlyoffice
   zimbra-rabbitmq-server
      ...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 (13):
   zimbra-core-components
   zimbra-ldap-components
   zimbra-mta-components
   zimbra-snmp-components
   zimbra-license-daemon
   zimbra-store-components
   zimbra-jetty-distribution
   zimbra-apache-components
   zimbra-spell-components
   zimbra-memcached
   zimbra-proxy-components
   zimbra-onlyoffice
   zimbra-rabbitmq-server
      ...done

Installing local packages (31):
   zimbra-timezone-data
   zimbra-common-core-jar
   zimbra-common-mbox-conf-attrs
   zimbra-common-mbox-conf-msgs
   zimbra-common-mbox-native-lib
   zimbra-common-mbox-conf-rights
   zimbra-common-mbox-conf
   zimbra-common-mbox-db
   zimbra-common-mbox-docs
   zimbra-common-core-libs
   zimbra-core
   zimbra-ldap
   zimbra-logger
   zimbra-mta
   zimbra-snmp
   zimbra-mbox-conf
   zimbra-mbox-war
   zimbra-mbox-service
   zimbra-mbox-webclient-war
   zimbra-mbox-admin-console-war
   zimbra-mbox-store-libs
   zimbra-mbox-ews-service
   zimbra-store
   zimbra-apache
   zimbra-spell
   zimbra-license-tools
   zimbra-license-extension
   zimbra-network-store
   zimbra-convertd
   zimbra-proxy
   zimbra-archiving
      ...done

Installing extra packages (9):
   zimbra-modern-ui
   zimbra-modern-zimlets
   zimbra-zimlet-document-editor
   zimbra-zimlet-classic-document-editor
   zimbra-zimlet-classic-set-default-client
   zimbra-patch
   zimbra-mta-patch
   zimbra-proxy-patch
   zimbra-ldap-patch
      ...done

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

Running Post Installation Configuration:
Copying /tmp/install.log.aFTqrdpm to /opt/zimbra/log
Operations logged to /tmp/zmsetup.20240809-084758.log
Installing LDAP configuration database...done.
Setting defaults...

DNS ERROR resolving MX for mail.vkttech.xyz
It is suggested that the domain name have an MX record configured in DNS
Change domain name? [Yes] yes
Create domain: [mail.vkttech.xyz] vkttech.xyz
        MX: mail.vkttech.xyz (172.105.151.44)

        Interface: 127.0.0.1
        Interface: ::1
        Interface: 172.105.151.44
        Interface: 192.168.173.41
        Interface: 2600:3c02::f03c:94ff:fe6d:5dd9
done.
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:                 [email protected]
******* +Admin Password                        UNSET
        +Anti-virus quarantine user:           [email protected]
        +Enable automated spam training:       yes
        +Spam training user:                   [email protected]
        +Non-spam(Ham) training user:          [email protected]
        +SMTP host:                            mail.vkttech.xyz
        +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://mail.vkttech.xyz:7780/aspell.php
        +Enable version update checks:         TRUE
        +Enable version update notifications:  TRUE
        +Version update notification email:    [email protected]
        +Version update source email:          [email protected]
        +Install mailstore (service webapp):   yes
        +Install UI (zimbra,zimbraAdmin webapps): yes
******* +License Activation:                   UNSET

   7) zimbra-spell:                            Enabled
   8) zimbra-convertd:                         Enabled
   9) zimbra-proxy:                            Enabled
  10) zimbra-onlyoffice:                       Enabled
  11) zimbra-license-daemon:                   Enabled
  12) Default Class of Service Configuration:
  13) Enable default backup schedule:          yes
   s) Save config to file
   x) Expand menu
   q) Quit

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

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


Store configuration

   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.vkttech.xyz
  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.vkttech.xyz: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
**25) License Activation:                      UNSET

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

Password for [email protected] (min 6 characters): [yhdwUbbde] vikash123

Now Press 25 to set zimbra 10 License,

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

1) Activate license with installation
2) Activate license after installation

Select, or 'r' for previous menu [r] 1
Please enter the license key (enter 'r' for previous menu): 539465398594915763

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”

Generate DKIM key on Zimbra
su zimbra
[zimbra@mail root]$ /opt/zimbra/libexec/zmdkimkeyutil -a -d vkttech.com

All Done .

Leave a Comment

Comments

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

Leave a Reply