Mon Sep 7 09:47:02 2015 UTC ()
Update mail/postfix to 3.0.2.

Database and regexp map functionality is now split into separate packages:

- postfix-cdb
- postfix-ldap
- postfix-lmdb
- postfix-mysql
- postfix-pcre
- postfix-pgsql
- postfix-sqlite

Upstream changelog follows.

Postfix 3.0.2
-------------
No delta against 2.11.6.

Postfix 3.0.1
-------------
- Build error when compiling the Postfix SMTP server with SASL support
  but no TLS support.
- The DNS "resource record to text" converter, used for xxx_dns_reply_filter
  pattern matching, appended a '.' to TXT record resource values.
- The postscreen(8) manpage specified an incorrect Postfix version number
  for the postscreen_dnsbl_timeout parameter.
- The postfix-install script expanded macros in parameter values when
  trying to detect parameter overrides, causing unnecessary main.cf updates
  during "postfix start" etc.
- Some low-level cleanup of UTF-8 string handling with no visible change
  in behavior (besides better performance).

Postfix 3.0.0
-------------
- SMTPUTF8 support for internationalized domain names and address
  localparts as defined in RFC 6530 and related documents.
- Support for Postfix dynamically-linked libraries and database plugins.
- An OPT-IN safety net for the selective adoption of new Postfix default
  settings. If you do nothing, the old Postfix default settings *should*
  remain in effect (complain to your downstream maintainer if that is not
  the case).
- Support for operations on multiple lookup tables. The
  pipemap:{map1,map2...} database type implements a pipeline of lookup
  tables where the result from one lookup table becomes a query for
  the next table; the unionmap:{map1,map2,...} database type sends the


(fhajny)
diff -r1.469 -r1.470 pkgsrc/mail/Makefile
diff -r1.285 -r1.286 pkgsrc/mail/postfix/Makefile
diff -r0 -r1.1 pkgsrc/mail/postfix/Makefile.common
diff -r0 -r1.1 pkgsrc/mail/postfix/Makefile.module
diff -r1.28 -r1.29 pkgsrc/mail/postfix/PLIST
diff -r1.160 -r1.161 pkgsrc/mail/postfix/distinfo
diff -r1.38 -r1.39 pkgsrc/mail/postfix/options.mk
diff -r0 -r1.1 pkgsrc/mail/postfix-cdb/DESCR
diff -r0 -r1.1 pkgsrc/mail/postfix-cdb/Makefile
diff -r0 -r1.1 pkgsrc/mail/postfix-ldap/DESCR
diff -r0 -r1.1 pkgsrc/mail/postfix-ldap/Makefile
diff -r0 -r1.1 pkgsrc/mail/postfix-lmdb/DESCR
diff -r0 -r1.1 pkgsrc/mail/postfix-lmdb/Makefile
diff -r0 -r1.1 pkgsrc/mail/postfix-mysql/DESCR
diff -r0 -r1.1 pkgsrc/mail/postfix-mysql/Makefile
diff -r0 -r1.1 pkgsrc/mail/postfix-pcre/DESCR
diff -r0 -r1.1 pkgsrc/mail/postfix-pcre/Makefile
diff -r0 -r1.1 pkgsrc/mail/postfix-pgsql/DESCR
diff -r0 -r1.1 pkgsrc/mail/postfix-pgsql/Makefile
diff -r0 -r1.1 pkgsrc/mail/postfix-sqlite/DESCR
diff -r0 -r1.1 pkgsrc/mail/postfix-sqlite/Makefile
diff -r1.23 -r1.24 pkgsrc/mail/postfix/patches/patch-aa
diff -r1.35 -r1.36 pkgsrc/mail/postfix/patches/patch-ag
diff -r1.33 -r1.34 pkgsrc/mail/postfix/patches/patch-ai

cvs diff -r1.469 -r1.470 pkgsrc/mail/Makefile (expand / switch to unified diff)

--- pkgsrc/mail/Makefile 2015/09/03 14:49:40 1.469
+++ pkgsrc/mail/Makefile 2015/09/07 09:47:01 1.470
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: Makefile,v 1.469 2015/09/03 14:49:40 wiz Exp $ 1# $NetBSD: Makefile,v 1.470 2015/09/07 09:47:01 fhajny Exp $
2# 2#
3 3
4COMMENT= Electronic mail utilities 4COMMENT= Electronic mail utilities
5 5
6SUBDIR+= GNUMail 6SUBDIR+= GNUMail
7SUBDIR+= OSBF-lua 7SUBDIR+= OSBF-lua
8SUBDIR+= Pantomime 8SUBDIR+= Pantomime
9SUBDIR+= R-mime 9SUBDIR+= R-mime
10SUBDIR+= YoSucker 10SUBDIR+= YoSucker
11SUBDIR+= akonadi 11SUBDIR+= akonadi
12SUBDIR+= alpine 12SUBDIR+= alpine
13SUBDIR+= amavis-perl 13SUBDIR+= amavis-perl
14SUBDIR+= amavisd-new 14SUBDIR+= amavisd-new
@@ -251,26 +251,33 @@ SUBDIR+= perdition-ldap @@ -251,26 +251,33 @@ SUBDIR+= perdition-ldap
251SUBDIR+= perdition-mysql 251SUBDIR+= perdition-mysql
252SUBDIR+= perdition-odbc 252SUBDIR+= perdition-odbc
253SUBDIR+= perdition-postgresql 253SUBDIR+= perdition-postgresql
254SUBDIR+= pfqueue 254SUBDIR+= pfqueue
255SUBDIR+= php-imap 255SUBDIR+= php-imap
256SUBDIR+= pine 256SUBDIR+= pine
257SUBDIR+= pine-pgp-filters 257SUBDIR+= pine-pgp-filters
258SUBDIR+= policyd 258SUBDIR+= policyd
259SUBDIR+= policyd-weight 259SUBDIR+= policyd-weight
260SUBDIR+= popa3d 260SUBDIR+= popa3d
261SUBDIR+= poppassd 261SUBDIR+= poppassd
262SUBDIR+= poppy 262SUBDIR+= poppy
263SUBDIR+= postfix 263SUBDIR+= postfix
 264SUBDIR+= postfix-cdb
 265SUBDIR+= postfix-ldap
 266SUBDIR+= postfix-lmdb
 267SUBDIR+= postfix-mysql
 268SUBDIR+= postfix-pcre
 269SUBDIR+= postfix-pgsql
 270SUBDIR+= postfix-sqlite
264SUBDIR+= postgrey 271SUBDIR+= postgrey
265SUBDIR+= prayer 272SUBDIR+= prayer
266SUBDIR+= procmail 273SUBDIR+= procmail
267SUBDIR+= proxsmtp 274SUBDIR+= proxsmtp
268SUBDIR+= pulsar 275SUBDIR+= pulsar
269SUBDIR+= py-libgmail 276SUBDIR+= py-libgmail
270SUBDIR+= py-sendmail-admin 277SUBDIR+= py-sendmail-admin
271SUBDIR+= py-spf 278SUBDIR+= py-spf
272SUBDIR+= py-validate-email-address 279SUBDIR+= py-validate-email-address
273SUBDIR+= pymsgauth 280SUBDIR+= pymsgauth
274SUBDIR+= qcheck 281SUBDIR+= qcheck
275SUBDIR+= qgreylist 282SUBDIR+= qgreylist
276SUBDIR+= qmHandle 283SUBDIR+= qmHandle

cvs diff -r1.285 -r1.286 pkgsrc/mail/postfix/Makefile (expand / switch to unified diff)

--- pkgsrc/mail/postfix/Makefile 2015/07/26 15:53:11 1.285
+++ pkgsrc/mail/postfix/Makefile 2015/09/07 09:47:01 1.286
@@ -1,184 +1,79 @@ @@ -1,184 +1,79 @@
1# $NetBSD: Makefile,v 1.285 2015/07/26 15:53:11 bsiegert Exp $ 1# $NetBSD: Makefile,v 1.286 2015/09/07 09:47:01 fhajny Exp $
2 2
3DISTNAME= postfix-2.11.6 3.include "../../mail/postfix/Makefile.common"
4PKGREVISION= 1 
5CATEGORIES= mail 
6MASTER_SITES= ftp://ftp.porcupine.org/mirrors/postfix-release/official/ 
7MASTER_SITES+= http://postfix.it-austria.net/releases/official/ 
8MASTER_SITES+= http://mirrors.isc.org/pub/postfix/official/ 
9MASTER_SITES+= http://mirror.postfix.jp/postfix-release/official/ 
10 4
11MAINTAINER= pkgsrc-users@NetBSD.org 
12HOMEPAGE= http://www.postfix.org/ 
13COMMENT= Postfix SMTP server and tools 5COMMENT= Postfix SMTP server and tools
14# The postfix license has only very minor diffs from cpl-1.0. 
15LICENSE= cpl-1.0 
16#LICENSE= postfix-license 
17 6
18CONFLICTS+= courier-mta-[0-9]* fastforward>=0.51nb2 sendmail-[0-9]* 7CONFLICTS+= courier-mta-[0-9]* fastforward>=0.51nb2 sendmail-[0-9]*
19CONFLICTS+= esmtp>=1.2 nullmailer-[0-9]* 8CONFLICTS+= esmtp>=1.2 nullmailer-[0-9]*
20 9
21USE_TOOLS+= perl 10USE_TOOLS+= perl
22CHECK_HEADERS_SKIP+= src/global/mail_params.h 
23 
24.include "../../mk/bsd.prefs.mk" 
25 11
26SPECIAL_PERMS+= sbin/postdrop postfix maildrop 2555 12SPECIAL_PERMS+= sbin/postdrop postfix maildrop 2555
27SPECIAL_PERMS+= sbin/postqueue postfix maildrop 2555 13SPECIAL_PERMS+= sbin/postqueue postfix maildrop 2555
28 14
29# POSTFIX_QUEUE_DIR is the default queue directory for Postfix. This is 
30# merely a default, and may be changed by setting "queue_directory" in 
31# ${PKG_SYSCONFDIR}/main.cf. 
32# 
33POSTFIX_DATA_DIR?= ${VARBASE}/db/postfix 
34POSTFIX_QUEUE_DIR?= ${VARBASE}/spool/postfix 
35BUILD_DEFS+= VARBASE POSTFIX_DATA_DIR POSTFIX_QUEUE_DIR 
36 
37# CCARGS is a list of options to pass to the preprocessor/compiler. 
38# AUXLIBS is a list of options to pass to the linker. 
39CCARGS= #defined 
40AUXLIBS= ${LDFLAGS} 
41 
42# Enable Dovecot SASL 
43CCARGS+= -DUSE_SASL_AUTH 
44# Enable Berkeley DB map type. BDB_LIBS is defined in mk/bdb.buildlink3.mk. 
45CCARGS+= -DHAS_DB 
46AUXLIBS+= ${BDB_LIBS} 
47 
48# Set some default paths to override ${WRKSRC}/src/global/mail_params.h. 
49CCARGS+= -DDEF_DATA_DIR=\"${POSTFIX_DATA_DIR}\" 
50CCARGS+= -DDEF_QUEUE_DIR=\"${POSTFIX_QUEUE_DIR}\" 
51CCARGS+= -DDEF_DAEMON_DIR=\"${LIBEXECDIR}\" 
52CCARGS+= -DDEF_COMMAND_DIR=\"${PREFIX}/sbin\" 
53CCARGS+= -DDEF_CONFIG_DIR=\"${PKG_SYSCONFDIR}\" 
54CCARGS+= -DDEF_SENDMAIL_PATH=\"${PREFIX}/sbin/sendmail\" 
55CCARGS+= -DDEF_MAILQ_PATH=\"${PREFIX}/bin/mailq\" 
56CCARGS+= -DDEF_NEWALIAS_PATH=\"${PREFIX}/bin/newaliases\" 
57CCARGS+= -DDEF_MANPAGE_DIR=\"${PREFIX}/${PKGMANDIR}\" 
58CCARGS+= -DDEF_SAMPLE_DIR=\"${EXAMPLEDIR}\" 
59CCARGS+= -DDEF_README_DIR=\"${DOCDIR}\" 
60 
61REPLACE_PERL+= auxiliary/qshape/qshape.pl 15REPLACE_PERL+= auxiliary/qshape/qshape.pl
62 16
63# Override those same default paths in the installed example main.cf. 
64SUBST_CLASSES+= postfix 
65SUBST_STAGE.postfix= post-configure 
66SUBST_FILES.postfix= conf/main.cf src/global/mail_params.h 
67SUBST_SED.postfix= \ 
68 -e 's|^\(data_directory\) =.*|\1 = ${POSTFIX_DATA_DIR}|' 
69SUBST_SED.postfix+= \ 
70 -e 's|^\(queue_directory\) =.*|\1 = ${POSTFIX_QUEUE_DIR}|' 
71SUBST_SED.postfix+= \ 
72 -e 's|^\(command_directory\) =.*|\1 = ${PREFIX}/sbin|' 
73SUBST_SED.postfix+= \ 
74 -e 's|^\(daemon_directory\) =.*|\1 = ${LIBEXECDIR}|' 
75SUBST_SED.postfix+= \ 
76 -e 's|^\(sendmail_path\) =.*|\1 = ${PREFIX}/sbin/sendmail|' 
77SUBST_SED.postfix+= \ 
78 -e 's|^\(newaliases_path\) =.*|\1 = ${PREFIX}/bin/newaliases|' 
79SUBST_SED.postfix+= \ 
80 -e 's|^\(mailq_path\) =.*|\1 = ${PREFIX}/bin/mailq|' 
81SUBST_SED.postfix+= \ 
82 -e 's|^\(setgid_group\) =.*|\1 = maildrop|' 
83SUBST_SED.postfix+= \ 
84 -e 's|^\(manpage_directory\) =.*|\1 = ${PREFIX}/${PKGMANDIR}|' 
85SUBST_SED.postfix+= \ 
86 -e 's|^\(sample_directory\) =.*|\1 = ${EXAMPLEDIR}|' 
87SUBST_SED.postfix+= \ 
88 -e 's|^\(readme_directory\) =.*|\1 = ${DOCDIR}|' 
89SUBST_SED.postfix+= \ 
90 -e '/^\#define DEF_SGID_GROUP[ ]/s,postdrop,maildrop,g' 
91 
92# options.mk appends to CCARGS and AUXLIBS the options needed to build 17# options.mk appends to CCARGS and AUXLIBS the options needed to build
93# Postfix with support for various add-on modules. 18# Postfix with support for various add-on modules.
94# 19#
95.include "options.mk" 20.include "options.mk"
96 21
97PKG_SYSCONFSUBDIR= postfix 
98LIBEXECDIR= ${PREFIX}/libexec/postfix 
99DOCDIR= ${PREFIX}/share/doc/postfix 
100EXAMPLEDIR= ${PREFIX}/share/examples/postfix 
101 
102FILES_SUBST+= EXAMPLEDIR=${EXAMPLEDIR} 22FILES_SUBST+= EXAMPLEDIR=${EXAMPLEDIR}
103MESSAGE_SUBST+= EXAMPLEDIR=${EXAMPLEDIR} 23MESSAGE_SUBST+= EXAMPLEDIR=${EXAMPLEDIR}
104MESSAGE_SUBST+= DOCDIR=${DOCDIR} 24MESSAGE_SUBST+= DOCDIR=${DOCDIR}
105 25
106MESSAGE_SRC+= ${PKGDIR}/MESSAGE 26MESSAGE_SRC+= ${PKGDIR}/MESSAGE
107.if exists(${PKGDIR}/MESSAGE.${OPSYS}) 27.if exists(${PKGDIR}/MESSAGE.${OPSYS})
108MESSAGE_SRC+= ${PKGDIR}/MESSAGE.${OPSYS} 28MESSAGE_SRC+= ${PKGDIR}/MESSAGE.${OPSYS}
109.endif 29.endif
110PLIST_SRC+= ${PKGDIR}/PLIST 30PLIST_SRC+= ${PKGDIR}/PLIST
111 31
112BUILD_TARGET= # empty 
113MAKE_ENV+= CC=${CC:Q} OPT=${CFLAGS:Q} 
114MAKE_ENV+= AUXLIBS=${AUXLIBS:Q} CCARGS=${CCARGS:Q} 
115 
116RCD_SCRIPTS= postfix 32RCD_SCRIPTS= postfix
117OWN_DIRS+= ${POSTFIX_QUEUE_DIR} ${POSTFIX_QUEUE_DIR}/etc 33OWN_DIRS+= ${POSTFIX_QUEUE_DIR} ${POSTFIX_QUEUE_DIR}/etc
118OWN_DIRS_PERMS+= ${POSTFIX_DATA_DIR} postfix postfix 0700 34OWN_DIRS_PERMS+= ${POSTFIX_DATA_DIR} postfix postfix 0700
119MAKE_DIRS+= ${PKG_SYSCONFDIR} 35MAKE_DIRS+= ${METADIR}/dynamicmaps.cf.d ${METADIR}/postfix-files.d
120 36
121PKG_GROUPS?= postfix maildrop 37PKG_GROUPS?= postfix maildrop
122PKG_USERS?= postfix:postfix 38PKG_USERS?= postfix:postfix
123PKG_GECOS.postfix= Postfix User 39PKG_GECOS.postfix= Postfix User
124PKG_HOME.postfix= ${POSTFIX_QUEUE_DIR} 40PKG_HOME.postfix= ${POSTFIX_QUEUE_DIR}
125 41
126CONF_FILES= # empty 42CONF_FILES= # empty
127.for i in main.cf master.cf 43.for i in main.cf master.cf
128CONF_FILES+= ${EXAMPLEDIR}/${i} ${PKG_SYSCONFDIR}/${i} 44CONF_FILES+= ${EXAMPLEDIR}/${i} ${PKG_SYSCONFDIR}/${i}
129.endfor 45.endfor
130CONF_FILES_PERMS= # empty 46CONF_FILES_PERMS= # empty
131 47
132MAKE_ENV+= DEBUG= # empty 
133 
134SUBST_CLASSES+= paths 48SUBST_CLASSES+= paths
135SUBST_FILES.paths= ${WRKDIR}/mailer.conf 49SUBST_FILES.paths= ${WRKDIR}/mailer.conf
136SUBST_SED.paths+= -e 's,@PREFIX@,${PREFIX},g' 50SUBST_SED.paths+= -e 's,@PREFIX@,${PREFIX},g'
137SUBST_STAGE.paths= post-patch 51SUBST_STAGE.paths= post-patch
138 52
139.if ${OPSYS} == "SunOS" && !exists(/usr/include/rpcsvc/nis_cache.h) 53INSTALLATION_DIRS+= ${LIBEXECDIR} ${METADIR} ${SHLIBDIR} ${EXAMPLEDIR} ${DOCDIR}
140SUBST_CLASSES+= nis 
141SUBST_FILES.nis= src/util/sys_defs.h 
142SUBST_MESSAGE.nis= Working around dropped support for NIS+ on SunOS 
143SUBST_STAGE.nis= post-patch 
144SUBST_SED.nis= -e 's,\#define HAS_NISPLUS,\#undef HAS_NISPLUS,g' 
145.endif 
146 
147CFLAGS.SunOS+= -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 
148 
149.if !empty(USE_DESTDIR:M[Yy][Ee][Ss]) 
150DESTDIR_INSTALLOPTIONS=-package install_root="${DESTDIR}" 
151.endif 
152 
153INSTALLATION_DIRS+= ${LIBEXECDIR} ${EXAMPLEDIR} ${DOCDIR} 
154 54
155post-extract: 55post-extract:
156 cp ${FILESDIR}/mailer.conf ${WRKDIR}/mailer.conf 56 cp ${FILESDIR}/mailer.conf ${WRKDIR}/mailer.conf
157 rm -f ${WRKSRC}/auxiliary/MacOSX/Postfix.StartupItem/Postfix 57 rm -f ${WRKSRC}/auxiliary/MacOSX/Postfix.StartupItem/Postfix
158 58
159do-configure: 
160 cd ${WRKSRC} && \ 
161 env ${MAKE_ENV} ${MAKE} -f Makefile.init makefiles \ 
162 'CCARGS=${CCARGS}' 'AUXLIBS=${AUXLIBS}' 
163 
164post-build: 59post-build:
165.if !empty(PKG_OPTIONS:Msasl) 60.if !empty(PKG_OPTIONS:Msasl)
166 ${ECHO} "pwcheck_method: ${PWCHECK_METHOD}" > ${WRKDIR}/smtpd.conf 61 ${ECHO} "pwcheck_method: ${PWCHECK_METHOD}" > ${WRKDIR}/smtpd.conf
167.endif 62.endif
168 63
169do-install: 64do-install:
170 rm -f ${WRKSRC}/conf/*.orig 65 rm -f ${WRKSRC}/conf/*.orig
171.if !empty(PKG_OPTIONS:Msasl) 66.if !empty(PKG_OPTIONS:Msasl)
172 ${INSTALL_DATA} ${WRKDIR}/smtpd.conf ${DESTDIR}${EXAMPLEDIR} 67 ${INSTALL_DATA} ${WRKDIR}/smtpd.conf ${DESTDIR}${EXAMPLEDIR}
173.endif 68.endif
174 cd ${WRKSRC} && sh ./postfix-install -non-interactive \ 69 cd ${WRKSRC} && ${SETENV} LD_LIBRARY_PATH=${WRKSRC}/lib sh \
 70 ./postfix-install -non-interactive \
175 ${DESTDIR_INSTALLOPTIONS} config_directory="${EXAMPLEDIR}" 71 ${DESTDIR_INSTALLOPTIONS} config_directory="${EXAMPLEDIR}"
176 ${INSTALL_DATA} ${WRKDIR}/mailer.conf \ 72 ${INSTALL_DATA} ${WRKDIR}/mailer.conf \
177 ${DESTDIR}${EXAMPLEDIR}/mailer.conf 73 ${DESTDIR}${EXAMPLEDIR}/mailer.conf
178 ${INSTALL_SCRIPT} ${WRKSRC}/auxiliary/qshape/qshape.pl \ 74 ${INSTALL_SCRIPT} ${WRKSRC}/auxiliary/qshape/qshape.pl \
179 ${DESTDIR}${PREFIX}/sbin/qshape 75 ${DESTDIR}${PREFIX}/sbin/qshape
180 ${INSTALL_MAN} ${WRKSRC}/man/man1/qshape.1 \ 76 ${INSTALL_MAN} ${WRKSRC}/man/man1/qshape.1 \
181 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1 77 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1
182 78
183.include "../../mk/bdb.buildlink3.mk" 
184.include "../../mk/bsd.pkg.mk" 79.include "../../mk/bsd.pkg.mk"

File Added: pkgsrc/mail/postfix/Makefile.common
# $NetBSD: Makefile.common,v 1.1 2015/09/07 09:47:01 fhajny Exp $
# used by mail/postfix/Makefile
# used by mail/postfix/Makefile.module

DISTNAME=	postfix-3.0.2
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_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|^\(setgid_group\) =.*|\1 = maildrop|'
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_SGID_GROUP[ 	]/s,postdrop,maildrop,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

.if !empty(USE_DESTDIR:M[Yy][Ee][Ss])
DESTDIR_INSTALLOPTIONS=-package install_root="${DESTDIR}"
.endif

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"

File Added: pkgsrc/mail/postfix/Makefile.module
# $NetBSD: Makefile.module,v 1.1 2015/09/07 09:47:01 fhajny Exp $
# used by mail/postfix-cdb/Makefile
# used by mail/postfix-ldap/Makefile
# used by mail/postfix-lmdb/Makefile
# used by mail/postfix-mysql/Makefile
# used by mail/postfix-pcre/Makefile
# used by mail/postfix-pgsql/Makefile
# used by mail/postfix-sqlite/Makefile

PKGNAME=	${DISTNAME:S/postfix/postfix-${POSTFIX_LIB}/}

.include "../../mail/postfix/Makefile.common"

DEPENDS+=	postfix-${PKGVERSION_NOREV}{,nb[0-9]*}:../../mail/postfix

CCARGS+=	-DHAS_${POSTFIX_LIB:tu}
MAKE_ENV+=	AUXLIBS_${POSTFIX_LIB:tu}=${AUXLIBS_MODULE:Q}

# Define functionality to populate dynamicmaps.cf
POSTFIX_LIBFILE=	postfix-${POSTFIX_LIB}.so
.if !empty(POSTFIX_LIB_DICT:Myes)
POSTFIX_LIB_FUNCS+=	dict_${POSTFIX_LIB}_open
.endif
.if !empty(POSTFIX_LIB_MKMAP:Myes)
POSTFIX_LIB_FUNCS+=	mkmap_${POSTFIX_LIB}_open
.endif

INSTALLATION_DIRS+=	${SHLIBDIR}
INSTALLATION_DIRS+=	${METADIR}/dynamicmaps.cf.d ${METADIR}/postfix-files.d

GENERATE_PLIST+=	${ECHO} "${SHLIBDIR}/${POSTFIX_LIBFILE}";
GENERATE_PLIST+=	${ECHO} "${METADIR}/dynamicmaps.cf.d/${POSTFIX_LIB}.cf";
GENERATE_PLIST+=	${ECHO} "${METADIR}/postfix-files.d/${POSTFIX_LIB}.cf";

do-build:
	cd ${WRKSRC}/src/util && ${BUILD_MAKE_CMD} update
	cd ${WRKSRC}/${POSTFIX_LIBDIR} && ${BUILD_MAKE_CMD} ${POSTFIX_LIBFILE}

do-install:
	${INSTALL_LIB} ${WRKSRC}/${POSTFIX_LIBDIR}/${POSTFIX_LIBFILE} 			\
		${DESTDIR}${PREFIX}/${SHLIBDIR}
	${ECHO} "${POSTFIX_LIB} ${POSTFIX_LIBFILE} ${POSTFIX_LIB_FUNCS}" >		\
		${DESTDIR}${PREFIX}/${METADIR}/dynamicmaps.cf.d/${POSTFIX_LIB}.cf
	( ${ECHO} "\$$shlib_directory/${POSTFIX_LIBFILE}:f:root:-:755";			\
	  ${ECHO} "\$$meta_directory/dynamicmaps.cf.d/${POSTFIX_LIB}.cf:f:root:-:644";	\
	  ${ECHO} "\$$meta_directory/postfix-files.d/${POSTFIX_LIB}.cf:f:root:-:644"; )	\
		> ${DESTDIR}${PREFIX}/${METADIR}/postfix-files.d/${POSTFIX_LIB}.cf

cvs diff -r1.28 -r1.29 pkgsrc/mail/postfix/PLIST (expand / switch to unified diff)

--- pkgsrc/mail/postfix/PLIST 2014/03/11 14:05:04 1.28
+++ pkgsrc/mail/postfix/PLIST 2015/09/07 09:47:01 1.29
@@ -1,28 +1,35 @@ @@ -1,28 +1,35 @@
1@comment $NetBSD: PLIST,v 1.28 2014/03/11 14:05:04 jperkin Exp $ 1@comment $NetBSD: PLIST,v 1.29 2015/09/07 09:47:01 fhajny Exp $
2bin/mailq 2bin/mailq
3bin/newaliases 3bin/newaliases
 4lib/postfix/libpostfix-dns.so
 5lib/postfix/libpostfix-global.so
 6lib/postfix/libpostfix-master.so
 7lib/postfix/libpostfix-tls.so
 8lib/postfix/libpostfix-util.so
4libexec/postfix/anvil 9libexec/postfix/anvil
5libexec/postfix/bounce 10libexec/postfix/bounce
6libexec/postfix/cleanup 11libexec/postfix/cleanup
7libexec/postfix/discard 12libexec/postfix/discard
8libexec/postfix/dnsblog 13libexec/postfix/dnsblog
 14libexec/postfix/dynamicmaps.cf
9libexec/postfix/error 15libexec/postfix/error
10libexec/postfix/flush 16libexec/postfix/flush
11libexec/postfix/lmtp 17libexec/postfix/lmtp
12libexec/postfix/local 18libexec/postfix/local
13libexec/postfix/main.cf 19libexec/postfix/main.cf.proto
 20libexec/postfix/makedefs.out
14libexec/postfix/master 21libexec/postfix/master
15libexec/postfix/master.cf 22libexec/postfix/master.cf.proto
16libexec/postfix/nqmgr 23libexec/postfix/nqmgr
17libexec/postfix/oqmgr 24libexec/postfix/oqmgr
18libexec/postfix/pickup 25libexec/postfix/pickup
19libexec/postfix/pipe 26libexec/postfix/pipe
20libexec/postfix/post-install 27libexec/postfix/post-install
21libexec/postfix/postfix-files 28libexec/postfix/postfix-files
22libexec/postfix/postfix-script 29libexec/postfix/postfix-script
23libexec/postfix/postfix-wrapper 30libexec/postfix/postfix-wrapper
24libexec/postfix/postmulti-script 31libexec/postfix/postmulti-script
25libexec/postfix/postscreen 32libexec/postfix/postscreen
26libexec/postfix/proxymap 33libexec/postfix/proxymap
27libexec/postfix/qmgr 34libexec/postfix/qmgr
28libexec/postfix/qmqpd 35libexec/postfix/qmqpd
@@ -176,19 +183,18 @@ share/doc/postfix/VIRTUAL_README @@ -176,19 +183,18 @@ share/doc/postfix/VIRTUAL_README
176share/doc/postfix/XCLIENT_README 183share/doc/postfix/XCLIENT_README
177share/doc/postfix/XFORWARD_README 184share/doc/postfix/XFORWARD_README
178share/examples/postfix/LICENSE 185share/examples/postfix/LICENSE
179share/examples/postfix/TLS_LICENSE 186share/examples/postfix/TLS_LICENSE
180share/examples/postfix/access 187share/examples/postfix/access
181share/examples/postfix/aliases 188share/examples/postfix/aliases
182share/examples/postfix/bounce.cf.default 189share/examples/postfix/bounce.cf.default
183share/examples/postfix/canonical 190share/examples/postfix/canonical
184share/examples/postfix/generic 191share/examples/postfix/generic
185share/examples/postfix/header_checks 192share/examples/postfix/header_checks
186share/examples/postfix/mailer.conf 193share/examples/postfix/mailer.conf
187share/examples/postfix/main.cf 194share/examples/postfix/main.cf
188share/examples/postfix/main.cf.default 195share/examples/postfix/main.cf.default
189share/examples/postfix/makedefs.out 
190share/examples/postfix/master.cf 196share/examples/postfix/master.cf
191share/examples/postfix/relocated 197share/examples/postfix/relocated
192${PLIST.csasl}share/examples/postfix/smtpd.conf 198${PLIST.csasl}share/examples/postfix/smtpd.conf
193share/examples/postfix/transport 199share/examples/postfix/transport
194share/examples/postfix/virtual 200share/examples/postfix/virtual

cvs diff -r1.160 -r1.161 pkgsrc/mail/postfix/distinfo (expand / switch to unified diff)

--- pkgsrc/mail/postfix/distinfo 2015/07/22 00:25:37 1.160
+++ pkgsrc/mail/postfix/distinfo 2015/09/07 09:47:01 1.161
@@ -1,9 +1,9 @@ @@ -1,9 +1,9 @@
1$NetBSD: distinfo,v 1.160 2015/07/22 00:25:37 taca Exp $ 1$NetBSD: distinfo,v 1.161 2015/09/07 09:47:01 fhajny Exp $
2 2
3SHA1 (postfix-2.11.6.tar.gz) = 005f84264ae8fa6989181bc61b756a0fd8e99dfa 3SHA1 (postfix-3.0.2.tar.gz) = 9d75ca3c207441a38a79a2c8ceaa398c2b9cdc4e
4RMD160 (postfix-2.11.6.tar.gz) = 54a35e148ec169d86528857484e002e9326dc56e 4RMD160 (postfix-3.0.2.tar.gz) = aba1e9decc1aa9aa0c0b68f2bb7f0432b75fabdf
5Size (postfix-2.11.6.tar.gz) = 4030414 bytes 5Size (postfix-3.0.2.tar.gz) = 4239235 bytes
6SHA1 (patch-aa) = 6f7dc14d53e914e9cb72752fb3941c569cd2e8f9 6SHA1 (patch-aa) = f2c418a2fd34da7325ea2823ddd14043768f0111
7SHA1 (patch-ag) = 2f96a679e7f0c2e36615f5e7993ab96296303a10 7SHA1 (patch-ag) = e3d818cd75225c5b50960659827c6e27767cbd58
8SHA1 (patch-ai) = de5985d9fd6a81ea74b69224c82c665cd311c0c7 8SHA1 (patch-ai) = d515202c3bba755067bcb057714cb21453d15d75
9SHA1 (patch-src_dns_dns__lookup.c) = 9c26686e5abd9aee36f042440e5f6a6ffca3df4a 9SHA1 (patch-src_dns_dns__lookup.c) = 9c26686e5abd9aee36f042440e5f6a6ffca3df4a

cvs diff -r1.38 -r1.39 pkgsrc/mail/postfix/options.mk (expand / switch to unified diff)

--- pkgsrc/mail/postfix/options.mk 2015/04/17 02:22:52 1.38
+++ pkgsrc/mail/postfix/options.mk 2015/09/07 09:47:01 1.39
@@ -1,86 +1,34 @@ @@ -1,86 +1,34 @@
1# $NetBSD: options.mk,v 1.38 2015/04/17 02:22:52 hiramatsu Exp $ 1# $NetBSD: options.mk,v 1.39 2015/09/07 09:47:01 fhajny Exp $
2 2
3# Global and legacy options 3# Global and legacy options
4 4
5PKG_OPTIONS_VAR= PKG_OPTIONS.postfix 5PKG_OPTIONS_VAR= PKG_OPTIONS.postfix
6PKG_SUPPORTED_OPTIONS= ldap mysql pcre pgsql sasl sqlite tls cdb 6PKG_SUPPORTED_OPTIONS= sasl tls eai
7PKG_SUGGESTED_OPTIONS= tls 7PKG_SUGGESTED_OPTIONS= tls
8 8
9.include "../../mk/bsd.options.mk" 9.include "../../mk/bsd.options.mk"
10 10
11### 11###
12### STARTTLS support 12### STARTTLS support
13### 13###
14.if !empty(PKG_OPTIONS:Mtls) 14.if !empty(PKG_OPTIONS:Mtls)
15. include "../../security/openssl/buildlink3.mk" 15. include "../../security/openssl/buildlink3.mk"
16CCARGS+= -DUSE_TLS 16CCARGS+= -DUSE_TLS
17AUXLIBS+= -L${BUILDLINK_PREFIX.openssl}/lib \ 17AUXLIBS+= -L${BUILDLINK_PREFIX.openssl}/lib \
18 ${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.openssl}/lib \ 18 ${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.openssl}/lib \
19 -lssl -lcrypto 19 -lssl -lcrypto
20.endif 
21 
22### 
23### Support "pcre" map type for regular expressions. 
24### 
25.if !empty(PKG_OPTIONS:Mpcre) 
26. include "../../devel/pcre/buildlink3.mk" 
27CCARGS+= -DHAS_PCRE 
28AUXLIBS+= -L${BUILDLINK_PREFIX.pcre}/lib \ 
29 ${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.pcre}/lib \ 
30 -lpcre 
31.else 20.else
32CCARGS+= -DNO_PCRE 21CCARGS+= -DNO_TLS
33.endif 
34 
35### 
36### Support LDAP directories for table lookups. 
37### 
38.if !empty(PKG_OPTIONS:Mldap) 
39. include "../../databases/openldap-client/buildlink3.mk" 
40CCARGS+= -DHAS_LDAP 
41AUXLIBS+= -L${BUILDLINK_PREFIX.openldap-client}/lib \ 
42 ${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.openldap-client}/lib \ 
43 -lldap -llber 
44.endif 
45 
46### 
47### Support using a MySQL database server for table lookups. 
48### 
49.if !empty(PKG_OPTIONS:Mmysql) 
50. include "../../mk/mysql.buildlink3.mk" 
51CCARGS+= -DHAS_MYSQL -I${BUILDLINK_PREFIX.mysql-client}/include/mysql 
52AUXLIBS+= -L${BUILDLINK_PREFIX.mysql-client}/lib/mysql \ 
53 ${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.mysql-client}/lib/mysql \ 
54 -lmysqlclient -lz -lm 
55.endif 
56 
57### 
58### Support using a PostgreSQL database server for table lookups. 
59### 
60.if !empty(PKG_OPTIONS:Mpgsql) 
61. include "../../mk/pgsql.buildlink3.mk" 
62CCARGS+= -DHAS_PGSQL -I${PGSQL_PREFIX}/include/pgsql 
63AUXLIBS+= -L${PGSQL_PREFIX}/lib -lpq 
64.endif 
65 
66### 
67### Support using a SQLite database for table lookups. 
68### See http://www.treibsand.com/postfix-sqlite/ 
69### 
70.if !empty(PKG_OPTIONS:Msqlite) 
71. include "../../databases/sqlite3/buildlink3.mk" 
72CCARGS+= -DHAS_SQLITE -I${SQLITE3_PREFIX}/include/sqlite3 
73AUXLIBS+= -L${SQLITE3_PREFIX}/lib -lsqlite3 
74.endif 22.endif
75 23
76### 24###
77### Cyrus SASL support for SMTP authentication. 25### Cyrus SASL support for SMTP authentication.
78### (Dovecot SASL support is built in by default.) 26### (Dovecot SASL support is built in by default.)
79### 27###
80PLIST_VARS+= csasl 28PLIST_VARS+= csasl
81.if !empty(PKG_OPTIONS:Msasl) 29.if !empty(PKG_OPTIONS:Msasl)
82. include "../../security/cyrus-sasl/buildlink3.mk" 30. include "../../security/cyrus-sasl/buildlink3.mk"
83BUILDLINK_INCDIRS.cyrus-sasl= include/sasl 31BUILDLINK_INCDIRS.cyrus-sasl= include/sasl
84SASLLIBDIR= ${PREFIX}/lib/sasl2 32SASLLIBDIR= ${PREFIX}/lib/sasl2
85PWCHECK_METHOD= auxprop 33PWCHECK_METHOD= auxprop
86CCARGS+= -DUSE_CYRUS_SASL 34CCARGS+= -DUSE_CYRUS_SASL
@@ -88,22 +36,23 @@ AUXLIBS+= -L${BUILDLINK_PREFIX.cyrus-sas @@ -88,22 +36,23 @@ AUXLIBS+= -L${BUILDLINK_PREFIX.cyrus-sas
88 ${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.cyrus-sasl}/lib \ 36 ${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.cyrus-sasl}/lib \
89 -lsasl2 37 -lsasl2
90PLIST.csasl= yes 38PLIST.csasl= yes
91MESSAGE_SRC+= ${PKGDIR}/MESSAGE.sasl 39MESSAGE_SRC+= ${PKGDIR}/MESSAGE.sasl
92MESSAGE_SUBST+= PKG_SYSCONFDIR=${PKG_SYSCONFDIR} 40MESSAGE_SUBST+= PKG_SYSCONFDIR=${PKG_SYSCONFDIR}
93MESSAGE_SUBST+= SASLLIBDIR=${SASLLIBDIR} 41MESSAGE_SUBST+= SASLLIBDIR=${SASLLIBDIR}
94MAKE_DIRS+= ${SASLLIBDIR} 42MAKE_DIRS+= ${SASLLIBDIR}
95CONF_FILES+= ${EXAMPLEDIR}/smtpd.conf ${SASLLIBDIR}/smtpd.conf 43CONF_FILES+= ${EXAMPLEDIR}/smtpd.conf ${SASLLIBDIR}/smtpd.conf
96.else 44.else
97CCARGS+= -DDEF_SERVER_SASL_TYPE=\"dovecot\" 45CCARGS+= -DDEF_SERVER_SASL_TYPE=\"dovecot\"
98.endif 46.endif
99 47
100### 48###
101### Support CDB (Constant Database) map type. 49### EAI (Email Address Internationalization) support (SMTPUTF8)
102### 50###
103.if !empty(PKG_OPTIONS:Mcdb) 51.if !empty(PKG_OPTIONS:Meai)
104. include "../../databases/tinycdb/buildlink3.mk" 52. include "../../textproc/icu/buildlink3.mk"
105CCARGS+= -DHAS_CDB 53CCARGS+= -DHAS_EAI -I${BUILDLINK_PREFIX.icu}/include
106AUXLIBS+= -L${BUILDLINK_PREFIX.tinycdb}/lib \ 54AUXLIBS+= -L${BUILDLINK_PREFIX.icu}/lib -licuuc \
107 ${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.tinycdb}/lib \ 55 ${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.icu}/lib
108 -lcdb 56.else
 57CCARGS+= -DNO_EAI
109.endif 58.endif

File Added: pkgsrc/mail/postfix-cdb/DESCR
Postfix SMTP server cdb backend module

File Added: pkgsrc/mail/postfix-cdb/Makefile
# $NetBSD: Makefile,v 1.1 2015/09/07 09:47:02 fhajny Exp $
#

COMMENT=		Postfix SMTP server cdb backend module

POSTFIX_LIB=		cdb
POSTFIX_LIBDIR=		src/global
POSTFIX_LIB_DICT=	yes
POSTFIX_LIB_MKMAP=	yes

.include "../../mail/postfix/Makefile.module"

CCARGS+=		-I${BUILDLINK_PREFIX.tinycdb}/include
AUXLIBS_MODULE=		-L${BUILDLINK_PREFIX.tinycdb}/lib -lcdb			\
			${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.tinycdb}/lib

.include "../../databases/tinycdb/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"

File Added: pkgsrc/mail/postfix-ldap/DESCR
Postfix SMTP server LDAP backend module

File Added: pkgsrc/mail/postfix-ldap/Makefile
# $NetBSD: Makefile,v 1.1 2015/09/07 09:47:02 fhajny Exp $
#

COMMENT=		Postfix SMTP server LDAP backend module

POSTFIX_LIB=		ldap
POSTFIX_LIBDIR=		src/global
POSTFIX_LIB_DICT=	yes
POSTFIX_LIB_MKMAP=	no

.include "../../mail/postfix/Makefile.module"

CCARGS+=		-I${BUILDLINK_PREFIX.openldap-client}/include
AUXLIBS_MODULE=		-L${BUILDLINK_PREFIX.openldap-client}/lib -lldap -llber	\
			${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.openldap-client}/lib

.include "../../databases/openldap-client/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"

File Added: pkgsrc/mail/postfix-lmdb/DESCR
Postfix SMTP server LMDB backend module

File Added: pkgsrc/mail/postfix-lmdb/Makefile
# $NetBSD: Makefile,v 1.1 2015/09/07 09:47:02 fhajny Exp $
#

COMMENT=		Postfix SMTP server LMDB backend module

POSTFIX_LIB=		lmdb
POSTFIX_LIBDIR=		src/global
POSTFIX_LIB_DICT=	yes
POSTFIX_LIB_MKMAP=	yes

.include "../../mail/postfix/Makefile.module"

CCARGS+=		-I${BUILDLINK_PREFIX.lmdb}/include
AUXLIBS_MODULE=		-L${BUILDLINK_PREFIX.lmdb}/lib -llmdb			\
			${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.}/lib

.include "../../databases/lmdb/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"

File Added: pkgsrc/mail/postfix-mysql/DESCR
Postfix SMTP server MySQL backend module

File Added: pkgsrc/mail/postfix-mysql/Makefile
# $NetBSD: Makefile,v 1.1 2015/09/07 09:47:02 fhajny Exp $
#

COMMENT=		Postfix SMTP server MySQL backend module

POSTFIX_LIB=		mysql
POSTFIX_LIBDIR=		src/global
POSTFIX_LIB_DICT=	yes
POSTFIX_LIB_MKMAP=	no

.include "../../mail/postfix/Makefile.module"

CCARGS+=		-I${BUILDLINK_PREFIX.mysql-client}/include
AUXLIBS_MODULE=		-L${BUILDLINK_PREFIX.mysql-client}/lib -lmysqlclient	\
			${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.}/lib

.include "../../mk/mysql.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"

File Added: pkgsrc/mail/postfix-pcre/DESCR
Postfix SMTP server PCRE map module

File Added: pkgsrc/mail/postfix-pcre/Makefile
# $NetBSD: Makefile,v 1.1 2015/09/07 09:47:02 fhajny Exp $
#

COMMENT=		Postfix SMTP server PCRE map module

POSTFIX_LIB=		pcre
POSTFIX_LIBDIR=		src/util
POSTFIX_LIB_DICT=	yes
POSTFIX_LIB_MKMAP=	no

.include "../../mail/postfix/Makefile.module"

CCARGS+=		-I${BUILDLINK_PREFIX.pcre}/include
AUXLIBS_MODULE=		-L${BUILDLINK_PREFIX.pcre}/lib -lpcre			\
			${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.}/lib

.include "../../devel/pcre/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"

File Added: pkgsrc/mail/postfix-pgsql/DESCR
Postfix SMTP server PostgreSQL backend module

File Added: pkgsrc/mail/postfix-pgsql/Makefile
# $NetBSD: Makefile,v 1.1 2015/09/07 09:47:02 fhajny Exp $
#

COMMENT=		Postfix SMTP server PostgreSQL backend module

POSTFIX_LIB=		pgsql
POSTFIX_LIBDIR=		src/global
POSTFIX_LIB_DICT=	yes
POSTFIX_LIB_MKMAP=	no

.include "../../mail/postfix/Makefile.module"

CCARGS+=		-I${PGSQL_PREFIX}/include
AUXLIBS_MODULE=		-L${PGSQL_PREFIX}/lib -lpq				\
			${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.}/lib

.include "../../mk/pgsql.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"

File Added: pkgsrc/mail/postfix-sqlite/DESCR
Postfix SMTP server SQLite backend module

File Added: pkgsrc/mail/postfix-sqlite/Makefile
# $NetBSD: Makefile,v 1.1 2015/09/07 09:47:02 fhajny Exp $
#

COMMENT=		Postfix SMTP server SQLite backend module

POSTFIX_LIB=		sqlite
POSTFIX_LIBDIR=		src/global
POSTFIX_LIB_DICT=	yes
POSTFIX_LIB_MKMAP=	no

.include "../../mail/postfix/Makefile.module"

CCARGS+=		-I${BUILDLINK_PREFIX.sqlite3}/include
AUXLIBS_MODULE=		-L${BUILDLINK_PREFIX.sqlite3}/lib -lsqlite3		\
			${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.}/lib

.include "../../databases/sqlite3/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"

cvs diff -r1.23 -r1.24 pkgsrc/mail/postfix/patches/patch-aa (expand / switch to unified diff)

--- pkgsrc/mail/postfix/patches/patch-aa 2014/02/09 05:34:13 1.23
+++ pkgsrc/mail/postfix/patches/patch-aa 2015/09/07 09:47:01 1.24
@@ -1,44 +1,47 @@ @@ -1,44 +1,47 @@
1$NetBSD: patch-aa,v 1.23 2014/02/09 05:34:13 taca Exp $ 1$NetBSD: patch-aa,v 1.24 2015/09/07 09:47:01 fhajny Exp $
2 2
3Make this pkgsrc friendly. 3Make this pkgsrc friendly.
4 4
5--- postfix-install.orig 2012-05-22 19:40:29.000000000 +0000 5--- postfix-install.orig 2015-01-29 22:15:30.000000000 +0000
6+++ postfix-install 6+++ postfix-install
7@@ -370,26 +370,6 @@ HTML files. Specify \"no\" if you do not 7@@ -436,26 +436,6 @@ template files main.cf.proto and master.
8 : ${tempdir=`pwd`} 8 : ${tempdir=`pwd`}
9 : ${config_directory=`bin/postconf -c conf -h -d config_directory`} 9 : ${config_directory=`bin/postconf -c conf -h -d config_directory`}
10  10
11-# Find out the location of installed configuration files. 11-# Find out the location of installed configuration files.
12- 12-
13-test -z "$non_interactive" && for name in install_root tempdir config_directory 13-test -z "$non_interactive" && for name in install_root tempdir config_directory
14-do 14-do
15- while : 15- while :
16- do 16- do
17- echo 17- echo
18- eval echo Please specify \$${name}_prompt | ${FMT} 18- eval echo Please specify \$${name}_prompt | ${FMT}
19- eval echo \$n "$name: [\$$name]\ \$c" 19- eval echo \$n "$name: [\$$name]\ \$c"
20- read ans 20- read ans
21- case $ans in 21- case $ans in
22- "") break;; 22- "") break;;
23- *) case $ans in 23- *) case $ans in
24- /*) eval $name=$ans; break;; 24- /*) eval $name=$ans; break;;
25- *) echo; echo $0: Error: $name should be an absolute path name. 1>&2;; 25- *) echo; echo $0: Error: $name should be an absolute path name. 1>&2;;
26- esac;; 26- esac;;
27- esac 27- esac
28- done 28- done
29-done 29-done
30- 30-
31 # In case some systems special-case pathnames beginning with //. 31 # In case some systems special-case pathnames beginning with //.
32  32
33 case $install_root in 33 case $install_root in
34@@ -744,10 +724,3 @@ bin/postconf -c $CONFIG_DIRECTORY -e \ 34@@ -847,13 +827,3 @@ bin/postconf -c $CONFIG_DIRECTORY -e \
35 "sample_directory = $sample_directory" \ 35 "shlib_directory = $shlib_directory" \
36 "readme_directory = $readme_directory" \ 36 "meta_directory = $meta_directory" \
37 || exit 1 37 || exit 1
38- 38-
39-# If Postfix is being installed locally from source code, do the 39-# If Postfix is being installed locally from source code, do the
40-# post-install processing now. 40-# post-install processing now.
41- 41-
 42-# The unexpansion above may have side effects on exported variables.
 43-# It does not matter because bin/postfix below will override them.
 44-
42-test -n "$install_root" || { 45-test -n "$install_root" || {
43- bin/postfix post-install $post_install_options || exit 1 46- bin/postfix post-install $post_install_options || exit 1
44-} 47-}

cvs diff -r1.35 -r1.36 pkgsrc/mail/postfix/patches/patch-ag (expand / switch to unified diff)

--- pkgsrc/mail/postfix/patches/patch-ag 2014/08/25 16:00:54 1.35
+++ pkgsrc/mail/postfix/patches/patch-ag 2015/09/07 09:47:01 1.36
@@ -1,34 +1,26 @@ @@ -1,34 +1,26 @@
1$NetBSD: patch-ag,v 1.35 2014/08/25 16:00:54 taca Exp $ 1$NetBSD: patch-ag,v 1.36 2015/09/07 09:47:01 fhajny Exp $
2 2
3* Add support for NetBSD 7. 3* Add support for NetBSD 7.
4* Only define HAS_DB if it hasn't been defined. 4* Only define HAS_DB if it hasn't been defined.
5 5
6--- src/util/sys_defs.h.orig 2013-09-29 20:51:55.000000000 +0000 6--- src/util/sys_defs.h.orig 2015-07-18 13:28:17.000000000 +0000
7+++ src/util/sys_defs.h 7+++ src/util/sys_defs.h
8@@ -31,6 +31,7 @@ 8@@ -45,7 +45,9 @@
9 || defined(OPENBSD5) \ 
10 || defined(NETBSD1) || defined(NETBSD2) || defined(NETBSD3) \ 
11 || defined(NETBSD4) || defined(NETBSD5) || defined(NETBSD6) \ 
12+ || defined(NETBSD7) \ 
13 || defined(EKKOBSD1) || defined(DRAGONFLY) 
14 #define SUPPORTED 
15 #include <sys/types.h> 
16@@ -44,7 +45,9 @@ 
17 #define DEF_MAILBOX_LOCK "flock, dotlock" 9 #define DEF_MAILBOX_LOCK "flock, dotlock"
18 #define HAS_SUN_LEN 10 #define HAS_SUN_LEN
19 #define HAS_FSYNC 11 #define HAS_FSYNC
20+#ifndef HAS_DB 12+#ifndef HAS_DB
21 #define HAS_DB 13 #define HAS_DB
22+#endif 14+#endif
23 #define HAS_SA_LEN 15 #define HAS_SA_LEN
24 #define NATIVE_DB_TYPE "hash" 16 #define NATIVE_DB_TYPE "hash"
25 #if (defined(__NetBSD_Version__) && __NetBSD_Version__ >= 104250000) 17 #if (defined(__NetBSD_Version__) && __NetBSD_Version__ >= 104250000)
26@@ -1265,6 +1268,8 @@ extern int h_errno; 18@@ -1267,6 +1269,8 @@ extern int h_errno;
27 #define DEF_SMTP_CACHE_DEMAND 0 19 #define DEF_SMTP_CACHE_DEMAND 0
28 #endif 20 #endif
29  21
30+#define RECEIVED_ENVELOPE_FROM 22+#define RECEIVED_ENVELOPE_FROM
31+ 23+
32 /* 24 /*
33 * We're not going to try to guess like configure does. 25 * We're not going to try to guess like configure does.
34 */ 26 */

cvs diff -r1.33 -r1.34 pkgsrc/mail/postfix/patches/patch-ai (expand / switch to unified diff)

--- pkgsrc/mail/postfix/patches/patch-ai 2015/07/22 00:25:37 1.33
+++ pkgsrc/mail/postfix/patches/patch-ai 2015/09/07 09:47:01 1.34
@@ -1,43 +1,34 @@ @@ -1,43 +1,34 @@
1$NetBSD: patch-ai,v 1.33 2015/07/22 00:25:37 taca Exp $ 1$NetBSD: patch-ai,v 1.34 2015/09/07 09:47:01 fhajny Exp $
2 2
3Make this pkgsrc friendly. 3Make this pkgsrc friendly.
4 4
5--- makedefs.orig 2015-07-19 14:24:10.000000000 +0000 5--- makedefs.orig 2015-07-19 14:24:25.000000000 +0000
6+++ makedefs 6+++ makedefs
7@@ -187,6 +187,8 @@ case "$SYSTEM.$RELEASE" in 7@@ -372,13 +372,6 @@ case "$SYSTEM.$RELEASE" in
8 ;; 
9 NetBSD.6*) SYSTYPE=NETBSD6 
10 ;; 
11+ NetBSD.7*) SYSTYPE=NETBSD7 
12+ ;; 
13 BSD/OS.2*) SYSTYPE=BSDI2 
14 ;; 
15 BSD/OS.3*) SYSTYPE=BSDI3 
16@@ -244,13 +246,6 @@ case "$SYSTEM.$RELEASE" in 
17 esac 8 esac
18 ;; 9 ;;
19 ULTRIX.4*) SYSTYPE=ULTRIX4 10 ULTRIX.4*) SYSTYPE=ULTRIX4
20- if [ -f /usr/local/lib/libdb.a ]; then 11- if [ -f /usr/local/lib/libdb.a ]; then
21- SYSLIBS="$SYSLIBS -ldb" 12- SYSLIBS="$SYSLIBS -ldb"
22- CCARGS="$CCARGS -DHAS_DB" 13- CCARGS="$CCARGS -DHAS_DB"
23- if [ -d /usr/local/include/db ]; then 14- if [ -d /usr/local/include/db ]; then
24- CCARGS="$CCARGS -I/usr/local/include/db" 15- CCARGS="$CCARGS -I/usr/local/include/db"
25- fi 16- fi
26- fi 17- fi
27 for l in syslog resolv; do 18 for l in syslog resolv; do
28 if [ -f /usr/local/lib/lib$l.a ]; then 19 if [ -f /usr/local/lib/lib$l.a ]; then
29 SYSLIBS="$SYSLIBS -l$l" 20 SYSLIBS="$SYSLIBS -l$l"
30@@ -288,33 +283,8 @@ case "$SYSTEM.$RELEASE" in 21@@ -416,33 +409,8 @@ case "$SYSTEM.$RELEASE" in
31 esac;; 22 esac;;
32 # Tested with RedHat 3.03 on 20020729. 23 # Tested with RedHat 3.03 on 20020729.
33 Linux.1*) SYSTYPE=LINUX1 24 Linux.1*) SYSTYPE=LINUX1
34- case "$CCARGS" in 25- case "$CCARGS" in
35- *-DNO_DB*) ;; 26- *-DNO_DB*) ;;
36- *-DHAS_DB*) ;; 27- *-DHAS_DB*) ;;
37- *) SYSLIBS="-ldb";; 28- *) SYSLIBS="-ldb";;
38- esac 29- esac
39 ;; 30 ;;
40 Linux.2*) SYSTYPE=LINUX2 31 Linux.2*) SYSTYPE=LINUX2
41- case "$CCARGS" in 32- case "$CCARGS" in
42- *-DNO_DB*) ;; 33- *-DNO_DB*) ;;
43- *-DHAS_DB*) ;; 34- *-DHAS_DB*) ;;
@@ -51,78 +42,78 @@ Make this pkgsrc friendly. @@ -51,78 +42,78 @@ Make this pkgsrc friendly.
51- # No, we're not going to try db1 db2 db3 etc. 42- # No, we're not going to try db1 db2 db3 etc.
52- # On a properly installed system, Postfix builds 43- # On a properly installed system, Postfix builds
53- # by including <db.h> and by linking with -ldb 44- # by including <db.h> and by linking with -ldb
54- echo "No <db.h> include file found." 1>&2 45- echo "No <db.h> include file found." 1>&2
55- echo "Install the appropriate db*-devel package first." 1>&2 46- echo "Install the appropriate db*-devel package first." 1>&2
56- exit 1 47- exit 1
57- fi 48- fi
58- SYSLIBS="-ldb" 49- SYSLIBS="-ldb"
59- ;; 50- ;;
60- esac 51- esac
61 for name in nsl resolv $GDBM_LIBS 52 for name in nsl resolv $GDBM_LIBS
62 do 53 do
63 for lib in /usr/lib64 /lib64 /usr/lib /lib 54 for lib in /usr/lib64 /lib64 /usr/lib /lib
64@@ -368,25 +338,6 @@ EOF 55@@ -503,25 +471,6 @@ EOF
65 esac 56 : ${PLUGIN_LD="${CC-gcc} -shared"}
66 ;; 57 ;;
67 Linux.[34].*) SYSTYPE=LINUX$RELEASE_MAJOR 58 Linux.[34].*) SYSTYPE=LINUX$RELEASE_MAJOR
68- case "$CCARGS" in 59- case "$CCARGS" in
69- *-DNO_DB*) ;; 60- *-DNO_DB*) ;;
70- *-DHAS_DB*) ;; 61- *-DHAS_DB*) ;;
71- *) if [ -f /usr/include/db.h ] 62- *) if [ -f /usr/include/db.h ]
72- then 63- then
73- : we are all set 64- : we are all set
74- elif [ -f /usr/include/db/db.h ] 65- elif [ -f /usr/include/db/db.h ]
75- then 66- then
76- CCARGS="$CCARGS -I/usr/include/db" 67- CCARGS="$CCARGS -I/usr/include/db"
77- else 68- else
78- # On a properly installed system, Postfix builds 69- # On a properly installed system, Postfix builds
79- # by including <db.h> and by linking with -ldb 70- # by including <db.h> and by linking with -ldb
80- echo "No <db.h> include file found." 1>&2 71- echo "No <db.h> include file found." 1>&2
81- echo "Install the appropriate db*-devel package first." 1>&2 72- echo "Install the appropriate db*-devel package first." 1>&2
82- exit 1 73- exit 1
83- fi 74- fi
84- SYSLIBS="-ldb" 75- SYSLIBS="-ldb"
85- ;; 76- ;;
86- esac 77- esac
87 for name in nsl resolv 78 for name in nsl resolv
88 do 79 do
89 for lib in /usr/lib64 /lib64 /usr/lib /usr/lib/* /lib /lib/* 80 for lib in /usr/lib64 /lib64 /usr/lib /usr/lib/* /lib /lib/*
90@@ -400,24 +351,6 @@ EOF 81@@ -542,24 +491,6 @@ EOF
91 ;; 82 ;;
92 GNU.0*|GNU/kFreeBSD.[567]*) 83 GNU.0*|GNU/kFreeBSD.[567]*)
93 SYSTYPE=GNU0 84 SYSTYPE=GNU0
94- case "$CCARGS" in 85- case "$CCARGS" in
95- *-DNO_DB*) ;; 86- *-DNO_DB*) ;;
96- *) if [ -f /usr/include/db.h ] 87- *) if [ -f /usr/include/db.h ]
97- then 88- then
98- : we are all set 89- : we are all set
99- elif [ -f /usr/include/db/db.h ] 90- elif [ -f /usr/include/db/db.h ]
100- then 91- then
101- CCARGS="$CCARGS -I/usr/include/db" 92- CCARGS="$CCARGS -I/usr/include/db"
102- else 93- else
103- # On a properly installed system, Postfix builds 94- # On a properly installed system, Postfix builds
104- # by including <db.h> and by linking with -ldb 95- # by including <db.h> and by linking with -ldb
105- echo "No <db.h> include file found." 1>&2 96- echo "No <db.h> include file found." 1>&2
106- echo "Install the appropriate db*-devel package first." 1>&2 97- echo "Install the appropriate db*-devel package first." 1>&2
107- exit 1 98- exit 1
108- fi 99- fi
109- SYSLIBS="-ldb" 100- SYSLIBS="-ldb"
110- ;; 101- ;;
111- esac 102- esac
112 for name in nsl resolv 103 for name in nsl resolv
113 do 104 do
114 for lib in /usr/lib64 /lib64 /usr/lib /lib 105 for lib in /usr/lib64 /lib64 /usr/lib /lib
115@@ -448,25 +381,13 @@ EOF 106@@ -590,25 +521,13 @@ EOF
116 HP-UX.A.09.*) SYSTYPE=HPUX9 107 HP-UX.A.09.*) SYSTYPE=HPUX9
117 SYSLIBS=-ldbm 108 SYSLIBS=-ldbm
118 CCARGS="$CCARGS -DMISSING_USLEEP" 109 CCARGS="$CCARGS -DMISSING_USLEEP"
119- if [ -f /usr/lib/libdb.a ]; then 110- if [ -f /usr/lib/libdb.a ]; then
120- CCARGS="$CCARGS -DHAS_DB" 111- CCARGS="$CCARGS -DHAS_DB"
121- SYSLIBS="$SYSLIBS -ldb" 112- SYSLIBS="$SYSLIBS -ldb"
122- fi 113- fi
123 ;; 114 ;;
124 HP-UX.B.10.*) SYSTYPE=HPUX10 115 HP-UX.B.10.*) SYSTYPE=HPUX10
125 CCARGS="$CCARGS `nm /usr/lib/libc.a 2>/dev/null | 116 CCARGS="$CCARGS `nm /usr/lib/libc.a 2>/dev/null |
126 (grep usleep >/dev/null || echo '-DMISSING_USLEEP')`" 117 (grep usleep >/dev/null || echo '-DMISSING_USLEEP')`"
127- if [ -f /usr/lib/libdb.a ]; then 118- if [ -f /usr/lib/libdb.a ]; then
128- CCARGS="$CCARGS -DHAS_DB" 119- CCARGS="$CCARGS -DHAS_DB"