Manual Installation Ubuntu Gutsy

From Scalix Wiki
Jump to: navigation, search


Important Note

Please note that these manual installation instructions should only be used on Ubuntu distributions, such as Ubuntu Gutsy Gibbon 7.10 server, the distribution the document was written for. It is highly recommended to perform installation using the Scalix Installer on all supported platforms. If you manually install any version of Scalix, this may invalidate your ability to receive Scalix support for that software. Thank you for your understanding and compliance.

This document might be inaccurate and under construction. Do not trust this document.

Manual Installation on Ubuntu 7.10 Server (Gutsy Gibbon)

As Ubuntu 7.10 is an unsupported platform there is currently no manual describing the installation on this platform. It took me a lot of time to have the Scalix Community Edition installed on my Ubuntu server. To do so I had to combine the information of a lot of sources (wiki pages, forums posts, etc) together. At last I managed to get Scalix it up and running and just felt like sharing this with the community. Simply my way to give something back.

So below you'll find a how-to that describes the manual installation of Scalix on Ubuntu 7.10 server.

Just to put things right, this document is loosely based on the instructions to install Scalix manually, as provided here on this Wiki as well. Besides that, as said earlier, I used several sources of information on the web. The ones I can remember, I listed at the end of the document under Sources.

Applicable Environments

These Installation instructions have been tested with

  • Scalix CE 11.3.0
  • Ubuntu 7.10 Server (Gutsy Gibbon)

They might not apply unmodified to any other version of Scalix or Ubuntu.


Scalix Community Edition software is currently available as an i386 build only. It will run on i386 and x86_64 Intel and AMD platforms.

System Preparation

The following items may be helpful in preparing your system for Scalix Installation:

Network Configuration

  • Make sure you have at least one properly configured network interface.
  • Use a static IP address; running a Scalix server on a machine using DHCP is not recommended.
  • Correct hostname resolution/DNS setup is vital. It is also best to use DNS in a Scalix/mail environment. File-based hostname resolution can be used (/etc/hosts). However, the following should always be true:
    • Your system should have a fully-qualified hostname
    • The 'hostname' command should return the short hostname, while the 'hostname --fqdn' command should return the fully-qualified hostname
    • Both the hostname and the fully-qualified hostname should resolve to the system's IP address (not the loopback IP address).
    • The special name 'localhost' should resolve to
    • The IP address of the system should reverse-resolve to the fully-qualified hostname (not the short hostname or localhost)

To achieve this your /etc/hosts file should contain at least the following two lines:         localhost
<yourexternalip>  <> <hostname>

Disk/File System Configuration

  • Scalix Software is installed in /opt. You need 200 MB in this directory
  • Scalix Data is kept in /var/opt/scalix. You need a minimum of 200 MB plus the size of any mailboxes.

Disabling Conflicting Services

Scalix comes with its own POP3, IMAP, LDAP and SMTP services. These might conflict with components already installed on the system.

  • To check for processes listening on the POP3 and IMAP ports, use the
    sudo lsof -i :110  or  sudo netstat -anp | grep 110
    sudo lsof -i :143  or  sudo netstat -anp | grep 143 
    commands. If you see any process/service running, shut it down and disable it from starting with system startup
  • To check for processes listening on the standard LDAP port, use the
    sudo lsof -i :389  or  sudo netstat -anp | grep 389
    command. If you see any process/service running, you can use an alternate port number for Scalix LDAP. Please see this Wiki article.
  • To check for processes listening on the standard SMTP port, use the
    sudo lsof -i :25  or  sudo netstat -anp | grep 25
    command. If sendmail listens on it's allright, you can leave it the way it is. However, it should not listen on your external IP address. If you see a sendmail process/service listening on the external IP address, reconfigure your MTA. If you see another proces (MTA) than sendmail, make sure you remove your current MTA to replace it by sendmail (described below).

Software Selection

Note: Make sure you have the multiverse repository and the universe repository active in /etc/apt/sources.list and run:
sudo apt-get update

The following additional packages that come with Ubuntu are needed after base installation.

  • Apache Webserver 2.x: the apache2 package
  • OpenSSL: the openssl package
  • Gnu AWK: the gawk package
  • Kerberos (MIT Kerberos 5): the krb5-config, krb5-doc, krb5-user, libkadm55 and libkrb53 packages
  • libglib2: the libglib2.0-0 package
  • libstdc++: the libstdc++2.10-glibc2.2, gcc-4.2-base, gcc-3.3-base, libstdc++5 and libstdc++6 packages are also required
  • libxml2: the libxml2, sgml-base and xml-core packages
  • Postgres: the postgresql and postgresql-client packages
  • SASL2 and modules for plain, crammd5 and gssapi (for MIT Kerberos): the libsasl2-modules and libsasl2-modules-gssapi-mit packages
  • Tk: the tk8.3 package
  • Tcl: the libfreetype6 and tcl8.3 packages
  • text-based web browser: the elinks package
  • Apache Tomcat mod_jk connector: the libapache2-mod-jk package
  • Sun Java Runtime Environment: the sun-java5-jre package
  • sendmail (if not installed yet, see Disabling Conflicting Services above): the sendmail package

To install all these packages together with their dependencies run the following command:

sudo apt-get install apache2 gawk krb5-config krb5-doc krb5-user libkadm55 libkrb53 libglib2.0-0 libstdc++2.10-glibc2.2 \
gcc-4.2-base libstdc++6 libxml2 sgml-base xml-core postgresql postgresql-client libsasl2-modules libsasl2-modules-gssapi-mit \
libfreetype6 tcl8.3 tk8.3 elinks libapache2-mod-jk sun-java5-jre gcc-3.3-base openssl libstdc++5

If it is necessary to install sendmail as well, run also:

sudo apt-get install sendmail

Extra dependency

Scalix depends on a package called libsasl-2. Unfortunately is this package not available for Ubuntu 7.10. Sure, there is a replacement, so in fact there's no problem regarding the actual library dependencies, but the replacement package is called libsasl-2-2. It seems stupid, but the Scalix server won't install with this package and we really have to install a package called libsasl-2 next to it. As said, there's no such package available, so I created a kind of fake package (see also this forumthread on to install instead and prevent problems later on. Download the package here and install it using this command:

sudo dpkg -i libsasl2_2.1.22.dfsg1-9ubuntu2_i386.deb

Other preparation steps

The Scalix message store depends on the libssl0.9.7 package. As the 0.9.7 version is not available for this Ubuntu version, you have to sym-link the library to instead. This can be done by:

sudo ln -s /usr/lib/ /usr/lib/

Under Ubuntu the standard shell /bin/sh is linked to dash instead of bash. This will cause problems running the scripts later on. To prevent this, please link /bin/sh temporarily to /bin/bash, after saving the original link of course (don't worry, we will restore the original state afterwards):

sudo mv /bin/sh /bin/SH
sudo ln -s /bin/bash /bin/sh

Download the Scalix Software

The Scalix 11.3.0 packages can be downloaded here. You will need to download the installer package for Debian, called: scalix-11.3.0-U1-GA-unsupported-debian-intel.bin.

Unpack the Scalix software

Start the downloaded installer:

sudo bash scalix-11.3.0-U1-GA-unsupported-debian-intel.bin

This will take you to the license agreement, to proceed:

  • press the space bar repeatedly to scroll down if you want to read the license agreement, or press q to skip to the end immediately
  • at the end of the agreement, at the prompt, accept the agreement by entering yes
  • next, launch the readme file by pressing enter
  • when prompted to run the package, say no

Install the Scalix Server package

Before installing the scalix-server package, we have to install the last two dependencies (scalix-chardet and scalix-libical). They come with the Scalix installer and can be installed by:

sudo dpkg -i scalix-debian-11.3.0-GA/software/scalix_server/scalix-chardet_1.0.20071031-2_i386.deb
sudo dpkg -i scalix-debian-11.3.0-GA/software/scalix_server/scalix-libical_0.27.20071008-1_i386.deb

After that, we can (finally) install the scalix-server package using dpkg, do so using this command:

sudo dpkg -i scalix-debian-11.3.0-GA/software/scalix_server/scalix-server_11.3.0.11339_i386.deb

Create and configure the initial Scalix Server Instance

Initialize the Scalix Message Store

To initialize the Scalix message store, use the
sudo /opt/scalix/bin/ommakeom
command. This creates an empty message store in /var/opt/scalix and also adds config file templates for all components into this directory tree. The process takes 3-15 minutes, depending on the speed of your system. Please check the screen output for any errors or problems during the process. A log of the message store creation is located in /var/opt/scalix/sys/install/log. In case of an error, correct the problem and restart message store creation by using the command:
sudo /opt/scalix/bin/ompatchom

Set generation rules for Display Name, Login Name and Internet Address

Before creating any new user, set the default rules for generating the display name (shown in the 'from' email header and address book display), the login name (used to log in to Scalix clients) and the Internet address.

See the following list of user attributes you can use in those rules:

  • G represents the given name in mixed/original casing
  • S represents the surname in mixed/original casing
  • I represents the middle initial(s) in mixed/original casing
  • C represents the common name/display name in mixed/original casing (this cannot be used in the display name generation)
  • g, s, i and c represent the first character of the given name/surname/initials/common name in lower case
  • f and l represent the full given name/last name in lowercase
  1. To set up generation rules for the display name, use the
    sudo /opt/scalix/bin/sxconfig --set -t general.usrl_cn_rule='<rule>'
    command, e.g.
    sudo /opt/scalix/bin/sxconfig --set -t general.usrl_cn_rule='G S'
    to set the display name generation rule to <name> <surname>.

  2. To set up generation rules for the login name, use the
    sudo /opt/scalix/bin/sxconfig --set -t general.usrl_authid_rule='<rule>'
    command, e.g.
    sudo /opt/scalix/bin/sxconfig --set -t general.usrl_authid_rule='sg'
    to set the login name generation rule to use the initials of the user in lowercase. If you add a @ character behind the <rule> (e.g. sg@), the fully-qualified domain name of the server appends to the login name.

  3. To set up generation rules for the Internet address, use the
    sudo /opt/scalix/bin/sxconfig --set -t orniasys.name_part_<n>='<rule>' -t orniasys.domain_part_<n>='<domain>'
    command, e.g.
    sudo /opt/scalix/bin/sxconfig --set -t orniasys.name_part_1='"G S" <G.S>' -t orniasys.domain_part_1=''
    to set the Internet address generation rule to generate addresses in the form "First Last" <>.

Create default mailnode

The mailnode is a organizational unit grouping users. For single-server systems, creating a single, default mailnode is usually sufficient. It is best to use the organization name (without any 8-bit or special characters, also underscores are not allowed) as the mailnode name. To create the initial mailnode and make it the default, use the
sudo /opt/scalix/bin/omaddmn -m <mailnode>
command, e.g.
sudo /opt/scalix/bin/omaddmn -m mydomain

Start server daemons

Before creating the first set of users, you'll have to start the server daemons. Do so using the
sudo /opt/scalix/bin/omrc -n
command. The -n option makes sure that the mail delivery and user sign-on services are not started because these are not usable yet at this time.

Create a default admin user

To create a default admin account, use the command
sudo /opt/scalix/bin/omaddu -n "<fullname>/<mailnode>" --class <class> -c admin -p <password> <loginname>
command, like below
sudo /opt/scalix/bin/omaddu -n "sxadmin/mydomain" --class limited -c admin -p password sxadmin


  • sxadmin is the full name of the admin user as displayed in the address book
  • mydomain is the default mailnode created in the previous step
  • limited is either full or limited. Note that when the admin user is a full user, this will use one of the 10 free premium users available in the Scalix Community Edition. Although, if the admin user is a limited user, the admin user cannot be used to connect via Outlook for example.
  • -c admin sets full admin capabilities for the user
  • password is the users initial password
  • sxadmin is the users login name

Configure the admin user

Set up the admin user as a 'postmaster' to receive system error messages:
sudo /opt/scalix/bin/omconfenu -n "sxadmin/mydomain"
. To make sure this user is excluded from system-wide inbox quota checking, use:
sudo /opt/scalix/bin/omlimit -u "sxadmin/mydomain" -o -i 0 -m 0

Create a LDAP query user

To allow the Scalix Admin Server and Admin Console to access user information through Scalix LDAP, create a system user as follows:

sudo /opt/scalix/bin/omaddu -n sxqueryadmin/<mailnode> --class limited -c admin -p <passwd> sxqueryadmin@<fqdn>

This user's password can be anything, but the username (sxqueryadmin) and the login name (sxqueryname) must match the values provided. The <fqdn> should match the FQDN of your server as returned by the hostname --fqdn command. The user can always be created as a limited user because the only server he is allowed to log in to is LDAP, that does not require a premium user account.

Create the standard Scalix admin groups

Next, create the standard Scalix admin groups for the Scalix Admin Server. The names of these groups are fixed, so you must create them as follows:

sudo /opt/scalix/bin/omaddpdl -l ScalixUserAdmins/mydomain
sudo /opt/scalix/bin/omaddpdl -l ScalixUserAttributesAdmins/mydomain
sudo /opt/scalix/bin/omaddpdl -l ScalixGroupAdmins/mydomain
sudo /opt/scalix/bin/omaddpdl -l ScalixAdmins/mydomain

Starting Scalix services

Finally, start all services now using the following command:
sudo /opt/scalix/bin/omon -s all

Install the remaining Scalix application packages

Now install the remaining Scalix packages , that are left, please make sure you install the packages in this order:

sudo dpkg -i scalix-debian-11.3.0-GA/software/scalix_server/scalix-tomcat-connector_11.3.0.77_all.deb
sudo dpkg -i scalix-debian-11.3.0-GA/software/scalix_server/scalix-tomcat_5.5.25-57_all.deb
sudo dpkg -i scalix-debian-11.3.0-GA/software/scalix_server/scalix-platform_11.3.0.77_all.deb
sudo dpkg -i scalix-debian-11.3.0-GA/software/scalix_server/scalix-sis_11.3.0.77_all.deb
sudo dpkg -i scalix-debian-11.3.0-GA/software/scalix_server/scalix-swa_11.3.0.97_all.deb
sudo dpkg -i scalix-debian-11.3.0-GA/software/scalix_server/scalix-res_11.3.0.77_all.deb
sudo dpkg -i scalix-debian-11.3.0-GA/software/scalix_server/scalix-sac_11.3.0.77_all.deb
sudo dpkg -i scalix-debian-11.3.0-GA/software/scalix_server/scalix-mobile_11.3.0.77_all.deb
sudo dpkg -i scalix-debian-11.3.0-GA/software/scalix_server/scalix-postgres_11.3.0.77_all.deb

Set up Scalix-Tomcat

Configure Tomcat memory allocation

Edit the following line in /etc/opt/scalix-tomcat/scalix-tomcat.conf so that JAVA_OPTIONS has parameters that allocate 50% of your RAM or 512MB, whichever is less, to your Tomcat application server, e.g. for a machine with 1024MB of RAM:

JAVA_OPTS="-server -Xms512m -Xmx512m"

Configure Tomcat connector

Check if your have Tomcat running as http-proxy on port 8080. To do so you should check whether in the file /var/opt/scalix/<instance>/tomcat/conf/server.xml in the CATALINA service config part the directive that begins with: <Connector port="8080" is uncommented. If not, please uncomment it, otherwise you will not be able to reach the Scalix applications.

Configure Apache proxy access

Edit the file /etc/apache2/mods-available/proxy.conf. Find the <Proxy *> section, like shown below:

<Proxy *>
    AddDefaultCharset off
    Order deny,allow
    Deny from all
    #Allow from

Change the line Deny from all into Allow from all. Afterwards the <Proxy *> section should look like this:

<Proxy *>
    AddDefaultCharset off
    Order deny,allow
    Allow from all
    #Allow from

This makes sure that you'll be able to reach the Scalix Tomcat instance afterwards.

Set up Scalix-Postgres

Use the commands below to set up the Scalix-Postgres service:

sudo /opt/scalix-postgres/bin/sxpsql-init                  # To create the database and tables
sudo /opt/scalix-postgres/bin/sxpsql-setpwd <password>     # This is a database password you select
sudo /opt/scalix-postgres/bin/sxpsql-whitelist <yourip>    # This is the IP address matching the 
                                                           # hostname of the machine as used above

Configure Scalix applications

You will need to follow a few simple steps to integrate the Scalix applications into your Tomcat application server.

Configure Scalix Web Access (SWA)

Now, you must set up a number of parameters in /var/opt/scalix/<instance>/webmail/                                     # Add your main domain here                          # FQDN of your Scalix server                          # FQDN of your Scalix server
swa.settings.rulesWizardURL=/Scalix/rw                            #                             # FQDN of your Scalix server
swa.ldap.1.port=389                                               # The port number of your 
                                                                  # Scalix LDAP server; if you 
                                                                  # have changed this from the
                                                                  # default during server install,
                                                                  # this needs to be reflected                             # FQDN of your Scalix server
swa.ldap.2.port=389                                               # The port number of your 
                                                                  # Scalix LDAP server; if you 
                                                                  # have changed this from the
                                                                  # default during server install,
                                                                  # this needs to be reflected
swa.platform.url=                 # Points to Platform Host
swa.platform.enabled=true                                         # use the platform
swa.soap.soapRequestTimeout=60                                    # default timeout

Configure Scalix Ubermanager Admin Server (CAA)

Next, you must set up a number of parameters in /var/opt/scalix/<instance>/caa/scalix.res/config/ :                 # FQDN of your Scalix server
ubermanager.kerberos.mode=false                              # N/A for single server
ubermanager.kerberos.principalName=                          # "   "   "      "
ubermanager.kerberos.kdc=                                    # "   "   "      "
ubermanager.kerberos.realm=                                  # "   "   "      "
ubermanager.console.externalAuth=false                       # default value
ubermanager.console.allowExternalAuthChoice=false            # default value
ubermanager.console.maxListSize=100                          # default value                # Your email domain(s)
ubermanager.console.authDomains=                             # default value
ubermanager.console.modifyExternalSyncedAuthId=false         # default value
ubermanager.query.server.port=389                            # Scalix LDAP port number
ubermanager.configured=true                                  # to indicate file has been touched
ubermanager.version=11.3.0                                   # Please use your correct Scalix version

Also, create a file called /var/opt/scalix/<instance>/caa/scalix.res/config/psdata, put in the sxqueryadmin password and make sure the file is only readable by root:

cd /var/opt/scalix/<instance>/caa/scalix.res/config
sudo bash -c "echo <sxqueryadmin-password> >psdata"
sudo chown root:root psdata
sudo chmod 400 psdata

Configure Scalix RES Admin Agent

You will need to adjust a few parameters in /var/opt/scalix/<instance>/res/config/

res.kerberos.mode=                                           # Leave empty for single server
res.kerberos.kdc=                                            # "     "     "   "      "     
res.kerberos.realm=                                          # "     "     "   "      "     
res.kerberos.allowedclients=ubermanager/  # FQDN of your Scalix server                     # FQDN of your Scalix server
res.tomcat.tcp.port=8080                                     # http port number of Tomcat
res.configured=true                                          # to indicate file has been touched
res.version=11.3.0                                           # Please use your correct Scalix version

Configure Scalix Messaging Services API Platform

You will need to adjust a few parameters in /var/opt/scalix/<instance>/platform/                                                 # FQDN of your Scalix server                                                 # FQDN of your Scalix server
ldap.port=389                                                                 # Scalix LDAP port
hibernate.connection.url = jdbc:postgresql://  # DB server or localhost
                                                                              # Note Scalix specific PG port
hibernate.connection.password = <postgres-password>                           # as assigned on DB creation

Configure Scalix Web Access Mobile

You will need to adjust another few parameters in /var/opt/scalix/<instance>/mobile/

platform.url=                 # URL to Messaging Services Platform

Configuring Scalix Search and Indexing Services

You will need to adjust a few parameters in /var/opt/scalix/<instance>/sis/

index.language=English                        # Default language for indexing, 
                                              # analysis, stemming search
index.client.whitelist=<yourip>               # IP of your Scalix server
search.client.whitelist=<yourip>              # IP of your Scalix server

Make Scalix web applications available via Apache

As the out-of-the-box installation does not work together with the default Apache configuration on Ubuntu properly, you won't be able to reach any of the web applications that come with Scalix. To make it possible to access them, you'll have to change the (default) Apache configuration file /etc/apache2/sites-available/default. Add the following lines to this file, just before the line </VirtualHost> at the end of the file:

Include /etc/opt/scalix-tomcat/connector/ajp/app-<hostname>.*.conf
Include /etc/opt/scalix-tomcat/connector/jk/app-<hostname>.*.conf

Of course, here <hostname> should be replaced by the hostname of your Scalix server.

Normally the configuration files included in this lines would be included by the following configuration files: /etc/opt/scalix-tomcat/connector/ajp/instance-<hostname>.conf and /etc/opt/scalix-tomcat/connector/jk/instance-<hostname>.conf. That means you have to edit these files as well.

So edit the file /etc/opt/scalix-tomcat/connector/ajp/instance-<hostname>.conf with your favorite editor and comment out the following lines:

#<VirtualHost <hostname.domain>:80>
#    Include /etc/opt/scalix-tomcat/connector/ajp/app-<hostname>.*.conf

Next, edit the file /etc/opt/scalix-tomcat/connector/jk/instance-<hostname>.conf, here also comment out the following lines:

#<VirtualHost <hostname.domain>:80>
#    Include /etc/opt/scalix-tomcat/connector/jk/app-<hostname>.*.conf

Restarting Tomcat

After making all these changes, restart Tomcat with the following command:
sudo /etc/init.d/scalix-tomcat restart

Integrating the Web-based Scalix Rules Wizard into Apache

You will need to link the Apache config file into your Apache config directory:
sudo ln -s /opt/scalix/global/httpd/scalix-web-client.conf /etc/apache2/conf.d
Afterwards restart apache using:
sudo /etc/init.d/apache2 restart

Test your freshly installed system

Installation is now complete. Before starting with the new system, test the following:

  • Reboot your server. All services (Scalix Server, Tomcat and Apache) should come up without any problems.
  • Check the output of the commands:
    sudo /opt/scalix/bin/omstat -a  and sudo /opt/scalix/bin/omstat -s
    Only the Item Structure Server may be displayed as stopped. All other daemons and services should be up and running.
  • Try to access Scalix Admin Console from a browser using the URL. Log in using your sxadmin login and password.
  • Create a new user.
  • Try to access Scalix Web Access from a browser using the URL. Log in using your newly-created user. Try address book lookups. Send an email message to yourself. Try to access the Web-based Scalix Rules Wizard from your Extras menu.
  • Download and install the Outlook connector.
  • Setup a premium user. Install the Outlook connector on a Windows PC.
  • Set up an Outlook profile and access your Scalix mailbox from Outlook.

If all this works, your Scalix server is allright and you're ready to take the next steps.

Next steps

  • Read the documentation. Check out the Administration Guide, the Setup Guide and the Administration Console Guide. If you need more information: manpages contain a lot of valuable data. Start with man scalix-server
  • Setup your sendmail with correct smarthost and routing information for outbound (internet) email. Find here how to do so.
  • Setup fetchmail if your email is hosted with a provider. Find here how to do so.
  • Setup SpamAssassin for spam protection. Find here how to do so.
  • Setup ClamAV for virus protection. Find here how to do so.
  • Setup https if you require secured SSL communication for the Scalix web applications. Find here how to do so.


The author

The origin for this document was written by Max Wiertz. As a Scalix newbie, I invested a lot of work in getting Scalix to work for me on Ubuntu. I felt like sharing this with all of you, so you can probably take advantage of it.

If you have any questions, remarks, comments or suggestions regarding this document, do not hesitate to contact me by e-mail: mailto:max_DOT_wiertz_AT_gmail_DOT_com.