How To Install Open Source Zimbra Mail Server 8.8 on CentOS 7 / RHEL 7 & Ubuntu 16.04

0

In any organization, email service is one of the essential and critical services for communication. Proprietary software such as Microsoft Exchange (Outlook 360), IBM dominos and cloud email services like G Suite are ahead of race compared to opensource suits.

But, one such product that is giving a good fight to them is ZCS (Zimbra Collaboration Suite). Zimbra is one of the leading mail server used by many organizations, and it comes in two versions, Open Source, and Enterprise version.

Requirements

  • CentOS 7 / RHEL 7 / Ubuntu 16.04
  • 8 GB RAM
  • 5 GB Free Space on /opt/Zimbra
  • 10 GB free disk space on /opt and /tmp
  • Fully Qualified Domain Name (FQDN), in my case it is “mail.itzgeek.local”
  • A & MX record for your Server
  • The firewall should be disabled

In this post, we will install Open Source Zimbra Collaboration Suite 8.8.10 on CentOS 7 / RHEL 7 & Ubuntu 16.04.

Prerequisites

Become the root user.

sudo su -

OR

su -

Install below packages.

### CentOS 7 / RHEL 7 ###

yum install -y bind-utils net-tools wget curl perl

### Ubuntu 16.04 ###

apt-get install -y curl perl wget

Set the hostname of your mail server.

hostnamectl set-hostname mail.itzgeek.local

Add the following lines in the /etc/hosts file.

192.168.1.25 mail.itzgeek.local mail

Firewall

Zimbra recommends the firewall to be disabled.

### CentOS 7 / RHEL 7 ###

systemctl stop firewalld
systemctl disable firewalld

### Ubuntu 16.04 ###

ufw disable

Disable Services

CentOS 7 / RHEL 7

In CentOS 7, postfix is installed and running by default. So, we need to disable it for Zimbra installation.

systemctl stop postfix
systemctl disable postfix

Ubuntu 16.04

In Ubuntu 16.04, dnsmasq uses port 53 and acts as local resolver which conflicts with Zimbra DNS. So, we need to disable the use of dnsmasq.

Edit NetworkManager.conf file.

nano /etc/NetworkManager/NetworkManager.conf

Comment out the dns=dnsmasq line by putting a hash # in front of it.

#dns=dnsmasq

Then, restart the service.

service network-manager restart

Mail Server Setup

For this demo, I will configure Zimbra to receive emails for domain itzgeek.local.

itzgeek.local is not a live internet domain, and it can’t receive or send emails to internet domains such as gmail.com or yahoo.com. So, I have created one more email server (blog.local) in my environment to test the functionality.

Installation for the live domain is similar to local domain setup, and it will work only if the A, MX and SPF records are created properly as shown in the next step.

Create A and Mx Record

You would need to create A and MX record for your domain to receive emails.

1. For Local Test Domain

2. For Live Domain

Local Test Domain

The local test domain set up is done by creating A and MX record on the local DNS server.

READ: How To Configure DNS Server on CentOS 7 / RHEL 7

READ: How To Configure DNS Server On Ubuntu 16.04

Verify A and MX Records

Verify that the A is configured for your domain using dig command.

dig -t A mail.itzgeek.local

Output:

; <<>> DiG 9.9.4-RedHat-9.9.4-72.el7 <<>> mail.itzgeek.local
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 49222
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4000
;; QUESTION SECTION:
;mail.itzgeek.local.            IN      A

;; ANSWER SECTION:
mail.itzgeek.local.     3600    IN      A       192.168.1.25

;; Query time: 0 msec
;; SERVER: 192.168.1.230#53(192.168.1.230)
;; WHEN: Thu Dec 06 09:53:22 IST 2018
;; MSG SIZE  rcvd: 63

Verify MX records.

dig -t MX itzgeek.local

Output:

; <<>> DiG 9.9.4-RedHat-9.9.4-72.el7 <<>> -t MX itzgeek.local
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 621
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 2

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4000
;; QUESTION SECTION:
;itzgeek.local.                 IN      MX

;; ANSWER SECTION:
itzgeek.local.          3600    IN      MX      10 mail.itzgeek.local.

;; ADDITIONAL SECTION:
mail.itzgeek.local.     3600    IN      A       192.168.1.25

;; Query time: 0 msec
;; SERVER: 192.168.1.230#53(192.168.1.230)
;; WHEN: Thu Dec 06 09:54:02 IST 2018
;; MSG SIZE  rcvd: 79

Live Domain

A record is to point your system’s FQDN (hostname) to your mail server IPv4 address.

NAME                TTL    TYPE      DATA

mail.itzgeek.com.   3600     A     35.193.38.113

MX record is to specify which mail server is responsible for accepting email messages on behalf of your domain.

NAME          TYPE  PRIORITY      DATA

itzgeek.com.   MX    10      mail.itzgeek.com.

SPF record is used to verify which mail servers are permitted to send email on behalf of your domain. In the example below, emails sent from all servers defined in MX record of itzgeek.com are permitted.

itzgeek.com. 3600 IN TXT "v=spf1 mx mx:itzgeek.com ~all"

PTR (Pointer) is an IP address to domain name mapping, and it’s the exact opposite of A record which maps domain names to IP addresses.

Most of the organizations have spam filters which will perform a reverse DNS lookup on the IP address of your email server that is sending emails to them and would block emails from your server if the PTR record is not set.

You would most likely need to reach to your hosting provider / ISP and make a request to create a reverse PTR record for your mail server IP address

If you are struggling to create DNS records, you can always reach your domain registrar for assistance.

Download Zimbra Collaboration 8.8 – Open Source Edition

Create a directory called zimbra to place the installer.

mkdir /zimbra
cd /zimbra

Download the Zimbra Collaboration Suite 8.8 – Open Source Edition from the official site or download using the wget command

### CentOS 7 / RHEL 7 ###

wget https://files.zimbra.com/downloads/8.8.10_GA/zcs-8.8.10_GA_3039.RHEL7_64.20180928094617.tgz

### Ubuntu 16.04 ### 

wget https://files.zimbra.com/downloads/8.8.10_GA/zcs-8.8.10_GA_3039.UBUNTU16_64.20180928094617.tgz

Install Zimbra Collaboration 8.8 – Open Source Edition

Extract the downloaded Zimbra archive file using the tar command

### CentOS 7 / RHEL 7 ###

tar -zxvf zcs-8.8.10_GA_3039.RHEL7_64.20180928094617.tgz

### Ubuntu 16.04 ###

tar -zxvf zcs-8.8.10_GA_3039.UBUNTU16_64.20180928094617.tgz

Go to the extracted folder.

### CentOS 7 / RHEL 7 ###

cd zcs-8.8.10_GA_3039.RHEL7_64.20180928094617

### Ubuntu 16.04 ###

cd zcs-8.8.10_GA_3039.UBUNTU16_64.20180928094617/

Execute the install script.

./install.sh

Once you execute the install script, you will get text-based installation wizard. Press Y to accept the Zimbra license agreement.

Install Open Source Zimbra Mail Server on CentOS 7 - Accept Zimbra License Agreement
Install Open Source Zimbra Mail Server on CentOS 7 – Accept Zimbra License Agreement

Now Configure the Zimbra package repository.

Install Open Source Zimbra Mail Server on CentOS 7 - Configure Zimbra Package Repository
Install Open Source Zimbra Mail Server on CentOS 7 – Configure Zimbra Package Repository

Press Y to all Zimbra Components to install.

Also, press Y to continue to download the Zimbra related packages. This task can take time depending upon on your internet speed.

Install Open Source Zimbra Mail Server on CentOS 7 - Confirm Zimbra Installation
Install Open Source Zimbra Mail Server on CentOS 7 – Confirm Zimbra Installation

Once all the Zimbra packages are download and installed, we will get the below window.

Enter the domain name for Zimbra installation.

In my case, it is itzgeek.local.

If your installation is for the live domain, enter like domain.com or domain.org.
Install Open Source Zimbra Mail Server on CentOS 7 - Enter Domain
Install Open Source Zimbra Mail Server on CentOS 7 – Enter Domain

Now we need to set the Zimbra admin password. To do that, press 7.

Install Open Source Zimbra Mail Server on CentOS 7 - Set Zimbra Admin Password
Install Open Source Zimbra Mail Server on CentOS 7 – Set Zimbra Admin Password

Then, press 4 to set the Zimbra admin password.

Install Open Source Zimbra Mail Server on CentOS 7 - Enter Zimbra Admin Password
Install Open Source Zimbra Mail Server on CentOS 7 – Enter Zimbra Admin Password

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

Install Open Source Zimbra Mail Server on CentOS 7 - Apply Configuration
Install Open Source Zimbra Mail Server on CentOS 7 – Apply Configuration

Save the installation log and continue.

Install Open Source Zimbra Mail Server on CentOS 7 - Complete Configuration
Install Open Source Zimbra Mail Server on CentOS 7 – Complete Configuration

Upon successful completion of configuration and starting the services, you will get the output something like below.

Install Open Source Zimbra Mail Server on CentOS 7 - Installation Completed
Install Open Source Zimbra Mail Server on CentOS 7 – Installation Completed

Verify Zimbra Services

To check the Zimbra services status from the command line, you would need to switch to zimbra user.

[root@mail ~]# su - zimbra

Then, run the following command.

[zimbra@mail ~]$ zmcontrol status

Output:

Zimbra Mail Services Status
Zimbra Mail Services Status

If required, you can restart the Zimbra Services using the following command.

[zimbra@mail ~]$ zmcontrol restart

Output:

Restarting Zimbra Server
Restarting Zimbra Server

Access Zimbra Admin Portal

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

https://mail.itzgeek.local:7071/

You will get the Zimbra admin login page. Login with admin and the password you entered during the installation.

Zimbra Admin Portal Login
Zimbra Admin Portal Login

Upon login, you will get the dashboard where you can view the summary.

Zimbra Admin Portal
Zimbra Admin Portal

Create Email Account (Optional)

To test the functionality of Zimbra, I would be creating an email account for receiving an email from second test domain blog.local. To create an email account, go to Manage >> Accounts >> New.

Zimbra Admin Portal - Create New Email Account
Zimbra Admin Portal – Create New Email Account

Enter the account details.

Zimbra Admin Portal - New Account Name
Zimbra Admin Portal – New Account Name

Scroll the window down to set the password for the new email account. Then, click finish.

Zimbra Admin Portal - New Account Password
Zimbra Admin Portal – New Account Password

Access Zimbra Web Mail Client

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

https://mail.itzgeek.local

Log in as the newly created user or as admin to see admin emails.

Here, I will log in as [email protected].

Zimbra Web Mail Client Login Page
Zimbra Web Mail Client Login Page

The Zimbra webmail will look like below.

Zimbra Web Mail
Zimbra Web Mail

The below screenshot I took after I sent an email from my second domain and you can see it is from [email protected]. This email confirms that the Zimbra is working as expected.

Zimbra Web Mail Client - Email From Other Domain
Zimbra Web Mail Client – Email From Other Domain

UnInstall Zimbra Collaboration 8.8 – Open Source Edition

In any time, you want to uninstall Zimbra mail server from the system. Go to the installer directory.

cd /zimbra/zcs-8.8.10_GA_3039.RHEL7_64.20180928094617

Then, run the install.sh script followed by -u.

./install.sh -u

That’s All.

You might also like