summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjlam <jlam>2004-07-31 05:53:44 +0000
committerjlam <jlam>2004-07-31 05:53:44 +0000
commit5af417d53d29448ac4194c85e3ecaad37c1b2c88 (patch)
tree97fb201c4c47dc3fce3b21e22164083f8115a833
parent545f1e00d11fedf6c68dd4afe3e89a765cd17697 (diff)
downloadpkgsrc-5af417d53d29448ac4194c85e3ecaad37c1b2c88.tar.gz
Minimize diffs with pkgsrc/mail/postfix to simplify maintenance of this
package.
-rw-r--r--mail/postfix-current/INSTALL11
-rw-r--r--mail/postfix-current/MESSAGE18
-rw-r--r--mail/postfix-current/MESSAGE.NetBSD3
-rw-r--r--mail/postfix-current/MESSAGE.sasl21
-rw-r--r--mail/postfix-current/MESSAGE.tls19
-rw-r--r--mail/postfix-current/Makefile256
-rw-r--r--mail/postfix-current/Makefile.options175
-rw-r--r--mail/postfix-current/PLIST27
-rw-r--r--mail/postfix-current/distinfo8
-rw-r--r--mail/postfix-current/files/mailer.conf14
-rw-r--r--mail/postfix-current/files/postfix.sh41
-rw-r--r--mail/postfix-current/patches/patch-aa18
-rw-r--r--mail/postfix-current/patches/patch-ae6
-rw-r--r--mail/postfix-current/patches/patch-af18
14 files changed, 379 insertions, 256 deletions
diff --git a/mail/postfix-current/INSTALL b/mail/postfix-current/INSTALL
deleted file mode 100644
index 145927c517f..00000000000
--- a/mail/postfix-current/INSTALL
+++ /dev/null
@@ -1,11 +0,0 @@
-# $NetBSD: INSTALL,v 1.2 2004/07/02 08:03:04 martti Exp $
-#
-
-SHAREDIR=@SHAREDIR@
-
-case $STAGE in
-POST-INSTALL)
- echo "===> Running postfix's post-install script"
- @SHAREDIR@/post-install command_directory=@PREFIX@/sbin first-install
- ;;
-esac
diff --git a/mail/postfix-current/MESSAGE b/mail/postfix-current/MESSAGE
index 96d5a8ce423..f7fbfd64539 100644
--- a/mail/postfix-current/MESSAGE
+++ b/mail/postfix-current/MESSAGE
@@ -1,11 +1,17 @@
===========================================================================
-$NetBSD: MESSAGE,v 1.1.1.1 2004/03/06 15:04:12 grant Exp $
+$NetBSD: MESSAGE,v 1.2 2004/07/31 05:53:44 jlam Exp $
-To activate postfix:
+Please run the following command to update main.cf and master.cf with
+the latest Postfix services and configuration directives:
-- Check the configuration files in ${PKG_SYSCONFDIR}
- (see ${SHAREDIR})
-- Modify /etc/mailer.conf (see ${SHAREDIR}/mailer.conf)
-- Set postfix=YES in /etc/rc.conf
+ ${PREFIX}/sbin/postfix upgrade-configuration
+
+If you are upgrading from a previous Postfix installation, you may want
+to back up any existing configuration files before running the above
+command.
+
+Postfix may be activated by executing:
+
+ ${PREFIX}/sbin/postfix start
===========================================================================
diff --git a/mail/postfix-current/MESSAGE.NetBSD b/mail/postfix-current/MESSAGE.NetBSD
index 710efa16242..34adcc71d1d 100644
--- a/mail/postfix-current/MESSAGE.NetBSD
+++ b/mail/postfix-current/MESSAGE.NetBSD
@@ -1,9 +1,10 @@
===========================================================================
-$NetBSD: MESSAGE.NetBSD,v 1.1.1.1 2004/03/06 15:04:12 grant Exp $
+$NetBSD: MESSAGE.NetBSD,v 1.2 2004/07/31 05:53:44 jlam Exp $
If you are running NetBSD 1.5 (or newer), the existing /etc/rc.d/postfix
can be forced to start ${PREFIX}/sbin/postfix instead of /usr/sbin/postfix,
by adding the following lines to /etc/rc.conf.d/postfix:
+
required_files='${PKG_SYSCONFDIR}/main.cf'
start_cmd='${PREFIX}/sbin/postfix start'
stop_cmd='${PREFIX}/sbin/postfix stop'
diff --git a/mail/postfix-current/MESSAGE.sasl b/mail/postfix-current/MESSAGE.sasl
index b097dd49cdc..c824cc80384 100644
--- a/mail/postfix-current/MESSAGE.sasl
+++ b/mail/postfix-current/MESSAGE.sasl
@@ -1,7 +1,20 @@
===========================================================================
-$NetBSD: MESSAGE.sasl,v 1.1.1.1 2004/03/06 15:04:11 grant Exp $
+$NetBSD: MESSAGE.sasl,v 1.2 2004/07/31 05:53:44 jlam Exp $
+
+To enable SASL authentication, you may want to edit
+
+ ${SASLLIBDIR}/smtpd.conf
+
+and change the method used to check plaintext passwords. To use
+security/cyrus-saslauthd, you should change the contents of smtpd.conf to:
+
+ pwcheck_method: saslauthd
+
+Please consult:
+
+ ${DOCDIR}/SASL_README
+
+and the SASL documentation for more information on setting up SASL
+authentication.
-To enable SASL authentication, you might need to change permission
-of ${PKG_SYSCONFDIR}/sasldb.db so that smtpd can read it, and configure
-${PKG_SYSCONFDIR}/main.cf (See ${SHAREDIR}/sample-auth.cf.)
===========================================================================
diff --git a/mail/postfix-current/MESSAGE.tls b/mail/postfix-current/MESSAGE.tls
index b78d36ab02a..8602a9a1ec9 100644
--- a/mail/postfix-current/MESSAGE.tls
+++ b/mail/postfix-current/MESSAGE.tls
@@ -1,13 +1,20 @@
===========================================================================
-$NetBSD: MESSAGE.tls,v 1.1.1.1 2004/03/06 15:04:11 grant Exp $
+$NetBSD: MESSAGE.tls,v 1.2 2004/07/31 05:53:44 jlam Exp $
-To enable TLS, you might need to reconfigure /etc/postfix/main.cf and
-${PKG_SYSCONFDIR}/master.cf (See ${SHAREDIR}/sample-tls.cf.)
+To enable TLS, you might need to reconfigure the following files:
+
+ ${PKG_SYSCONFDIR}/main.cf
+ ${PKG_SYSCONFDIR}/master.cf
master.cf:
----------
- tlsmgr fifo - - y 300 1 tlsmgr
- smtps inet n - y - - smtpd -o smtpd_tls_wrappermode=yes -o smtpd_sasl_auth_enable=yes
- submission inet n - y - - smtpd -o smtpd_enforce_tls=yes -o smtpd_sasl_auth_enable=yes
+# ==========================================================================
+# service type private unpriv chroot wakeup maxproc command + args
+# ==========================================================================
+tlsmgr fifo - - y 300 1 tlsmgr
+smtps inet n - y - - smtpd
+ -o smtpd_tls_wrappermode=yes -o smtpd_sasl_auth_enable=yes
+submission inet n - y - - smtpd
+ -o smtpd_enforce_tls=yes -o smtpd_sasl_auth_enable=yes
===========================================================================
diff --git a/mail/postfix-current/Makefile b/mail/postfix-current/Makefile
index a4951caad9b..5ee02d0e406 100644
--- a/mail/postfix-current/Makefile
+++ b/mail/postfix-current/Makefile
@@ -1,9 +1,10 @@
-# $NetBSD: Makefile,v 1.35 2004/07/24 22:45:15 recht Exp $
+# $NetBSD: Makefile,v 1.36 2004/07/31 05:53:44 jlam Exp $
DISTNAME= postfix-2.2-20040628
CATEGORIES= mail
MASTER_SITES= ftp://ftp.porcupine.org/mirrors/postfix-release/experimental/ \
http://public.planetmirror.com.au/pub/postfix/experimental/
+DIST_SUBDIR= postfix
MAINTAINER= tech-pkg@NetBSD.org
HOMEPAGE= http://www.postfix.org/
@@ -11,174 +12,86 @@ COMMENT= Postfix SMTP server and tools
CONFLICTS+= sendmail-[0-9]* fastforward>=0.51nb2
-DIST_SUBDIR= postfix
-
PKG_INSTALLATION_TYPES= overwrite pkgviews
+USE_BUILDLINK3= yes
-USE_BUILDLINK3= yes
-USE_PKGINSTALL= yes
-
-PKG_SYSCONFSUBDIR= postfix
-POSTFIX_SPOOL= /var/spool/postfix
+.include "../../mk/bsd.prefs.mk"
-OWN_DIRS= ${POSTFIX_SPOOL}
+# 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_QUEUE_DIR?= ${VARBASE}/spool/postfix
+
+# CCARGS is a list of options to pass to the preprocessor/compiler.
+# AUXLIBS is a list of options to pass to the linker.
+#
+CCARGS= # empty
+AUXLIBS= # empty
+FIX_RPATH+= AUXLIBS
CCARGS+= -DDEF_CONFIG_DIR=\"${PKG_SYSCONFDIR}\"
+CCARGS+= -DDEF_QUEUE_DIR=\"${POSTFIX_QUEUE_DIR}\"
+CCARGS+= -DDEF_COMMAND_DIR=\"${PREFIX}/sbin\"
+CCARGS+= -DDEF_DAEMON_DIR=\"${LIBEXECDIR}\"
CCARGS+= -DDEF_SENDMAIL_PATH=\"${PREFIX}/sbin/sendmail\"
CCARGS+= -DDEF_MAILQ_PATH=\"${PREFIX}/bin/mailq\"
CCARGS+= -DDEF_NEWALIAS_PATH=\"${PREFIX}/bin/newaliases\"
-CCARGS+= -DDEF_COMMAND_DIR=\"${PREFIX}/sbin\"
-CCARGS+= -DDEF_DAEMON_DIR=\"${LIBEXECDIR}\"
-
-.include "../../mk/bsd.prefs.mk"
-# NetBSD 1.5 and above has /etc/rc.d/postfix already which is
-# suitable.
-.if empty(MACHINE_PLATFORM:MNetBSD-1.[5-9]*-*)
-RCD_SCRIPTS= postfix
-.endif
+# Makefile.options appends to CCARGS and AUXLIBS the options needed to
+# build Postfix with support for various add-on modules.
+#
+.include "Makefile.options"
-FIX_RPATH+= AUXLIBS
+PKG_SYSCONFSUBDIR= postfix
+LIBEXECDIR= ${PREFIX}/libexec/postfix
+DOCDIR= ${PREFIX}/share/doc/postfix
+EXAMPLEDIR= ${PREFIX}/share/examples/postfix
-BUILD_DEFS+= POSTFIX_USE_INET6
-BUILD_DEFS+= POSTFIX_USE_TLS
-BUILD_DEFS+= POSTFIX_USE_PCRE
-BUILD_DEFS+= POSTFIX_USE_MYSQL
-BUILD_DEFS+= POSTFIX_USE_PGSQL
-BUILD_DEFS+= USE_OPENLDAP
-BUILD_DEFS+= USE_SASL
-BUILD_DEFS+= USE_SASL2
-
-# .if defined(POSTFIX_USE_INET6) && ${POSTFIX_USE_INET6} == "YES"
-# . include "../../security/openssl/buildlink3.mk"
-# PATCHFILES+= tls+ipv6-1.25-pf-2.2-20040616.patch.gz
-# PATCH_SITES+= ftp://ftp.stack.nl/pub/postfix/tls+ipv6/1.25/
-# PATCH_DIST_STRIP= -p1
-#
-# CCARGS+= -DHAS_SSL
-# AUXLIBS+= -L${BUILDLINK_PREFIX.openssl}/lib \
-# -Wl,${RPATH_FLAG}${BUILDLINK_PREFIX.openssl}/lib \
-# -lssl -lcrypto
-#
-# PLIST_SRC+= ${PKGDIR}/PLIST.tls
-# MESSAGE_SRC+= ${PKGDIR}/MESSAGE.tls
-# .endif
-
-.if defined(POSTFIX_USE_PCRE) && ${POSTFIX_USE_PCRE} == "YES"
-. include "../../devel/pcre/buildlink3.mk"
-CCARGS+= -DHAS_PCRE
-AUXLIBS+= -L${BUILDLINK_PREFIX.pcre}/lib \
- -Wl,${RPATH_FLAG}${BUILDLINK_PREFIX.pcre}/lib \
- -lpcre
-.else
-CCARGS+= -DNO_PCRE
-.endif
+FILES_SUBST+= EXAMPLEDIR=${EXAMPLEDIR}
+MESSAGE_SUBST+= EXAMPLEDIR=${EXAMPLEDIR}
+MESSAGE_SUBST+= DOCDIR=${DOCDIR}
-.if defined(USE_OPENLDAP) && ${USE_OPENLDAP} == "YES"
-. include "../../databases/openldap/buildlink3.mk"
-CCARGS+= -DHAS_LDAP
-AUXLIBS+= -L${BUILDLINK_PREFIX.openldap}/lib \
- -Wl,${RPATH_FLAG}${BUILDLINK_PREFIX.openldap}/lib \
- -lldap -llber
-. if ${OPSYS} != "Linux"
-. include "../../databases/db4/buildlink3.mk"
-CCARGS+= -I${BUILDLINK_PREFIX.db4}/include/db4
-AUXLIBS+= -L${BUILDLINK_PREFIX.db4}/lib \
- -Wl,${RPATH_FLAG}${BUILDLINK_PREFIX.db4}/lib \
- -ldb4
-. endif
+MESSAGE_SRC+= ${PKGDIR}/MESSAGE
+.if exists(${PKGDIR}/MESSAGE.${OPSYS})
+MESSAGE_SRC+= ${PKGDIR}/MESSAGE.${OPSYS}
.endif
+PLIST_SRC+= ${PKGDIR}/PLIST
-.if defined(POSTFIX_USE_MYSQL) && ${POSTFIX_USE_MYSQL} == "YES"
-. include "../../databases/mysql-client/buildlink3.mk"
-CCARGS+= -DHAS_MYSQL -I${BUILDLINK_PREFIX.mysql-client}/include/mysql
-AUXLIBS+= -L${BUILDLINK_PREFIX.mysql-client}/lib/mysql \
- -Wl,${RPATH_FLAG}${BUILDLINK_PREFIX.mysql-client}/lib/mysql \
- -lmysqlclient -lz -lm
-.endif
+ALL_TARGET= # empty
+MAKE_ENV= CC="${CC}" OPT="${CFLAGS}"
+MAKE_ENV+= AUXLIBS="${AUXLIBS}" CCARGS="${CCARGS}"
-## .if defined(POSTFIX_USE_PGSQL) && ${POSTFIX_USE_PGSQL} == "YES"
-## . include "../../mk/pgsql.buildlink3.mk"
-## . include "../../security/openssl/buildlink3.mk"
-## PATCHFILES+= postfix-pg.postfix-2.0.0.2.patch
-## PATCH_SITES+= http://www.mat.cc/postfix/
-## PATCH_DIST_STRIP= -p1
-##
-## CCARGS+= -DHAS_PGSQL -I${PGSQL_PREFIX}/include/pgsql
-## AUXLIBS+= -L${PGSQL_PREFIX}/lib -lpq \
-## -L${BUILDLINK_PREFIX.openssl}/lib -lcrypt
-## .endif
-
-.if defined(USE_SASL2) && ${USE_SASL2} == "YES"
-USING_SASL= YES
-. include "../../security/cyrus-sasl2/buildlink3.mk"
-CCARGS+= -DUSE_SASL2_AUTH
-AUXLIBS+= -L${BUILDLINK_PREFIX.cyrus-sasl}/lib \
- -Wl,${RPATH_FLAG}${BUILDLINK_PREFIX.cyrus-sasl}/lib \
- -lsasl2
-.elif defined(USE_SASL) && ${USE_SASL} == "YES"
-USING_SASL=YES
-. include "../../security/cyrus-sasl/buildlink3.mk"
-CCARGS+= -DUSE_SASL_AUTH
-AUXLIBS+= -L${BUILDLINK_PREFIX.cyrus-sasl}/lib \
- -Wl,${RPATH_FLAG}${BUILDLINK_PREFIX.cyrus-sasl}/lib \
- -lsasl
-.endif
+USE_PKGINSTALL= yes
+RCD_SCRIPTS= postfix
+OWN_DIRS+= ${POSTFIX_QUEUE_DIR}
+MAKE_DIRS+= ${PKG_SYSCONFDIR}
-.if defined(USING_SASL)
-PLIST_SRC+= ${PKGDIR}/PLIST.sasl
-MESSAGE_SRC+= ${PKGDIR}/MESSAGE.sasl
-MESSAGE_SUBST+= PKG_SYSCONFDIR=${PKG_SYSCONFDIR}
-.endif
+PKG_GROUPS?= postfix maildrop
+PKG_USERS?= postfix:postfix::Postfix\\ User:${POSTFIX_QUEUE_DIR}
-MESSAGE_SRC+= ${PKGDIR}/MESSAGE
-.if exists(${PKGDIR}/MESSAGE.${OPSYS})
-MESSAGE_SRC+= ${PKGDIR}/MESSAGE.${OPSYS}
-.endif
-PLIST_SRC+= ${PKGDIR}/PLIST
-ALL_TARGET= #empty
-MAKE_ENV= CC="${CC}" OPT="${CFLAGS}"
-MAKE_ENV+= AUXLIBS="${AUXLIBS}" CCARGS="${CCARGS}"
-
-POSTFIX_CONF_FILES= conf/main.cf src/util/sys_defs.h postfix-install
-POSTFIX_CONF_FILES+= src/global/mail_params.h
-
-FILES_SUBST+= SHAREDIR=${SHAREDIR}
-MESSAGE_SUBST+= SHAREDIR=${SHAREDIR}
-PLIST_SUBST+= POSTFIX_SPOOL=${POSTFIX_SPOOL}
-
-PKG_GROUPS?= postfix maildrop
-PKG_USERS?= postfix:postfix::Postfix\\ User:${POSTFIX_SPOOL}
-
-LIBEXECDIR= ${PREFIX}/libexec/${PKGBASE}
-SHAREDIR= ${PREFIX}/share/examples/${PKGBASE}
-
-CONF_FILES= ${SHAREDIR}/main.cf ${PKG_SYSCONFDIR}/main.cf
-CONF_FILES+= ${SHAREDIR}/master.cf ${PKG_SYSCONFDIR}/master.cf
-.if defined(USING_SASL)
-. if defined(USE_SASL2)
-MAKE_DIRS+= ${PREFIX}/lib/sasl2
-CONF_FILES+= ${SHAREDIR}/smtpd.conf ${PREFIX}/lib/sasl2/smtpd.conf
-. else
-MAKE_DIRS+= ${PREFIX}/lib/sasl
-CONF_FILES+= ${SHAREDIR}/smtpd.conf ${PREFIX}/lib/sasl/smtpd.conf
-. endif
-.endif
+CONF_FILES= # empty
+.for _file_ in main.cf master.cf postfix-files
+CONF_FILES+= ${EXAMPLEDIR}/${_file_} ${PKG_SYSCONFDIR}/${_file_}
+.endfor
CONF_FILES_PERMS= # empty
-.for confscr in post-install postfix-files postfix-script
-CONF_FILES_PERMS+= ${SHAREDIR}/${confscr} ${PKG_SYSCONFDIR}/${confscr} \
+.for _file_ in post-install postfix-script
+CONF_FILES_PERMS+= ${EXAMPLEDIR}/${_file_} ${PKG_SYSCONFDIR}/${_file_} \
${ROOT_USER} ${ROOT_GROUP} 755
.endfor
-.undef confscr
+.undef _file_
+.if !empty(PKG_OPTIONS:Msasl)
+MAKE_DIRS+= ${SASLLIBDIR}
+CONF_FILES+= ${EXAMPLEDIR}/smtpd.conf ${SASLLIBDIR}/smtpd.conf
+.endif
-INSTALL_EXTRA_TMPL+= ${PKGDIR}/INSTALL
+POSTFIX_CONF_FILES= conf/main.cf src/util/sys_defs.h \
+ src/global/mail_params.h postfix-install
pre-configure:
@for i in ${POSTFIX_CONF_FILES}; do \
${CP} ${WRKSRC}/$${i} ${WRKSRC}/$${i}.dist; \
- ${SED} -e 's|__PREFIX|'${PREFIX}'|g' \
- -e 's|__PKG_SYSCONFDIR|'${PKG_SYSCONFDIR}'|g' \
- < ${WRKSRC}/$${i}.dist \
+ ${SED} ${FILES_SUBST_SED} ${WRKSRC}/$${i}.dist \
> ${WRKSRC}/$${i}; \
done
@@ -188,42 +101,31 @@ do-configure:
'CCARGS=${CCARGS}' 'AUXLIBS=${AUXLIBS}'
post-build:
- ${SED} -e 's#@@PREFIX@@#${PREFIX}#g' \
- <${FILESDIR}/mailer.conf >${WRKDIR}/mailer.conf.postfix
-
-pre-install:
- ${INSTALL_DATA_DIR} ${PKG_SYSCONFDIR}
- ${INSTALL_DATA_DIR} ${SHAREDIR}
- ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/postfix
- ${INSTALL_DATA_DIR} ${LIBEXECDIR}
- ${CHOWN} ${ROOT_USER}:${ROOT_GROUP} ${SHAREDIR} ${LIBEXECDIR}
- ${CHMOD} 755 ${SHAREDIR} ${LIBEXECDIR}
- -${RM} -f ${WRKSRC}/conf/*.orig
-.if defined(USING_SASL)
-. if defined(USE_SASL2)
- ${ECHO} "pwcheck_method: auxprop" > ${WRKDIR}/smtpd.conf
-. else
- ${ECHO} "pwcheck_method: sasldb" > ${WRKDIR}/smtpd.conf
-. endif
- ${INSTALL_DATA} ${WRKDIR}/smtpd.conf ${SHAREDIR}
+ @${SED} ${FILES_SUBST_SED} ${FILESDIR}/mailer.conf \
+ > ${WRKDIR}/mailer.conf
+.if !empty(PKG_OPTIONS:Msasl)
+ ${ECHO} "pwcheck_method: ${PWCHECK_METHOD}" > ${WRKDIR}/smtpd.conf
.endif
- ${INSTALL_SCRIPT} ${WRKSRC}/conf/post-install ${SHAREDIR}
- ${INSTALL_SCRIPT} ${WRKSRC}/conf/postfix-files ${SHAREDIR}
- ${INSTALL_SCRIPT} ${WRKSRC}/conf/postfix-script ${SHAREDIR}
- ${INSTALL_DATA} ${WRKSRC}/conf/main.cf ${SHAREDIR}
- ${INSTALL_DATA} ${WRKSRC}/conf/master.cf ${SHAREDIR}
- ${INSTALL_DATA} ${WRKDIR}/mailer.conf.postfix ${SHAREDIR}/mailer.conf
+
+POSTFIX_EXAMPLE_FILES= LICENSE access aliases canonical header_checks \
+ main.cf main.cf.default makedefs.out master.cf \
+ postfix-files relocated transport virtual
do-install:
- cd ${WRKSRC} && ${SETENV} config_directory="${SHAREDIR}" \
- ${SH} postfix-install -non-interactive
-
-.if ${OPSYS} == "Linux"
-. include "../../databases/db/buildlink3.mk"
-CCARGS+= -I${BUILDLINK_PREFIX.db2}/include/db2
-AUXLIBS+= -L${BUILDLINK_PREFIX.db2}/lib \
- -Wl,${RPATH_FLAG}${BUILDLINK_PREFIX.db2}/lib \
- -ldb2
+ ${INSTALL_DATA_DIR} ${LIBEXECDIR}
+ ${INSTALL_DATA_DIR} ${EXAMPLEDIR}
+ ${INSTALL_DATA_DIR} ${DOCDIR}
+ -${RM} -f ${WRKSRC}/conf/*.orig
+.if !empty(PKG_OPTIONS:Msasl)
+ ${INSTALL_DATA} ${WRKDIR}/smtpd.conf ${EXAMPLEDIR}
.endif
+ @for i in ${POSTFIX_EXAMPLE_FILES}; do \
+ ${INSTALL_DATA} ${WRKSRC}/conf/$$i ${EXAMPLEDIR}/$$i; \
+ done
+ ${INSTALL_SCRIPT} ${WRKSRC}/conf/post-install ${EXAMPLEDIR}
+ ${INSTALL_SCRIPT} ${WRKSRC}/conf/postfix-script ${EXAMPLEDIR}
+ ${INSTALL_DATA} ${WRKDIR}/mailer.conf ${EXAMPLEDIR}/mailer.conf
+ cd ${WRKSRC}; ${SH} ./postfix-install -non-interactive \
+ config_directory="${EXAMPLEDIR}"
.include "../../mk/bsd.pkg.mk"
diff --git a/mail/postfix-current/Makefile.options b/mail/postfix-current/Makefile.options
new file mode 100644
index 00000000000..9aa9dd41971
--- /dev/null
+++ b/mail/postfix-current/Makefile.options
@@ -0,0 +1,175 @@
+# $NetBSD: Makefile.options,v 1.1 2004/07/31 05:53:44 jlam Exp $
+
+# Global and legacy options
+#
+# XXX Support for the following variables will be removed after the
+# XXX pkgsrc-2004Q3 branch is released:
+# XXX
+# XXX POSTFIX_USE_INET6 POSTFIX_USE_TLS
+# XXX POSTFIX_USE_PCRE POSTFIX_USE_MYSQL
+# XXX POSTFIX_USE_PGSQL POSTFIX_OPTIONS
+# XXX POSTFIX_USE_SASL_AUTH
+#
+.if defined(USE_SASL) || defined(USE_SASL2) || defined(USE_OPENLDAP) || \
+ defined(POSTFIX_USE_INET6) || defined(POSTFIX_USE_TLS) || \
+ defined(POSTFIX_USE_PCRE) || defined(POSTFIX_USE_MYSQL) || \
+ defined(POSTFIX_USE_PGSQL) || defined(POSTFIX_USE_SASL_AUTH) || \
+ defined(POSTFIX_OPTIONS)
+. if !defined(PKG_OPTIONS.postfix)
+. if defined(USE_SASL) && !empty(USE_SASL:M[yY][eE][sS])
+PKG_OPTIONS.postfix+= sasl
+. endif
+. if defined(USE_SASL2) && !empty(USE_SASL2:M[yY][eE][sS])
+PKG_OPTIONS.postfix+= sasl
+. endif
+. if defined(USE_OPENLDAP) && !empty(USE_OPENLDAP:M[yY][eE][sS])
+PKG_OPTIONS.postfix+= ldap
+. endif
+. if defined(POSTFIX_USE_INET6) && !empty(POSTFIX_USE_INET6:M[yY][eE][sS])
+PKG_OPTIONS.postfix+= inet6
+. endif
+. if defined(POSTFIX_USE_TLS) && !empty(POSTFIX_USE_TLS:M[yY][eE][sS])
+PKG_OPTIONS.postfix+= tls
+. endif
+. if defined(POSTFIX_USE_PCRE) && !empty(POSTFIX_USE_PCRE:M[yY][eE][sS])
+PKG_OPTIONS.postfix+= pcre
+. endif
+. if defined(POSTFIX_USE_MYSQL) && !empty(POSTFIX_USE_MYSQL:M[yY][eE][sS])
+PKG_OPTIONS.postfix+= mysql
+. endif
+. if defined(POSTFIX_USE_PGSQL) && !empty(POSTFIX_USE_PGSQL:M[yY][eE][sS])
+PKG_OPTIONS.postfix+= pgsql
+. endif
+. if defined(POSTFIX_USE_SASL_AUTH) && defined(POSTFIX_USE_SASL_AUTH)
+PKG_OPTIONS.postfix+= sasl
+. endif
+. if defined(POSTFIX_OPTIONS)
+PKG_OPTIONS.postfix= ${POSTFIX_OPTIONS}
+. endif
+. endif
+.endif
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.postfix
+#PKG_SUPPORTED_OPTIONS= inet6 ldap mysql mysql4 pcre pgsql sasl tls
+PKG_SUPPORTED_OPTIONS= ldap mysql mysql4 pcre pgsql sasl
+.include "../../mk/bsd.options.mk"
+
+# ###
+# ### IPv6 and STARTTLS support (http://www.ipnet6.org/postfix/)
+# ###
+# .if !empty(PKG_OPTIONS:Minet6) || !empty(PKG_OPTIONS:Mtls)
+# . include "../../security/openssl/buildlink3.mk"
+# PATCHFILES+= tls+ipv6-1.25-pf-2.2-20040616.patch.gz
+# PATCH_SITES+= ftp://ftp.stack.nl/pub/postfix/tls+ipv6/1.25/
+# PATCH_DIST_STRIP= -p1
+#
+# CCARGS+= -DHAS_SSL
+# AUXLIBS+= -L${BUILDLINK_PREFIX.openssl}/lib \
+# -Wl,${RPATH_FLAG}${BUILDLINK_PREFIX.openssl}/lib \
+# -lssl -lcrypto
+#
+# PLIST_SRC+= ${PKGDIR}/PLIST.tls
+# MESSAGE_SRC+= ${PKGDIR}/MESSAGE.tls
+# .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 \
+ -Wl,${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/buildlink3.mk"
+CCARGS+= -DHAS_LDAP
+AUXLIBS+= -L${BUILDLINK_PREFIX.openldap}/lib \
+ -Wl,${RPATH_FLAG}${BUILDLINK_PREFIX.openldap}/lib \
+ -lldap -llber
+. if ${OPSYS} != "Linux"
+. include "../../databases/db4/buildlink3.mk"
+CCARGS+= -I${BUILDLINK_PREFIX.db4}/include/db4
+AUXLIBS+= -L${BUILDLINK_PREFIX.db4}/lib \
+ -Wl,${RPATH_FLAG}${BUILDLINK_PREFIX.db4}/lib \
+ -ldb4
+. endif
+.endif
+
+###
+### Support using a MySQL database server for table lookups.
+###
+.if !empty(PKG_OPTIONS:Mmysql4)
+. include "../../databases/mysql4-client/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 "../../databases/mysql-client/buildlink3.mk"
+CCARGS+= -DHAS_MYSQL -I${BUILDLINK_PREFIX.mysql-client}/include/mysql
+AUXLIBS+= -L${BUILDLINK_PREFIX.mysql-client}/lib/mysql \
+ -Wl,${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
+
+###
+### SASL support for SMTP authentication. If neither SASLv1 or SASLv2 is
+### explicitly specified, then build with SASLv2.
+###
+.if !empty(PKG_OPTIONS:Msasl)
+. if !defined(USE_SASL2) && !defined(USE_SASL)
+. include "../../security/cyrus-sasl2/buildlink3.mk"
+SASLLIBDIR= ${PREFIX}/lib/sasl2
+PWCHECK_METHOD= auxprop
+CCARGS+= -DUSE_SASL2_AUTH
+AUXLIBS+= -L${BUILDLINK_PREFIX.cyrus-sasl}/lib \
+ -Wl,${RPATH_FLAG}${BUILDLINK_PREFIX.cyrus-sasl}/lib \
+ -lsasl2
+. elif defined(USE_SASL2) && !empty(USE_SASL2:M[yY][eE][sS])
+. include "../../security/cyrus-sasl2/buildlink3.mk"
+SASLLIBDIR= ${PREFIX}/lib/sasl2
+PWCHECK_METHOD= auxprop
+CCARGS+= -DUSE_SASL2_AUTH
+AUXLIBS+= -L${BUILDLINK_PREFIX.cyrus-sasl}/lib \
+ -Wl,${RPATH_FLAG}${BUILDLINK_PREFIX.cyrus-sasl}/lib \
+ -lsasl2
+. elif defined(USE_SASL) && !empty(USE_SASL:M[yY][eE][sS])
+. include "../../security/cyrus-sasl/buildlink3.mk"
+SASLLIBDIR= ${PREFIX}/lib/sasl
+PWCHECK_METHOD= sasldb
+CCARGS+= -DUSE_SASL_AUTH
+AUXLIBS+= -L${BUILDLINK_PREFIX.cyrus-sasl}/lib \
+ -Wl,${RPATH_FLAG}${BUILDLINK_PREFIX.cyrus-sasl}/lib \
+ -lsasl
+. endif
+PLIST_SRC+= ${PKGDIR}/PLIST.sasl
+MESSAGE_SRC+= ${PKGDIR}/MESSAGE.sasl
+MESSAGE_SUBST+= PKG_SYSCONFDIR=${PKG_SYSCONFDIR}
+MESSAGE_SUBST+= SASLLIBDIR=${SASLLIBDIR}
+.endif
+
+.if ${OPSYS} == "Linux"
+. include "../../databases/db/buildlink3.mk"
+CCARGS+= -I${BUILDLINK_PREFIX.db2}/include/db2
+AUXLIBS+= -L${BUILDLINK_PREFIX.db2}/lib \
+ -Wl,${RPATH_FLAG}${BUILDLINK_PREFIX.db2}/lib \
+ -ldb2
+.endif
diff --git a/mail/postfix-current/PLIST b/mail/postfix-current/PLIST
index 0adf7c1657f..6f3ab237161 100644
--- a/mail/postfix-current/PLIST
+++ b/mail/postfix-current/PLIST
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.3 2004/07/02 08:03:04 martti Exp $
+@comment $NetBSD: PLIST,v 1.4 2004/07/31 05:53:44 jlam Exp $
bin/mailq
bin/newaliases
libexec/postfix/anvil
@@ -130,13 +130,22 @@ share/doc/postfix/VERP_README
share/doc/postfix/VIRTUAL_README
share/doc/postfix/XCLIENT_README
share/doc/postfix/XFORWARD_README
-share/examples/postfix-2.2/mailer.conf
-share/examples/postfix-2.2/main.cf
-share/examples/postfix-2.2/master.cf
-share/examples/postfix-2.2/post-install
-share/examples/postfix-2.2/postfix-files
-share/examples/postfix-2.2/postfix-script
-@dirrm share/examples/postfix-2.2
+share/examples/postfix/LICENSE
+share/examples/postfix/access
+share/examples/postfix/aliases
+share/examples/postfix/canonical
+share/examples/postfix/header_checks
+share/examples/postfix/mailer.conf
+share/examples/postfix/main.cf
+share/examples/postfix/main.cf.default
+share/examples/postfix/makedefs.out
+share/examples/postfix/master.cf
+share/examples/postfix/post-install
+share/examples/postfix/postfix-files
+share/examples/postfix/postfix-script
+share/examples/postfix/relocated
+share/examples/postfix/transport
+share/examples/postfix/virtual
+@dirrm share/examples/postfix
@dirrm share/doc/postfix
-@dirrm libexec/postfix-2.2
@dirrm libexec/postfix
diff --git a/mail/postfix-current/distinfo b/mail/postfix-current/distinfo
index 99b05da1f76..24c2c680489 100644
--- a/mail/postfix-current/distinfo
+++ b/mail/postfix-current/distinfo
@@ -1,12 +1,12 @@
-$NetBSD: distinfo,v 1.7 2004/07/02 08:03:04 martti Exp $
+$NetBSD: distinfo,v 1.8 2004/07/31 05:53:44 jlam Exp $
SHA1 (postfix/postfix-2.2-20040628.tar.gz) = f5fb9278cbcb86fd2d90ceea62e806894561a333
Size (postfix/postfix-2.2-20040628.tar.gz) = 2014579 bytes
-SHA1 (patch-aa) = ca3d2739c35c89056b2f0c19a2cbcb9e018013c6
+SHA1 (patch-aa) = 279b54f19289b56a423214716386c5aab79a57d5
SHA1 (patch-ab) = ac4c75fb7a36491edf03b54915c7a47461748b4d
SHA1 (patch-ac) = b0d26742fe8496b2fd4729a41fecadc275e71cf2
-SHA1 (patch-ae) = 98ff7efe8338d4e6e05e311d070237d726161af2
-SHA1 (patch-af) = c5fc75f8f9499ed533bd30e162ec8784e446d288
+SHA1 (patch-ae) = 3c0884fc2969d8353809895479f0f58897c5f133
+SHA1 (patch-af) = 48f0f516f415b1faa1e9d2775e9446aa540d749d
SHA1 (patch-ag) = 292b3b5d87f4688930fd654edfc5cb83ca8a2652
SHA1 (patch-ah) = 6beedd15ee3a7cfd46cf3ed0b9ee579b9906300b
SHA1 (patch-ai) = e7284d9b3d7b83def7994269867e443fc0394d40
diff --git a/mail/postfix-current/files/mailer.conf b/mail/postfix-current/files/mailer.conf
index a607a042abd..7122137ea38 100644
--- a/mail/postfix-current/files/mailer.conf
+++ b/mail/postfix-current/files/mailer.conf
@@ -1,10 +1,10 @@
-# $NetBSD: mailer.conf,v 1.3 2004/03/06 15:08:32 grant Exp $
+# $NetBSD: mailer.conf,v 1.4 2004/07/31 05:53:44 jlam Exp $
#
# Use "postfix" as replacement for "sendmail".
#
-sendmail @@PREFIX@@/sbin/sendmail
-send-mail @@PREFIX@@/sbin/sendmail
-mailq @@PREFIX@@/sbin/sendmail
-newaliases @@PREFIX@@/sbin/sendmail
-hoststat @@PREFIX@@/sbin/sendmail
-purgestat @@PREFIX@@/sbin/sendmail
+sendmail @PREFIX@/sbin/sendmail
+send-mail @PREFIX@/sbin/sendmail
+mailq @PREFIX@/sbin/sendmail
+newaliases @PREFIX@/sbin/sendmail
+hoststat @PREFIX@/sbin/sendmail
+purgestat @PREFIX@/sbin/sendmail
diff --git a/mail/postfix-current/files/postfix.sh b/mail/postfix-current/files/postfix.sh
index 98a9f887c99..b289b6fbc4c 100644
--- a/mail/postfix-current/files/postfix.sh
+++ b/mail/postfix-current/files/postfix.sh
@@ -1,6 +1,6 @@
#!@RCD_SCRIPTS_SHELL@
#
-# $NetBSD: postfix.sh,v 1.2 2004/03/07 10:14:40 grant Exp $
+# $NetBSD: postfix.sh,v 1.3 2004/07/31 05:53:44 jlam Exp $
#
# PROVIDE: mail
@@ -12,13 +12,14 @@
name="postfix"
rcvar=$name
-required_files="@PKG_SYSCONFDIR@/main.cf"
+postfix_command="@PREFIX@/sbin/${name}"
+: ${required_files=`@PREFIX@/sbin/postconf -h config_directory`/main.cf}
start_precmd="postfix_precmd"
-start_cmd="${name} "'${rc_arg}'
-stop_cmd=$start_cmd
-reload_cmd=$start_cmd
+start_cmd="postfix_op"
+stop_cmd="postfix_op"
+reload_cmd="postfix_op"
extra_commands="reload"
-spooletcdir="/var/spool/${name}/etc"
+: ${spooletcdir=`@PREFIX@/sbin/postconf -h queue_directory`/etc}
required_dirs=$spooletcdir
postfix_precmd()
@@ -37,5 +38,33 @@ postfix_precmd()
done
}
+postfix_op()
+{
+ case ${rc_arg} in
+ start)
+ for _f in $required_dirs; do
+ if [ ! -d "${_f}/." ]; then
+ warn "${_f} is not a directory."
+ if [ -z $rc_force ]; then
+ return 1
+ fi
+ fi
+ done
+ for _f in $required_files; do
+ if [ ! -r "${_f}" ]; then
+ warn "${_f} is not readable."
+ if [ -z $rc_force ]; then
+ return 1
+ fi
+ fi
+ done
+ ${postfix_command} ${rc_arg}
+ ;;
+ *)
+ ${postfix_command} ${rc_arg}
+ ;;
+ esac
+}
+
load_rc_config $name
run_rc_command "$1"
diff --git a/mail/postfix-current/patches/patch-aa b/mail/postfix-current/patches/patch-aa
index c4aff913353..060f2d35d8c 100644
--- a/mail/postfix-current/patches/patch-aa
+++ b/mail/postfix-current/patches/patch-aa
@@ -1,8 +1,8 @@
-$NetBSD: patch-aa,v 1.13 2004/07/02 08:03:04 martti Exp $
+$NetBSD: patch-aa,v 1.14 2004/07/31 05:53:44 jlam Exp $
---- postfix-install.orig 2004-04-14 11:45:23.000000000 -0400
-+++ postfix-install 2004-05-23 22:32:31.000000000 -0400
-@@ -354,33 +354,13 @@
+--- postfix-install.orig Wed Apr 14 11:45:23 2004
++++ postfix-install
+@@ -354,26 +354,6 @@ HTML files. Specify \"no\" if you do not
: ${tempdir=`pwd`}
: ${config_directory=`bin/postconf -h -d config_directory`}
@@ -29,15 +29,7 @@ $NetBSD: patch-aa,v 1.13 2004/07/02 08:03:04 martti Exp $
# In case some systems special-case pathnames beginning with //.
case $install_root in
- /) install_root=
- esac
-
--CONFIG_DIRECTORY=$install_root$config_directory
-+CONFIG_DIRECTORY=conf
-
- # If a parameter is not set via the command line or environment,
- # try to use settings from installed configuration files.
-@@ -715,10 +695,3 @@
+@@ -715,10 +695,3 @@ bin/postconf -c $CONFIG_DIRECTORY -e \
"sample_directory = $sample_directory" \
"readme_directory = $readme_directory" \
|| exit 1
diff --git a/mail/postfix-current/patches/patch-ae b/mail/postfix-current/patches/patch-ae
index 6298f3b891b..62818d309bd 100644
--- a/mail/postfix-current/patches/patch-ae
+++ b/mail/postfix-current/patches/patch-ae
@@ -1,4 +1,4 @@
-$NetBSD: patch-ae,v 1.4 2004/07/02 08:03:04 martti Exp $
+$NetBSD: patch-ae,v 1.5 2004/07/31 05:53:44 jlam Exp $
--- src/global/mail_params.h.orig 2004-04-21 14:56:04.000000000 -0400
+++ src/global/mail_params.h 2004-05-23 22:44:13.000000000 -0400
@@ -16,14 +16,14 @@ $NetBSD: patch-ae,v 1.4 2004/07/02 08:03:04 martti Exp $
#define VAR_DAEMON_DIR "daemon_directory"
#ifndef DEF_DAEMON_DIR
-#define DEF_DAEMON_DIR "/usr/libexec/postfix"
-+#define DEF_DAEMON_DIR "__PREFIX/libexec/postfix"
++#define DEF_DAEMON_DIR "@PREFIX@/libexec/postfix"
#endif
extern char *var_daemon_dir;
#define VAR_COMMAND_DIR "command_directory"
#ifndef DEF_COMMAND_DIR
-#define DEF_COMMAND_DIR "/usr/sbin"
-+#define DEF_COMMAND_DIR "__PREFIX/sbin"
++#define DEF_COMMAND_DIR "@PREFIX@/sbin"
#endif
extern char *var_command_dir;
diff --git a/mail/postfix-current/patches/patch-af b/mail/postfix-current/patches/patch-af
index ee35fcfcb3d..06bbcd5ed40 100644
--- a/mail/postfix-current/patches/patch-af
+++ b/mail/postfix-current/patches/patch-af
@@ -1,4 +1,4 @@
-$NetBSD: patch-af,v 1.10 2004/07/02 08:03:04 martti Exp $
+$NetBSD: patch-af,v 1.11 2004/07/31 05:53:44 jlam Exp $
--- conf/main.cf.orig 2004-04-15 09:27:21.000000000 -0400
+++ conf/main.cf 2004-05-23 22:51:16.000000000 -0400
@@ -7,19 +7,19 @@ $NetBSD: patch-af,v 1.10 2004/07/02 08:03:04 martti Exp $
# postXXX commands.
#
-command_directory = /usr/sbin
-+command_directory = __PREFIX/sbin
++command_directory = @PREFIX@/sbin
# The daemon_directory parameter specifies the location of all Postfix
# daemon programs (i.e. programs listed in the master.cf file). This
# directory must be owned by root.
#
-daemon_directory = /usr/libexec/postfix
-+daemon_directory = __PREFIX/libexec/postfix
++daemon_directory = @PREFIX@/libexec/postfix
+
+# Shared files and etc directory
-+etc_directory = __PKG_SYSCONFDIR
-+share_directory = __PREFIX/share/examples/postfix
-+man_directory = __PREFIX/man
++etc_directory = @PKG_SYSCONFDIR@
++share_directory = @PREFIX@/share/examples/postfix
++man_directory = @PREFIX@/man
# QUEUE AND PROCESS OWNERSHIP
#
@@ -46,15 +46,15 @@ $NetBSD: patch-af,v 1.10 2004/07/02 08:03:04 martti Exp $
# manpage_directory: The location of the Postfix on-line manual pages.
#
-manpage_directory =
-+manpage_directory = __PREFIX/man
++manpage_directory = @PREFIX@/man
# sample_directory: The location of the Postfix sample configuration files.
# This parameter is obsolete as of Postfix 2.1.
#
-sample_directory =
-+sample_directory = __PREFIX/share/examples/postfix
++sample_directory = @PREFIX@/share/examples/postfix
# readme_directory: The location of the Postfix README files.
#
-readme_directory =
-+readme_directory = __PREFIX/share/doc/postfix
++readme_directory = @PREFIX@/share/doc/postfix