pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mail/postfix * With SASL2, the correct pwcheck_method ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/350a11964d44
branches:  trunk
changeset: 463636:350a11964d44
user:      jlam <jlam%pkgsrc.org@localhost>
date:      Fri Nov 21 15:33:41 2003 +0000

description:
* 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:

 mail/postfix/Makefile   |  41 ++++++++++++++++++++++-------------------
 mail/postfix/PLIST.sasl |   2 ++
 2 files changed, 24 insertions(+), 19 deletions(-)

diffs (86 lines):

diff -r 1209fef2faf0 -r 350a11964d44 mail/postfix/Makefile
--- a/mail/postfix/Makefile     Fri Nov 21 15:03:31 2003 +0000
+++ b/mail/postfix/Makefile     Fri Nov 21 15:33:41 2003 +0000
@@ -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,7 +76,15 @@
 BUILD_DEFS+=   POSTFIX_USE_MYSQL
 .endif
 
-.if defined(USE_SASL) && ${USE_SASL} == "YES"
+.if defined(USE_SASL2) && ${USE_SASL2} == "YES"
+USING_SASL=YES
+.include "../../security/cyrus-sasl2/buildlink2.mk"
+CCARGS+=       -DUSE_SASL2_AUTH
+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
@@ -86,18 +94,8 @@
 BUILD_DEFS+=   USE_SASL
 .endif
 
-.if defined(USE_SASL2) && ${USE_SASL2} == "YES"
-USING_SASL=YES
-.include "../../security/cyrus-sasl2/buildlink2.mk"
-CCARGS+=       -DUSE_SASL2_AUTH
-AUXLIBS+=      -L${BUILDLINK_PREFIX.cyrus-sasl}/lib            \
-               -Wl,${RPATH_FLAG}${BUILDLINK_PREFIX.cyrus-sasl}/lib     \
-               -lsasl2
-BUILD_DEFS+=   USE_SASL2
-.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 @@
 
 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 @@
        ${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
-.if defined(USE_SASL2)
-       ${INSTALL_DATA} ${WRKDIR}/smtpd.conf ${PREFIX}/lib/sasl2
-       ${ECHO} lib/sasl2/smtpd.conf > ${WRKDIR}/PLIST.sasl
-.else
-       ${INSTALL_DATA} ${WRKDIR}/smtpd.conf ${PREFIX}/lib/sasl
-       ${ECHO} lib/sasl/smtpd.conf > ${WRKDIR}/PLIST.sasl
 .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 -r 1209fef2faf0 -r 350a11964d44 mail/postfix/PLIST.sasl
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/mail/postfix/PLIST.sasl   Fri Nov 21 15:33:41 2003 +0000
@@ -0,0 +1,2 @@
+@comment $NetBSD: PLIST.sasl,v 1.1 2003/11/21 15:33:41 jlam Exp $
+share/examples/postfix/smtpd.conf



Home | Main Index | Thread Index | Old Index