How To Install Zimbra Collaboration Suite (ZCS) On Ubuntu

July 6, 2007 at 3:34 pm | Posted in Ubuntu, zimbra | Leave a comment

How To Install Zimbra Collaboration Suite (ZCS) On Ubuntu

Version 1.0
Author: Falko Timme <ft [at] falkotimme [dot] com>
Last edited 03/05/2007

This guide shows how to install the Zimbra Collaboration Suite (ZCS) on Ubuntu 6.10 (Edgy Eft) and 6.06 (Dapper Drake) server systems. Zimbra is a full-featured, open source collaboration suite – email, group calendaring, contacts, and web document management and authoring. It has a feature-rich AJAX web interface and is compatible with clients such as Microsoft Outlook, Apple Mail, and Novell Evolution so that mail, contacts, and calendar items can be synchronised from these to the ZCS server. It can also be synchronized to many mobile devices. ZCS makes use of many existing open source projects such as Postfix, MySQL, and OpenLDAP.

if (!window.netshel_ord) { netshel_ord=Math.random()*10000000000000000; } if (!window.netshel_tile) { netshel_tile=1; } document.write(”); netshel_tile++; I do not issue any guarantee that this will work for you!

1 Preliminary Note

Please download the Ubuntu 6.10 or 6.06 server CD from and install a basic Ubuntu system with it. Don’t install/enable any services (e.g. like LAMP or DNS) – if you do, you’ll have to disable them later on as they might interfere with Zimbra!

After the installation of the base system, we’ll do some additional configuration, e.g. enable the root account, install an SSH daemon, apply a static IP address and a hostname to the system.

I will use the hostname in this tutorial together with the IP address Adjust this to your needs, but make sure that has a valid MX record in DNS (Zimbra needs this!). I assume you want to create email accounts for instead of, so you should have an MX record for as well.

In this example the Zimbra server is in a local network ( is a private IP address) behind a router, so make sure you use the router’s public IP address ( in this example) in the DNS records – of course this IP address should be static. If you have a dynamic IP address, you could use a service such as, but keep in mind that most public IP addresses are blacklisted nowadays.

So if you use BIND on the authoritative name server for, you should have something like this in‘s zone file:

[...]        A        MX 0             MX 0


If your Ubuntu server is behind router, make sure that you forward at least port 25 from your router to your Ubuntu server.

If your Ubuntu server is in a data center, it most likely has a static public IP address and a hostname, so you can skip chapter 1.3, but still you must make sure that this hostname has a valid MX record.

1.1 Enable The root Account

To enable the root account, run

sudo passwd root

and specify a password for root.

Afterwards, become root by running


All following commands in this tutorial are executed as root (unless something else is written)!

1.2 Install The SSH Daemon

Just run

apt-get install ssh openssh-server

to install the SSH daemon.

1.3 Apply A Static IP Address And Hostname

Edit /etc/network/interfaces and adjust it to your needs (in this example setup I will use the IP address

vi /etc/network/interfaces

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static

Then restart your network:

/etc/init.d/networking restart

Then edit /etc/hosts. Make it look like this:

vi /etc/hosts localhost.localdomain localhost mail

# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

Now run

echo > /etc/hostname

and reboot the system:

shutdown -r now

Afterwards, run

hostname -f

Both should show

From now on you can use an SSH client such as PuTTY and connect from your workstation to your Ubuntu server and follow the remaining steps from this tutorial.

1.4 Disable The Ubuntu CD In /etc/apt/sources.list

I like to install all packages over the internet instead of from the Ubuntu CD, therefore I disable the Ubuntu CD in /etc/apt/sources.list now:

vi /etc/apt/sources.list

On Ubuntu 6.10 (“Edgy Eft”), comment out this line:

#deb cdrom:[Ubuntu-Server 6.10 _Edgy Eft_ - Release i386 (20061025.1)]/ edgy main restricted

On Ubuntu 6.06 (“Dapper Drake”), it’s this line:

#deb cdrom:[Ubuntu-Server 6.06 _Dapper Drake_ - Release i386 (20060531)]/ dapper main restricted

Then update the packages database by running

apt-get update

1.5 Disable Services

If this is no fresh system and you have some services already running (such as Postfix, Apache, OpenLDAP), you must disable them first before installing Zimbra. Otherwise Zimbra will fail to install.

For example, to disable Postfix on your system, run

/etc/init.d/postfix stop
update-rc.d -f postfix remove

The commands for the other services are similar.

2 Change The Default Shell (Ubuntu 6.10 Edgy Eft Only)

If you are on Ubuntu Edgy Eft, most probably /bin/sh is a symlink to /bin/dash, however we need /bin/bash, not /bin/dash. Therefore we do this:

rm -f /bin/sh
ln -s /bin/bash /bin/sh

If you don’t do this, you will most likely get an error like this during the Zimbra installation:

Creating SSL certificate…Done
Initializing ldap…TLS: error:02001002:system library:fopen:No such file or directory bss_file.c:352
TLS: error:20074002:BIO routines:FILE_CTRL:system lib bss_file.c:354
TLS: error:140B0002:SSL routines:SSL_CTX_use_PrivateKey_file:system lib ssl_rsa.c:648
main: TLS init def ctx failed: -1
ERROR – failed to start slapd


On Ubuntu Dapper Drake, /bin/sh points to /bin/bash by default, so everything is ok.

3 Install Zimbra

First let’s install some prerequisites for Zimbra:

apt-get install curl fetchmail libpcre3 libgmp3c2 libexpat1 libxml2 libtie-ixhash-perl

Afterwards, go to and download the Ubuntu 6 (.tgz) package to /usr/src, for example like this:

cd /usr/src

(Replace the download URL with the one you get from SourceForge.)

if (!window.netshel_ord) { netshel_ord=Math.random()*10000000000000000; } if (!window.netshel_tile) { netshel_tile=1; } document.write(”); netshel_tile++; Afterwards, unpack the Zimbra .tgz file and start the installer:

tar xvfz zcs-4.5.3_GA_733.UBUNTU6.tgz
cd zcs/

The installer will ask a few questions. Answer them like this:

Operations logged to /tmp/install.log.4416
Checking for existing installation…
zimbra-ldap…NOT FOUND
zimbra-logger…NOT FOUND
zimbra-mta…NOT FOUND
zimbra-snmp…NOT FOUND
zimbra-store…NOT FOUND
zimbra-apache…NOT FOUND
zimbra-spell…NOT FOUND
zimbra-core…NOT FOUND


License Terms for the Zimbra Collaboration Suite:

Press Return to continue <– <ENTER>

Install zimbra-ldap [Y] <– <ENTER>

Install zimbra-logger [Y] <– <ENTER>

Install zimbra-mta [Y] <– <ENTER>

Install zimbra-snmp [Y] <– <ENTER>

Install zimbra-store [Y] <– <ENTER>

Install zimbra-spell [Y] <– <ENTER>

The system will be modified. Continue? [N] <– y

Main menu

1) Hostname:
2) Ldap master host:
3) Ldap port: 389
4) Ldap password: set
5) zimbra-ldap: Enabled
6) zimbra-store: Enabled
+Create Admin User: yes
+Admin user to create:
******* +Admin Password UNSET
+Enable automated spam training: yes
+Spam training user:
+Non-spam(Ham) training user:
+Global Documents Account:
+SMTP host:
+Web server HTTP port: 80
+Web server HTTPS port: 443
+Web server mode: http
+Enable POP/IMAP proxy: no
+IMAP server port: 143
+IMAP server SSL port: 993
+POP server port: 110
+POP server SSL port: 995
+Use spell check server: yes
+Spell server URL:

7) zimbra-mta: Enabled
8) zimbra-snmp: Enabled
9) zimbra-logger: Enabled
10) zimbra-spell: Enabled
r) Start servers after configuration yes
s) Save config to file
x) Expand menu
q) Quit

Address unconfigured (**) items (? – help) <– 6

Store configuration

1) Status: Enabled
2) Create Admin User: yes
3) Admin user to create:
** 4) Admin Password UNSET
5) Enable automated spam training: yes
6) Spam training user:
7) Non-spam(Ham) training user:
8) Global Documents Account:
9) SMTP host:
10) Web server HTTP port: 80
11) Web server HTTPS port: 443
12) Web server mode: http
13) Enable POP/IMAP proxy: no
14) IMAP server port: 143
15) IMAP server SSL port: 993
16) POP server port: 110
17) POP server SSL port: 995
18) Use spell check server: yes
19) Spell server URL:

Select, or ‘r’ for previous menu [r] <– 4

Password for (min 6 characters): [8BD.yZtFh] <– [specify a password for the admin user, e.g. howtoforge]

Select, or ‘r’ for previous menu [r] <– <ENTER>

Main menu

1) Hostname:
2) Ldap master host:
3) Ldap port: 389
4) Ldap password: set
5) zimbra-ldap: Enabled
6) zimbra-store: Enabled
7) zimbra-mta: Enabled
8) zimbra-snmp: Enabled
9) zimbra-logger: Enabled
10) zimbra-spell: Enabled
r) Start servers after configuration yes
s) Save config to file
x) Expand menu
q) Quit

*** CONFIGURATION COMPLETE – press ‘a’ to apply
Select from menu, or press ‘a’ to apply config (? – help) <– a
Save configuration data to a file? [Yes] <– <ENTER>
Save config in file: [/opt/zimbra/config.5762] <– <ENTER>
Saving config in /opt/zimbra/config.5762…Done
The system will be modified – continue? [No]
<– y

You have the option of notifying Zimbra of your installation.
This helps us to track the uptake of the Zimbra Collaboration Suite.
The only information that will be transmitted is:
The VERSION of zcs installed (4.5.3_GA_733_UBUNTU6)

Notify Zimbra of your installation? [Yes] <– [if you want to notify Zimbra of your installation, type y, otherwise n]

Configuration complete – press return to exit <– <ENTER>

That’s it already. To test if all Zimbra services are running, become the zimbra user:

su – zimbra

and run

zmcontrol status

The output should look like this:

zimbra@mail:~$ zmcontrol status
antispam Running
antivirus Running
ldap Running
logger Running
mailbox Running
mta Running
snmp Running
spell Running

If not all services are started, run

zmcontrol start



to become root again.

4 The Zimbra Web Interface

Zimbra comes with a web interface for the administrator ( and normal users ( I’m going to show some basic screenshots here, but no help on how to use Zimbra. To learn how to use Zimbra, please refer to and

4.1 The Administration Console

You can now open a browser and open the Zimbra Administrator web interface. The URL is Log in with the username admin and the password you specified during the Zimbra installation:

This is how the admin panel looks like:

You can find all pre-configured email addresses under Accounts:

If you want to add a new domain (e.g. because you want email addresses of the form instead of, click on Domains and then on New:


Afterwards, is listed in the domains list:

To create a new user, go to Accounts and click on New:

Follow the wizard to create a new email account. Take care that you select the right domain ( vs.

Afterwards, mark the new account in the accounts list and click on Edit:

Specify a password for the new account on the General Information tab and click on Save:

4.2 The User Webinterface

Now that you’ve created a normal user account, you can log out of the admin panel and go to Log in with the email address and the password of the new account:

This is how the user webinterface looks like. You have tabs to manage your emails, address book, calendar, documents, etc.

5 Uninstall Zimbra

If you want to uninstall Zimbra, do it like this:

Go the the Zimbra installation directory (I hope you didn’t delete it):

cd /usr/src/zcs

Then run

./ -u

and delete the Zimbra installation directory afterwards:

cd /usr/src
rm -rf zcs

6 Links


Leave a Comment »

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at
Entries and comments feeds.

%d bloggers like this: