Zimbra

How To Install Zimbra 8.6 on CentOS 6 Part 1

Usually, i am always using SUSE Linux Enterprise Server as operating system for Zimbra Mail Server. But, starting from Zimbra 9.x.x, SLES has been deprecated (end of life) and may be will not supported by Zimbra. Therefore, i attempt to using CentOS as operating system for Zimbra. For easy understanding, this is my information system

Domain     : imanudin.net
Hostname   : mail
IP Address : 192.168.80.91
Gateway    : 192.168.80.11

# Configure Network

First, we must configure network on CentOS. Assuming name of your network interface is eth0

vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
ONBOOT=yes
NM_CONTROLLED=no
BOOTPROTO=none
IPADDR=192.168.80.91
NETMASK=255.255.255.0
DNS1=192.168.80.91
GATEWAY=192.168.80.11
DNS2=192.168.80.11
DNS3=8.8.8.8
USERCTL=no

Restart network service and setup for automatic boot

service network restart
chkconfig network on

# Configure Disable Selinux & Firewall

Open file /etc/sysconfig/selinux and change SELINUX=enforcing become SELINUX=disabled. Also disable some service such as iptables and ip6tables.

setenforce 0
service iptables stop
service ip6tables stop
chkconfig iptables off
chkconfig ip6tables off

# Configure /etc/hosts, /etc/resolv.conf and hostname

Open file /etc/hosts and configure as follows

127.0.0.1     localhost
192.168.80.91 mail.imanudin.net mail

Open file /etc/resolv.conf and configure as follows

search imanudin.net
nameserver 192.168.80.91
nameserver 192.168.80.11
nameserver 8.8.8.8

Do the following command as root and open file /etc/sysconfig/network to change hostname to the name mail.imanudin.net

hostname mail.imanudin.net
vi /etc/sysconfig/network

Change HOSTNAME so that like below :

NETWORKING=yes
HOSTNAME=mail.imanudin.net

# Disable service sendmail or postfix

Do the following command as root

service sendmail stop
service postfix stop
chkconfig sendmail off
chkconfig postfix off

# Update repo and install packages dependencies needed by Zimbra

yum update
yum -y install perl perl-core wget screen w3m elinks openssh-clients openssh-server bind bind-utils unzip nmap sed nc sysstat libaio rsync telnet aspell

# Configure local DNS Server

Zimbra needed lookup to MX records on domain that used. For that purpose, we can configure dns server on the same machine with Zimbra mail server

Open file /etc/named.conf and add any on listen-on port 53 and allow-query as follows

listen-on port 53 { 127.0.0.1; any; };
allow-query     { localhost; any; };

Create a zone at the bottom of file named.conf as follows

zone "imanudin.net" IN {
type master;
file "db.imanudin.net";
allow-update { none; };
};

Create database for a new zone who has been created in folder /var/named/

touch /var/named/db.imanudin.net
chgrp named /var/named/db.imanudin.net
vi /var/named/db.imanudin.net

fill as follows

$TTL 1D
@       IN SOA  ns1.imanudin.net. root.imanudin.net. (
                                        0       ; serial
                                        1D      ; refresh
                                        1H      ; retry
                                        1W      ; expire
                                        3H )    ; minimum
@       IN      NS      ns1.imanudin.net.
@       IN      MX      0 mail.imanudin.net.
ns1     IN      A       192.168.80.91
mail    IN      A       192.168.80.91

# Restart Service & Check results configuration of DNS Server

service named restart
chkconfig named on
nslookup mail.imanudin.net
dig imanudin.net mx

If results from above command like follows, your dns configuration has been success

[root@mail opt]# nslookup mail.imanudin.net
Server:         192.168.80.91
Address:        192.168.80.91#53
Name: mail.imanudin.net
Address: 192.168.80.91

Preparation for install Zimbra has been finished. Now we can install zimbra and will explained on part 2 😀

Good luck and hopefully useful 😀

Let’s See the Video on Youtube

70 comments

  1. How to change Zimbra logo with my custom one. if you pls suggest me step by step.

    Thanks
    Md. Saidul Islam Talukder

  2. Dear im new to zimbra i need some information about it.
    is it open source or we require a license to use it.?

  3. Hello Iman,
    Great tutorial. A quick one though. what if i want to host more than one domain mails in one server/box. How do i configure both the DNSs and Zimbra the case.
    Thanks

    1. Hello Chacha,

      DNS internal for other domain not required. You only need to configure MX records in Public DNS to refer into server same as first domain

  4. hello iman,
    i want to install zimbra behind firewall, let say i already configure nat in router, how do i set the dns, so zimbra still can receive mail from gmail, yahoo, etc and also from internal

  5. Hi

    thx for your work

    am new in email server configuration,i did the same steps it works but i have some problem
    i would like to send and receive email from external how can i configure my server

  6. Dear iman,
    i am very new to zimbra i followed your steps and its configured moreover its working fine

    i just wants to know its a open sources are licenced one
    i followed this url but i cant find the answer
    https://www.zimbra.com/
    please help me to get the answer

  7. dear iman
    thanks for your help

    when i trying to get the imapsync with gmail app its says can not connect to the imap.gmail.com

    i installed imapsync package in the server (Centos 6.5)
    need help

  8. Dear Iman,

    Really a good article. I am not getting any daily log report and others. I checked the crontab -l all the schedules are there as it is.what could be the problem!!!

  9. hi iman
    saya punya masalah commnad di sendmail stop
    kenapa tidak bisa ya

    [root@localhost ~]# service sendmail stop
    sendmail: unrecognized service
    [root@localhost ~]# service postfix stop
    [root@localhost ~]#

    1. Hi mas,

      Untuk service sendmail masalah karena service tersebut tidak ada. Itu bisa diignore, karena hanya memastikan saja bahwa semua service yang berpotensi bentrok dengan Zimbra distop dan didisable

  10. Hi
    In our case, we were using zimbra 8.6 and every incoming mails had a delay around 20 minutes and that all mails are stuck in active section….pls guide me on this….

    Rgds
    Rajesh.A

    1. Hi Rajesh,

      Please make sure your internet connection are good for checking RBL, virus, spam and etc. If still getting the same problem, please try to disable services of amavis, antispam and antivirus

  11. [root@mail ~]# service named restart
    Stopping named: . [ OK ]
    Starting named: [ OK ]
    [root@mail ~]# dig -x 10.0.31.214

    ; <> DiG 9.8.2rc1-RedHat-9.8.2-0.62.rc1.el6 <> -x 10.0.31.214
    ;; global options: +cmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 55296
    ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0

    ;; QUESTION SECTION:
    ;214.31.0.10.in-addr.arpa. IN PTR

    ;; Query time: 64 msec
    ;; SERVER: 8.8.8.8#53(8.8.8.8)
    ;; WHEN: Mon Apr 10 17:37:09 2017
    ;; MSG SIZE rcvd: 42

  12. [root@mail ~]# nslookup 10.0.31.214
    Server: 10.0.31.214
    Address: 10.0.31.214#53

    ** server can’t find 214.31.0.10.in-addr.arpa.: NXDOMAIN

    1. Hi Sarfaraz Ali,

      I think Zimbra will conflict with Vestacp (port 80, 25 and another port that used by Zimbra). I recommend you to install on another server

  13. Hi iman,

    I’am using open source zimbra mail, its sowing the following error in log while sending mails to other domain

    Status=differed (Delivery temporarily suspended: lost connection with alt3.aspmx.l.google[74.125.30.27] while receiving the initial server greeting)

  14. Dear Iman,

    We have internet connection on the server even tested on the browser all the pages getting opened. But we are getting the same error. please help us on this.

  15. Dear Sir,
    We are using Zimbra network edition oracle Linux 6, now we need to change existing server to new one.
    We purchased DL380 server and installed same version, host name and ip address. So we need to put old server backup to new server so please give me an idea how to put old server backup to new server

    1. Hi Noushad,

      You can rsync /opt/zimbra from old server into new one. After that, you can test starting Zimbra on the new one server. I’m often do that on my clients 🙂

  16. Hi Iman,
    As moved our mail server to production. But getting the below error,
    ‘Oct 18 23:40:00 mail zimbramon[5684]: 5684:crit: Disk warning: mail.mydomain.com: / on device /dev/mapper/vg_mailserver-lv_root at 100%

    Here is the DISK details,

    Filesystem Size Used Avail Use% Mounted on
    /dev/mapper/vg_mailserver-lv_root
    50G 49G 492M 100% /
    tmpfs 1.9G 72K 1.9G 1% /dev/shm
    /dev/sda1 477M 203M 249M 45% /boot
    /dev/mapper/vg_mailserver-lv_home
    864G 17G 804G 3% /home

    The First one /dev/mapper/vg_mailserver-lv_root is almost Full, what files needs to be deleted from here or move to somewhere. Please help and do the needful asap.

    1. Hi Manikandan,

      I see your LVM configuration is not good. As Zimbra folder placed on /opt, the bigger size of your partition is should be / or /opt. Not /home.

      If you want to change, you can copy all /opt/zimbra into /home folder and then change mounting lv_home into /opt

  17. Hi Iman,
    Simply can i cut and paste the opt folder into lv_home will work or need to do some config. Also please provide the instruction to change mounting lv_home into /opt. Thank you for your quick response.

  18. Is it a good idea to install Zimbra on the same machine I intend to use as a file and web server? Someone told me that Zimbra doesn’t like to share. What can I do and what can’t I do with the machine Zimbra is using?

    1. Hi Brian,
      I am recommend you to do not install web server on the same machine with Zimbra. But, you can to use Zimbra as file server also (but not recommended). This is because Zimbra have ports 80 and 443 which are will conflict with web server

  19. Dear Sir,
    Please provide me offline restore steps,i configure test server and copied latest backup from our production server.(opt/zimbra/backup)
    Now i need to restore this backup to test server

  20. Dear sir,

    How can i change the path the volume of all message of user.

    Usual path is. /opt/Index for index and for data . /opt/data

    Thank you sir Godbless

  21. Hi Iman,
    Hope you are doing good!!
    We are having the physical server in our environment IP:192.168.2.201. I got the task from my TL that physical server(192.168.2.201) need to be moved to the virtual server (192.168.2.44). we need all the user mails and groups to the virtual server as in the 192.168.2.201. Please suggest the idea.

    1. Hi Manikandan,

      If you are using VMware, you can use VMware converter. If not, you can rsync all /opt/zimbra folder in the physical server into virtual server

      1. Hi Sir Iman,

        today sir i encounter this error to start zmcontrol. please suggest what i can do to start and running zimbra server

        [zimbra@mail root]$ zmcontrol start
        Host mail.northpoint.ph
        Starting ldap…Done.
        Failed.
        Failed to start slapd. Attempting debug start to determine error.
        5ac500f7 bdb(): Log sequence error: page LSN 262 9852039; previous LSN 262 9890007
        5ac500f7 bdb(): Recovery function for LSN 262 9892840 failed on forward pass
        5ac500f7 bdb_db_close: database “”: txn_checkpoint failed: Invalid argument (22).
        5ac500f7 backend_startup_one (type=hdb, suffix=””): bi_db_open failed! (-30974)
        5ac500f7 bdb_db_close: database “”: alock_close failed

        [zimbra@mail root]$ zmcontrol restart
        Host mail.domain.ph
        Stopping zmconfigd…Done.
        Stopping stats…Done.
        Stopping mta…Done.
        Stopping spell…Done.
        Stopping snmp…Done.
        Stopping cbpolicyd…Done.
        Stopping archiving…Done.
        Stopping antivirus…Done.
        Stopping antispam…Done.
        Stopping imapproxy…Done.
        Stopping memcached…Done.
        Stopping mailbox…Done.
        Stopping logger…Done.
        Stopping ldap…Done.
        Host mail.domain.ph
        Starting ldap…Done.
        Failed.
        Failed to start slapd. Attempting debug start to determine error.
        5ac50161 bdb(): Log sequence error: page LSN 262 9852039; previous LSN 262 9890007
        5ac50161 bdb(): Recovery function for LSN 262 9892840 failed on forward pass
        5ac50161 bdb_db_close: database “”: txn_checkpoint failed: Invalid argument (22).
        5ac50161 backend_startup_one (type=hdb, suffix=””): bi_db_open failed! (-30974)
        5ac50161 bdb_db_close: database “”: alock_close failed

        [zimbra@mail root]$ zmcontrol status
        Unable to determine enabled services from ldap.
        Unable to determine enabled services. Cache is out of date or doesn’t exist.
        [zimbra@mail root]$

        Thank you sir Iman

  22. Hi Iman,
    Happy to inform you that Migration has been done and everything working fine now… I followed the rsync… You are really Great!!! thank you…

  23. Hi Iman,
    Hope you are doing good!!! I would like to add multiple domains on my server. For Example: myfirstdomain.com already there i added myseconddomain.com followed some instructions both mails are working locally, i am not able to receive mails from outside.. pls need your instruction to complete this…
    Thanks in advance!!!

  24. Hi Imanudin,
    am getting this error
    [root@mail ~]# nslookup mail.demo.co.in
    Server: 125.22.47.125
    Address: 125.22.47.125#53

    ** server can’t find mail.demo.co.in: NXDOMAIN

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.