summaryrefslogtreecommitdiff
path: root/mail
diff options
context:
space:
mode:
authorjlam <jlam>2003-11-21 15:33:41 +0000
committerjlam <jlam>2003-11-21 15:33:41 +0000
commitbe9be9b02e6250a2314e7329b41874478fccd919 (patch)
tree9dbbfe555113ac8b134f9e6befb5a50eacbbdce1 /mail
parent49ba7a98fdd1d423de4b322d3d52f8c204b177c7 (diff)
downloadpkgsrc-be9be9b02e6250a2314e7329b41874478fccd919.tar.gz
* With SASL2, the correct pwcheck_method to use the /etc/sasldb2 is
"auxprop". * Modify the package so that the smtpd.conf file is initially stored with the other example files and copied over to its true location via CONF_FILES. This allows modifying the postfix installation to use some other SASL authenticaion method, e.g. PLAIN with saslauthd through TLS. * Only allow using one SASL library or the other, and prefer SASL2 to SASL1.
Diffstat (limited to 'mail')
-rw-r--r--mail/postfix/Makefile37
-rw-r--r--mail/postfix/PLIST.sasl2
2 files changed, 22 insertions, 17 deletions
diff --git a/mail/postfix/Makefile b/mail/postfix/Makefile
index bb79c76f647..3b242e489d4 100644
--- a/mail/postfix/Makefile
+++ b/mail/postfix/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.106 2003/11/10 16:27:37 kleink Exp $
+# $NetBSD: Makefile,v 1.107 2003/11/21 15:33:41 jlam Exp $
DISTNAME= postfix-2.0.16
CATEGORIES= mail
@@ -76,16 +76,6 @@ AUXLIBS+= -L${BUILDLINK_PREFIX.mysql-client}/lib/mysql \
BUILD_DEFS+= POSTFIX_USE_MYSQL
.endif
-.if defined(USE_SASL) && ${USE_SASL} == "YES"
-USING_SASL=YES
-.include "../../security/cyrus-sasl/buildlink2.mk"
-CCARGS+= -DUSE_SASL_AUTH
-AUXLIBS+= -L${BUILDLINK_PREFIX.cyrus-sasl}/lib \
- -Wl,${RPATH_FLAG}${BUILDLINK_PREFIX.cyrus-sasl}/lib \
- -lsasl
-BUILD_DEFS+= USE_SASL
-.endif
-
.if defined(USE_SASL2) && ${USE_SASL2} == "YES"
USING_SASL=YES
.include "../../security/cyrus-sasl2/buildlink2.mk"
@@ -94,10 +84,18 @@ AUXLIBS+= -L${BUILDLINK_PREFIX.cyrus-sasl}/lib \
-Wl,${RPATH_FLAG}${BUILDLINK_PREFIX.cyrus-sasl}/lib \
-lsasl2
BUILD_DEFS+= USE_SASL2
+.elif defined(USE_SASL) && ${USE_SASL} == "YES"
+USING_SASL=YES
+.include "../../security/cyrus-sasl/buildlink2.mk"
+CCARGS+= -DUSE_SASL_AUTH
+AUXLIBS+= -L${BUILDLINK_PREFIX.cyrus-sasl}/lib \
+ -Wl,${RPATH_FLAG}${BUILDLINK_PREFIX.cyrus-sasl}/lib \
+ -lsasl
+BUILD_DEFS+= USE_SASL
.endif
.if defined(USING_SASL)
-PLIST_SRC+= ${WRKDIR}/PLIST.sasl
+PLIST_SRC+= ${PKGDIR}/PLIST.sasl
MESSAGE_SRC+= ${PKGDIR}/MESSAGE.sasl
MESSAGE_SUBST+= PKG_SYSCONFDIR=${PKG_SYSCONFDIR}
.endif
@@ -124,6 +122,13 @@ 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)
+CONF_FILES+= ${SHAREDIR}/smtpd.conf ${PREFIX}/lib/sasl2/smtpd.conf
+.else
+CONF_FILES+= ${SHAREDIR}/smtpd.conf ${PREFIX}/lib/sasl/smtpd.conf
+.endif
+.endif
CONF_FILES_PERMS=
.for confscr in post-install postfix-files postfix-script
CONF_FILES_PERMS+= ${SHAREDIR}/${confscr} ${PKG_SYSCONFDIR}/${confscr} \
@@ -160,15 +165,13 @@ pre-install:
${CHMOD} 755 ${SHAREDIR} ${LIBEXECDIR}
-${RM} -f ${WRKSRC}/conf/*.orig
.if defined(USING_SASL)
- ${ECHO} "pwcheck_method: sasldb" > ${WRKDIR}/smtpd.conf
.if defined(USE_SASL2)
- ${INSTALL_DATA} ${WRKDIR}/smtpd.conf ${PREFIX}/lib/sasl2
- ${ECHO} lib/sasl2/smtpd.conf > ${WRKDIR}/PLIST.sasl
+ ${ECHO} "pwcheck_method: auxprop" > ${WRKDIR}/smtpd.conf
.else
- ${INSTALL_DATA} ${WRKDIR}/smtpd.conf ${PREFIX}/lib/sasl
- ${ECHO} lib/sasl/smtpd.conf > ${WRKDIR}/PLIST.sasl
+ ${ECHO} "pwcheck_method: sasldb" > ${WRKDIR}/smtpd.conf
.endif
.endif
+ ${INSTALL_DATA} ${WRKDIR}/smtpd.conf ${SHAREDIR}
${INSTALL_SCRIPT} ${WRKSRC}/conf/post-install ${SHAREDIR}
${INSTALL_SCRIPT} ${WRKSRC}/conf/postfix-files ${SHAREDIR}
${INSTALL_SCRIPT} ${WRKSRC}/conf/postfix-script ${SHAREDIR}
diff --git a/mail/postfix/PLIST.sasl b/mail/postfix/PLIST.sasl
new file mode 100644
index 00000000000..30baecfa40c
--- /dev/null
+++ b/mail/postfix/PLIST.sasl
@@ -0,0 +1,2 @@
+@comment $NetBSD: PLIST.sasl,v 1.1 2003/11/21 15:33:41 jlam Exp $
+share/examples/postfix/smtpd.conf