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

Set the hostname of your mail server.

hostnamectl set-hostname mail.linuxtender.com

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

139.99.105.245 mail.linuxtender.com mail

Firewall

Zimbra recommends the firewall to be disabled.

### CentOS 7 / RHEL 7 ###

systemctl stop firewalld
systemctl disable firewalld

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

Mail Server Setup

For this demo, I will configure Zimbra to receive emails for domain. linuxtender.com

linuxtender.com is a live internet domain, and it can receive or send emails to internet domains such as gmail.com or yahoo.com. So, I have created one record email server (mail.linuxtender.com) 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.

dig -t MX linuxtender.com

Output:

; <<>> DiG 9.9.4-RedHat-9.9.4-73.el7_6 <<>> -t MX linuxtender.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 56453
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 4

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;linuxtender.com.               IN      MX

;; ANSWER SECTION:
linuxtender.com.        604800  IN      MX      10 mail.linuxtender.com.

;; AUTHORITY SECTION:
linuxtender.com.        165431  IN      NS      ns2.linuxcambodia.com.
linuxtender.com.        165431  IN      NS      ns1.linuxcambodia.com.

;; ADDITIONAL SECTION:
mail.linuxtender.com.   604367  IN      A       139.99.105.245
ns1.linuxcambodia.com.  164191  IN      A       139.99.105.245

Live Domain

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


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


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.

linuxtender.com. 3600 IN TXT "v=spf1 mx mx:linuxtender.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.

You can use DNS Lookup tool to lookup domain from global access at https://www.dnswatch.info

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

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

Go to the extracted folder.


### CentOS 7 / RHEL 7 ###

cd zcs-8.8.10_GA_3039.RHEL7_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 linuxtender.com.

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

Then, press 4 to set the Zimbra admin password.

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


Save the installation log and continue.


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.

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

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

[zimbra@mail ~]$ zmcontrol restart

Access Zimbra Admin Portal

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

https://mail.linuxtender.com:7071/

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



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


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 linuxtender.com. To create an email account, go to Manage >> Accounts >> New.

Access Zimbra Web Mail Client

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

https://mail.linuxtender.com

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

Here, I will log in as it.operation@linuxtender.com


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. Thank you for reading my artical. If you have any futher more concerns or question. Please kindly contact me at pkaylinux@gmail.com

All Right Reserved, Linux Tender