Install Zimbra Mail Server

Cara Install Open Source Zimbra Mail Server (ZCS 8.8.12) di CentOS 7

Server Mail adalah salah satu server yang penting dan kritikal untuk banyak organisasi karena kebanyakan komunikasi dilakukan melalui email. Di dunia Open source ada beberapa pasang server email gratis,tapi Zimbra adalah salah satu mail server teratas. Server Zimbra Mail atau disebut ZCS (Zimbra Collaboration Suite) ada dalam dua versi, versi Open Source dan enterprise.


Prerequisites

  • Minimal CentOS 7
  • 8 GB RAM
  • 5 GB Free Space on /opt
  • FQDN (Fully Qualified Domain Name), in my case it is “mail.example.com”
  • A & MX record for your Server

Step:1) Login ke CentOS 7 dan apply updates.

Login ke Server CentOS 7 dan update terbaru menggunakan perintah yum dan kemudian reboot ,
1
yum update && yum upgrade -y ; reboot

Setelah reboot, set hostname dari server, dalam kasus saya menggunakan “mail.example.com”

1
2
~]# hostnamectl set-hostname "mail.example.com"
~]# exec bash

Tambah perintah berikut di /etc/hosts file,

1
192.168.0.108 mail.example.com mail

Setelah konfigurasi hostname, verifikasi A dan MX terkonfigurasi untuk domain menggunakan perintah dig,

1
2
[root@mail ~]# dig -t A mail.example.com
[root@mail ~]# dig -t MX example.com

Disable Selinux

Berikut, disable SELinux. check status dari SELinux, jalankan perintah seperti berikut.

1
getenforce

Output

1
enforcing

Untuk mengganti dari enforcing ke disabled ikuti langkah seperti berikut

vim /etc/selinux/config
Ganti SELinux dari enforcing ke disabled seperti berikut

Disable Unwanted Services

Instalasi default CentOS 7 dengan postfix daemon telah terinstal dan berjalan. Untuk disable dan hapus service postfix jalankan perintah berikut:

1
2
systemctl stop postfix
systemctl disable postfix

Install extra packages
Berikut, install beberapa paket yang di perlukan

1
2
yum -y install unzip net-tools sysstat openssh-clients perl-core libaio nmap-ncat libstdc++.so.6 wget libreoffice-headless libreoffice bind-utils
Reboot server

At this point, reboot the system.

1
reboot

Step:2) Install Zimbra dependencies menggunakan yum

Jalankan perintah berikut untuk install Zimbra / ZCS dependencies
1
[root@mail ~]# yum install unzip net-tools sysstat openssh-clients perl-core libaio nmap-ncat libstdc++.so.6 wget -y

Step:3) Download versi terbaru dari Zimbra (ZCS 8.8.12) menggunakan wget command

Buat folder dengan nama “zimbra”
1
[root@mail ~]# mkdir zimbra && cd zimbra

Gunakan perintah wget seperti berikut untuk download versi terbaru dari ZCS 8.8.10 dari terminal,

1
[root@mail zimbra]# wget https://files.zimbra.com/downloads/8.8.12_GA/zcs-8.8.12_GA_3794.RHEL6_64.20190329045002.tgz --no-check-certificate

Step:4) Install Zimbra / ZCS 8.8.12

Extract download tgz file of ZCS 8.8.10 menggunakan perintah tar seperti berikut
1
[root@mail zimbra]# tar zxpvf zcs-8.8.10_GA_3039.RHEL7_64.20180928094617.tgz
buka folder hasil extract dan jalankan script install,
1
2
[root@mail zimbra]# cd zcs-8.8.12_GA_3794.RHEL6_64.20190329045002
[root@mail zcs-8.8.12_GA_3794.RHEL6_64.20190329045002]# ./install.sh
kamu akan melihat sebuah text based wizard.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
Operations logged to /tmp/install.log.luSct9Pm
Checking for existing installation...
zimbra-chat...NOT FOUND
zimbra-drive...NOT FOUND
zimbra-imapd...NOT FOUND
zimbra-network-modules-ng...NOT FOUND
zimbra-rpost...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
IMPORTANT-READ CAREFULLY: THE TERMS OF THIS END USER LICENSE AGREEMENT ("EULA") WILL GOVERN YOUR USE OF THE SOFTWARE. BY DOWNLOADING, INSTALLING, OR USING THE SOFTWARE, YOU (THE INDIVIDUAL OR LEGAL ENTITY) ARE (1) REPRESENTING THAT YOU ARE OVER THE AGE OF 18 AND HAVE THE CAPACITY AND AUTHORITY TO BIND YOURSELF OR THE LEGAL ENTITY, AS APPLICABLE, TO THE TERMS OF THIS EULA AND (2) AGREEING ON BEHALF OF YOURSELF AND/OR AS AN AUTHORIZED REPRESENTATIVE OF THE LEGAL ENTITY, AS APPLICABLE, TO BE BOUND BY THIS EULA. IF YOU DO NOT AGREE TO THE TERMS OF THIS EULA, YOU MUST NOT DOWNLOAD, INSTALL, OR USE THE SOFTWARE.
Select “y” on the two EULA and license agreement questions.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
The parties acknowledge and agree that a material breach of this
Agreement adversely affecting Autonomy's proprietary rights would cause
irreparable harm to Autonomy for which a remedy at law would be inadequate and
that Autonomy shall be entitled to injunctive relief in addition to any
remedies it may have hereunder or at law.
Do you agree with the terms of the software license agreement? [N]y
Use Zimbra's package repository [Y] y
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-convertd (local)
Found zimbra-memcached (repo)
Found zimbra-proxy (local)
Found zimbra-archiving (local)
Found zimbra-chat (repo)
Found zimbra-drive (repo)
Found zimbra-imapd (local)
Found zimbra-network-modules-ng (local)
In this blog, we are going to install all packages except the convertd, chat , drive , imapd and network-modules-ngand, which are still in beta:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Select the packages to install
Install zimbra-ldap [Y]
Install zimbra-logger [Y]
Install zimbra-mta [Y]
Install zimbra-dnscache [Y]
Install zimbra-snmp [Y]
Install zimbra-store [Y]
Install zimbra-apache [Y]
Install zimbra-spell [Y]
Install zimbra-convertd [Y] n
Install zimbra-memcached [Y]
Install zimbra-proxy [Y]
Install zimbra-archiving [N]
Install zimbra-chat [Y] n
Install zimbra-drive [Y] n
Install zimbra-imapd (BETA - for evaluation only) [N] n
Install zimbra-network-modules-ng [Y] n
Press “y” to allow modification of the system:
1
2
3
4
5
6
7
8
9
10
11
12
The system will be modified.  Continue? [N] Y
Beginning Installation - see /tmp/install.log.luSct9Pm for details...
zimbra-core-components will be downloaded and installed.
zimbra-timezone-data will be installed.
zimbra-common-mbox-conf-msgs will be installed.
zimbra-common-mbox-db will be installed.
zimbra-common-mbox-conf will be installed.
zimbra-common-mbox-native-lib will be installed.
zimbra-common-mbox-docs will be installed.
zimbra-common-mbox-conf-attrs will be installed.
zimbra-common-mbox-conf-rights will be installed.
zimbra-core will be installed.......
This is another hot step. You need to select yes to change the domain and select your own instead mail.example.com, just example.com
DNS ERROR resolving MX for mail.example.com
It is suggested that the domain name have an MX record configured in DNS
Change domain name? [Yes] Y
Create domain: [mail.example.com] example.com
....
done.
Checking for port conflicts

You need to change the admin password by pressing the number 6 (zimbra-store) and then number 4 on the submenu:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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-convertd: Enabled
9) zimbra-proxy: Enabled
10) Default Class of Service Configuration:
11) Enable default backup schedule: yes
s) Save config to file
x) Expand menu
q) Quit
*** CONFIGURATION COMPLETE - press 'a' to apply
Press “a” to apply the changes:

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.10904]
Saving config in /opt/zimbra/config.10904...done.

Press “y” to continue:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
Operations logged to /tmp/zmsetup.20180111-132052.log
Setting local config values...done.
Initializing core config...Setting up CA...done.
Deploying CA to /opt/zimbra/conf/ca ...done.
Creating SSL zimbra-store certificate...done.
Creating new zimbra-ldap SSL certificate...done.
Creating new zimbra-mta SSL certificate...done.
Creating new zimbra-proxy SSL certificate...done.
Installing mailboxd SSL certificates...done.
Installing MTA SSL certificates...done.
Installing LDAP SSL certificate...done.
Installing Proxy SSL certificate...done.
Initializing ldap...done.
Setting replication password...done.
Setting Postfix password...done.
Setting amavis password...done.
Setting nginx password...done.
Setting BES searcher password...done.
Creating server entry for zcs-886.zimbra.io...done.
Setting Zimbra IP Mode...done.
Saving CA in ldap...done.
Saving SSL Certificate in ldap...done.
Setting spell check URL...done.
Setting service ports on zcs-886.zimbra.io...done.
Setting zimbraFeatureTasksEnabled=TRUE...done.
Setting zimbraFeatureBriefcasesEnabled=TRUE...done.
Checking current setting of zimbraReverseProxyAvailableLookupTargets
Querying LDAP for other mailstores
Searching LDAP for reverseProxyLookupTargets...done.

Press “enter” to finish the installation:

1
2
Moving /tmp/zmsetup.20180111-132052.log to /opt/zimbra/log
Configuration complete - press return to exit

Setelah instalasi berhasil, buka browser dan buka alamat server’s IP

Zimbra-Installation-Completed-CentOS7

Step: 5) Konfigurasi Firewall

Buka ports di firewall jika os firewall running di server
1
2
3
4
5
[root@mail ~]# firewall-cmd --permanent --add-port={25,80,110,143,443,465,587,993,995,5222,5223,9071,7071}/tcp
success
[root@mail ~]# firewall-cmd --reload
success
[root@mail ~]#

Step:6) Akses Zimbra Admin Portal & Web Mail Client

Untuk mengakses Zimbra Admin Portal, ketik URL di bawah dalam Web Browser

https://mail.example.com:7071/

Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×