Originally Posted by gezley
has anyone recompiled Postfix using the Slackbuild script, modifying the script to include support for Cyrus-SASL, OpenLDAP, and MySQL in the build, while retaining Dovecot SASL and TLS?
If so I would appreciate it if they could post the CCARGS and AUXLIBS commands.
I struggled through this and I think I have finally succeeded. This is the first time I have recompiled a Slackware package by editing the slackbuild, and it has been a very rewarding experience. Here is what I did:
1) Used standard Slack openssl
2) Used standard Slack cyrus-sasl
3) Recompiled OpenLDAP - first I downloaded the updated source from the OpenLDAP site and then I edited the slackbuild so that the version number matched the updated source; and second I edited the slackbuild script so that the OpenLDAP server was enabled (the server is disabled by default in Slackware 13-64). I did this by changing "disable-slapd" and "disable-slurpd" to "enable-" in both cases.
4) Used standard Slack mysql
5) Created dovecot user and group, and installed dovecot from slackbuilds
6) Created postfix user and group, and postdrop group. Recompiled Postfix - downloaded up-to-date source from postfix.org and edited slackbuild accordingly. Then edited slackbuild to compile support for cyrus-sasl, mysql and openldap in, using the following CCARGS and AUXLIBS command:
make makefiles \
CCARGS='-DUSE_SASL_AUTH -DUSE_TLS \
-DUSE_CYRUS_SASL -DHAS_MYSQL \
-DHAS_LDAP -I/usr/include/sasl \
AUXLIBS="-L/usr/lib64/mysql -lssl \
-lcrypto -lsasl2 -lmysqlclient -lz -lm \
Dovecot SASL and TLS are compiled in by default.
I wanted Cyrus SASL because I need my Postfix server to act as a client to my Fastmail SMTP server, and Dovecot SASL is server-only.
Everything seems to have gone OK; now I need to work on the Postfix config to get the server relaying outbound mail to the Fastmail servers, and then configure getmail to collect mail from them. I hope to use Dovecot IMAP to read the mail on my local Postfix server.
I will keep you informed as I go along. I find this way of installing packages very simple once you get the hang of editing slackbuilds to support different compile-time options and to compile from up-to-date source. It's certainly more exciting and instructive than what I have been used to, which is Next>Next>Next>Finish in Windows and apt-get install in Debian! It also allows you to download and install updated source quite easily. Very impressed.
I hope this is helpful to someone else along the way.