8. Cyrus-SASL Installation

Tuomo Soini currently provides RPMS for Cyrus-SASL and for Postfix. He constructed the RPMS so that they fit together well, which means that when you install both of his RPMS you will be half the way through on your way to a nicely working version of Cyrus-SASL and Postfix.

Tuomos RPMS are SOURCE RPMS. This means that they have to be compiled before we can install them. But before we do this, we'll have to download them.

8.1. Download the SRPMS

Point you Browser to http://tis.foobar.fi/software/ and download the current versions of Cyrus-SASL and Postfix (if you want to use the Postfix SRPM also) to your future SMTP server.

[Note]Note

By the time of writing this HOWTO current versions of Cyrus-SASL and Postfix are:

  • cyrus-sasl-1.5.27-t22.src.rpm

  • postfix-1.1.7-t4.src.rpm

We'll be using these throughout this HOWTO.

[Tip]Tip

New to RPM?

Source RPMS (or SRPMS) do not contain the ready-to-run binaries, but merely the source code that still needs to be compiled. So we will compile the SRPMS first and install the RPM that we built after wards. If you want to know more about RPM read this RPM HOWTO.

8.2. Install SRPMS for compilation

First we have to install the SRPMS into the RPM framework. Before you do that, please read this tiny Building RPMS and consider to follow the concept.

Login and cd to the directory where you put the two RPMS. Then install the two RPMS:

[rpm_user@example.com]# rpm -ivh cyrus-sasl-1.5.27-t22.src.rpm

Now the source.rpms are installed. Our next step is to configure and build them.

8.3. Configure and build RPM from SRPM

In Order to configure our RPMS we need to add some changes to the specification files. We change to the location the RedHat Package Manager has put it to:

[root@example.com]# cd /usr/src/redhat/SPECS/
[Note]Note

Remember, that Postfix needs the SASL libraries when at compilation time. So we have to compile and install Cyrus-SASL first and turn to build Postfix only then.

8.4. Build Cyrus-SASL

Cyrus-SASL builds nicely the way it is and we do not need to pass any extra configuration options. All we have to do, is build it:

[rpm_user@example.com]# rpmbuild -ba cyrus-sasl.spec

8.5. Check for existing Cyrus-SASL

You should check if you already have an existing version on your machine. It doesn't matter if you already have an existing version of Cyrus-SASL installed, as we are going to install Tuomos Version anyway. All we need to know is if we have to install a complete new Cyrus-SASL or if we 'only' need to update the existing one.

This is how we check. We query the RPM Database to tell us if there is a Cyrus-SASL RPM installed:

[root@example.com]# rpm -q cyrus-sasl

If it reads

[root@example.com]# package cyrus-sasl is not installed

go to Install Cyrus-SASL otherwise if the output is

[root@example.com]# cyrus-sasl-XX

else proceed with Update Cyrus-SASL.

8.6. Cyrus-SASL installation

8.6.1. Install Cyrus-SASL

Change to the directory where the now completed and compiled Cyrus-SASL RPM was dropped by the RPM Build.

[rpm_user@example.com]# cd $HOME/rpm/RPMS/i386

Let's see what we have:

[rpm_user@example.com]# ls cyr*
cyrus-sasl-1.5.27-t22.i386.rpm
cyrus-sasl-authd-1.5.27-t22.i386.rpm
cyrus-sasl-devel-1.5.27-t22.i386.rpm
cyrus-sasl-gssapi-1.5.27-t22.i386.rpm
cyrus-sasl-md5-1.5.27-t22.i386.rpm
cyrus-sasl-plain-1.5.27-t22.i386.rpm

We need at least the following RPMS installed in order to make Cyrus-SASL and Postfix work and Postfix get what it needs to when it has to compile with SASL support:

cyrus-sasl-1.5.27-t22.i386.rpm
cyrus-sasl-authd-1.5.27-t22.i386.rpm
cyrus-sasl-devel-1.5.27-t22.i386.rpm

Then you have to choose at least on of the following mechanisms to use when authenticating users:

cyrus-sasl-gssapi-1.5.27-t22.i386.rpm
cyrus-sasl-md5-1.5.27-t22.i386.rpm
cyrus-sasl-plain-1.5.27-t22.i386.rpm

In this HOWTO we are going to install all of them. We su to root and type:

[root@example.com]# rpm -ivh cyrus-sasl-*

That's it for now. We leave Cyrus-SASL the way it is and will build and install Postfix before we will return to configure SASL. Your next Step is Postfix Installation.

8.6.2. Update Cyrus-SASL

Let's see what we have:

[rpm_user@example.com]# ls cyr*
cyrus-sasl-1.5.27-t22.i386.rpm
cyrus-sasl-authd-1.5.27-t22.i386.rpm
cyrus-sasl-devel-1.5.27-t22.i386.rpm
cyrus-sasl-gssapi-1.5.27-t22.i386.rpm
cyrus-sasl-md5-1.5.27-t22.i386.rpm
cyrus-sasl-plain-1.5.27-t22.i386.rpm

We need at least the following RPMs installed in order to make Cyrus-SASL and Postfix work and Postfix get what it needs to when it has to compile with SASL support:

cyrus-sasl-1.5.27-t22.i386.rpm
cyrus-sasl-authd-1.5.27-t22.i386.rpm
cyrus-sasl-devel-1.5.27-t22.i386.rpm

Then you have to choose at least on of the following mechanisms to use when authenticating users:

cyrus-sasl-gssapi-1.5.27-t22.i386.rpm
cyrus-sasl-md5-1.5.27-t22.i386.rpm
cyrus-sasl-plain-1.5.27-t22.i386.rpm

In this HOWTO we are going to update and install the missing ones. We su to root and type:

[root@example.com]# rpm -Uvh cyrus-sasl-*

Before you go and get some fresh coffee, let's wrap things up to now up.

8.7. Summary

Tuomos Cyrus-SASL RPM did the following when we installed it:

  • install cyrus-sasl binaries and libraries

  • install Cyrus-SASL mechanisms

  • add an init script /etc/init.d/saslauthd to start the saslauthd required by the latter /usr/lib/sasl/smtpd.conf

  • add a /etc/pam.d/cyrus file, which will be used by the saslauthd to connect to PAM.

That's it for now. We leave Cyrus-SASL the way it is and will build and install Postfix before we will return to configure SASL.