Subject: building postfix with cyrus-sasl2 support
To: None <netbsd-help@netbsd.org>
From: Erik Osheim <erik@plastic-idolatry.com>
List: netbsd-help
Date: 10/27/2004 21:08:17
I've scoured the archives and the internet. There have been other
posts around this topic, but none that I've seen. I was considering
sending this to tech-pkg, but it is probably just a stupid error so
I'm going to ask here first.

I want to build mail/postfix to support SASL, using the
security/cyrus-sasl2 package. My pkgsrc is current as of a week
ago. After reading some documentation on pkgsrc, and some mailing
lists, I believed that this should do the trick:

(from /etc/mk.conf):
USE_SASL2=YES
PKG_OPTIONS.postfix+=sasl

And indeed, at the beginning of the build, the following is displayed:

==========================================================================
The supported build options for this package are:

        inet6 ldap mysql mysql4 pcre pgsql sasl tls

You can select which build options to use by setting the following
variables.  Their current value is shown:

        PKG_OPTIONS.postfix = sasl tls

==========================================================================

So, it looks like those were getting picked up. It also registered the
cyrus-sasl2 package as a dependency and seemed to link against it:

(lines from compile output, wrapped by mutt):

cc -DDEF_QUEUE_DIR=\"/var/spool/postfix\"
-DDEF_DAEMON_DIR=\"/usr/pkg/libexec/postfix\"
-DDEF_COMMAND_DIR=\"/usr/pkg/sbin\"
-DDEF_CONFIG_DIR=\"/usr/pkg/etc/postfix\"
-DDEF_SENDMAIL_PATH=\"/usr/pkg/sbin/sendmail\"
-DDEF_MAILQ_PATH=\"/usr/pkg/bin/mailq\"
-DDEF_NEWALIAS_PATH=\"/usr/pkg/bin/newaliases\"
-DDEF_MANPAGE_DIR=\"/usr/pkg/man\"
-DDEF_SAMPLE_DIR=\"/usr/pkg/share/examples/postfix\"
-DDEF_README_DIR=\"/usr/pkg/share/doc/postfix\" -DHAS_SSL -DNO_PCRE
-DUSE_SASL_AUTH -g -O2 -I/usr/pkg/include -I/usr/pkg/include/sasl
-I. -I../../include -DNETBSD1 -o flush flush.o ../../lib/libmaster.a
../../lib/libglobal.a ../../lib/libutil.a -L/usr/pkg/lib
-Wl,-R/usr/pkg/lib      -lssl -lcrypto -L/usr/pkg/lib
-Wl,-R/usr/pkg/lib -lsasl2

But I still get these messages in my /var/log/maillog file:

Oct 27 21:03:06 cage postfix/postfix-script: stopping the Postfix mail
system
Oct 27 21:03:06 cage postfix/master[22289]: terminating on signal 15
Oct 27 21:03:07 cage postfix/postfix-script: starting the Postfix mail
system
Oct 27 21:03:07 cage postfix/master[15614]: daemon started
Oct 27 21:03:11 cage postfix/smtpd[15618]: warning:
smtpd_sasl_auth_enable is true, but SASL support is not compiled in
Oct 27 21:03:11 cage postfix/smtpd[15618]: connect from
localhost[127.0.0.1]

SO....

Anyone have any ideas what is going on? Any other variables I need to
set in /etc/mk.conf? Weird environment variables?? Goats to
sacrifices??

Thanks,

-- Erik