How to Install Open Source Zimbra Mail Server (ZCS 8.8.10) on CentOS 7

Mail Server is one of the important and critical Server for any organization as most of business communication done via emails only. In Open source world there are couple of free email server but Zimbra is one of the leading mail servers. Zimbra Mail Server a.k.a ZCS (Zimbra Collaboration Suite) comes in two versions, Open Source and enterprise version.

Prerequisites of Zimbra Mail Server (ZCS)

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

In this article we will demonstrate how to install Open Source ZCS 8.8.10 on a CentOS 7.

Step:1) Login to CentOS 7 and apply updates.

Login to your CentOS 7 Server and apply the latest updates using following yum command and then reboot,

~]# yum update -y ; reboot

After the reboot, set the hostname of your server, in my case I am setting it as “mail.linuxtechi.com”

~]# hostnamectl set-hostname "mail.linuxtechi.com"
~]# exec bash

Add the following lines in  /etc/hosts file,

192.168.0.108 mail.linuxtechi.com mail

After configuring the hostname, verify the A and MX is configure for your domain using dig command,

[root@mail ~]# dig -t A mail.linuxtechi.com
[root@mail ~]# dig -t MX linuxtechi.com

Step:2) Install Zimbra dependencies using yum

Run the below command to install Zimbra / ZCS dependencies

[root@mail ~]# yum install unzip net-tools sysstat openssh-clients perl-core libaio nmap-ncat libstdc++.so.6 wget -y

Step:3) Download latest version of Zimbra (ZCS 8.8.10) using wget command

Create a folder with the name “zimbra”

[root@mail ~]# mkdir zimbra && cd zimbra

Use below wget command to download the latest version of ZCS 8.8.10 from the terminal,

[root@mail zimbra]# wget https://files.zimbra.com/downloads/8.8.10_GA/zcs-8.8.10_GA_3039.RHEL7_64.20180928094617.tgz --no-check-certificate

Step:4 Install Zimbra / ZCS 8.8.10

Extract the downloaded tgz file of  ZCS 8.8.10 using the beneath tar command

[root@mail zimbra]# tar zxpvf zcs-8.8.10_GA_3039.RHEL7_64.20180928094617.tgz

Go to extracted folder and run the install script,

[root@mail zimbra]# cd zcs-8.8.10_GA_3039.RHEL7_64.20180928094617
[root@mail zcs-8.8.10_GA_3039.RHEL7_64.20180928094617]# ./install.sh

Once we run above install script then we will get text-based installation wizard, to Accept the license, press Y

Zimbra-License-Agreement-CentOS7

Now Configure the Zimbra package repository and select the all Zimbra Components to install.

Zimbra-Package-Repo-Packages-CentOS7

Press Y to modify the System,

Modify-System-Zimbra-CentOS7

After pressing Y, it will download the Zimbra related packages and it can take time depending upon on your internet speed.

Once all the Zimbra packages are installed in the backend then we will get the below window,

MX-Record-Zimbra-Installation-CentOS7

Now Press 7 and then 4 to set admin user password,

Admin-User-Password-Set-Zimbra-Installation-CentOS7

Now press “r” to go to previous menu and then press “a” to apply the changes.

Once all the changes are applied and Zimbra related services are started then we will get the output something like below,

Zimbra-Installation-Completed-CentOS7

Open the ports in the firewall in case os firewall is running on your server

[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:5) Access Zimbra Admin Portal & Web Mail Client

To access the Zimbra Admin Portal, type below URL in Web Browser

https://mail.linuxtechi.com:7071/

Zimbra-Administration-CentOS7

Zimbra-Administration-Dashboard-CentOS7

To access Zimbra Mail Web Client, type the following URL in the browser

https://mail.linuxtechi.com

Zimbra-WebClient-SignIn-CentOS7

Zimbra-Inbox-Dashboard-CentOS7

Note: For both the URLs we can use user name as “admin” and password that we set during the installation

Step:6) Troubleshooting Zimbra Services and Logs

There can be some scenarios where some zimbra services might be stopped, to find zimbra services status from command line, run the following command,

[root@mail ~]# su - zimbra
Last login: Sun Oct  7 14:59:48 IST 2018 on pts/0
[zimbra@mail ~]$ zmcontrol status
Host mail.linuxtechi.com
        amavis                  Running
        antispam                Running
        antivirus               Running
        dnscache                Running
        imapd                   Running
        ldap                    Running
        logger                  Running
        mailbox                 Running
        memcached               Running
        mta                     Running
        opendkim                Running
        proxy                   Running
        service webapp          Running
        snmp                    Running
        spell                   Running
        stats                   Running
        zimbra webapp           Running
        zimbraAdmin webapp      Running
        zimlet webapp           Running
        zmconfigd               Running
[zimbra@mail ~]$

To restart the Zimbra Services use the following command,

[zimbra@mail ~]$ zmcontrol restart
Host mail.linuxtechi.com
        Stopping zmconfigd...Done.
        Stopping imapd...Done.
        Stopping zimlet webapp...Done.
        Stopping zimbraAdmin webapp...Done.
        Stopping zimbra webapp...Done.
        Stopping service webapp...Done.
        Stopping stats...Done.
        Stopping mta...Done.
        Stopping spell...Done.
        Stopping snmp...Done.
        Stopping cbpolicyd...Done.
        Stopping archiving...Done.
        Stopping opendkim...Done.
        Stopping amavis...Done.
        Stopping antivirus...Done.
        Stopping antispam...Done.
        Stopping proxy...Done.
        Stopping memcached...Done.
        Stopping mailbox...Done.
        Stopping logger...Done.
        Stopping dnscache...Done.
        Stopping ldap...Done.
Host mail.linuxtechi.com
        Starting ldap...Done.
        Starting zmconfigd...Done.
        Starting dnscache...Done.
        Starting logger...Done.
        Starting mailbox...Done.
        Starting memcached...Done.
        Starting proxy...Done.
        Starting amavis...Done.
        Starting antispam...Done.
        Starting antivirus...Done.
        Starting opendkim...Done.
        Starting snmp...Done.
        Starting spell...Done.
        Starting mta...Done.
        Starting stats...Done.
        Starting service webapp...Done.
        Starting zimbra webapp...Done.
        Starting zimbraAdmin webapp...Done.
        Starting zimlet webapp...Done.
        Starting imapd...Done.
[zimbra@mail ~]$

All the log files for Zimbra server are kept under the folder “/opt/zimbra/log”

Note: In my case postfix was already installed and running on my centos 7 server because of that Zimbra MTA service was getting stopped and failed. To resolve this issue, I have to stopped and disable the postfix service and then restart Zimbra service using the “zmcontrol” command.

When you are done with Zimbra testing and want to uninstall it from the system, then run the “install.sh” script followed by “-u

[root@mail ~]# cd /root/zimbra/zcs-8.8.10_GA_3039.RHEL7_64.20180928094617
[root@mail zcs-8.8.10_GA_3039.RHEL7_64.20180928094617]# ./install.sh -u

That’s conclude this article. If you find it informative please do share this among your Linux technical friends and share the feedback and comments in the comment section below.

31 thoughts on “How to Install Open Source Zimbra Mail Server (ZCS 8.8.10) on CentOS 7”

  1. i have problem bro…. you can help me?

    Connect: Unable to determine enabled services from ldap.
    Unable to determine enabled services. Cache is out of date or doesn’t exist.

    Reply
    • Had this error after installing a new commercial certificate. The error seems valid as my server hostname and certificate name do not match, but it is my understanding this name mismatch is allowed and should still work.

      To resolve this I just ran these two commands as Zimbra user.
      zmlocalconfig -e ldap_starttls_required=false
      zmlocalconfig -e ldap_starttls_supported=0

      I am slightly concerned as to the security implications of disabling these settings. I am still on ldap not ldaps and this is on CentOS 7.

      Reply
  2. Hello bro…

    I have followed your article on “How to Install Open Source Zimbra Mail Server (ZCS 8.8.10) on CentOS 7”, but always fails and hung on the configuration process, i.e.:

    Initializing store sql database…………..

    This process hung infinitely.

    Do you have any suggestion how to solve it according to your experience.

    Look forward to hearing from you soon.

    Best regards,
    Suryana

    Reply
  3. Thank you very much, it was easy to understand and install. What about configuration tips, it will be great to have it from you.
    Cheers from Turkey!

    Reply
  4. somehow zimra installation do not takeroper /opt/zimbra as zimbra:zimbra owner. I manually run
    #chown -R zimbra:zimbra /opt/zimbra
    to get installation finish

    Reply
    • It seems like MX record is not configured for your test domain, also make sure your system points to correct DNS server where your domain records are configured.

      Reply
      • Hi. I’m having this problem also. Can u explain which IP I have use. From my ISP? Or do I have to setup my DNS server where Zimbra is being installed? If yes, can you provide some tips how to do this? A lot of confusing info on Google so I’m struggling for a week now 🙂 My server is at home behind NAT router. Thank you in advance

        Reply
        • Hi Krusso,

          You can send the emails via your NATed IP but to receive email from outside like Gmail , Yahoo etc then you must have a fix static IP which points to your Zimbra Server. You need make a MX record entry of the Static IP in your domain DNS Server. DNS server for your domain can be outside of Zimbra Server.

          Reply
          • Thank you. I have MX record from my ISP. All installation goes nicely except MX part being rejected and after installation I cannot even go to Zimbra admin page. I’m trying to install Zimbra on clean centos. PC is on private network, Static IP fixed. Zibra status report OK. No luck until today 🙁 I’ve saw some advice to use DNSmasq. Is it so?

  5. Following your article to install open source Zimbra Mail Server in my laptop is successful as your instruction are so understandable that I didn’t find any difficulty while installing. But there was a bit problem occurred via DNS error and it was hanged for 2-3 times but it is solved now. It is very informative and I have shared this article to my technical friends and they are also very thankful for this wonderful article. The services I got from the article is very useful and you made my work very easy. Your article is full of open information and every steps are very clear with the help of screenshot you’ve mentioned too . There also exist the URL to access in any steps. I am very concerned as to the security regarding Mail Server which is one of the important and critical Server for any organization as most of business communication done via emails only.

    Reply
  6. It was easy to understand, Installation succeed also opened for the zimbra webmail url it was working but the issue was mail sending succeed but not received (Own Domain). I don’t know what’s the problem. help me

    Reply
  7. I have a problem:

    Importing Zimbra GPG key
    ERROR: Unable to retrive Zimbra GPG key for package validation

    please how to i fix this
    thank you

    Reply
  8. Hi,

    Perfect post. Thank you for this article. But i have a problem. My MTA is not running and service “postfix is not running” Log does not appear.

    What happened?

    Thanks.

    Reply
  9. Hi
    Thank you for a well written How-To!
    I have tried to follow it but I stumbled and fell at step 4.
    After agreeing to change the system there were some errors in finding packages and so the process stopped 🙁
    I’ve cleared the yum cache and removed all cached files but it’s still no show.
    When I look at the yum repository list there’s no entry for Zimbra, as I think there should.
    Is there any way to manually add the Zimbra repository and get on with the installation, or maybe install it the “normal” way just using yum install ?

    TIA
    /Kjell

    Reply
  10. error
    Not Found / Object Not Found (HTTP 404)
    The object corresponding to the requested URL could not be found on this server.
    Wait a moment and try again.
    ERROR: 404

    Reply
  11. Hi I have some problem running some processes, Can you help me?

    [zimbra@mail ~]$ zmcontrol restart
    Host mail.mydomin.ir
    Stopping zmconfigd…Done.
    …..

    Host mail.mydomin.ir
    Starting ldap…Done.
    Starting zmconfigd…Failed.
    Starting zmconfigd…/opt/zimbra/bin/zmconfigdctl: line 82: kill: (22675) – No such process
    failed.

    Starting dnscache…Done.
    Starting logger…Done.
    Starting mailbox…Done.
    Starting memcached…Failed.
    Starting memcached…failed.

    Starting proxy…Failed.
    Starting proxy…nginx: [emerg] bind() to 0.0.0.0:443 failed (98: Address already in use)
    nginx: [emerg] bind() to 0.0.0.0:443 failed (98: Address already in use)
    nginx: [emerg] bind() to 0.0.0.0:443 failed (98: Address already in use)
    nginx: [emerg] bind() to 0.0.0.0:443 failed (98: Address already in use)
    nginx: [emerg] bind() to 0.0.0.0:443 failed (98: Address already in use)
    nginx: [emerg] still could not bind()
    failed.

    Starting amavis…Done.
    Starting antispam…Done.
    Starting antivirus…Done.
    Starting opendkim…Done.
    Starting snmp…Done.
    Starting spell…Done.
    Starting mta…Failed.
    Starting saslauthd…done.
    postfix failed to start

    Starting stats…Done.
    Starting service webapp…Failed.

    Starting zimbra webapp…Failed.

    Starting zimbraAdmin webapp…Failed.

    Starting zimlet webapp…Failed.

    Starting imapd…Done.

    Reply
  12. Mails are not going ..getting error on maillog-> connect to alt4.gmail-smtp-in.l.google.com[74.125.28.27]:25: Connection timed out

    Reply
  13. after complete installation of zimbra on centos 7,i can login web access.Created user account but when i send mail to any domain it said failed to send.whats the reason.Please help

    Reply
    • Hi Tabarak,

      Check the Zimbra postfix logs and zimbra postfix MTA service.

      If all services are up and running and then check whether external IP configured on Zimbra is blacklisted is or not.

      Reply

Leave a Reply to Pradeep Kumar Cancel reply