summaryrefslogtreecommitdiff
path: root/mail/qmail-run
diff options
context:
space:
mode:
authorschmonz <schmonz@pkgsrc.org>2017-06-17 05:58:39 +0000
committerschmonz <schmonz@pkgsrc.org>2017-06-17 05:58:39 +0000
commit4b57ace28c268bd04bfd3d293f7cfe6c92a11516 (patch)
tree87cef7e44cae0b41d7be6afa21b11295c749e75c /mail/qmail-run
parent2aa5029fdb4f09e16e76757668184e0576132894 (diff)
downloadpkgsrc-4b57ace28c268bd04bfd3d293f7cfe6c92a11516.tar.gz
Increase default {ofmip,pop3,smtp}d softlimits by about 20 percent,
to 180000000 bytes. From Nathan Arthur in private mail. Allow path to tcpserver to be overridden in rc.conf (e.g., by sslserver from net/ucspi-ssl). From Thomas Lazar in private mail. Detach processes and their loggers from the controlling terminal with pgrphack(8). Include qmailqread in the services driven by the LWQ-style qmail rc.d script. Unconditionally depend on mail/mess822, now that it's correctly marked public-domain. Remove qmail-run-ofmipd option. Bump version.
Diffstat (limited to 'mail/qmail-run')
-rw-r--r--mail/qmail-run/Makefile5
-rw-r--r--mail/qmail-run/files/qmail.sh4
-rw-r--r--mail/qmail-run/files/qmailofmipd.sh19
-rw-r--r--mail/qmail-run/files/qmailpop3d.sh19
-rw-r--r--mail/qmail-run/files/qmailqread.sh14
-rw-r--r--mail/qmail-run/files/qmailsend.sh4
-rw-r--r--mail/qmail-run/files/qmailsmtpd.sh19
-rw-r--r--mail/qmail-run/options.mk9
8 files changed, 48 insertions, 45 deletions
diff --git a/mail/qmail-run/Makefile b/mail/qmail-run/Makefile
index d49db66e14f..40128362a78 100644
--- a/mail/qmail-run/Makefile
+++ b/mail/qmail-run/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.36 2017/05/31 07:08:04 schmonz Exp $
+# $NetBSD: Makefile,v 1.37 2017/06/17 05:58:39 schmonz Exp $
#
-DISTNAME= qmail-run-20170531
+DISTNAME= qmail-run-20170617
CATEGORIES= mail
MASTER_SITES= # empty
DISTFILES= # empty
@@ -10,6 +10,7 @@ MAINTAINER= schmonz@NetBSD.org
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}
DEPENDS+= qmail-qfilter>1.5nb1:../../mail/qmail-qfilter
diff --git a/mail/qmail-run/files/qmail.sh b/mail/qmail-run/files/qmail.sh
index d3f07c33c6f..5b8a5e9c2de 100644
--- a/mail/qmail-run/files/qmail.sh
+++ b/mail/qmail-run/files/qmail.sh
@@ -1,6 +1,6 @@
#!@RCD_SCRIPTS_SHELL@
#
-# $NetBSD: qmail.sh,v 1.4 2017/01/09 04:58:09 schmonz Exp $
+# $NetBSD: qmail.sh,v 1.5 2017/06/17 05:58:39 schmonz Exp $
#
# @PKGNAME@ master script for administrators to control qmail
# services. Usage resembles the qmailctl script from "Life with qmail".
@@ -70,7 +70,7 @@ doqueue -- schedules queued messages for immediate delivery
HELP
}
-COMMAND_LIST="qmailsend qmailsmtpd qmailofmipd qmailpop3d"
+COMMAND_LIST="qmailsend qmailqread qmailsmtpd qmailofmipd qmailpop3d"
name="qmail"
start_cmd="forward_commands"
diff --git a/mail/qmail-run/files/qmailofmipd.sh b/mail/qmail-run/files/qmailofmipd.sh
index 56253e21374..a6f0c580590 100644
--- a/mail/qmail-run/files/qmailofmipd.sh
+++ b/mail/qmail-run/files/qmailofmipd.sh
@@ -1,6 +1,6 @@
#!@RCD_SCRIPTS_SHELL@
#
-# $NetBSD: qmailofmipd.sh,v 1.4 2017/04/10 15:04:56 schmonz Exp $
+# $NetBSD: qmailofmipd.sh,v 1.5 2017/06/17 05:58:39 schmonz Exp $
#
# @PKGNAME@ script to control ofmipd (SMTP submission service).
#
@@ -15,8 +15,9 @@ name="qmailofmipd"
: ${qmailofmipd_tcpflags:="-vRl0"}
: ${qmailofmipd_tcphost:="127.0.0.1"}
: ${qmailofmipd_tcpport:="26"}
-: ${qmailofmipd_datalimit:="146800640"}
+: ${qmailofmipd_datalimit:="180000000"}
: ${qmailofmipd_pretcpserver:=""}
+: ${qmailofmipd_tcpserver:="@PREFIX@/bin/tcpserver"}
: ${qmailofmipd_preofmipd:=""}
: ${qmailofmipd_ofmipdcmd:="@PREFIX@/bin/ofmipd"}
: ${qmailofmipd_postofmipd:=""}
@@ -32,7 +33,7 @@ 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="@PREFIX@/bin/tcpserver"
+command="${qmailofmipd_tcpserver}"
procname=${name}
start_precmd="qmailofmipd_precmd"
extra_commands="stat pause cont cdb"
@@ -43,22 +44,22 @@ 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 OFMIP
- # service. Use argv0(1) to set procname to "qmailofmipd".
if [ -f /etc/rc.subr ] && ! checkyesno qmailofmipd_log; then
qmailofmipd_logcmd=${qmailofmipd_nologcmd}
fi
- command="@SETENV@ - ${qmailofmipd_postenv}
+ # tcpserver(1) is akin to inetd(8), but runs one service per process.
+ # We want to signal only the tcpserver process responsible for this
+ # service. Use argv0(1) to set procname to "qmailofmipd".
+ command="@PREFIX@/bin/pgrphack @SETENV@ - ${qmailofmipd_postenv}
@PREFIX@/bin/softlimit -m ${qmailofmipd_datalimit} ${qmailofmipd_pretcpserver}
-@PREFIX@/bin/argv0 @PREFIX@/bin/tcpserver ${name}
+@PREFIX@/bin/argv0 ${qmailofmipd_tcpserver} ${name}
${qmailofmipd_tcpflags} -x @PKG_SYSCONFDIR@/tcp.ofmip.cdb
-c `@HEAD@ -1 @PKG_SYSCONFDIR@/control/concurrencyofmip`
-u `@ID@ -u @QMAIL_DAEMON_USER@` -g `@ID@ -g @QMAIL_DAEMON_USER@`
${qmailofmipd_tcphost} ${qmailofmipd_tcpport}
${qmailofmipd_preofmipd} ${qmailofmipd_ofmipdcmd} ${qmailofmipd_postofmipd}
2>&1 |
-@PREFIX@/bin/setuidgid @QMAIL_LOG_USER@ ${qmailofmipd_logcmd}"
+@PREFIX@/bin/pgrphack @PREFIX@/bin/setuidgid @QMAIL_LOG_USER@ ${qmailofmipd_logcmd}"
command_args="&"
rc_flags=""
}
diff --git a/mail/qmail-run/files/qmailpop3d.sh b/mail/qmail-run/files/qmailpop3d.sh
index 8af77bcd246..a33f1c83e39 100644
--- a/mail/qmail-run/files/qmailpop3d.sh
+++ b/mail/qmail-run/files/qmailpop3d.sh
@@ -1,6 +1,6 @@
#!@RCD_SCRIPTS_SHELL@
#
-# $NetBSD: qmailpop3d.sh,v 1.13 2017/04/10 15:04:56 schmonz Exp $
+# $NetBSD: qmailpop3d.sh,v 1.14 2017/06/17 05:58:39 schmonz Exp $
#
# @PKGNAME@ script to control qmail-pop3d (POP3 server for Maildirs).
#
@@ -14,8 +14,9 @@ name="qmailpop3d"
: ${qmailpop3d_tcpflags:="-vRHl0"}
: ${qmailpop3d_tcphost:="0"}
: ${qmailpop3d_tcpport:="110"}
-: ${qmailpop3d_datalimit:="146800640"}
+: ${qmailpop3d_datalimit:="180000000"}
: ${qmailpop3d_pretcpserver:=""}
+: ${qmailpop3d_tcpserver:="@PREFIX@/bin/tcpserver"}
: ${qmailpop3d_prepop3d:=""}
: ${qmailpop3d_pop3dcmd:="@PREFIX@/bin/qmail-pop3d"}
: ${qmailpop3d_checkpassword:="@PREFIX@/bin/checkpassword"}
@@ -32,7 +33,7 @@ rcvar=${name}
required_files="@PKG_SYSCONFDIR@/control/me"
required_files="${required_files} @PKG_SYSCONFDIR@/control/concurrencypop3"
required_files="${required_files} @PKG_SYSCONFDIR@/tcp.pop3.cdb"
-command="@PREFIX@/bin/tcpserver"
+command="${qmailpop3d_tcpserver}"
procname=${name}
start_precmd="qmailpop3d_precmd"
extra_commands="stat pause cont cdb"
@@ -43,22 +44,22 @@ cdb_cmd="qmailpop3d_cdb"
qmailpop3d_precmd()
{
- # tcpserver(1) is akin to inetd(8), but runs one service per process.
- # We want to signal only the tcpserver process responsible for POP
- # service. Use argv0(1) to set procname to "qmailpop3d".
if [ -f /etc/rc.subr ] && ! checkyesno qmailpop3d_log; then
qmailpop3d_logcmd=${qmailpop3d_nologcmd}
fi
- command="@SETENV@ - ${qmailpop3d_postenv}
+ # tcpserver(1) is akin to inetd(8), but runs one service per process.
+ # We want to signal only the tcpserver process responsible for this
+ # service. Use argv0(1) to set procname to "qmailpop3d".
+ command="@PREFIX@/bin/pgrphack @SETENV@ - ${qmailpop3d_postenv}
@PREFIX@/bin/softlimit -m ${qmailpop3d_datalimit} ${qmailpop3d_pretcpserver}
-@PREFIX@/bin/argv0 @PREFIX@/bin/tcpserver ${name}
+@PREFIX@/bin/argv0 ${qmailpop3d_tcpserver} ${name}
${qmailpop3d_tcpflags} -x @PKG_SYSCONFDIR@/tcp.pop3.cdb
-c `@HEAD@ -1 @PKG_SYSCONFDIR@/control/concurrencypop3`
${qmailpop3d_tcphost} ${qmailpop3d_tcpport} @PREFIX@/bin/qmail-popup
`@HEAD@ -1 @PKG_SYSCONFDIR@/control/me` ${qmailpop3d_checkpassword}
${qmailpop3d_prepop3d} ${qmailpop3d_pop3dcmd} ${qmailpop3d_maildirname}
2>&1 |
-@PREFIX@/bin/setuidgid @QMAIL_LOG_USER@ ${qmailpop3d_logcmd}"
+@PREFIX@/bin/pgrphack @PREFIX@/bin/setuidgid @QMAIL_LOG_USER@ ${qmailpop3d_logcmd}"
command_args="&"
rc_flags=""
}
diff --git a/mail/qmail-run/files/qmailqread.sh b/mail/qmail-run/files/qmailqread.sh
index 449ce08bbc6..c3990e70a85 100644
--- a/mail/qmail-run/files/qmailqread.sh
+++ b/mail/qmail-run/files/qmailqread.sh
@@ -1,6 +1,6 @@
#!@RCD_SCRIPTS_SHELL@
#
-# $NetBSD: qmailqread.sh,v 1.10 2017/04/10 15:04:56 schmonz Exp $
+# $NetBSD: qmailqread.sh,v 1.11 2017/06/17 05:58:39 schmonz Exp $
#
# @PKGNAME@ script to control a service providing local non-root
# users access to see the queue. Adapted from a script by Steinar Haug.
@@ -16,6 +16,7 @@ name="qmailqread"
: ${qmailqread_tcpflags:="-R1"}
: ${qmailqread_tcphost:="127.0.0.1"}
: ${qmailqread_tcpport:="20025"}
+: ${qmailqread_tcpserver:="@PREFIX@/bin/tcpserver"}
: ${qmailqread_log:="YES"}
: ${qmailqread_logcmd:="logger -t nb${name} -p mail.info"}
: ${qmailqread_nologcmd:="@PREFIX@/bin/multilog -*"}
@@ -25,7 +26,7 @@ if [ -f /etc/rc.subr ]; then
fi
rcvar=${name}
-command="@PREFIX@/bin/tcpserver"
+command="${qmailqread_tcpserver}"
procname=${name}
start_precmd="qmailqread_precmd"
@@ -34,14 +35,17 @@ qmailqread_precmd()
if [ -f /etc/rc.subr ] && ! checkyesno qmailqread_log; then
qmailqread_logcmd=${qmailqread_nologcmd}
fi
- command="@SETENV@ - ${qmailqread_postenv}
-@PREFIX@/bin/argv0 @PREFIX@/bin/tcpserver ${name}
+ # tcpserver(1) is akin to inetd(8), but runs one service per process.
+ # We want to signal only the tcpserver process responsible for this
+ # service. Use argv0(1) to set procname to "qmailqread".
+ command="@PREFIX@/bin/pgrphack @SETENV@ - ${qmailqread_postenv}
+@PREFIX@/bin/argv0 ${qmailqread_tcpserver} ${name}
${qmailqread_tcpflags}
-u `@ID@ -u @QMAIL_SEND_USER@` -g `@ID@ -g @QMAIL_SEND_USER@`
${qmailqread_tcphost} ${qmailqread_tcpport}
@PREFIX@/bin/qmail-qread
2>&1 |
-@PREFIX@/bin/setuidgid @QMAIL_LOG_USER@ ${qmailqread_logcmd}"
+@PREFIX@/bin/pgrphack @PREFIX@/bin/setuidgid @QMAIL_LOG_USER@ ${qmailqread_logcmd}"
command_args="&"
rc_flags=""
}
diff --git a/mail/qmail-run/files/qmailsend.sh b/mail/qmail-run/files/qmailsend.sh
index 63a08211a18..ecf9f5cf779 100644
--- a/mail/qmail-run/files/qmailsend.sh
+++ b/mail/qmail-run/files/qmailsend.sh
@@ -1,6 +1,6 @@
#!@RCD_SCRIPTS_SHELL@
#
-# $NetBSD: qmailsend.sh,v 1.9 2017/04/10 15:04:56 schmonz Exp $
+# $NetBSD: qmailsend.sh,v 1.10 2017/06/17 05:58:39 schmonz Exp $
#
# @PKGNAME@ script to control qmail-send (local and outgoing mail).
#
@@ -44,7 +44,7 @@ qmailsend_precmd()
if [ -f /etc/rc.subr ] && ! checkyesno qmailsend_log; then
qmailsend_logcmd=${qmailsend_nologcmd}
fi
- command="@SETENV@ - ${qmailsend_postenv}
+ command="@PREFIX@/bin/pgrphack @SETENV@ - ${qmailsend_postenv}
qmail-start '$qmailsend_defaultdelivery'
${qmailsend_logcmd}"
command_args="&"
diff --git a/mail/qmail-run/files/qmailsmtpd.sh b/mail/qmail-run/files/qmailsmtpd.sh
index 8ea8d565026..81a1322f00c 100644
--- a/mail/qmail-run/files/qmailsmtpd.sh
+++ b/mail/qmail-run/files/qmailsmtpd.sh
@@ -1,6 +1,6 @@
#!@RCD_SCRIPTS_SHELL@
#
-# $NetBSD: qmailsmtpd.sh,v 1.13 2017/04/10 15:04:56 schmonz Exp $
+# $NetBSD: qmailsmtpd.sh,v 1.14 2017/06/17 05:58:39 schmonz Exp $
#
# @PKGNAME@ script to control qmail-smtpd (SMTP service).
#
@@ -15,8 +15,9 @@ name="qmailsmtpd"
: ${qmailsmtpd_tcpflags:="-vRl0"}
: ${qmailsmtpd_tcphost:="0"}
: ${qmailsmtpd_tcpport:="25"}
-: ${qmailsmtpd_datalimit:="146800640"}
+: ${qmailsmtpd_datalimit:="180000000"}
: ${qmailsmtpd_pretcpserver:=""}
+: ${qmailsmtpd_tcpserver:="@PREFIX@/bin/tcpserver"}
: ${qmailsmtpd_presmtpd:=""}
: ${qmailsmtpd_smtpdcmd:="@PREFIX@/bin/qmail-smtpd"}
: ${qmailsmtpd_postsmtpd:=""}
@@ -32,7 +33,7 @@ rcvar=${name}
required_files="@PKG_SYSCONFDIR@/control/concurrencyincoming"
required_files="${required_files} @PKG_SYSCONFDIR@/tcp.smtp.cdb"
required_files="${required_files} @PKG_SYSCONFDIR@/control/rcpthosts"
-command="@PREFIX@/bin/tcpserver"
+command="${qmailsmtpd_tcpserver}"
procname=${name}
start_precmd="qmailsmtpd_precmd"
extra_commands="stat pause cont cdb"
@@ -43,22 +44,22 @@ cdb_cmd="qmailsmtpd_cdb"
qmailsmtpd_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 "qmailsmtpd".
if [ -f /etc/rc.subr ] && ! checkyesno qmailsmtpd_log; then
qmailsmtpd_logcmd=${qmailsmtpd_nologcmd}
fi
- command="@SETENV@ - ${qmailsmtpd_postenv}
+ # tcpserver(1) is akin to inetd(8), but runs one service per process.
+ # We want to signal only the tcpserver process responsible for this
+ # service. Use argv0(1) to set procname to "qmailsmtpd".
+ command="@PREFIX@/bin/pgrphack @SETENV@ - ${qmailsmtpd_postenv}
@PREFIX@/bin/softlimit -m ${qmailsmtpd_datalimit} ${qmailsmtpd_pretcpserver}
-@PREFIX@/bin/argv0 @PREFIX@/bin/tcpserver ${name}
+@PREFIX@/bin/argv0 ${qmailsmtpd_tcpserver} ${name}
${qmailsmtpd_tcpflags} -x @PKG_SYSCONFDIR@/tcp.smtp.cdb
-c `@HEAD@ -1 @PKG_SYSCONFDIR@/control/concurrencyincoming`
-u `@ID@ -u @QMAIL_DAEMON_USER@` -g `@ID@ -g @QMAIL_DAEMON_USER@`
${qmailsmtpd_tcphost} ${qmailsmtpd_tcpport}
${qmailsmtpd_presmtpd} ${qmailsmtpd_smtpdcmd} ${qmailsmtpd_postsmtpd}
2>&1 |
-@PREFIX@/bin/setuidgid @QMAIL_LOG_USER@ ${qmailsmtpd_logcmd}"
+@PREFIX@/bin/pgrphack @PREFIX@/bin/setuidgid @QMAIL_LOG_USER@ ${qmailsmtpd_logcmd}"
command_args="&"
rc_flags=""
}
diff --git a/mail/qmail-run/options.mk b/mail/qmail-run/options.mk
index be2cf91ac59..b6941d84251 100644
--- a/mail/qmail-run/options.mk
+++ b/mail/qmail-run/options.mk
@@ -1,15 +1,10 @@
-# $NetBSD: options.mk,v 1.2 2017/04/09 12:58:46 schmonz Exp $
+# $NetBSD: options.mk,v 1.3 2017/06/17 05:58:39 schmonz Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.qmail-run
-PKG_SUPPORTED_OPTIONS+= qmail-run-ofmipd sasl tls
+PKG_SUPPORTED_OPTIONS+= sasl tls
.include "../../mk/bsd.options.mk"
-.if !empty(PKG_OPTIONS:Mqmail-run-ofmipd)
-DEPENDS+= mess822-[0-9]*:../../mail/mess822
-.endif
-
-
.if !empty(PKG_OPTIONS:Msasl)
DEPENDS+= spamdyke-[0-9]*:../../mail/spamdyke
.endif