pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/mail/qmail-run
Module Name: pkgsrc
Committed By: schmonz
Date: Mon Jan 9 04:58:09 UTC 2017
Modified Files:
pkgsrc/mail/qmail-run: INSTALL MESSAGE Makefile PLIST
pkgsrc/mail/qmail-run/files: README.pkgsrc qmail.sh
Added Files:
pkgsrc/mail/qmail-run/files: qmailofmipd.sh spamdyke-ofmipd.conf
stunnel.conf
Log Message:
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".
To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 pkgsrc/mail/qmail-run/INSTALL
cvs rdiff -u -r1.3 -r1.4 pkgsrc/mail/qmail-run/MESSAGE
cvs rdiff -u -r1.28 -r1.29 pkgsrc/mail/qmail-run/Makefile
cvs rdiff -u -r1.6 -r1.7 pkgsrc/mail/qmail-run/PLIST
cvs rdiff -u -r1.3 -r1.4 pkgsrc/mail/qmail-run/files/README.pkgsrc \
pkgsrc/mail/qmail-run/files/qmail.sh
cvs rdiff -u -r0 -r1.1 pkgsrc/mail/qmail-run/files/qmailofmipd.sh \
pkgsrc/mail/qmail-run/files/spamdyke-ofmipd.conf \
pkgsrc/mail/qmail-run/files/stunnel.conf
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/mail/qmail-run/INSTALL
diff -u pkgsrc/mail/qmail-run/INSTALL:1.4 pkgsrc/mail/qmail-run/INSTALL:1.5
--- pkgsrc/mail/qmail-run/INSTALL:1.4 Wed Nov 25 12:51:30 2015
+++ pkgsrc/mail/qmail-run/INSTALL Mon Jan 9 04:58:09 2017
@@ -10,6 +10,12 @@ POST-INSTALL)
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 @@ POST-INSTALL)
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}
Index: pkgsrc/mail/qmail-run/MESSAGE
diff -u pkgsrc/mail/qmail-run/MESSAGE:1.3 pkgsrc/mail/qmail-run/MESSAGE:1.4
--- pkgsrc/mail/qmail-run/MESSAGE:1.3 Mon Aug 23 03:47:48 2004
+++ pkgsrc/mail/qmail-run/MESSAGE Mon Jan 9 04:58:09 2017
@@ -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 @@ Local and outgoing deliveries:
- 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.
Index: pkgsrc/mail/qmail-run/Makefile
diff -u pkgsrc/mail/qmail-run/Makefile:1.28 pkgsrc/mail/qmail-run/Makefile:1.29
--- pkgsrc/mail/qmail-run/Makefile:1.28 Wed Nov 25 12:51:30 2015
+++ pkgsrc/mail/qmail-run/Makefile Mon Jan 9 04:58:09 2017
@@ -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 @@ MAINTAINER= schmonz%NetBSD.org@localhost
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 @@ NO_CHECKSUM= yes
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 @@ MAKEVARS+= PKG_SYSCONFDIR.qmail-run
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,@CAT@,${CAT},g'
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 @@ do-install:
${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"
Index: pkgsrc/mail/qmail-run/PLIST
diff -u pkgsrc/mail/qmail-run/PLIST:1.6 pkgsrc/mail/qmail-run/PLIST:1.7
--- pkgsrc/mail/qmail-run/PLIST:1.6 Tue Mar 11 14:05:05 2014
+++ pkgsrc/mail/qmail-run/PLIST Mon Jan 9 04:58:09 2017
@@ -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
Index: pkgsrc/mail/qmail-run/files/README.pkgsrc
diff -u pkgsrc/mail/qmail-run/files/README.pkgsrc:1.3 pkgsrc/mail/qmail-run/files/README.pkgsrc:1.4
--- pkgsrc/mail/qmail-run/files/README.pkgsrc:1.3 Tue Dec 21 05:37:11 2004
+++ pkgsrc/mail/qmail-run/files/README.pkgsrc Mon Jan 9 04:58:09 2017
@@ -23,7 +23,7 @@ installation, your request for help is l
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
Index: pkgsrc/mail/qmail-run/files/qmail.sh
diff -u pkgsrc/mail/qmail-run/files/qmail.sh:1.3 pkgsrc/mail/qmail-run/files/qmail.sh:1.4
--- pkgsrc/mail/qmail-run/files/qmail.sh:1.3 Mon Aug 23 03:47:48 2004
+++ pkgsrc/mail/qmail-run/files/qmail.sh Mon Jan 9 04:58:09 2017
@@ -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 @@ qmail_help()
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 @@ doqueue -- schedules queued messages for
HELP
}
-COMMAND_LIST="qmailsend qmailsmtpd qmailpop3d"
+COMMAND_LIST="qmailsend qmailsmtpd qmailofmipd qmailpop3d"
name="qmail"
start_cmd="forward_commands"
@@ -80,7 +80,7 @@ reload_cmd="qmailrcd send"; hup_cmd=${re
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"
Added files:
Index: pkgsrc/mail/qmail-run/files/qmailofmipd.sh
diff -u /dev/null pkgsrc/mail/qmail-run/files/qmailofmipd.sh:1.1
--- /dev/null Mon Jan 9 04:58:10 2017
+++ pkgsrc/mail/qmail-run/files/qmailofmipd.sh Mon Jan 9 04:58:09 2017
@@ -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
Index: pkgsrc/mail/qmail-run/files/spamdyke-ofmipd.conf
diff -u /dev/null pkgsrc/mail/qmail-run/files/spamdyke-ofmipd.conf:1.1
--- /dev/null Mon Jan 9 04:58:10 2017
+++ pkgsrc/mail/qmail-run/files/spamdyke-ofmipd.conf Mon Jan 9 04:58:09 2017
@@ -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@"
Index: pkgsrc/mail/qmail-run/files/stunnel.conf
diff -u /dev/null pkgsrc/mail/qmail-run/files/stunnel.conf:1.1
--- /dev/null Mon Jan 9 04:58:10 2017
+++ pkgsrc/mail/qmail-run/files/stunnel.conf Mon Jan 9 04:58:09 2017
@@ -0,0 +1,13 @@
+# $NetBSD: stunnel.conf,v 1.1 2017/01/09 04:58:09 schmonz Exp $
+#
+# Export qmail-ofmipd as a TLS-enabled SMTP submission service.
+#
+debug = mail.info
+cert = /etc/openssl/certs/yourdomain.crt
+key = /etc/openssl/private/yourdomain.key
+options = NO_SSLv2
+
+[submission]
+accept = submission
+connect = localhost:26
+protocol = smtp
Home |
Main Index |
Thread Index |
Old Index