How To Install Zimbra 8.6 on CentOS 6 Part 1

Posted by

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

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


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

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 "" IN {
type master;
file "";
allow-update { none; };

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

touch /var/named/
chgrp named /var/named/
vi /var/named/

fill as follows

@       IN SOA (
                                        0       ; serial
                                        1D      ; refresh
                                        1H      ; retry
                                        1W      ; expire
                                        3H )    ; minimum
@       IN      NS
@       IN      MX      0
ns1     IN      A
mail    IN      A

# Restart Service & Check results configuration of DNS Server

service named restart
chkconfig named on
dig mx

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

[root@mail opt]# nslookup

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. Please Send me elaborated steps for Zimbra Backup both Full Backup & Incremental Backup.

    Thanking You
    Suman Banerjee

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

    Md. Saidul Islam Talukder

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

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

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

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

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

  8. dear iman
    thanks for your help

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

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

  9. Hi , I install Zimbra , but when I am sending any email from zimbra client , other user not getting ,

    Kindly help me

  10. 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!!!

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

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

  13. [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

  14. [root@mail ~]# nslookup

    ** server can’t find NXDOMAIN

  15. named service start perfect bt PTR record couldn’t redolve

    ; IN PTR

  16. Hi

    Thanks for your nice tutorial. I have a server on centos 7 with vestacp. how can I install zimbra mail on a same server. Kindly let me know its configuration. I will remain thankful.

    My email id:


    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

  17. 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[] while receiving the initial server greeting)

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

  19. 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 🙂

  20. 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: / 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

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

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

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

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

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

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

  27. Hi Iman,
    Hope you are doing good!!! I would like to add multiple domains on my server. For Example: already there i added 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!!!

  28. Hi Imanudin,
    am getting this error
    [root@mail ~]# nslookup

    ** server can’t find NXDOMAIN

    1. Hi Nagendra,

      Please try this

      nslookup localhost

      If still did not appear, please check your BIND configuration

  29. Hi Imran,

    Loved your Video. But after installing emails are coming to my inbox with ***UNCHECKD*** whitten on the sunject line. This is happening for each email.

    My OS is CentOS 6.9 X64.
    I have installed the Zimbra version form the link given in this page by you.
    Can you please give me a solution for this issue ?


      1. Iman Thank you very much. This wokred beautifully !
        I think I made a similar comment on one of your videos as well, but as it is solved now please ignore that comment.

        Thanks & Cheers 😀 !!!

  30. Hi Iman,

    As-Salamualikum. Love your blog. Great work Thanks.

    I have installed everything to the point, my OS is CentOS 7.9 x64
    But – Antivirus (zmclamdctl) is not running. Becuase of which ***UNCHECKED*** appears in all my replies to poeple.

    Please help me out here. I have tried everything I could find on the web to no avail.

  31. Hi Sir,

    Zimbra 8.7.11 on centos 7. When we rsync it from centos 6 zimbra 8.7.11 (Origin 8.6) shows below issues:
    [zimbra@mail root]$ zmcontrol status
    /usr/bin/perl: symbol lookup error: /opt/zimbra/common/lib/perl5/x86_64-linux-thread-multi/auto/Socket/ undefined symbol: Perl_Istack_sp_ptr
    sent 12,443,391 bytes received 8,294,350,929 bytes 18,604,242.60 bytes/sec
    total size is 2,306,876,180,948 speedup is 277.71
    rsync warning: some files vanished before they could be transferred (code 24) at
    main.c(1650) [generator=3.1.2]

    Any help ..?

    #cat /etc/resolve.conf
    #cat /etc/hosts mail mail
    # cat /var/named/
    $TTL 1D
    @ IN SOA (
    1001 ; serial
    1D ; refresh
    1H ; retry
    1W ; expire
    3H ) ; minimumi

    @ IN NS
    1.110 IN NS IN A IN A IN A
    @ IN MX 0
    # service named restart

    Non-authoritative answer:
    # dig mx

    ; <> DiG 9.8.2rc1-RedHat-9.8.2-0.68.rc1.el6_10.3 <> mx
    ;; global options: +cmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 24493
    ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0

    ; IN MX

    ;; AUTHORITY SECTION: 1799 IN SOA 2019071304 7200 7200 172800 38400

    ;; Query time: 311 msec
    ;; SERVER:
    ;; WHEN: Fri Jul 19 16:12:43 2019
    ;; MSG SIZE rcvd: 105

    # dig mx

    ; <> DiG 9.8.2rc1-RedHat-9.8.2-0.68.rc1.el6_10.3 <> mx
    ;; global options: +cmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 48775
    ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

    ; IN MX

    ;; ANSWER SECTION: 21599 IN MX 0

    ;; Query time: 298 msec
    ;; SERVER:
    ;; WHEN: Fri Jul 19 16:13:31 2019
    ;; MSG SIZE rcvd: 54
    $zmcontrol status
    amavis Running
    antispam Running
    antivirus Running
    ldap Running
    logger Running
    mailbox Running
    memcached Running
    mta Running
    opendkim Running
    proxy Running
    service webapp Running
    spell Running
    stats Running
    zimbra webapp Running
    zimbraAdmin webapp Running
    zimlet webapp Running
    zmconfigd Running

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.