[Slackbuilds-users] Recommended Change to postfix.SlackBuild

Rob McGee rob0 at slackbuilds.org
Thu Feb 9 04:20:44 UTC 2012

On Wed, Feb 08, 2012 at 08:16:43PM -0600, Nishant Limbachia wrote:
> Here's my own personal modification to postfix slackbuild.  I've 
> included another option "both" that will include both cyrus and 
> dovecot support.
> I've used this mod to build last 3 or 4 versions of postfix and 
> haven't had any issue.

Nevertheless, it's not necessary. Nothing is linked for Dovecot; when
Cyrus SASL's enabled, so's Dovecot. Two for the bargain price of one.

> # Build with dovecot sasl by default, cyrus/dovecot are supported
> SASL=${SASL:-dovecot}
> case "$SASL" in
>      dovecot) SASLARGS='-DDEF_SERVER_SASL_TYPE=\"dovecot\"'
>               SASLLIBS="" ;;
>        cyrus) SASLARGS='-DUSE_CYRUS_SASL -I/usr/include/sasl'
>               SASLLIBS="-L/usr/lib${LIBDIRSUFFIX}/sasl2 -lsasl2" ;;
>         both) SASLARGS='-DDEF_SERVER_SASL_TYPE=\"dovecot\"

This is merely to set the default value for smtpd_sasl_type - it does
not hurt to leave that at "cyrus" and set "dovecot" value in main.cf.

Perhaps if anything needs patched, consider the README, specifically:

users. Thus, the outside has a sendmail-ish flavor, but the inside is
completely different.

This script builds postfix with support for Dovecot SASL but does not
include any support for Cyrus-SASL. If you need to enable support for
Cyrus see SASL_README in the source code. You can also enable support
for MySQL and Postgres. This script should find support for BerkleyDB
and PCRE automagically, so no special options are required.  Further,
this script builds postfix with TLS support and requires that openssl
be installed. openssl-solibs is not enough. You can find a SlackBuild
script for Dovecot at http://www.SlackBuilds.org/ but you do not need
to install it to use this package without SASL.

A couple things to remember about postfix:

It's not wrong. It's just a little misleading (or omissive) on how to
enable Cyrus SASL. Surely anyone who would need/want Cyrus SASL needs
to visit the SASL_README, and anyone who reads the postfix.SlackBuild 
ought to be able to figure out to pass it "SASL=cyrus". I had planned
to offer a patch, but it's late in the evening here, and I *dare* not 
mess with Alan's beautiful, near perfect, brick text at this hour. :)
But I can match it - and I can do so without resorting to cheats like
doubled spaces. /dev/rob0: master of the brickroll. Thick as a brick!

>               SASLLIBS="-L/usr/lib${LIBDIRSUFFIX}/sasl2 -lsasl2" ;;
>            *) SASLARGS=''
>               SASLLIBS="" ;;
> esac
> Hope that helps,
    Rob McGee - /dev/rob0 - rob0 at slackbuilds.org

More information about the SlackBuilds-users mailing list