summaryrefslogtreecommitdiff
path: root/mail
diff options
context:
space:
mode:
authorgrant <grant@pkgsrc.org>2004-03-06 15:08:32 +0000
committergrant <grant@pkgsrc.org>2004-03-06 15:08:32 +0000
commit0d6d56fc8b935c9d539ba788854871e36bbd785d (patch)
tree46cb8bfe64de5e9d83549fda4c5bb5ac19e8dc4b /mail
parentedd8772c5593051fa70f9f98e372211ed4167d41 (diff)
downloadpkgsrc-0d6d56fc8b935c9d539ba788854871e36bbd785d.tar.gz
resolve conflicts
Diffstat (limited to 'mail')
-rw-r--r--mail/postfix-current/Makefile220
-rw-r--r--mail/postfix-current/files/mailer.conf10
-rw-r--r--mail/postfix-current/patches/patch-aa53
-rw-r--r--mail/postfix-current/patches/patch-ab23
-rw-r--r--mail/postfix-current/patches/patch-ac23
-rw-r--r--mail/postfix-current/patches/patch-ad13
-rw-r--r--mail/postfix-current/patches/patch-ae40
-rw-r--r--mail/postfix-current/patches/patch-af55
-rw-r--r--mail/postfix-current/patches/patch-ah23
-rw-r--r--mail/postfix-current/patches/patch-ai27
-rw-r--r--mail/postfix-current/patches/patch-bd12
-rw-r--r--mail/postfix-current/patches/patch-be30
12 files changed, 529 insertions, 0 deletions
diff --git a/mail/postfix-current/Makefile b/mail/postfix-current/Makefile
new file mode 100644
index 00000000000..93fa9bf5d3c
--- /dev/null
+++ b/mail/postfix-current/Makefile
@@ -0,0 +1,220 @@
+# $NetBSD: Makefile,v 1.25 2004/03/06 15:08:32 grant Exp $
+
+DISTNAME= postfix-2.0.18-20040209
+PKGNAME= postfix-20040209
+CATEGORIES= mail
+MASTER_SITES= http://public.planetmirror.com.au/pub/postfix/experimental/
+
+MAINTAINER= tech-pkg@NetBSD.org
+HOMEPAGE= http://www.postfix.org/
+COMMENT= Postfix SMTP server and tools
+
+DIST_SUBDIR= postfix
+
+PKG_INSTALLATION_TYPES= overwrite pkgviews
+
+USE_BUILDLINK3= yes
+USE_PKGINSTALL= yes
+
+PKG_SYSCONFSUBDIR= postfix
+POSTFIX_SPOOL= /var/spool/postfix
+
+OWN_DIRS= ${POSTFIX_SPOOL}
+
+CCARGS+= -DDEF_CONFIG_DIR=\"${PKG_SYSCONFDIR}\"
+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
+
+FIX_RPATH+= AUXLIBS
+
+BUILD_DEFS+= POSTFIX_USE_INET6
+#BUILD_DEFS+= POSTFIX_USE_TLS
+BUILD_DEFS+= POSTFIX_USE_PCRE
+BUILD_DEFS+= POSTFIX_USE_LDAP
+BUILD_DEFS+= POSTFIX_USE_MYSQL
+BUILD_DEFS+= POSTFIX_USE_PGSQL
+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.21-pf-2.0.18.patch.gz
+#PATCH_SITES+= ftp://ftp.stack.nl/pub/postfix/tls+ipv6/1.21/
+#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
+
+.if defined(POSTFIX_USE_LDAP) && ${POSTFIX_USE_LDAP} == "YES"
+. include "../../databases/openldap/buildlink3.mk"
+CCARGS+= -DHAS_LDAP
+AUXLIBS+= -L${BUILDLINK_PREFIX.openldap}/lib \
+ -Wl,${RPATH_FLAG}${BUILDLINK_PREFIX.openldap}/lib \
+ -lldap -llber
+.endif
+
+.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
+
+.if defined(POSTFIX_USE_PGSQL) && ${POSTFIX_USE_PGSQL} == "YES"
+. include "../../databases/postgresql-lib/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${BUILDLINK_PREFIX.postgresql-lib}/include/pgsql
+AUXLIBS+= -L${BUILDLINK_PREFIX.postgresql-lib}/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
+
+.if defined(USING_SASL)
+PLIST_SRC+= ${PKGDIR}/PLIST.sasl
+MESSAGE_SRC+= ${PKGDIR}/MESSAGE.sasl
+MESSAGE_SUBST+= PKG_SYSCONFDIR=${PKG_SYSCONFDIR}
+.endif
+
+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+= conf/sample-misc.cf 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_PERMS= # empty
+.for confscr in post-install postfix-files postfix-script
+CONF_FILES_PERMS+= ${SHAREDIR}/${confscr} ${PKG_SYSCONFDIR}/${confscr} \
+ ${ROOT_USER} ${ROOT_GROUP} 755
+.endfor
+.undef confscr
+
+INSTALL_EXTRA_TMPL+= ${PKGDIR}/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 \
+ > ${WRKSRC}/$${i}; \
+ done
+
+do-configure:
+ cd ${WRKSRC} && \
+ ${SETENV} ${MAKE_ENV} ${MAKE} -f Makefile.init makefiles \
+ '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}
+.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
+
+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.db}/include/db2
+AUXLIBS+= -L${BUILDLINK_PREFIX.db}/lib \
+ -Wl,${RPATH_FLAG}${BUILDLINK_PREFIX.db}/lib \
+ -ldb2
+.endif
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/mail/postfix-current/files/mailer.conf b/mail/postfix-current/files/mailer.conf
new file mode 100644
index 00000000000..a607a042abd
--- /dev/null
+++ b/mail/postfix-current/files/mailer.conf
@@ -0,0 +1,10 @@
+# $NetBSD: mailer.conf,v 1.3 2004/03/06 15:08:32 grant 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
diff --git a/mail/postfix-current/patches/patch-aa b/mail/postfix-current/patches/patch-aa
new file mode 100644
index 00000000000..c51107d02ef
--- /dev/null
+++ b/mail/postfix-current/patches/patch-aa
@@ -0,0 +1,53 @@
+$NetBSD: patch-aa,v 1.11 2004/03/06 15:08:32 grant Exp $
+
+--- postfix-install.orig 2003-03-21 20:04:53.000000000 +0100
++++ postfix-install
+@@ -338,33 +338,13 @@ README files. Specify \"no\" if you do n
+ : ${tempdir=`pwd`}
+ : ${config_directory=`bin/postconf -h -d config_directory`}
+
+-# Find out the location of installed configuration files.
+-
+-test -z "$non_interactive" && for name in install_root tempdir config_directory
+-do
+- while :
+- do
+- echo
+- eval echo Please specify \$${name}_prompt | ${FMT}
+- eval echo \$n "$name: [\$$name]\ \$c"
+- read ans
+- case $ans in
+- "") break;;
+- *) case $ans in
+- /*) eval $name=$ans; break;;
+- *) echo; echo $0: Error: $name should be an absolute path name. 1>&2;;
+- esac;;
+- esac
+- done
+-done
+-
+ # 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.
+@@ -652,13 +632,3 @@ bin/postconf -c $CONFIG_DIRECTORY -e \
+ "sample_directory = $sample_directory" \
+ "readme_directory = $readme_directory" \
+ || exit 1
+-
+-# If Postfix is being installed locally from source code, do the
+-# post-install processing now.
+-
+-test -n "$install_root" || {
+- export daemon_directory command_directory queue_directory sendmail_path \
+- newaliases_path mailq_path mail_owner setgid_group manpage_directory \
+- sample_directory readme_directory
+- ${SHELL} conf/post-install $post_install_options || exit 1
+-}
diff --git a/mail/postfix-current/patches/patch-ab b/mail/postfix-current/patches/patch-ab
new file mode 100644
index 00000000000..34c044ab034
--- /dev/null
+++ b/mail/postfix-current/patches/patch-ab
@@ -0,0 +1,23 @@
+$NetBSD: patch-ab,v 1.5 2004/03/06 15:08:32 grant Exp $
+
+--- src/lmtp/lmtp.h.orig 2003-09-10 02:48:03.000000000 +0200
++++ src/lmtp/lmtp.h 2004-01-20 20:30:12.000000000 +0100
+@@ -11,10 +11,18 @@
+ /*
+ * SASL library.
+ */
++#ifdef USE_SASL2_AUTH
++#ifndef USE_SASL_AUTH
++#define USE_SASL_AUTH
++#endif
++#include <sasl/sasl.h>
++#include <sasl/saslutil.h>
++#else
+ #ifdef USE_SASL_AUTH
+ #include <sasl.h>
+ #include <saslutil.h>
+ #endif
++#endif
+
+ /*
+ * Utility library.
diff --git a/mail/postfix-current/patches/patch-ac b/mail/postfix-current/patches/patch-ac
new file mode 100644
index 00000000000..7536289c357
--- /dev/null
+++ b/mail/postfix-current/patches/patch-ac
@@ -0,0 +1,23 @@
+$NetBSD: patch-ac,v 1.3 2004/03/06 15:08:32 grant Exp $
+
+--- src/smtp/smtp.h.orig 2002-05-23 21:18:02.000000000 +0200
++++ src/smtp/smtp.h 2004-01-20 20:29:21.000000000 +0100
+@@ -11,10 +11,18 @@
+ /*
+ * SASL library.
+ */
++#ifdef USE_SASL2_AUTH
++#ifndef USE_SASL_AUTH
++#define USE_SASL_AUTH
++#endif
++#include <sasl/sasl.h>
++#include <sasl/saslutil.h>
++#else
+ #ifdef USE_SASL_AUTH
+ #include <sasl.h>
+ #include <saslutil.h>
+ #endif
++#endif
+
+ /*
+ * Utility library.
diff --git a/mail/postfix-current/patches/patch-ad b/mail/postfix-current/patches/patch-ad
new file mode 100644
index 00000000000..e2bb4c64cf8
--- /dev/null
+++ b/mail/postfix-current/patches/patch-ad
@@ -0,0 +1,13 @@
+$NetBSD: patch-ad,v 1.3 2004/03/06 15:08:32 grant Exp $
+
+--- conf/sample-misc.cf.orig 2003-08-12 19:20:19.000000000 +0300
++++ conf/sample-misc.cf 2004-01-21 08:40:15.000000000 +0200
+@@ -360,7 +360,7 @@
+ # The daemon_directory parameter specifies the location of Postfix
+ # support programs and daemons. This directory must be owned by root.
+ #
+-daemon_directory = /usr/libexec/postfix
++daemon_directory = __PREFIX/libexec/postfix
+
+ # The queue_directory specifies the location of the Postfix queue.
+ # This is also the root directory of Postfix daemons that run chrooted.
diff --git a/mail/postfix-current/patches/patch-ae b/mail/postfix-current/patches/patch-ae
new file mode 100644
index 00000000000..5a9480f2e7c
--- /dev/null
+++ b/mail/postfix-current/patches/patch-ae
@@ -0,0 +1,40 @@
+$NetBSD: patch-ae,v 1.3 2004/03/06 15:08:32 grant Exp $
+
+--- src/global/mail_params.h.orig 2004-01-18 02:04:00.000000000 +1100
++++ src/global/mail_params.h
+@@ -64,7 +64,7 @@ extern uid_t var_owner_uid;
+ extern gid_t var_owner_gid;
+
+ #define VAR_SGID_GROUP "setgid_group"
+-#define DEF_SGID_GROUP "postdrop"
++#define DEF_SGID_GROUP "maildrop"
+ extern char *var_sgid_group;
+ extern gid_t var_sgid_gid;
+
+@@ -202,13 +202,13 @@ extern char *var_queue_dir;
+ */
+ #define VAR_DAEMON_DIR "daemon_directory"
+ #ifndef DEF_DAEMON_DIR
+-#define DEF_DAEMON_DIR "/usr/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"
+ #endif
+ extern char *var_command_dir;
+
+@@ -334,6 +334,10 @@ extern char *var_send_canon_maps;
+ #define DEF_RCPT_CANON_MAPS ""
+ extern char *var_rcpt_canon_maps;
+
++#define VAR_CANON_ENV_RCPT "canonicalize_envelope_recipient"
++#define DEF_CANON_ENV_RCPT 1
++extern bool var_canon_env_rcpt;
++
+ #define VAR_SEND_BCC_MAPS "sender_bcc_maps"
+ #define DEF_SEND_BCC_MAPS ""
+ extern char *var_send_bcc_maps;
diff --git a/mail/postfix-current/patches/patch-af b/mail/postfix-current/patches/patch-af
new file mode 100644
index 00000000000..27212df3bd4
--- /dev/null
+++ b/mail/postfix-current/patches/patch-af
@@ -0,0 +1,55 @@
+$NetBSD: patch-af,v 1.8 2004/03/06 15:08:32 grant Exp $
+
+--- conf/main.cf.orig 2003-09-06 03:30:35.000000000 +0300
++++ conf/main.cf 2004-01-21 08:40:42.000000000 +0200
+@@ -31,13 +31,18 @@
+ # The command_directory parameter specifies the location of all
+ # postXXX commands.
+ #
+-command_directory = /usr/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
++
++# Shared files and etc directory
++etc_directory = __PKG_SYSCONFDIR
++share_directory = __PREFIX/share/examples/postfix
++man_directory = __PREFIX/man
+
+ # QUEUE AND PROCESS OWNERSHIP
+ #
+@@ -55,7 +60,7 @@
+ # These rights are used in the absence of a recipient user context.
+ # DO NOT SPECIFY A PRIVILEGED USER OR THE POSTFIX OWNER.
+ #
+-#default_privs = nobody
++default_privs = nobody
+
+ # INTERNET HOST AND DOMAIN NAMES
+ #
+@@ -621,16 +626,16 @@
+ # commands. This must be a group name with a numerical group ID that
+ # is not shared with other accounts, not even with the Postfix account.
+ #
+-setgid_group =
++setgid_group = maildrop
+
+ # manpage_directory: The location of the Postfix on-line manual pages.
+ #
+-manpage_directory =
++manpage_directory = __PREFIX/man
+
+ # sample_directory: The location of the Postfix sample configuration files.
+ #
+-sample_directory =
++sample_directory = __PREFIX/share/examples/postfix
+
+ # readme_directory: The location of the Postfix README files.
+ #
+-readme_directory =
++readme_directory = __PREFIX/share/doc/postfix
diff --git a/mail/postfix-current/patches/patch-ah b/mail/postfix-current/patches/patch-ah
new file mode 100644
index 00000000000..a936e20ba7c
--- /dev/null
+++ b/mail/postfix-current/patches/patch-ah
@@ -0,0 +1,23 @@
+$NetBSD: patch-ah,v 1.3 2004/03/06 15:08:32 grant Exp $
+
+--- src/smtpd/smtpd.h.orig 2003-10-02 06:48:30.000000000 -0400
++++ src/smtpd/smtpd.h 2003-10-02 06:48:31.000000000 -0400
+@@ -16,10 +16,18 @@
+ /*
+ * SASL library.
+ */
++#ifdef USE_SASL2_AUTH
++#ifndef USE_SASL_AUTH
++#define USE_SASL_AUTH
++#endif
++#include <sasl/sasl.h>
++#include <sasl/saslutil.h>
++#else
+ #ifdef USE_SASL_AUTH
+ #include <sasl.h>
+ #include <saslutil.h>
+ #endif
++#endif
+
+ /*
+ * Utility library.
diff --git a/mail/postfix-current/patches/patch-ai b/mail/postfix-current/patches/patch-ai
new file mode 100644
index 00000000000..6ed6681fbfc
--- /dev/null
+++ b/mail/postfix-current/patches/patch-ai
@@ -0,0 +1,27 @@
+$NetBSD: patch-ai,v 1.3 2004/03/06 15:08:32 grant Exp $
+
+--- makedefs.orig 2003-11-05 21:50:15.000000000 +0200
++++ makedefs 2004-01-23 13:56:57.000000000 +0200
+@@ -175,22 +175,6 @@
+ SYSLIBS="-ldb"
+ ;;
+ Linux.2*) SYSTYPE=LINUX2
+- # Postfix no longer needs DB 1.85 compatibility
+- if [ -f /usr/include/db.h ]
+- then
+- : we are all set
+- elif [ -f /usr/include/db/db.h ]
+- then
+- CCARGS="$CCARGS -I/usr/include/db"
+- else
+- # No, we're not going to try db1 db2 db3 etc.
+- # On a properly installed system, Postfix builds
+- # by including <db.h> and by linking with -ldb
+- echo "No <db.h> include file found." 1>&2
+- echo "Install the appropriate db*-devel package first." 1>&2
+- echo "See the RELEASE_NOTES file for more information." 1>&2
+- exit 1
+- fi
+ # GDBM locks the DBM .pag file after open. This breaks postmap.
+ # if [ -f /usr/include/gdbm-ndbm.h ]
+ # then
diff --git a/mail/postfix-current/patches/patch-bd b/mail/postfix-current/patches/patch-bd
new file mode 100644
index 00000000000..deaf11fa350
--- /dev/null
+++ b/mail/postfix-current/patches/patch-bd
@@ -0,0 +1,12 @@
+$NetBSD: patch-bd,v 1.3 2004/03/06 15:08:32 grant Exp $
+
+--- src/cleanup/cleanup_init.c.orig 2004-01-06 11:27:08.000000000 +1100
++++ src/cleanup/cleanup_init.c
+@@ -112,6 +112,7 @@ char *var_prop_extension; /* propagat
+ char *var_always_bcc; /* big brother */
+ char *var_rcpt_witheld; /* recipients not disclosed */
+ char *var_masq_classes; /* what to masquerade */
++bool var_canon_env_rcpt; /* canonicalize envelope recipient */
+ int var_qattr_count_limit; /* named attribute limit */
+ int var_virt_recur_limit; /* maximum virtual alias recursion */
+ int var_virt_expan_limit; /* maximum virtual alias expansion */
diff --git a/mail/postfix-current/patches/patch-be b/mail/postfix-current/patches/patch-be
new file mode 100644
index 00000000000..4dc1c4cc711
--- /dev/null
+++ b/mail/postfix-current/patches/patch-be
@@ -0,0 +1,30 @@
+$NetBSD: patch-be,v 1.3 2004/03/06 15:08:32 grant Exp $
+
+--- src/cleanup/cleanup_message.c.orig 2004-01-21 12:25:27.000000000 +1100
++++ src/cleanup/cleanup_message.c
+@@ -177,15 +177,17 @@ static void cleanup_rewrite_sender(CLEAN
+ for (tpp = addr_list; *tpp; tpp++) {
+ cleanup_rewrite_tree(*tpp);
+ if (state->flags & CLEANUP_FLAG_MAP_OK) {
+- if (cleanup_send_canon_maps)
+- cleanup_map11_tree(state, *tpp, cleanup_send_canon_maps,
+- cleanup_ext_prop_mask & EXT_PROP_CANONICAL);
+- if (cleanup_comm_canon_maps)
+- cleanup_map11_tree(state, *tpp, cleanup_comm_canon_maps,
+- cleanup_ext_prop_mask & EXT_PROP_CANONICAL);
+- if (cleanup_masq_domains
+- && (cleanup_masq_flags & CLEANUP_MASQ_FLAG_HDR_FROM))
++ if (var_canon_env_rcpt) {
++ if (cleanup_send_canon_maps)
++ cleanup_map11_tree(state, *tpp, cleanup_send_canon_maps,
++ cleanup_ext_prop_mask & EXT_PROP_CANONICAL);
++ if (cleanup_comm_canon_maps)
++ cleanup_map11_tree(state, *tpp, cleanup_comm_canon_maps,
++ cleanup_ext_prop_mask & EXT_PROP_CANONICAL);
++ if (cleanup_masq_domains
++ && (cleanup_masq_flags & CLEANUP_MASQ_FLAG_HDR_FROM))
+ cleanup_masquerade_tree(*tpp, cleanup_masq_domains);
++ }
+ }
+ if (hdr_opts->type == HDR_FROM && state->from == 0)
+ state->from = cleanup_extract_internal(header_buf, *tpp);