E-books & Knowledge Base
Posted By Irfad

How to Setup Zimbra Open Source Mail Server on Ubuntu 10.04


Discuss more about posts, topics & issues at our GeekLK Help

Zimbra, an open source mail server is not just to send and receive emails but it’s a fully featured collaboration suite which includes calendar, tasks, file-sharing, IM, mobile support and many more… Now, I wanted to deploy an email server on my work place and went through some research based on cost-effective, features, stability and easy to manage. And, I ended up choosing Zimbra open-source edition where as, I don’t need to worry about licensing. But the only thing to care about is hardware, power and internet. Zimbra also provide premium services which is cheaper compared to other e-mail solutions. Still this implementation is under testing. But, I really wanted to share what exactly I did on testing this product.

In this tutorial I will explain on how to setup Zimbra CS in Ubuntu 10.04 LTS.  Make sure following requirements are met before you proceed with this.

  • A domain name (e.g.: geeklk.com) with the ability to manage DNS and MX records. Assume I use geekdomain.com
  • A PC installed Ubuntu 10.04 LTS x64 (64bit). I use Desktop Edition. Please refer System requirements document. Assume it has a Private IP 192.168.1.50
  • Router is connected to the internet with a Static IP address, If you don’t have one, then refer this.
  • Zimbra insallation file.

Configure your router to forward following ports to 192.168.1.50

22, 25 – SMTP, 80 – HTTP, 110 – POP3, 143 – IMAP, 443 – HTTPS, 993 – IMAP SSL, 995 – POP3 SSL.

We need to change host files to match the domain.

[box]

cd /etc/

sudo cp hosts hosts.bak      #Its good to backup configuration files if anything goes wrong

sudo nano hosts

127.0.0.1 localhost

192.168.1.50 mail.geekdomain.com zimbraserver

sudo cp resolv.conf resolv.conf.bak

sudo nano resolv.conf

nameserver 192.168.1.50[/box]

Install Webmin and BIND dns server

Webmin is a web based tool to easily manage Ubuntu server

We need to create an internal DNS server. If you want to know why check this.

[box]

sudo apt-get install perl libnet-ssleay-perl openssl libauthen-pam-perl libpam-runtime libio-pty-perl apt-show-versions libapt-pkg-perl

wget http://mirror.pnl.gov/ubuntu//pool/universe/libm/libmd5-perl/libmd5-perl_2.03-1_all.deb

sudo dpkg -i libmd5-perl_2.03-1_all.deb

wget http://prdownloads.sourceforge.net/webadmin/webmin_1.580_all.deb

sudo dpkg -i webmin_1.580_all.deb

sudo apt-get install bind9

#reboot the system
sudo reboot [/box]

After rebooting the server login to webming by https://192.168.1.50:10000 and login with ubuntu username and password. Do the following to set the DNS records.

[box]

Click Refresh Modules

#Setup forwarding
Servers > BIND DNS SERVER > Forwarding and Transfers > Servers to forward queries to 8.8.8.8, 8.8.4.4

#Create master zone for geekdomain.com
Servers > BIND DNS SERVER > Create master zone > Zone type = Forward, Domain name / Network = geekdomain.com, Email address = admin@geekdomain.com

#Create reverse zone for geekdomain.com
Servers > BIND DNS SERVER > Create master zone > Zone type = Reverse, Domain name / Network = 192.168.1.100, Email address = admin@geekdomain.com

#Create A records for geekdomain.com
Servers > BIND DNS SERVER > irfad.me > Address > Name = mail, Address = 192.168.1.100
Servers > BIND DNS SERVER > irfad.me > Address > Name = geekdomain.com, Address = 192.168.1.100

#Add MX records for irfad.me
Servers > BIND DNS SERVER > irfad.me > Mail Server > Name = geekdomain.com, Mail Server = mail.geekdomain.com, Priority = 10

#Restart Bind
Stop BIND > Start BIND [/box]

Now the DNS server is set. To check DNS server works try these commands. Make the changes similar to this in the domain in public pointing to the ip address of the router’s internet facing interface (public IP)

[box]

nslookup geekdomain.com
nslookup mail.geekdomain.com
dig geekdomain.com mx [/box]

Before installing Zimbra install the following packages

[box] sudo apt-get install sysstat sqlite3 [/box]

Now let’s install zimbra (the installation package is extracted on desktop)

[box]

cd /(zimbra 7 folder)

sudo ./install.sh

License Agree = Y

Install zimbra-ldap = Y
Install zimbra-logger = Y
Install zimbra-mta = Y
Install zimbra-snmp = Y
Install zimbra-store = Y
Install zimbra-apache = Y
Install zimbra-spell = Y
Install zimbra-memchached = N
Install zimbra-proxy = N

System will be modified? = Y

Change domain name = Y = geekdomain.com

4 = Admin password set = ******
r for previous menu
a to apply

Save config = Y and Enter

System will be modified? = Y [/box]

Things are done! & good to go..!! Now login to the admin console by https://mail.geekdomain.com:7071

Use the following resources to dig deeper

Zimbra Admin Guide

Multi Server Installation

Discuss more about posts, topics & issues at our GeekLK Help


View Comments
View Comments
  • kurniadi

    Hello,

    i use webmin 1.6, but I can’t bind dns server>irfad.me. What’s mean irfad.me?

    Thx


  • Keshav Reddy

    Nice. Article. Thanks a lot. Kindly, can you post; how to backup the Zimbra Mail Server.


    • Irfad Razick

      I’ve planed a backup solution with rsync. Once I finish implementing in my production server I’ll give provide the guide 🙂


  • Daysi Gaynor

    Thank you for sharing you experience. My understanding is that sata drives usually have around 80 iops. How are you able to get more than 2000 iops in a test above? With only 256 Megs of RAM, it couldn’t have buffered soo much. Appreciate your input. thank you.


  • Kimbra Napierala

    I have to say that for the last few of hours i have been hooked by the amazing articles on this website. Keep up the great work.


  • Sidney Arvanitis

    This article provides a great historical perspective of what can go wrong in a cloud deployment leveraging highly publicized case studies. Great research in putting this post together. 


  • Bill

    Hi, I am in the middle of trying to configure zimbra to work with my public domain name. I am going to try and follow your instructions. I have a first question. Why is the ip address in the hosts file 192.168.1.100 and not 192.168.1.50? Thanks alot for the tutorial!


    • Irfad Razick

      Oh I’m sorry It’s a mistake. I copied it from my previous installation note :). Now changed.


This site uses Akismet to reduce spam. Learn how your comment data is processed.