pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mail/qmail-run Update to 20170109. pkgsrc changes:
details: https://anonhg.NetBSD.org/pkgsrc/rev/b4c8af888005
branches: trunk
changeset: 356959:b4c8af888005
user: schmonz <schmonz%pkgsrc.org@localhost>
date: Mon Jan 09 04:58:09 2017 +0000
description:
Update to 20170109. pkgsrc changes:
- Add qmailofmipd service for outgoing submissions.
- Add dependencies on mess822, spamdyke, and stunnel.
- Add sample spamdyke and stunnel configs for SMTP AUTH over TLS.
- Control ofmipd from the main qmail script.
- Fix broken link to "12 Steps to qmail List Bliss".
diffstat:
mail/qmail-run/INSTALL | 8 ++-
mail/qmail-run/MESSAGE | 12 +++-
mail/qmail-run/Makefile | 19 ++++-
mail/qmail-run/PLIST | 4 +-
mail/qmail-run/files/README.pkgsrc | 2 +-
mail/qmail-run/files/qmail.sh | 8 +-
mail/qmail-run/files/qmailofmipd.sh | 95 +++++++++++++++++++++++++++++++
mail/qmail-run/files/spamdyke-ofmipd.conf | 8 ++
mail/qmail-run/files/stunnel.conf | 13 ++++
9 files changed, 155 insertions(+), 14 deletions(-)
diffs (truncated from 312 to 300 lines):
diff -r 9e387a7dde73 -r b4c8af888005 mail/qmail-run/INSTALL
--- a/mail/qmail-run/INSTALL Mon Jan 09 04:03:34 2017 +0000
+++ b/mail/qmail-run/INSTALL Mon Jan 09 04:58:09 2017 +0000
@@ -10,6 +10,12 @@
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
@@ -30,7 +36,7 @@
pop3rule=':allow'
smtprule='127.:allow,RELAYCLIENT=""'
- for i in pop3 smtp; do
+ 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}
diff -r 9e387a7dde73 -r b4c8af888005 mail/qmail-run/MESSAGE
--- a/mail/qmail-run/MESSAGE Mon Jan 09 04:03:34 2017 +0000
+++ b/mail/qmail-run/MESSAGE Mon Jan 09 04:58:09 2017 +0000
@@ -1,5 +1,5 @@
===========================================================================
-$NetBSD: MESSAGE,v 1.3 2004/08/23 03:47:48 schmonz Exp $
+$NetBSD: MESSAGE,v 1.4 2017/01/09 04:58:09 schmonz Exp $
Please read ${PREFIX}/share/doc/qmail-run/README.pkgsrc.
@@ -10,9 +10,17 @@
- Modify /etc/mailer.conf (see share/examples/qmail-run/mailer.conf).
- Set qmailsend=YES in /etc/rc.conf.
-SMTP:
+Incoming SMTP deliveries:
- Set qmailsmtpd=YES in /etc/rc.conf.
+Outgoing submissions with SMTP AUTH over TLS:
+- Set qmailofmipd=YES in /etc/rc.conf, and also qmailofmipd_preofmipd to
+ ${PREFIX}/bin/spamdyke --config-file ${PKG_SYSCONFBASE}/spamdyke-ofmipd.conf
+- Copy share/examples/qmail-run/spamdyke-ofmipd.conf to ${PKG_SYSCONFBASE}.
+- Consider that your checkpassword binary may need to be setuid root.
+- Set stunnel=YES in /etc/rc.conf.
+- Incorporate share/examples/qmail-run/stunnel.conf into your stunnel.conf.
+
POP3 (only for Maildirs):
- Set qmailpop3d=YES in /etc/rc.conf.
diff -r 9e387a7dde73 -r b4c8af888005 mail/qmail-run/Makefile
--- a/mail/qmail-run/Makefile Mon Jan 09 04:03:34 2017 +0000
+++ b/mail/qmail-run/Makefile Mon Jan 09 04:58:09 2017 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.28 2015/11/25 12:51:30 jperkin Exp $
+# $NetBSD: Makefile,v 1.29 2017/01/09 04:58:09 schmonz Exp $
#
-DISTNAME= qmail-run-20141206
+DISTNAME= qmail-run-20170109
CATEGORIES= mail
MASTER_SITES= # empty
DISTFILES= # empty
@@ -10,8 +10,11 @@
COMMENT= Configures qmail to receive and deliver mail
LICENSE= 2-clause-bsd
+DEPENDS+= mess822-[0-9]*:../../mail/mess822
DEPENDS_QMAIL= qmail>=1.03nb8:../../mail/qmail
DEPENDS+= ${DEPENDS_QMAIL}
+# XXX DEPENDS+= spamdyke-[0-9]*:../../mail/spamdyke
+DEPENDS+= stunnel-[0-9]*:../../security/stunnel
CONFLICTS+= qmail-qfilter-1.5nb1
@@ -21,7 +24,8 @@
FILES_SUBST+= QMAIL_QUEUE_EXTRA=${QMAIL_QUEUE_EXTRA:Q}
FILES_SUBST+= PKGNAME=${PKGNAME:Q}
-RCD_SCRIPTS= qmail qmailpop3d qmailqread qmailsend qmailsmtpd
+MESSAGE_SUBST+= PKG_SYSCONFBASE=${PKG_SYSCONFBASE}
+RCD_SCRIPTS= qmail qmailofmipd qmailpop3d qmailqread qmailsend qmailsmtpd
INSTALLATION_DIRS= bin share/doc/qmail-run share/examples/qmail-run
BUILD_DEFS+= QMAIL_QUEUE_EXTRA
@@ -43,7 +47,7 @@
SUBST_CLASSES+= paths
SUBST_FILES.paths= mailer.conf qmail-procmail qmail-qfilter-queue
-SUBST_FILES.paths+= qmail-qread-client
+SUBST_FILES.paths+= qmail-qread-client spamdyke-ofmipd.conf
SUBST_SED.paths+= -e 's,@PREFIX@,${PREFIX},g'
SUBST_SED.paths+= -e 's,@PKG_SYSCONFDIR@,${PKG_SYSCONFDIR},g'
SUBST_SED.paths+= -e 's,@ECHO@,${ECHO},g'
@@ -52,10 +56,11 @@
SUBST_SED.paths+= -e 's,@SH@,${SH},g'
SUBST_SED.paths+= -e 's,@SED@,${SED},g'
SUBST_SED.paths+= -e 's,@PKGNAME@,${PKGNAME},g'
+SUBST_SED.paths+= -e 's,@TRUE@,${TRUE},g'
SUBST_STAGE.paths= post-patch
post-extract:
- for f in README.pkgsrc mailer.conf; do \
+ for f in README.pkgsrc mailer.conf spamdyke-ofmipd.conf stunnel.conf; do \
${CP} ${FILESDIR}/$$f ${WRKDIR}/$$f; \
done
for f in qmail-procmail qmail-qfilter-queue qmail-qread-client; do \
@@ -70,5 +75,9 @@
${DESTDIR}${PREFIX}/share/doc/qmail-run
${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
.include "../../mk/bsd.pkg.mk"
diff -r 9e387a7dde73 -r b4c8af888005 mail/qmail-run/PLIST
--- a/mail/qmail-run/PLIST Mon Jan 09 04:03:34 2017 +0000
+++ b/mail/qmail-run/PLIST Mon Jan 09 04:58:09 2017 +0000
@@ -1,6 +1,8 @@
-@comment $NetBSD: PLIST,v 1.6 2014/03/11 14:05:05 jperkin Exp $
+@comment $NetBSD: PLIST,v 1.7 2017/01/09 04:58:09 schmonz Exp $
bin/qmail-procmail
bin/qmail-qfilter-queue
bin/qmail-qread-client
share/doc/qmail-run/README.pkgsrc
share/examples/qmail-run/mailer.conf
+share/examples/qmail-run/spamdyke-ofmipd.conf
+share/examples/qmail-run/stunnel.conf
diff -r 9e387a7dde73 -r b4c8af888005 mail/qmail-run/files/README.pkgsrc
--- a/mail/qmail-run/files/README.pkgsrc Mon Jan 09 04:03:34 2017 +0000
+++ b/mail/qmail-run/files/README.pkgsrc Mon Jan 09 04:58:09 2017 +0000
@@ -23,7 +23,7 @@
It is highly recommended that you read Charles Cazabon's "12 Steps
to qmail List Bliss" before posting to the list:
-<URL:http://www.qcc.ca/~charlesc/writings/12-steps-to-qmail-list-bliss.html>
+<URL:http://pyropus.ca/personal/writings/12-steps-to-qmail-list-bliss.html>
Deviations from LWQ
diff -r 9e387a7dde73 -r b4c8af888005 mail/qmail-run/files/qmail.sh
--- a/mail/qmail-run/files/qmail.sh Mon Jan 09 04:03:34 2017 +0000
+++ b/mail/qmail-run/files/qmail.sh Mon Jan 09 04:58:09 2017 +0000
@@ -1,6 +1,6 @@
#!@RCD_SCRIPTS_SHELL@
#
-# $NetBSD: qmail.sh,v 1.3 2004/08/23 03:47:48 schmonz Exp $
+# $NetBSD: qmail.sh,v 1.4 2017/01/09 04:58:09 schmonz Exp $
#
# @PKGNAME@ master script for administrators to control qmail
# services. Usage resembles the qmailctl script from "Life with qmail".
@@ -59,7 +59,7 @@
pause -- temporarily stops mail service (connections accepted, nothing leaves)
cont -- continues paused mail service
stat -- displays status of mail service
- cdb -- rebuild the tcpserver cdb file for smtp and/or pop3
+ cdb -- rebuild the tcpserver cdb file for smtp, ofmip, and/or pop3
restart -- stops and restarts smtp, sends qmail-send a TERM & restarts it
doqueue -- schedules queued messages for immediate delivery
reload -- sends qmail-send HUP, rereading locals and virtualdomains
@@ -70,7 +70,7 @@
HELP
}
-COMMAND_LIST="qmailsend qmailsmtpd qmailpop3d"
+COMMAND_LIST="qmailsend qmailsmtpd qmailofmipd qmailpop3d"
name="qmail"
start_cmd="forward_commands"
@@ -80,7 +80,7 @@
status_cmd="forward_commands"; stat_cmd=${status_cmd}
pause_cmd="forward_commands"
cont_cmd="forward_commands"
-cdb_cmd="qmailrcd smtpd pop3d"
+cdb_cmd="qmailrcd smtpd ofmipd pop3d"
queue_cmd="qmailrcd send"
help_cmd="qmail_help"
extra_commands="pause cont stat status cdb doqueue reload queue alrm flush hup help"
diff -r 9e387a7dde73 -r b4c8af888005 mail/qmail-run/files/qmailofmipd.sh
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mail/qmail-run/files/qmailofmipd.sh Mon Jan 09 04:58:09 2017 +0000
@@ -0,0 +1,95 @@
+#!@RCD_SCRIPTS_SHELL@
+#
+# $NetBSD: qmailofmipd.sh,v 1.1 2017/01/09 04:58:09 schmonz Exp $
+#
+# @PKGNAME@ script to control ofmipd (SMTP submission service).
+#
+
+# PROVIDE: qmailofmipd mail
+# REQUIRE: qmailsend
+
+name="qmailofmipd"
+
+# User-settable rc.conf variables and their default values:
+: ${qmailofmipd_postenv:=""}
+: ${qmailofmipd_tcpflags:="-vRl0"}
+: ${qmailofmipd_tcphost:="127.0.0.1"}
+: ${qmailofmipd_tcpport:="26"}
+: ${qmailofmipd_datalimit:="146800640"}
+: ${qmailofmipd_pretcpserver:=""}
+: ${qmailofmipd_preofmipd:=""}
+: ${qmailofmipd_postofmipd:=""}
+: ${qmailofmipd_log:="YES"}
+: ${qmailofmipd_logcmd:="logger -t nb${name} -p mail.info"}
+: ${qmailofmipd_nologcmd:="/usr/pkg/bin/multilog -*"}
+
+if [ -f /etc/rc.subr ]; then
+ . /etc/rc.subr
+fi
+
+rcvar=${name}
+required_files="@PKG_SYSCONFDIR@/control/concurrencyofmip"
+required_files="${required_files} @PKG_SYSCONFDIR@/tcp.ofmip.cdb"
+required_files="${required_files} @PKG_SYSCONFDIR@/control/rcpthosts"
+command="/usr/pkg/bin/tcpserver"
+procname=${name}
+start_precmd="qmailofmipd_precmd"
+extra_commands="stat pause cont cdb"
+stat_cmd="qmailofmipd_stat"
+pause_cmd="qmailofmipd_pause"
+cont_cmd="qmailofmipd_cont"
+cdb_cmd="qmailofmipd_cdb"
+
+qmailofmipd_precmd()
+{
+ # tcpserver(1) is akin to inetd(8), but runs one service per process.
+ # We want to signal only the tcpserver process responsible for SMTP
+ # service. Use argv0(1) to set procname to "qmailofmipd".
+ if [ -f /etc/rc.subr ]; then
+ checkyesno qmailofmipd_log || qmailofmipd_logcmd=${qmailofmipd_nologcmd}
+ fi
+ command="/usr/bin/env - ${qmailofmipd_postenv} /usr/pkg/bin/softlimit -m ${qmailofmipd_datalimit} ${qmailofmipd_pretcpserver} /usr/pkg/bin/argv0 /usr/pkg/bin/tcpserver ${name}
${qmailofmipd_tcpflags} -x @PKG_SYSCONFDIR@/tcp.ofmip.cdb -c `/usr/bin/head -1 @PKG_SYSCONFDIR@/control/concurrencyofmip` -u `/usr/bin/id -u qmaild` -g `/usr/bin/id -g qmaild` ${qmailofmipd_tcphost}
${qmailofmipd_tcpport} ${qmailofmipd_preofmipd} /usr/pkg/bin/ofmipd ${qmailofmipd_postofmipd} 2>&1 | /usr/pkg/bin/setuidgid qmaill ${qmailofmipd_logcmd}"
+ command_args="&"
+ rc_flags=""
+}
+
+qmailofmipd_stat()
+{
+ run_rc_command status
+}
+
+qmailofmipd_pause()
+{
+ if ! statusmsg=`run_rc_command status`; then
+ echo $statusmsg
+ return 1
+ fi
+ echo "Pausing ${name}."
+ kill -STOP $rc_pid
+}
+
+qmailofmipd_cont()
+{
+ if ! statusmsg=`run_rc_command status`; then
+ echo $statusmsg
+ return 1
+ fi
+ echo "Continuing ${name}."
+ kill -CONT $rc_pid
+}
+
+qmailofmipd_cdb()
+{
+ echo "Reloading @PKG_SYSCONFDIR@/tcp.ofmip."
+ /usr/pkg/bin/tcprules @PKG_SYSCONFDIR@/tcp.ofmip.cdb @PKG_SYSCONFDIR@/tcp.ofmip.tmp < @PKG_SYSCONFDIR@/tcp.ofmip
+ /bin/chmod 644 @PKG_SYSCONFDIR@/tcp.ofmip.cdb
+}
+
+if [ -f /etc/rc.subr ]; then
+ load_rc_config $name
+ run_rc_command "$1"
+else
+ echo -n " ${name}"
+ qmailofmipd_precmd
+ eval ${command} ${qmailofmipd_flags} ${command_args}
+fi
diff -r 9e387a7dde73 -r b4c8af888005 mail/qmail-run/files/spamdyke-ofmipd.conf
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mail/qmail-run/files/spamdyke-ofmipd.conf Mon Jan 09 04:58:09 2017 +0000
@@ -0,0 +1,8 @@
+# $NetBSD: spamdyke-ofmipd.conf,v 1.1 2017/01/09 04:58:09 schmonz Exp $
+#
+# Wrap qmail-ofmipd with SMTP AUTH.
+#
+hostname-file=@PKG_SYSCONFDIR@/control/me
+qmail-rcpthosts-file=@PKG_SYSCONFDIR@/control/rcpthosts
+smtp-auth-level=always
+smtp-auth-command="@PREFIX@/bin/checkpassword @TRUE@"
diff -r 9e387a7dde73 -r b4c8af888005 mail/qmail-run/files/stunnel.conf
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mail/qmail-run/files/stunnel.conf Mon Jan 09 04:58:09 2017 +0000
@@ -0,0 +1,13 @@
+# $NetBSD: stunnel.conf,v 1.1 2017/01/09 04:58:09 schmonz Exp $
Home |
Main Index |
Thread Index |
Old Index