HowTo: Install Scalix on Debian using Postfix instead of Sendmail

Reading Time: 4 minutes

Over the last weeks I got the idea to set up my own server. I did this years before, during my study time but when starting to work I was too busy to maintain my server. Now, I regret this and would like to bring this blog to my own server. While doing this, I came to the idea, setting up my own mail server. In the past I used Scalix for this and discovered that Scalix is still alive. The only thing, which was not ideal with Scalix, you had to use Sendmail and CentOS if you want it for free. This changed a bit, as Debian will be supported with the next version, which will be 12.2. But as always I cannot wait until this version will be released so I started thinking about it and found an installation script for Debian here:

https://github.com/scalix/Debian-installer

This will do a great job, but will install Sendmail. To change this afterwards is a mess, so I decided to tweak the script. I removed the sendmail installation instructions in line 281. Remove “sendmail” and “sendmail-cf”. Doing this, wont install Sendmail, but the installation will fail, due to the missing dependencies of Scalix server.

Fake Sendmail

After doing some research, I figured out that it is possible, creating a fake Sendmail package, which will make Scalix server happy. The detailed description can be found here:

http://braindump.mrzesty.net/index.php?node=35

It is the first paragraph, which is describing the magic.

Login as root and create a folder for the package:

cd /root 
mkdir -p sendmail-fake/DEBIAN 
vi sendmail-fake/DEBIAN/control

The contents of “sendmail-fake/DEBIAN/control should look like this:

Package: sendmail-fake 
Version: 1.0.0 
Section: base 
Priority: optional 
Architecture: all 
Depends: bash (>= 2.05a-11), awk, grep (>= 2.4.2-3) 
Maintainer: Florian Baaske 
Provides: sendmail,sendmail-cf 
Description: Fake sendmail package to make Scalix happy

Create a .deb package from that and install the package:

dpkg-deb --build sendmail-fake /root/ dpkg -i sendmail-fake_1.0.0_all.deb

Before installing Scalix on Debian I installed Postfix:

apt-get install postfix

This should remove EXIM and install Postfix on the system. When installing Postfix, make sure, you select “no configuration”. This is necessary, to prevent that Postfix will take over port 25, which will be used by Scalix. I will change this later.

Install Scalix on Debian

You can now run the script, mentioned above. If you did not download the Scalix *.deb packages, you can run the script like this:

./deb_installer.sh --update

This will download the packages for you and install Scalix on Debian. Just follow the instructions. You just have to agree on installing a lot of packages and provide some passwords for authentication.

Afterwards you should get this output from the script:

############################################################ 
# 
# FINISHED !! 
# 
# You should now be able to access your scalix installation at: 
# 
# Admin Console: http://your-domain/sac 
# Webmail:       http://your-domain/webmail 
# Mobile Client: http://your-domain/m 
# API:           http://your-domain/api/dav 
# 
############################################################

You should be able to reach those URL’s. If not, you should look at your Apache Virtual Server configuration. I had a fresh installed Debian and needed to remove the default site:

rm /etc/apache2/sites-enabled/000-default

And remove the “NameVirtualHost *:80” statement in this file:

vi /etc/apache2/ports.conf

After the installation everything looks fine, until I tried to install a new package. I’ve got the following error messages:

root@mail:~# apt-get upgrade
Paketlisten werden gelesen... Fertig 
Abhängigkeitsbaum wird aufgebaut. 
Statusinformationen werden eingelesen.... 
Fertig Probieren Sie »apt-get -f install«, um dies zu korrigieren. 
Die folgenden Pakete haben unerfüllte Abhängigkeiten: 
 scalix-server : Hängt ab von (vorher): openssl:i386 ist aber nicht installierbar oder
                                          openssl:amd64 ist aber nicht installierbar
                  Hängt ab von (vorher): libstdc++6:i386 (>= 4.7.2-5) ist aber nicht installierbar
                  Hängt ab von (vorher): libkrb5-3:i386 (>= 1.10.1) ist aber nicht installierbar
                  Hängt ab von (vorher): libsasl2-2:i386 (>= 2.1.25) ist aber nicht installierbar
                  Hängt ab von (vorher): libsasl2-modules:i386 (>= 2.1.25) ist aber nicht installierbar
                  Hängt ab von (vorher): libgssapi3-heimdal:i386 ist aber nicht installierbar
                  Hängt ab von (vorher): libxml2:i386 (>= 2.8.0) ist aber nicht installierbar
                  Hängt ab von (vorher): libglib2.0-0:i386 (>= 2.33.12) ist aber nicht installierbar
                  Hängt ab von (vorher): libmilter1.0.1:i386 (>= 1.0.1) ist aber nicht installierbar
                  Hängt ab von (vorher): libldap-2.4-2:i386 (>= 2.4.31) ist aber nicht installierbar
                  Hängt ab von (vorher): mailutils:i386 ist aber nicht installierbar oder
                                          mailutils:amd64 ist aber nicht installierbar
                  Hängt ab von (vorher): ed:i386 ist aber nicht installierbar oder
                                          ed:amd64 ist aber nicht installierbar
E: Unerfüllte Abhängigkeiten. Versuchen Sie, -f zu benutzen.

After talking to the guy, which wrote the installation script, this is a known issue with Scalix 12.1 and Debian 7.4. This will be resolved with Scalix 12.2.

To resolve it for now, I found a workaround. I head over to the dpkg status file:

vi /var/lib/dpkg/status

and remove the “Depends:” part of the scalix-server package. I removed all, but you can just remove the packages, which creating those errors. Doing this means, that you have to make sure, that the required packages are not removed by accident.

Last but not least, you have to make sure that Scalix is started at boot time. The script, doing it during installation failed, because Scalix required Sendmail started before. To do it manually, you have to open the Scalix init script:

vi /etc/init.d/scalix

Search for the Sendmail entry and remove it. Now, you can put Scalix into the list of services which should be started at boot time:

update-rc.d scalix defaults

Afterwards, the Scalix server should be started at boot time and also be stopped at boot time.

Scalix is now up and running. I will describe in my next post, related to this topic, how to bring Postfix into the game.

Any feedback or questions are very appreciated. Just use the comment function.

Leave a Reply

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