pkgsrc/mail/postfix/options.mk
ghen 9a6dd16f5d Update Postfix to version 2.5.1 (ok martti). Major changes over 2.4.x are:
- TLS (SSL) support was streamlined further, and provides a new security level
  based on certificate fingerprints instead of CA signatures. See TLS_README
  for details.

- Milter support was updated from the Sendmail 8.13 feature set and now
  includes most of the features that were introduced with Sendmail 8.14. See
  MILTER_README for details.

- Stress-adaptive configuration was introduced. This allows the Postfix SMTP
  server to temporarily adjust its rules under conditions of overload, such as
  a malware attack or backscatter flood. See STRESS_README for details.
  [pkgsrc: this obsoletes the "postfix-stress" option which provided the same
  functionality via a distribution patch]

- The queue manager scheduler was refined. It now provides per-transport
  scheduling controls and allows for adjustment of the sensitivity to mail
  delivery (non-)errors. See SCHEDULER_README.

- Security was improved by introducing a Postfix-owned data_directory for
  storage of randomness, caches and other non-queue data. This change avoids
  future security loopholes due to untrusted data sitting in root-owned files
  or in root-owned directories. Writes to legacy files in root-owned
  directories are automatically redirected to files in the new data_directory.

No functionality has been removed, but it is a good idea to review the
RELEASE_NOTES file for the usual minor incompatibilities or limitations.
2008-02-18 17:45:34 +00:00

107 lines
3 KiB
Makefile

# $NetBSD: options.mk,v 1.30 2008/02/18 17:45:34 ghen Exp $
# Global and legacy options
PKG_OPTIONS_VAR= PKG_OPTIONS.postfix
PKG_SUPPORTED_OPTIONS= bdb ldap mysql mysql4 pcre pgsql sasl tls
PKG_SUGGESTED_OPTIONS= tls
.include "../../mk/bsd.options.mk"
###
### Support "hash" (Berkeley DB) map type.
###
.if empty(PKG_OPTIONS:Mbdb)
PKG_OPTIONS+= bdb # "hash" map type is mandatory
.endif
.if !empty(PKG_OPTIONS:Mbdb)
. include "../../mk/bdb.buildlink3.mk"
CCARGS+= -DHAS_DB
AUXLIBS+= ${BDB_LIBS}
.endif
###
### STARTTLS support
###
.if !empty(PKG_OPTIONS:Mtls)
. include "../../security/openssl/buildlink3.mk"
CCARGS+= -DUSE_TLS
AUXLIBS+= -L${BUILDLINK_PREFIX.openssl}/lib \
${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.openssl}/lib \
-lssl -lcrypto
.endif
###
### Support "pcre" map type for regular expressions.
###
.if !empty(PKG_OPTIONS:Mpcre)
. include "../../devel/pcre/buildlink3.mk"
CCARGS+= -DHAS_PCRE
AUXLIBS+= -L${BUILDLINK_PREFIX.pcre}/lib \
${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.pcre}/lib \
-lpcre
.else
CCARGS+= -DNO_PCRE
.endif
###
### Support LDAP directories for table lookups.
###
.if !empty(PKG_OPTIONS:Mldap)
. include "../../databases/openldap-client/buildlink3.mk"
CCARGS+= -DHAS_LDAP
AUXLIBS+= -L${BUILDLINK_PREFIX.openldap-client}/lib \
${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.openldap-client}/lib \
-lldap -llber
.endif
###
### Support using a MySQL database server for table lookups.
###
.if !empty(PKG_OPTIONS:Mmysql4)
. include "../../mk/mysql.buildlink3.mk"
CCARGS+= -DHAS_MYSQL
CCARGS+= `${BUILDLINK_PREFIX.mysql-client}/bin/mysql_config --include`
AUXLIBS+= `${BUILDLINK_PREFIX.mysql-client}/bin/mysql_config --libs`
.elif !empty(PKG_OPTIONS:Mmysql)
. include "../../mk/mysql.buildlink3.mk"
CCARGS+= -DHAS_MYSQL -I${BUILDLINK_PREFIX.mysql-client}/include/mysql
AUXLIBS+= -L${BUILDLINK_PREFIX.mysql-client}/lib/mysql \
${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.mysql-client}/lib/mysql \
-lmysqlclient -lz -lm
.endif
###
### Support using a PostgreSQL database server for table lookups.
###
.if !empty(PKG_OPTIONS:Mpgsql)
. include "../../mk/pgsql.buildlink3.mk"
. include "../../security/openssl/buildlink3.mk"
CCARGS+= -DHAS_PGSQL -I${PGSQL_PREFIX}/include/pgsql
AUXLIBS+= -L${PGSQL_PREFIX}/lib -lpq \
-L${BUILDLINK_PREFIX.openssl}/lib -lcrypt -lssl -lcrypto
.endif
###
### Cyrus SASL support for SMTP authentication.
### (Dovecot SASL support is built in by default.)
###
.if !empty(PKG_OPTIONS:Msasl)
. include "../../security/cyrus-sasl/buildlink3.mk"
BUILDLINK_INCDIRS.cyrus-sasl= include/sasl
SASLLIBDIR= ${PREFIX}/lib/sasl2
PWCHECK_METHOD= auxprop
CCARGS+= -DUSE_CYRUS_SASL
AUXLIBS+= -L${BUILDLINK_PREFIX.cyrus-sasl}/lib \
${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.cyrus-sasl}/lib \
-lsasl2
PLIST_SUBST+= SASL=
MESSAGE_SRC+= ${PKGDIR}/MESSAGE.sasl
MESSAGE_SUBST+= PKG_SYSCONFDIR=${PKG_SYSCONFDIR}
MESSAGE_SUBST+= SASLLIBDIR=${SASLLIBDIR}
MAKE_DIRS+= ${SASLLIBDIR}
CONF_FILES+= ${EXAMPLEDIR}/smtpd.conf ${SASLLIBDIR}/smtpd.conf
.else
PLIST_SUBST+= SASL="@comment "
CCARGS+= -DDEF_SERVER_SASL_TYPE=\"dovecot\"
.endif