pkgsrc/mail/postfix/Makefile.common
taca f5fd0274fa mail/postfix: update to 3.3.0
Postfix stable release 3.3.0 is available. This release ends support
for legacy release Postfix 2.11.

The main changes are:

  * Dual license: in addition to the historical IBM Public License
    1.0, Postfix is now also distributed with the more recent Eclipse
    Public License 2.0. Recipients can choose to take the software
    under the license of their choice. Those who are more comfortable
    with the IPL can continue with that license.

  * The postconf command now warns about unknown parameter names
    in a Postfix database configuration file. As with other unknown
    parameter names, these warnings can help to find typos early.

  * Container support: Postfix 3.3 will run in the foreground with
    "postfix start-fg". This requires that Postfix multi-instance
    support is disabled (the default). To collect Postfix syslog
    information on the container's host, mount the host's /dev/log
    socket into the container, for example with "docker run -v
    /dev/log:/dev/log ...other options...", and specify a distinct
    Postfix syslog_name setting in the container (for example with
    "postconf syslog_name=the-name-here").

  * Milter support: applications can now send RET and ENVID parameters
    in SMFIR_CHGFROM (change envelope sender) requests.

  * Postfix-generated From: headers with 'full name' information
    are now formatted as "From: name <address>" by default. Specify
    "header_from_format = obsolete" to get the earlier form "From:
    address (name)".

  * Interoperability: when Postfix IPv6 and IPv4 support are both
    enabled, the Postfix SMTP client will now relax MX preferences
    and attempt to schedule similar numbers of IPv4 and IPv6
    addresses. This works around mail delivery problems when a
    destination announces lots of primary MX addresses on IPv6, but
    is reachable only over IPv4 (or vice versa). The new behavior
    is controlled with the smtp_balance_mx_inet_protocols parameter.

  * Compatibility safety net: with compatibility_level < 1, the
    Postfix SMTP server now warns for mail that would be blocked
    by the Postfix 2.10 smtpd_relay_restrictions feature, without
    blocking that mail. There still is a steady trickle of sites
    that upgrade from an earlier Postfix version.
2018-03-21 15:28:45 +00:00

132 lines
4.5 KiB
Text

# $NetBSD: Makefile.common,v 1.15 2018/03/21 15:28:45 taca Exp $
# used by mail/postfix/Makefile
# used by mail/postfix/Makefile.module
DISTNAME= postfix-3.3.0
CATEGORIES= mail
MASTER_SITES= ftp://ftp.porcupine.org/mirrors/postfix-release/official/
MASTER_SITES+= http://mirrors.isc.org/pub/postfix/official/
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://www.postfix.org/
# The postfix license has only very minor diffs from cpl-1.0.
LICENSE= cpl-1.0
#LICENSE= postfix-license
DISTINFO_FILE= ${PKGDIR}/../../mail/postfix/distinfo
PATCHDIR= ${PKGDIR}/../../mail/postfix/patches
CHECK_HEADERS_SKIP+= src/global/mail_params.h
.include "../../mk/bsd.prefs.mk"
POSTFIX_USER?= postfix
POSTFIX_GROUP?= postfix
MAILDROP_GROUP?= maildrop
# POSTFIX_QUEUE_DIR is the default queue directory for Postfix. This is
# merely a default, and may be changed by setting "queue_directory" in
# ${PKG_SYSCONFDIR}/main.cf.
#
POSTFIX_DATA_DIR?= ${VARBASE}/db/postfix
POSTFIX_QUEUE_DIR?= ${VARBASE}/spool/postfix
BUILD_DEFS+= VARBASE POSTFIX_DATA_DIR POSTFIX_QUEUE_DIR
# CCARGS is a list of options to pass to the preprocessor/compiler.
# AUXLIBS is a list of options to pass to the linker.
CCARGS= #defined
AUXLIBS= ${LDFLAGS}
# Enable Dovecot SASL
CCARGS+= -DUSE_SASL_AUTH
# Enable Berkeley DB map type. BDB_LIBS is defined in mk/bdb.buildlink3.mk.
CCARGS+= -DHAS_DB
AUXLIBS+= ${BDB_LIBS}
# Disable modules by default
.for module in cdb ldap lmdb mysql pcre pgsql sqlite
CCARGS+= -DNO_${module:tu}
.endfor
# Set some default paths to override ${WRKSRC}/src/global/mail_params.h.
CCARGS+= -DDEF_COMMAND_DIR=\"${PREFIX}/sbin\"
CCARGS+= -DDEF_CONFIG_DIR=\"${PKG_SYSCONFDIR}\"
CCARGS+= -DDEF_DAEMON_DIR=\"${LIBEXECDIR}\"
CCARGS+= -DDEF_DATA_DIR=\"${POSTFIX_DATA_DIR}\"
CCARGS+= -DDEF_MAILQ_PATH=\"${PREFIX}/bin/mailq\"
CCARGS+= -DDEF_MANPAGE_DIR=\"${PREFIX}/${PKGMANDIR}\"
CCARGS+= -DDEF_META_DIR=\"${PREFIX}/${METADIR}\"
CCARGS+= -DDEF_NEWALIAS_PATH=\"${PREFIX}/bin/newaliases\"
CCARGS+= -DDEF_QUEUE_DIR=\"${POSTFIX_QUEUE_DIR}\"
CCARGS+= -DDEF_README_DIR=\"${DOCDIR}\"
CCARGS+= -DDEF_SAMPLE_DIR=\"${EXAMPLEDIR}\"
CCARGS+= -DDEF_SENDMAIL_PATH=\"${PREFIX}/sbin/sendmail\"
CCARGS+= -DDEF_SHLIB_DIR=\"${PREFIX}/${SHLIBDIR}\"
# Override those same default paths in the installed example main.cf.
SUBST_CLASSES+= postfix
SUBST_STAGE.postfix= post-configure
SUBST_FILES.postfix= conf/main.cf src/global/mail_params.h
SUBST_SED.postfix= \
-e 's|^\(data_directory\) =.*|\1 = ${POSTFIX_DATA_DIR}|'
SUBST_SED.postfix+= \
-e 's|^\(queue_directory\) =.*|\1 = ${POSTFIX_QUEUE_DIR}|'
SUBST_SED.postfix+= \
-e 's|^\(command_directory\) =.*|\1 = ${PREFIX}/sbin|'
SUBST_SED.postfix+= \
-e 's|^\(daemon_directory\) =.*|\1 = ${LIBEXECDIR}|'
SUBST_SED.postfix+= \
-e 's|^\(meta_directory\) =.*|\1 = ${PREFIX}/${METADIR}|'
SUBST_SED.postfix+= \
-e 's|^\(shlib_directory\) =.*|\1 = ${PREFIX}/${SHLIBDIR}|'
SUBST_SED.postfix+= \
-e 's|^\(sendmail_path\) =.*|\1 = ${PREFIX}/sbin/sendmail|'
SUBST_SED.postfix+= \
-e 's|^\(newaliases_path\) =.*|\1 = ${PREFIX}/bin/newaliases|'
SUBST_SED.postfix+= \
-e 's|^\(mailq_path\) =.*|\1 = ${PREFIX}/bin/mailq|'
SUBST_SED.postfix+= \
-e 's|^\(mail_owner\) =.*|\1 = ${POSTFIX_USER}|'
SUBST_SED.postfix+= \
-e 's|^\(setgid_group\) =.*|\1 = ${MAILDROP_GROUP}|'
SUBST_SED.postfix+= \
-e 's|^\(manpage_directory\) =.*|\1 = ${PREFIX}/${PKGMANDIR}|'
SUBST_SED.postfix+= \
-e 's|^\(sample_directory\) =.*|\1 = ${EXAMPLEDIR}|'
SUBST_SED.postfix+= \
-e 's|^\(readme_directory\) =.*|\1 = ${DOCDIR}|'
SUBST_SED.postfix+= \
-e '/^\#define DEF_MAIL_OWNER[ ]/s,postfix,${POSTFIX_USER},g'
SUBST_SED.postfix+= \
-e '/^\#define DEF_SGID_GROUP[ ]/s,postdrop,${MAILDROP_GROUP},g'
PKG_SYSCONFSUBDIR= postfix
LIBEXECDIR= ${PREFIX}/libexec/postfix
DOCDIR= ${PREFIX}/share/doc/postfix
EXAMPLEDIR= ${PREFIX}/share/examples/postfix
# Not prefixed so that we can use where relative path needed
# METADIR set for postfix-2.6.x compatibility
METADIR= libexec/postfix
SHLIBDIR= lib/postfix
BUILD_TARGET= # empty
MAKE_ENV+= CC=${CC:Q} OPT=${CFLAGS:Q}
MAKE_ENV+= AUXLIBS=${AUXLIBS:Q} CCARGS=${CCARGS:Q}
MAKE_ENV+= DEBUG= # empty
.if ${OPSYS} == "SunOS" && !exists(/usr/include/rpcsvc/nis_cache.h)
CCARGS+= -DNO_NISPLUS
.endif
CFLAGS.SunOS+= -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
DESTDIR_INSTALLOPTIONS=-package install_root="${DESTDIR}"
do-configure:
cd ${WRKSRC} && \
env ${MAKE_ENV} ${MAKE} -f Makefile.init makefiles \
'CCARGS=${CCARGS}' 'AUXLIBS=${AUXLIBS}' \
shared=yes dynamicmaps=yes
.include "../../mk/bdb.buildlink3.mk"