How to setup zimbra mail server on ubuntu 14.04

Setting up a Zimbra mail server on Ubuntu 14.04 is a bit involved, but I'll guide you through the process. Please note that this is a basic setup, and you may need to customize it according to your specific requirements.

Prerequisites:

  1. Ubuntu 14.04 (Trusty Tahr) or later
  2. At least 2 GB of RAM (recommended 4 GB or more)
  3. A minimum of 10 GB of free disk space (recommended 20 GB or more)
  4. A static IP address or a dynamic DNS (DDNS) service
  5. A domain name (e.g., example.com)

Step 1: Install Zimbra

  1. Open a terminal and update the package list: sudo apt-get update
  2. Install Zimbra Open Source Edition: sudo apt-get install zimbra
  3. Wait for the installation to complete. This may take some time.

Step 2: Configure Zimbra

  1. Start the Zimbra services: sudo service zimbra start
  2. Configure the Zimbra server:
    • Set the server name: sudo zmprov ms <server_name> <domain_name>
    • Set the administrator password: sudo zmprov sa admin@<domain_name> <password>
    • Set the mail domain: sudo zmprov md <domain_name> <mail_domain>
  3. Configure the DNS:
    • Create a TXT record for the domain: @ IN TXT "v=spf1 a mx ptr include:zimbra.com ~all"
    • Create an MX record for the domain: @ IN MX 10 mail.<domain_name>

Step 3: Configure Postfix

  1. Install Postfix: sudo apt-get install postfix
  2. Configure Postfix:
    • Edit the Postfix configuration file: sudo nano /etc/postfix/main.cf
    • Add the following lines:
      mydestination = <domain_name>
      myhostname = <server_name>
    • Save and close the file.
  3. Restart Postfix: sudo service postfix restart

Step 4: Configure Dovecot

  1. Install Dovecot: sudo apt-get install dovecot-imapd
  2. Configure Dovecot:
    • Edit the Dovecot configuration file: sudo nano /etc/dovecot/dovecot.conf
    • Add the following lines:
      mail_location = maildir:~/Maildir
    • Save and close the file.
  3. Restart Dovecot: sudo service dovecot restart

Step 5: Configure Zimbra Web Client

  1. Access the Zimbra Web Client: https://<server_name>:7071
  2. Log in with the administrator credentials you set earlier.
  3. Configure the Web Client:
    • Set the default language and timezone.
    • Configure the calendar and contacts settings.

Step 6: Test the Mail Server

  1. Send an email from an external account to an account on your Zimbra server.
  2. Verify that the email is delivered successfully.

Additional Tips:

That's it! You now have a basic Zimbra mail server setup on Ubuntu 14.04.