pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/mail/qmail-run Remove dependency on mess822, the "sasl...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/759f76027eae
branches:  trunk
changeset: 386621:759f76027eae
user:      schmonz <schmonz%pkgsrc.org@localhost>
date:      Wed Oct 24 15:46:54 2018 +0000

description:
Remove dependency on mess822, the "sasl" and "tls" options, and their
respective dependencies on spamdyke and stunnel. Depend instead on
qmail-acceptutils, which provides SMTP AUTH (and new filtering
functionality) and brings its own unconditional mess822 and stunnel
dependencies. Update rc.d scripts to match.

Use CONF_FILES instead of a bunch of open-coded INSTALL cleverness.
Clean up even better with a little DEINSTALL cleverness to remove CDB
files if their source CONF_FILES are gone.

Install sensible fixsmtpio rules and viruscan signatures.

Tighten MESSAGE. The basics have gotten pretty easy. Bump version.

diffstat:

 mail/qmail-run/DEINSTALL                   |  14 +++++++++
 mail/qmail-run/DESCR                       |   7 ++--
 mail/qmail-run/INSTALL                     |  31 ---------------------
 mail/qmail-run/MESSAGE                     |  31 ++++++++------------
 mail/qmail-run/Makefile                    |  44 ++++++++++++++++++++---------
 mail/qmail-run/PLIST                       |  12 ++++++-
 mail/qmail-run/files/concurrencyincoming   |   1 +
 mail/qmail-run/files/concurrencypop3       |   1 +
 mail/qmail-run/files/concurrencysubmission |   1 +
 mail/qmail-run/files/defaultdelivery       |   1 +
 mail/qmail-run/files/fixsmtpio             |  39 ++++++++++++++++++++++++++
 mail/qmail-run/files/qmailofmipd.sh        |  12 ++++---
 mail/qmail-run/files/qmailpop3d.sh         |   5 ++-
 mail/qmail-run/files/qmailsmtpd.sh         |   4 +-
 mail/qmail-run/files/signatures            |  18 ++++++++++++
 mail/qmail-run/files/spamdyke-ofmipd.conf  |   8 -----
 mail/qmail-run/files/tcp.ofmip             |   2 +
 mail/qmail-run/files/tcp.pop3              |   1 +
 mail/qmail-run/files/tcp.smtp              |   2 +
 mail/qmail-run/options.mk                  |  14 ---------
 20 files changed, 147 insertions(+), 101 deletions(-)

diffs (truncated from 472 to 300 lines):

diff -r 039de4785094 -r 759f76027eae mail/qmail-run/DEINSTALL
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/mail/qmail-run/DEINSTALL  Wed Oct 24 15:46:54 2018 +0000
@@ -0,0 +1,14 @@
+# $NetBSD: DEINSTALL,v 1.1 2018/10/24 15:46:54 schmonz Exp $
+
+PKG_SYSCONFDIR=@PKG_SYSCONFDIR@
+
+case "${STAGE}" in
+
+POST-DEINSTALL)
+       for i in ofmip pop3 smtp; do
+               s="${PKG_SYSCONFDIR}/tcp.${i}"
+               [ -f "${s}.cdb" ] && ! [ -f "${s}" ] && rm -f "${s}.cdb"
+       done
+       ;;
+
+esac
diff -r 039de4785094 -r 759f76027eae mail/qmail-run/DESCR
--- a/mail/qmail-run/DESCR      Wed Oct 24 15:42:46 2018 +0000
+++ b/mail/qmail-run/DESCR      Wed Oct 24 15:46:54 2018 +0000
@@ -1,4 +1,3 @@
-This package creates all the needed basic config files to run
-qmail, provides example {mailer,spamdyke,stunnel}.conf and wrappers
-for procmail, spamassassin, and rspamd, and installs NetBSD-style
-rc.d scripts.
+This package creates all the needed basic config files to run qmail,
+provides example {mailer,stunnel}.conf and wrappers for procmail,
+spamassassin, and rspamd, and installs NetBSD-style rc.d scripts.
diff -r 039de4785094 -r 759f76027eae mail/qmail-run/INSTALL
--- a/mail/qmail-run/INSTALL    Wed Oct 24 15:42:46 2018 +0000
+++ b/mail/qmail-run/INSTALL    Wed Oct 24 15:46:54 2018 +0000
@@ -10,37 +10,7 @@
 
        cd ${PKG_SYSCONFDIR}/alias && ${TOUCH} .qmail-postmaster .qmail-mailer-daemon .qmail-root
 
-       if ! [ -s ${PKG_SYSCONFDIR}/control/concurrencyofmip ]; then
-               ${ECHO} 20 > ${PKG_SYSCONFDIR}/control/concurrencyofmip
-               ${ECHO} "$psmsg" >> ${PKG_SYSCONFDIR}/control/concurrencyofmip
-               ${CHMOD} 644 ${PKG_SYSCONFDIR}/control/concurrencyofmip
-       fi
-
-       if ! [ -s ${PKG_SYSCONFDIR}/control/concurrencypop3 ]; then
-               ${ECHO} 20 > ${PKG_SYSCONFDIR}/control/concurrencypop3
-               ${ECHO} "$psmsg" >> ${PKG_SYSCONFDIR}/control/concurrencypop3
-               ${CHMOD} 644 ${PKG_SYSCONFDIR}/control/concurrencypop3
-       fi
-
-       if ! [ -s ${PKG_SYSCONFDIR}/control/concurrencyincoming ]; then
-               ${ECHO} 20 > ${PKG_SYSCONFDIR}/control/concurrencyincoming
-               ${ECHO} "$psmsg" >> ${PKG_SYSCONFDIR}/control/concurrencyincoming
-               ${CHMOD} 644 ${PKG_SYSCONFDIR}/control/concurrencyincoming
-       fi
-
-       if ! [ -s ${PKG_SYSCONFDIR}/control/defaultdelivery ]; then
-               ${ECHO} ./Mailbox > ${PKG_SYSCONFDIR}/control/defaultdelivery
-               ${ECHO} "$psmsg" >> ${PKG_SYSCONFDIR}/control/defaultdelivery
-               ${CHMOD} 644 ${PKG_SYSCONFDIR}/control/defaultdelivery
-       fi
-
-       pop3rule=':allow'
-       smtprule='127.:allow,RELAYCLIENT=""'
        for i in ofmip pop3 smtp; do
-               if ! [ -s ${PKG_SYSCONFDIR}/tcp.${i} ]; then
-                       ${ECHO} "$psmsg" > ${PKG_SYSCONFDIR}/tcp.${i}
-                       eval ${ECHO} \"\$${i}rule\" > ${PKG_SYSCONFDIR}/tcp.${i}
-               fi
                ${CHMOD} 644 ${PKG_SYSCONFDIR}/tcp.${i}
                ${PREFIX}/bin/tcprules ${PKG_SYSCONFDIR}/tcp.${i}.cdb ${PKG_SYSCONFDIR}/tcp.${i}.tmp < ${PKG_SYSCONFDIR}/tcp.${i}
                ${CHMOD} 644 ${PKG_SYSCONFDIR}/tcp.${i}.cdb
@@ -52,5 +22,4 @@
        fi
 
        ;;
-
 esac
diff -r 039de4785094 -r 759f76027eae mail/qmail-run/MESSAGE
--- a/mail/qmail-run/MESSAGE    Wed Oct 24 15:42:46 2018 +0000
+++ b/mail/qmail-run/MESSAGE    Wed Oct 24 15:46:54 2018 +0000
@@ -1,41 +1,34 @@
 ===========================================================================
-$NetBSD: MESSAGE,v 1.7 2017/07/21 04:08:15 schmonz Exp $
+$NetBSD: MESSAGE,v 1.8 2018/10/24 15:46:54 schmonz Exp $
 
 Please read ${PREFIX}/share/doc/qmail-run/README.pkgsrc.
 
-To enable qmail for...
+Assuming NetBSD-style mailwrapper(8) and rc(8), to enable qmail for...
 
 Local and outgoing deliveries:
-- Check the configuration files in ${PKG_SYSCONFDIR}
+- Check configuration in ${PKG_SYSCONFDIR}
 - Replace /etc/mailer.conf with share/examples/qmail-run/mailer.conf
-- In /etc/rc.conf, set
-    qmailsend=YES
+- Set qmailsend=YES in /etc/rc.conf
 
 Local non-root users to see the queue:
 - Change the mailq entry in /etc/mailer.conf to qmail-qread-client
-- In /etc/rc.conf, set
-    qmailqread=YES
+- Set qmailqread=YES in /etc/rc.conf
 
 Incoming SMTP deliveries:
-- In /etc/rc.conf, set
-    qmailsmtpd=YES
-    qmailsmtpd_postenv="QMAILQUEUE=${PREFIX}/bin/qmail-qfilter-smtpd-queue RCPTCHECK=${PREFIX}/bin/qmail-rcptcheck"
+- Set qmailsmtpd=YES in /etc/rc.conf
 
 Filtering incoming SMTP:
 - List qmail-qfilter programs in ${PKG_SYSCONFDIR}/control/smtpfilters
 - List qmail-rcptcheck programs in ${PKG_SYSCONFDIR}/control/rcptchecks
 
 Outgoing submissions with SMTP AUTH over TLS:
-- Incorporate share/examples/qmail-run/stunnel.conf into your stunnel.conf
-- Consider that your checkpassword binary may need to be setuid root
-- Copy share/examples/qmail-run/spamdyke-ofmipd.conf to ${PKG_SYSCONFBASE}
-- In /etc/rc.conf, set
-    qmailofmipd=YES
-    qmailofmipd_preofmipd="${PREFIX}/bin/spamdyke --config-file ${PKG_SYSCONFBASE}/spamdyke-ofmipd.conf"
-    stunnel=YES
+- Incorporate share/examples/qmail-run/stunnel.conf into stunnel.conf
+- Set qmailofmipd=YES and stunnel=YES in /etc/rc.conf
+
+Filtering outgoing submissions:
+- List qmail-qfilter programs in ${PKG_SYSCONFDIR}/control/ofmipfilters
 
 Fetching Maildirs via POP3:
-- In /etc/rc.conf, set
-    qmailpop3d=YES
+- Set qmailpop3d=YES in /etc/rc.conf
 
 ===========================================================================
diff -r 039de4785094 -r 759f76027eae mail/qmail-run/Makefile
--- a/mail/qmail-run/Makefile   Wed Oct 24 15:42:46 2018 +0000
+++ b/mail/qmail-run/Makefile   Wed Oct 24 15:46:54 2018 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.48 2018/09/10 09:07:49 schmonz Exp $
+# $NetBSD: Makefile,v 1.49 2018/10/24 15:46:54 schmonz Exp $
 #
 
-DISTNAME=              qmail-run-20180910
+DISTNAME=              qmail-run-20181024
 CATEGORIES=            mail
 MASTER_SITES=          # empty
 DISTFILES=             # empty
@@ -10,10 +10,10 @@
 COMMENT=               Configures qmail to receive and deliver mail
 LICENSE=               2-clause-bsd
 
-DEPENDS+=              mess822-[0-9]*:../../mail/mess822
 DEPENDS+=              pkg_alternatives-[0-9]*:../../pkgtools/pkg_alternatives
 DEPENDS_QMAIL=         qmail>=1.03nb36:../../mail/qmail
 DEPENDS+=              ${DEPENDS_QMAIL}
+DEPENDS+=              qmail-acceptutils-[0-9]*:../../mail/qmail-acceptutils
 DEPENDS+=              qmail-qfilter>1.5nb1:../../mail/qmail-qfilter
 DEPENDS+=              qmail-rejectutils-[0-9]*:../../mail/qmail-rejectutils
 
@@ -29,6 +29,16 @@
 MESSAGE_SUBST+=                PKG_SYSCONFBASE=${PKG_SYSCONFBASE:Q}
 RCD_SCRIPTS=           qmail qmailofmipd qmailpop3d qmailqread qmailsend qmailsmtpd
 
+.for f in defaultdelivery fixsmtpio signatures \
+       concurrencyincoming concurrencypop3 concurrencysubmission
+CONF_FILES+=           ${PREFIX}/share/examples/qmail-run/${f} \
+                       ${PKG_SYSCONFDIR}/control/${f}
+.endfor
+.for f in tcp.ofmip tcp.pop3 tcp.smtp
+CONF_FILES+=           ${PREFIX}/share/examples/qmail-run/${f} \
+                       ${PKG_SYSCONFDIR}/${f}
+.endfor
+
 INSTALLATION_DIRS=     bin share/doc/qmail-run share/examples/qmail-run
 BUILD_DEFS+=           QMAIL_DAEMON_USER QMAIL_LOG_USER QMAIL_SEND_USER
 BUILD_DEFS+=           QMAIL_QUEUE_EXTRA PKG_SYSCONFBASE
@@ -50,33 +60,39 @@
 
 SUBST_CLASSES+=                paths
 SUBST_STAGE.paths=     pre-configure
-SUBST_FILES.paths=     mailer.conf qmail-isspam-* qmail-procmail
-SUBST_FILES.paths+=    qmail-qread-client spamdyke-ofmipd.conf
+SUBST_FILES.paths=     mailer.conf
+SUBST_FILES.paths+=    qmail-isspam-* qmail-procmail qmail-qread-client
+SUBST_FILES.paths+=    tcp.*
 SUBST_VARS.paths=      PKGNAME PKG_SYSCONFDIR PREFIX
 SUBST_VARS.paths+=     CAT ECHO GREP SED SH SORT TRUE
 
-.include "options.mk"
-
 post-extract:
-       for f in README.pkgsrc mailer.conf spamdyke-ofmipd.conf stunnel.conf; do \
-           ${CP} ${FILESDIR}/$$f ${WRKDIR}/$$f;                        \
-       done
+       for f in README.pkgsrc mailer.conf stunnel.conf \
+               defaultdelivery fixsmtpio signatures \
+               concurrencyincoming concurrencypop3 concurrencysubmission \
+               tcp.ofmip tcp.pop3 tcp.smtp; do \
+               ${CP} ${FILESDIR}/$$f ${WRKDIR}/$$f; \
+       done; \
        for f in qmail-isspam-rspamd qmail-isspam-spamassassin \
                qmail-procmail qmail-qread-client; do \
-           ${CP} ${FILESDIR}/$$f.sh ${WRKDIR}/$$f;                     \
+               ${CP} ${FILESDIR}/$$f.sh ${WRKDIR}/$$f; \
        done
 
 do-install:
        for f in qmail-isspam-rspamd qmail-isspam-spamassassin \
                qmail-procmail qmail-qread-client; do \
-           ${INSTALL_SCRIPT} ${WRKDIR}/$$f ${DESTDIR}${PREFIX}/bin;    \
+               ${INSTALL_SCRIPT} ${WRKDIR}/$$f ${DESTDIR}${PREFIX}/bin; \
        done
        ${INSTALL_DATA} ${WRKDIR}/README.pkgsrc \
                ${DESTDIR}${PREFIX}/share/doc/qmail-run
+       for f in defaultdelivery fixsmtpio signatures \
+               concurrencyincoming concurrencypop3 concurrencysubmission \
+               tcp.ofmip tcp.pop3 tcp.smtp; do \
+               ${INSTALL_DATA} ${WRKDIR}/$${f} \
+                       ${DESTDIR}${PREFIX}/share/examples/qmail-run; \
+       done; \
        ${INSTALL_DATA} ${WRKDIR}/mailer.conf \
                ${DESTDIR}${PREFIX}/share/examples/qmail-run
-       ${INSTALL_DATA} ${WRKDIR}/spamdyke-ofmipd.conf \
-               ${DESTDIR}${PREFIX}/share/examples/qmail-run
        ${INSTALL_DATA} ${WRKDIR}/stunnel.conf \
                ${DESTDIR}${PREFIX}/share/examples/qmail-run
 
diff -r 039de4785094 -r 759f76027eae mail/qmail-run/PLIST
--- a/mail/qmail-run/PLIST      Wed Oct 24 15:42:46 2018 +0000
+++ b/mail/qmail-run/PLIST      Wed Oct 24 15:46:54 2018 +0000
@@ -1,9 +1,17 @@
-@comment $NetBSD: PLIST,v 1.11 2018/09/10 09:07:49 schmonz Exp $
+@comment $NetBSD: PLIST,v 1.12 2018/10/24 15:46:54 schmonz Exp $
 bin/qmail-isspam-rspamd
 bin/qmail-isspam-spamassassin
 bin/qmail-procmail
 bin/qmail-qread-client
 share/doc/qmail-run/README.pkgsrc
+share/examples/qmail-run/concurrencyincoming
+share/examples/qmail-run/concurrencypop3
+share/examples/qmail-run/concurrencysubmission
+share/examples/qmail-run/defaultdelivery
+share/examples/qmail-run/fixsmtpio
 share/examples/qmail-run/mailer.conf
-share/examples/qmail-run/spamdyke-ofmipd.conf
+share/examples/qmail-run/signatures
 share/examples/qmail-run/stunnel.conf
+share/examples/qmail-run/tcp.ofmip
+share/examples/qmail-run/tcp.pop3
+share/examples/qmail-run/tcp.smtp
diff -r 039de4785094 -r 759f76027eae mail/qmail-run/files/concurrencyincoming
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/mail/qmail-run/files/concurrencyincoming  Wed Oct 24 15:46:54 2018 +0000
@@ -0,0 +1,1 @@
+20
diff -r 039de4785094 -r 759f76027eae mail/qmail-run/files/concurrencypop3
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/mail/qmail-run/files/concurrencypop3      Wed Oct 24 15:46:54 2018 +0000
@@ -0,0 +1,1 @@
+20
diff -r 039de4785094 -r 759f76027eae mail/qmail-run/files/concurrencysubmission
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/mail/qmail-run/files/concurrencysubmission        Wed Oct 24 15:46:54 2018 +0000
@@ -0,0 +1,1 @@
+20
diff -r 039de4785094 -r 759f76027eae mail/qmail-run/files/defaultdelivery
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/mail/qmail-run/files/defaultdelivery      Wed Oct 24 15:46:54 2018 +0000
@@ -0,0 +1,1 @@
+./Mailbox
diff -r 039de4785094 -r 759f76027eae mail/qmail-run/files/fixsmtpio
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/mail/qmail-run/files/fixsmtpio    Wed Oct 24 15:46:54 2018 +0000
@@ -0,0 +1,39 @@
+### For all users, authenticated or not:
+
+# Prepend acceptutils link to HELP message, so problems go to fixsmtpio author
+:help::*::&fixsmtpio_fixup
+
+# Replace hostname in initial greeting
+:greeting::2*::&fixsmtpio_fixup
+
+# Replace hostname in HELO/EHLO response
+:helo::2*::&fixsmtpio_fixup
+:ehlo::2*::&fixsmtpio_fixup
+
+# Replace hostname in QUIT response
+:quit::2*::&fixsmtpio_fixup
+
+########################################################################
+
+### For users authenticated via authup(8):
+
+# SMTP conversation already in progress, replace greeting
+AUTHUP_USER:greeting::2*::235 ok, go ahead (#2.0.0)
+
+# If client closes connection, tell authup the session succeeded
+AUTHUP_USER:clienteof::*:0:
+
+# If server greets us unhappily, preserve message, and tell authup to stop trying
+AUTHUP_USER:greeting::4*:14:&fixsmtpio_noop



Home | Main Index | Thread Index | Old Index