Sebelum membuat mail server, jika anda belum menginstal centos 7 anda bisa cek disini
Persiapan
Dalam membuat mail server dengan zimbra berikut yang harus disiapkan, diantaranya
- Server / VPS – System Requirements
- IP Public – Nat IP Publik ke IP Local untuk Port nya
- Centos 7 – cek disini
- Zimbra 8.8.12 – Download
- Domain
Langkah Membuat Mail Server dengan Zimbra
1. Instalasi paket yang dibutuhkan
#
| yum install nano wget bind bind-utils telnet perl firewalld -y |
2. Atur TimeZone Centos
#
| timedatectl set-timezone Asia/Jakarta |
3. Atur Hostname Centos
#
| hostnamectl set-hostname mail.latihanzimbra.ga |
4. Stop dan Disable Postfix
#
#
| systemctl stop postfixsystemctl disable postfix |
#
| nano /etc/hosts |
Masukkan IP Address Centos (Cek Dengan Perintah: ifconfig / ip addr) IP Contoh: 111.222.333.444. Save dengan Ctrl+o
111.222.333.444 mail.latihanzimbra.ga mail |
6. Ubah Konfigurasi resolv.conf
#
| nano /etc/resolv.conf |
Tambahkan baris berikut di paling atas, ganti ip dengan ip anda. Save dengan Ctrl+o
nameserver 111.222.333.444 |
Membuat DNS Server Local
7. Create zone di dns server bind
#
| nano /etc/named.conf |
Ubah
options { listen-on port 53 { 127.0.0.1; }; listen-on-v6 port 53 { ::1; }; directory "/var/named"; dump-file "/var/named/data/cache_dump.db"; statistics-file "/var/named/data/named_stats.txt"; memstatistics-file "/var/named/data/named_mem_stats.txt"; allow-query { localhost; }; |
Menjadi
options { listen-on port 53 { any; }; listen-on-v6 port 53 { ::1; }; directory "/var/named"; dump-file "/var/named/data/cache_dump.db"; statistics-file "/var/named/data/named_stats.txt"; memstatistics-file "/var/named/data/named_mem_stats.txt"; allow-query { any; }; |
Tambahkan baris berikut setelah session-keyfile “/run/named/session.key”;
bisa juga diganti menggunakan IP Address DNS Server ISP.
forwarders { 8.8.8.8; 8.8.4.4; }; |
Tambahkan berikut pada baris paling bawah
Simpan perubahan menggunakan Ctrl+o
zone "latihanzimbra.ga" { type master; file "/var/named/latihanzimbra.ga.hosts"; }; |
8. Create latihanzimbra.ga.hosts
#
| nano /var/named/latihanzimbra.ga.hosts |
Isi dengan baris dibawah (silahkan diubah sesuai nama domain dan IP Address yang digunakan)
$ttl 38400latihanzimbra.ga. IN SOA mail.latihanzimbra.ga. admin.latihanzimbra.ga. ( 1520401032 10800 3600 604800 38400 )latihanzimbra.ga. IN NS mail.latihanzimbra.ga.mail.latihanzimbra.ga. IN A 111.222.333.444latihanzimbra.ga. IN MX 10 mail |
9. Restart dns server bind
#
| systemctl restart named |
10. Check lookup
#
| nslookup mail.latihanzimbra.ga |
Bila respon seperti dibawah, konfigurasi sudah benar
[root@latihanzimbra etc]# nslookup mail.latihanzimbra.gaServer: 111.222.333.444Address: 111.222.333.444#53Name: mail.latihanzimbra.gaAddress: 111.222.333.444 |
Download dan Install Zimbra Mail Server
Untuk dapat membuat mail server dengan zimbra, harus download terlebih dahulu software zimbra, setelah itu di install
1. Download Paket zimbra mail server
# #
#
| cd /opt/wget https://files.zimbra.com/downloads/8.8.12_GA/zcs-8.8.12_GA_3794.RHEL7_64.20190329045002.tgz |
2. Ekstrak Paket
#
#
| tar -zxvf zcs-8.8.12_GA_3794.RHEL7_64.20190329045002.tgzcd zcs-8.8.12_GA_3794.RHEL7_64.20190329045002 |
3. Install Zimbra Mail Server
#
| ./install.sh |
4. Ketik y kemudian enter
----------------------------------------------------------------------PLEASE READ THIS AGREEMENT CAREFULLY BEFORE USING THE SOFTWARE.SYNACOR, INC. ("SYNACOR") WILL ONLY LICENSE THIS SOFTWARE TO YOU IF YOUFIRST ACCEPT THE TERMS OF THIS AGREEMENT. BY DOWNLOADING OR INSTALLINGTHE SOFTWARE, OR USING THE PRODUCT, YOU ARE CONSENTING TO BE BOUND BYTHIS AGREEMENT. IF YOU DO NOT AGREE TO ALL OF THE TERMS OF THISAGREEMENT, THEN DO NOT DOWNLOAD, INSTALL OR USE THE PRODUCT.License Terms for this Zimbra Collaboration Suite Software:https://www.zimbra.com/license/zimbra-public-eula-2-6.html----------------------------------------------------------------------
Do you agree with the terms of the software license agreement? [N] y |
5. Ketik y Enter
Use Zimbra's package repository [Y] y |
Ketik y atau n sesuai contoh dibawah
Select the packages to installInstall zimbra-ldap [Y] yInstall zimbra-logger [Y] yInstall zimbra-mta [Y] yInstall zimbra-dnscache [Y] nInstall zimbra-snmp [Y] yInstall zimbra-store [Y] yInstall zimbra-apache [Y] yInstall zimbra-spell [Y] yInstall zimbra-memcached [Y] yInstall zimbra-proxy [Y] yInstall zimbra-drive [Y] yInstall zimbra-imapd (BETA - for evaluation only) [N] nInstall zimbra-chat [Y] y |
6. Ketik y kemudian enter
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-chatThe system will be modified. Continue? [N] y |
7. Ketik y, kemudian masukkan nama domain. (tanpa mail. di depan) ikuti contoh dibawah
DNS ERROR resolving MX for mail.latihanzimbra.gaIt is suggested that the domain name have an MX record configured in DNSChange domain name? [Yes] yCreate domain: [mail.latihanzimbra.ga] latihanzimbra.ga |
8. Ubah password admin zimbra, ketik 6 kemudian enter
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: admin@latihanzimbra.ga******* +Admin Password UNSET +Anti-virus quarantine user: virus-quarantine.vqn1ugcv8y@latihanzimbra.ga +Enable automated spam training: yes +Spam training user: spam.nl5jjee2@latihanzimbra.ga +Non-spam(Ham) training user: ham.wdw5m0ki@latihanzimbra.ga +SMTP host: mail.latihanzimbra.ga +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.latihanzimbra.ga:7780/aspell.php +Enable version update checks: TRUE +Enable version update notifications: TRUE +Version update notification email: admin@latihanzimbra.ga +Version update source email: admin@latihanzimbra.ga +Install mailstore (service webapp): yes +Install UI (zimbra,zimbraAdmin webapps): yes 7) zimbra-spell: Enabled 8) zimbra-proxy: Enabled 9) Default Class of Service Configuration: s) Save config to file x) Expand menu q) QuitAddress unconfigured (**) items (? - help) 6 |
Store configuration 1) Status: Enabled 2) Create Admin User: yes 3) Admin user to create: admin@latihanzimbra.ga** 4) Admin Password UNSET 5) Anti-virus quarantine user: virus-quarantine.vqn1ugcv8y@latihanzimbra.ga 6) Enable automated spam training: yes 7) Spam training user: spam.nl5jjee2@latihanzimbra.ga 8) Non-spam(Ham) training user: ham.wdw5m0ki@latihanzimbra.ga 9) SMTP host: mail.latihanzimbra.ga 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.latihanzimbra.ga:7780/aspell.php 19) Enable version update checks: TRUE 20) Enable version update notifications: TRUE 21) Version update notification email: admin@latihanzimbra.ga 22) Version update source email: admin@latihanzimbra.ga 23) Install mailstore (service webapp): yes 24) Install UI (zimbra,zimbraAdmin webapps): yesSelect, or 'r' for previous menu [r] 4 |
Masukkan password admin (contoh: latihanzimbra)
Password for admin@latihanzimbra.ga (min 6 characters): [Gp023iETas] latihanzimbra |
9. Ketik r kemudian enter
Store configuration 1) Status: Enabled 2) Create Admin User: yes 3) Admin user to create: admin@latihanzimbra.ga 4) Admin Password set 5) Anti-virus quarantine user: virus-quarantine.vqn1ugcv8y@latihanzimbra.ga 6) Enable automated spam training: yes 7) Spam training user: spam.nl5jjee2@latihanzimbra.ga 8) Non-spam(Ham) training user: ham.wdw5m0ki@latihanzimbra.ga 9) SMTP host: mail.latihanzimbra.ga 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.latihanzimbra.ga:7780/aspell.php 19) Enable version update checks: TRUE 20) Enable version update notifications: TRUE 21) Version update notification email: admin@latihanzimbra.ga 22) Version update source email: admin@latihanzimbra.ga 23) Install mailstore (service webapp): yes 24) Install UI (zimbra,zimbraAdmin webapps): yesSelect, or 'r' for previous menu [r] r |
10. Ikutin sesuai petunjuk dibawah
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-proxy: Enabled 9) Default Class of Service Configuration: s) Save config to file x) Expand menu q) Quit*** CONFIGURATION COMPLETE - press 'a' to applySelect from menu, or press 'a' to apply config (? - help) aSave configuration data to a file? [Yes] ySave config in file: [/opt/zimbra/config.10132]Saving config in /opt/zimbra/config.10132...done.The system will be modified - continue? [No] y |
11. Ketik n kemudian enter
You have the option of notifying Zimbra of your installation.This helps us to track the uptake of the Zimbra Collaboration Server.The only information that will be transmitted is: The VERSION of zcs installed (8.8.12_GA_3794_RHEL7_64) The ADMIN EMAIL ADDRESS created (admin@latihanzimbra.ga)Notify Zimbra of your installation? [Yes] n |
12. Tekan Enter
Moving /tmp/zmsetup.20190411-102605.log to /opt/zimbra/logConfiguration complete - press return to exit |
13. Jalankan firewalld
#
| systemctl start firewalld |
14. Masukkan perintah berikut untuk membuka port akses zimbra, copy+paste kemudian enter
firewall-cmd --permanent --zone=public --add-port=25/tcpfirewall-cmd --permanent --zone=public --add-port=80/tcpfirewall-cmd --permanent --zone=public --add-port=110/tcpfirewall-cmd --permanent --zone=public --add-port=143/tcpfirewall-cmd --permanent --zone=public --add-port=443/tcpfirewall-cmd --permanent --zone=public --add-port=465/tcpfirewall-cmd --permanent --zone=public --add-port=587/tcpfirewall-cmd --permanent --zone=public --add-port=993/tcpfirewall-cmd --permanent --zone=public --add-port=995/tcpfirewall-cmd --permanent --zone=public --add-port=3443/tcpfirewall-cmd --permanent --zone=public --add-port=5222/tcpfirewall-cmd --permanent --zone=public --add-port=5223/tcpfirewall-cmd --permanent --zone=public --add-port=9071/tcpfirewall-cmd --permanent --zone=public --add-port=8443/tcpfirewall-cmd --permanent --zone=public --add-port=7071/tcpfirewall-cmd --permanent --zone=public --add-port=53/tcpfirewall-cmd --permanent --zone=public --add-port=53/udpfirewall-cmd --reload |
Jika komputer mati dan ingin memulai lagi, maka:
#
#
# |
sudo su
su - zimbra
zmcontrol start |
Jika ingin melihat satus zimbra
#
|
zmcontrol status
|
Jika inin merestart
#
| zmcontrol restart |