pkgsrc/mail/postfix/Makefile.common
fhajny 49cae38051 Update mail/postfix to 3.2.0.
- Elliptic curve negotiation with OpenSSL >= 1.0.2. This changes the
  default smtpd_tls_eecdh_grade setting to "auto", and introduces a
  new parameter tls_eecdh_auto_curves with the names of curves that may
  be negotiated.
- Stored-procedure support for MySQL databases.
- Cidr: table support for if/endif and negation (by prepending ! to a
  pattern), just like regexp: and pcre: tables. See the cidr_table(5)
  manpage for details.
- The postmap command and the inline: and texthash: maps now support
  spaces in left-hand field of lookup table source text. Use double
  quotes (") around a left-hand field that contains spaces, and use
  backslash (\) to protect quotes in a left-hand field.
- Support for per-client Milter configuration (smtpd_milter_maps) that
  overrides the main.cf smtpd_milters setting, and that has the same
  syntax. A lookup result of "DISABLE" turns off Milter support for that
  client.
- The local SMTP server IP address and port are available in the
  policy delegation protocol (attribute names: server_address,
  server_port), in the Milter protocol (macro names: {daemon_addr},
  {daemon_port}), and in the XCLIENT protocol (attribute names:
  DESTADDR, DESTPORT).
- For safety reasons, the Postfix sendmail -C option must specify an
  authorized directory: the default configuration directory, a
  directory that is listed in the default main.cf file with
  alternate_config_directories or multi_instance_directories, otherwise
  the command must be invoked with root privileges. This mitigates a
  recurring "jail break" problem with the PHP mail() function.
- "PASS" and "STRIP" actions in header/body_checks. "STRIP" is similar
  to "IGNORE" but also logs the action, and "PASS" disables header,
  body, and Milter inspection for the remainder of the message content.
- The collate.pl script by Viktor Dukhovni for grouping Postfix
  logfile records into "sessions" based on queue ID and process ID
  information, in the auxiliary/collate directory of the Postfix source
  tree.

Disabled or removed behavior:
- SMTPUTF8 support: Postfix 3.2 disables the 'transitional'
  compatibility between the IDNA2003 and IDNA2008 standards for
  internationalized domain names (domain names beyond the limits of
  US-ASCII). This makes Postfix behavior consistent with contemporary
  web browsers.
- Postfix 3.2 removes tentative features that were implemented before
  the DANE spec was finalized: support for certificate usage
  PKIX-EE(1), the ability to disable digest agility, and the ability to
  disable support for "TLSA 2 [01] [12]" records that specify the digest
  of a trust anchor.
2017-04-24 20:11:40 +00:00

134 lines
4.6 KiB
Text

# $NetBSD: Makefile.common,v 1.9 2017/04/24 20:11:40 fhajny Exp $
# used by mail/postfix/Makefile
# used by mail/postfix/Makefile.module
DISTNAME= postfix-3.2.0
CATEGORIES= mail
MASTER_SITES= ftp://ftp.porcupine.org/mirrors/postfix-release/official/
MASTER_SITES+= http://postfix.it-austria.net/releases/official/
MASTER_SITES+= http://mirrors.isc.org/pub/postfix/official/
MASTER_SITES+= http://mirror.postfix.jp/postfix-release/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"