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 :
Gateway    :

# Configure Network

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

vi /etc/sysconfig/network-scripts/ifcfg-eth0

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     localhost mail.imanudin.net mail

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

search imanudin.net

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 :


# 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 {; 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

@       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
mail    IN      A

# 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
Name: mail.imanudin.net

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


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

    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.

    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
    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….


    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

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

    ; IN PTR

    ;; Query time: 64 msec
    ;; SERVER:
    ;; WHEN: Mon Apr 10 17:37:09 2017
    ;; MSG SIZE rcvd: 42

  12. [root@mail ~]# nslookup

    ** server can’t find 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[] 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
    50G 49G 492M 100% /
    tmpfs 1.9G 72K 1.9G 1% /dev/shm
    /dev/sda1 477M 203M 249M 45% /boot
    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: I got the task from my TL that physical server( need to be moved to the virtual server ( we need all the user mails and groups to the virtual server as in the 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 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 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…

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.