Home | Comics | wishlist | Impressum | Datenschutzerklärung | 54.159.44.54


How to build Postfix with SASL1 or SASL2

What's the problem here?

Building Postfix from source using the correct pairs of includes and libraries seems to be a tough challenge to many -- even advanced users.

Locate the include files

% find / -name sasl.h | xargs ls -l
-rw-r--r--    1 root     root        35389 Jan 18 13:24 /usr/local/include/sasl.h
-rw-r--r--    1 root     root        47086 Mai 14 22:52 /usr/local/include/sasl/sasl.h

So, which is which?

Look into the sasl.h files: /usr/local/include/sasl/sasl.h contains:
#define SASL_VERSION_MAJOR 2
#define SASL_VERSION_MINOR 1
#define SASL_VERSION_STEP 13
This is version 2.1.13.

and /usr/local/include/sasl.h:

#define SASL_VERSION_MAJOR 1
#define SASL_VERSION_MINOR 5
#define SASL_VERSION_STEP 27
This is version 1.5.27.

So, if I want SASL2 in Postfix, I need to use CCARGS="-DUSE_SASL_AUTH -I/usr/local/include/sasl".

So, if I want SASL1, I need to use CCARGS="-DUSE_SASL_AUTH -I/usr/local/include".

Locate the library files

% find / -name 'libsasl*' | xargs ls -l
-rw-r--r--    1 root     root       458562 Jan 18 13:24 /usr/local/lib/libsasl.a
-rwxr-xr-x    1 root     root          694 Jan 18 13:24 /usr/local/lib/libsasl.la
lrwxrwxrwx    1 root     root           17 Jan 18 13:24 /usr/local/lib/libsasl.so -> libsasl.so.7.1.10
lrwxrwxrwx    1 root     root           17 Jan 18 13:24 /usr/local/lib/libsasl.so.7 -> libsasl.so.7.1.10
-rwxr-xr-x    1 root     root       208168 Jan 18 13:24 /usr/local/lib/libsasl.so.7.1.10
-rwxr-xr-x    1 root     root       201319 Okt 11  2001 /usr/local/lib/libsasl.so.7.1.8
-rw-r--r--    1 root     root      1260616 Mai 14 22:52 /usr/local/lib/libsasl2.a
-rwxr-xr-x    1 root     root          690 Mai 14 22:52 /usr/local/lib/libsasl2.la
lrwxrwxrwx    1 root     root           18 Mai 14 22:52 /usr/local/lib/libsasl2.so -> libsasl2.so.2.0.13
lrwxrwxrwx    1 root     root           18 Mai 14 22:52 /usr/local/lib/libsasl2.so.2 -> libsasl2.so.2.0.13
-rwxr-xr-x    1 root     root       286100 Jan 18 13:51 /usr/local/lib/libsasl2.so.2.0.10
-rwxr-xr-x    1 root     root       288003 Mai 14 22:52 /usr/local/lib/libsasl2.so.2.0.13
-rw-r--r--    1 root     root       217802 Mai 14 22:52 /usr/local/lib/sasl2/libsasldb.a
-rwxr-xr-x    1 root     root          714 Mai 14 22:52 /usr/local/lib/sasl2/libsasldb.la
lrwxrwxrwx    1 root     root           19 Mai 14 22:52 /usr/local/lib/sasl2/libsasldb.so -> libsasldb.so.2.0.13
lrwxrwxrwx    1 root     root           19 Mai 14 22:52 /usr/local/lib/sasl2/libsasldb.so.2 -> libsasldb.so.2.0.13
-rwxr-xr-x    1 root     root       115991 Jan 18 13:51 /usr/local/lib/sasl2/libsasldb.so.2.0.10
-rwxr-xr-x    1 root     root       102959 Mai 14 22:52 /usr/local/lib/sasl2/libsasldb.so.2.0.13
The SASL1 libs are in /usr/local/lib, named libsasl.*
The SASL2 libs are in /usr/local/lib, named libsasl2.*

So, if I want SASL1, I need to use AUXLIBS="-L/usr/local/lib -lsasl"
So, if I want SASL2, I need to use AUXLIBS="-L/usr/local/lib -lsasl2"

Combine, Dr. Watson


© by Ralf Hildebrandt
This document contains links to external information sources that I do neither monitor nor control. I explicitly disclaim any liabilities in respect to external references.
You are getting this document without any guarantees. Any methods shown above are meant as demonstration and may be wrong in some place. You may damage your system if you try to follow my hints and instructions. You do this at your own risk!

This file was last modified 17. Jan 2007 by root