Setting up Zimbra on CentOS7 with SWAG Reverse Proxy

Print Friendly, PDF & Email
  1. Install CentOS 7 Core
    1. Set hostname to mail.whatever.com
    2. Set static IP
    3. Disable selinux
      1. vi /etc/selinux/config
      2. reboot
    4. Disable Firewall
      1. systemctl stop firewalld
      2. systemctl disable firewalld
    5. yum -y install wget perl unzip net-tools sysstat openssh-clients perl-core  libaio n map-ncat libstdc++.so.6
  2. Install Zimbra
    1. configure local dns for mail.whatever.com to point to 10.10.10.90
    2. echo “10.10.10.90 mail.whatever.com mail ” >> /etc/hosts
    3. wget https://files.zimbra.com/downloads/8.8.15_GA/zcs-8.8.15_GA_3869.RHEL7_64.20190918004220.tgz
    4. tar -xvzf zcs-8.8.15_GA_3869.RHEL7_64.20190918004220.tgz
    5. cd zcs-8.8.15_GA_3869.RHEL7_64.20190918004220
    6. ./install.sh
    7. When it shows a DNS error, change the domain name from mail.whatever.com to whatever.com
    8. All the defaults are fine, including the proxy.  Be sure to set the admin password so the setup can complete.
  3. Zimbra SWAG config
    1. ## Version 2020/12/09
      # make sure that your dns has a cname set for nzbhydra and that your nzbhydra container is not using a base url

      server {
      listen 443 ssl;
      listen [::]:443 ssl;

      server_name mail.whatever.com;

      include /config/nginx/ssl.conf;

      client_max_body_size 0;


      location / {

      include /config/nginx/proxy.conf;
      resolver 8.8.8.8 valid=30s;
      set $upstream_app 10.10.10.90;
      set $upstream_port 443;
      set $upstream_proto https;
      proxy_pass $upstream_proto://$upstream_app:$upstream_port;

      }
      }

  4. Forward the following ports on the firewall
    1. 25 smtp mta incoming mail to postfix
      110 pop3 mailbox / proxy POP3
      143 imap mailbox / proxy IMAP
      465 smtps mta Incoming mail to postfix over TLS (Legacy Outlook only? If possible, use 587 instead)
      587 smtp mta Mail submission over TLS
      993 imaps mailbox / proxy IMAP over TLS
      995 pop3s mailbox / proxy POP3 over TLS
      3443 https proxy User Certificate Connection Port (optional)
      5222 xmpp mailbox Default server port
      5223 xmpp mailbox Default legacy SSL port
      9071 https proxy admin console HTTP over TLS (optional)
      Lastly, update the MX records to point at mail.whatever.com and email should start flowing!
  5. Lastly, update DNS MX record to point at mail.whatever.com and mail should start flowing!

Comments are closed.