How To Install Zimbra Mail Server OSE On Linux Ubuntu Server 16.04 LTS Or On Any Newer Version Of Ubuntu.

REQUIREMENTS
In order to complete this tutorial successfully the following items are required. Please ensure to have these items available before taking implementation action on this tutorial :
1) 1 x Physical or Virtual Machine with A Quad Core Processor and 4GB Ram.
2) 1 x 100GB Hard disk drive or Solid state drive.
3) Internet Connection With A routable Public IP Address.
4) A registered fully qualified Domain Nane with CPANEL access.
5) A perfect DNS Configuration..
OVERVIEW
2)
3)
4)
5)
Step 1: Preflight Ubuntu Configuration For Zimbra Mail OSE

Step 2 (Optional) : Configure Port Forwarding

Step 3: Configure Static IP Address And Hostname
3) The next step is to configure a static IP ADDRESS, if ubuntu is setup to obtain an IP address automatically using DHCP. To configure the static IP ADDRESS run the following command.
nano /etc/network/interfaces
The interfaces file will have the following DHCP configuration information:
auto ens33
iface ens33 inet dhcp

4) Remove the iface ens33 inet dhcp line and enter the following configuration:
auto ens33
iface ens33 inet static
address 192.X.X.X (enter your static address here)
netmask 255.255.255.0
gateway 192.X.X.X (enter your ip gateway here)
dns-nameservers 8.8.8.8

5) Open the resolve.conf file and ensure you have a valid static DNS server entry. Open the hosts file by typing in the following command:
nano /etc/hosts
Set the HOSTNAME and IP ADDRESS information as shown below:
127.0.0.1 localhost
192.168.X.X mail.yourdomainname.com mail
Press “CNTRL + O” and “CNTRL + X” to apply changes and exit out of nano. Type reboot and this will restart ubuntu

Step 4: INSTALL THE DNSMASQ DNS SERVER

7) Open and edit the DNSMASQ configuration file. Enter your network information on the relavate places:
> /etc/dnsmasq.conf (this will clear all contents in this file!! create a backup before running this command)
nano /etc/dnsmasq.conf
server=8.8.8.8
listen-address=127.0.0.1
domain=zimbra.io
mx-host=zimbra.io,zcs-886.zimbra.io,0
address=/zcs-886.zimbra.io/192.168.X.X

8) Press “CNTRL + O” and “CNTRL + X” to apply changes and restart the DNSMASQ service by running the following command:
service dnsmasq restart

STEP 5: TEST AND CHECK DNS ENTRIES

10) Now test for the domain, mail.yourdomainname.com by running the command:
dig mx mail.yourdomainname.com
Take note of the results that are returned. If your DNS and MX records tests are not correct, revisit configuration steps in the previous steps and ensure that your configuration is correct and all variables conform to your environment.
