Mon Apr 17 16:12:20 2017 UTC ()
Pullup ticket #5255 - requested by schmonz
mail/qmail-run: bugfix

Revisions pulled up:
- mail/qmail-run/DESCR                                          1.3
- mail/qmail-run/Makefile                                       1.32
- mail/qmail-run/files/qmailofmipd.sh                           1.2
- mail/qmail-run/files/qmailpop3d.sh                            1.11
- mail/qmail-run/files/qmailqread.sh                            1.9
- mail/qmail-run/files/qmailsmtpd.sh                            1.11

---
   Module Name:	pkgsrc
   Committed By:	schmonz
   Date:		Sun Apr  2 22:27:52 UTC 2017

   Modified Files:
   	pkgsrc/mail/qmail-run: DESCR

   Log Message:
   Document more stuff this package includes nowadays.

---
   Module Name:	pkgsrc
   Committed By:	schmonz
   Date:		Tue Apr  4 07:51:03 UTC 2017

   Modified Files:
   	pkgsrc/mail/qmail-run: Makefile
   	pkgsrc/mail/qmail-run/files: qmailofmipd.sh qmailpop3d.sh qmailqread.sh
   	    qmailsmtpd.sh

   Log Message:
   Substitute configured qmail users in rc.d scripts. Un-hardcode some
   paths in qmailofmipd.sh, somehow missed in 20170109. Bump version.


(bsiegert)
diff -r1.2 -r1.2.106.1 pkgsrc/mail/qmail-run/DESCR
diff -r1.31 -r1.31.2.1 pkgsrc/mail/qmail-run/Makefile
diff -r1.1 -r1.1.2.1 pkgsrc/mail/qmail-run/files/qmailofmipd.sh
diff -r1.10 -r1.10.12.1 pkgsrc/mail/qmail-run/files/qmailpop3d.sh
diff -r1.10 -r1.10.12.1 pkgsrc/mail/qmail-run/files/qmailsmtpd.sh
diff -r1.8 -r1.8.12.1 pkgsrc/mail/qmail-run/files/qmailqread.sh

cvs diff -r1.2 -r1.2.106.1 pkgsrc/mail/qmail-run/DESCR (expand / switch to unified diff)

--- pkgsrc/mail/qmail-run/DESCR 2004/08/23 03:47:48 1.2
+++ pkgsrc/mail/qmail-run/DESCR 2017/04/17 16:12:20 1.2.106.1
@@ -1,3 +1,3 @@ @@ -1,3 +1,3 @@
1This package creates all the needed basic config files to run qmail, 1This package creates all the needed basic config files to run qmail,
2and provides NetBSD-style rc.d scripts and an example mailer.conf. 2provides example {mailer,spamdyke,stunnel}.conf and wrapper scripts for
3It also includes wrapper scripts for procmail and qmail-qfilter. 3procmail and qmail-qfilter, and installs NetBSD-style rc.d scripts.

cvs diff -r1.31 -r1.31.2.1 pkgsrc/mail/qmail-run/Makefile (expand / switch to unified diff)

--- pkgsrc/mail/qmail-run/Makefile 2017/01/14 23:00:31 1.31
+++ pkgsrc/mail/qmail-run/Makefile 2017/04/17 16:12:20 1.31.2.1
@@ -1,41 +1,45 @@ @@ -1,41 +1,45 @@
1# $NetBSD: Makefile,v 1.31 2017/01/14 23:00:31 schmonz Exp $ 1# $NetBSD: Makefile,v 1.31.2.1 2017/04/17 16:12:20 bsiegert Exp $
2# 2#
3 3
4DISTNAME= qmail-run-20170114 4DISTNAME= qmail-run-20170404
5CATEGORIES= mail 5CATEGORIES= mail
6MASTER_SITES= # empty 6MASTER_SITES= # empty
7DISTFILES= # empty 7DISTFILES= # empty
8 8
9MAINTAINER= schmonz@NetBSD.org 9MAINTAINER= schmonz@NetBSD.org
10COMMENT= Configures qmail to receive and deliver mail 10COMMENT= Configures qmail to receive and deliver mail
11LICENSE= 2-clause-bsd 11LICENSE= 2-clause-bsd
12 12
13DEPENDS+= mess822-[0-9]*:../../mail/mess822 13DEPENDS+= mess822-[0-9]*:../../mail/mess822
14DEPENDS_QMAIL= qmail>=1.03nb8:../../mail/qmail 14DEPENDS_QMAIL= qmail>=1.03nb8:../../mail/qmail
15DEPENDS+= ${DEPENDS_QMAIL} 15DEPENDS+= ${DEPENDS_QMAIL}
16 16
17CONFLICTS+= qmail-qfilter-1.5nb1 17CONFLICTS+= qmail-qfilter-1.5nb1
18 18
19WRKSRC= ${WRKDIR} 19WRKSRC= ${WRKDIR}
20NO_BUILD= yes 20NO_BUILD= yes
21NO_CHECKSUM= yes 21NO_CHECKSUM= yes
22 22
 23FILES_SUBST+= QMAIL_DAEMON_USER=${QMAIL_DAEMON_USER:Q}
 24FILES_SUBST+= QMAIL_LOG_USER=${QMAIL_LOG_USER:Q}
 25FILES_SUBST+= QMAIL_SEND_USER=${QMAIL_SEND_USER:Q}
23FILES_SUBST+= QMAIL_QUEUE_EXTRA=${QMAIL_QUEUE_EXTRA:Q} 26FILES_SUBST+= QMAIL_QUEUE_EXTRA=${QMAIL_QUEUE_EXTRA:Q}
24FILES_SUBST+= PKGNAME=${PKGNAME:Q} 27FILES_SUBST+= PKGNAME=${PKGNAME:Q}
25MESSAGE_SUBST+= PKG_SYSCONFBASE=${PKG_SYSCONFBASE} 28MESSAGE_SUBST+= PKG_SYSCONFBASE=${PKG_SYSCONFBASE}
26RCD_SCRIPTS= qmail qmailofmipd qmailpop3d qmailqread qmailsend qmailsmtpd 29RCD_SCRIPTS= qmail qmailofmipd qmailpop3d qmailqread qmailsend qmailsmtpd
27 30
28INSTALLATION_DIRS= bin share/doc/qmail-run share/examples/qmail-run 31INSTALLATION_DIRS= bin share/doc/qmail-run share/examples/qmail-run
 32BUILD_DEFS+= QMAIL_DAEMON_USER QMAIL_LOG_USER QMAIL_SEND_USER
29BUILD_DEFS+= QMAIL_QUEUE_EXTRA 33BUILD_DEFS+= QMAIL_QUEUE_EXTRA
30 34
31.include "../../mk/bsd.prefs.mk" 35.include "../../mk/bsd.prefs.mk"
32 36
33# Detect the PKG_SYSCONFDIR of the installed qmail, so we can create 37# Detect the PKG_SYSCONFDIR of the installed qmail, so we can create
34# config files there and refer to them from rc.d scripts. 38# config files there and refer to them from rc.d scripts.
35# 39#
36.if !defined(PKG_SYSCONFDIR.qmail-run) 40.if !defined(PKG_SYSCONFDIR.qmail-run)
37PKG_SYSCONFDIR.qmail-run!= \ 41PKG_SYSCONFDIR.qmail-run!= \
38 ${PKG_INFO} -Q PKG_SYSCONFDIR \ 42 ${PKG_INFO} -Q PKG_SYSCONFDIR \
39 ${DEPENDS_QMAIL:C/:.*$//:Q} 2>/dev/null || \ 43 ${DEPENDS_QMAIL:C/:.*$//:Q} 2>/dev/null || \
40 ${ECHO} "PKG_SYSCONFDIR.qmail-run_not_set" 44 ${ECHO} "PKG_SYSCONFDIR.qmail-run_not_set"
41. if empty(PKG_SYSCONFDIR.qmail-run:M*not_set) 45. if empty(PKG_SYSCONFDIR.qmail-run:M*not_set)

cvs diff -r1.1 -r1.1.2.1 pkgsrc/mail/qmail-run/files/qmailofmipd.sh (expand / switch to unified diff)

--- pkgsrc/mail/qmail-run/files/qmailofmipd.sh 2017/01/09 04:58:09 1.1
+++ pkgsrc/mail/qmail-run/files/qmailofmipd.sh 2017/04/17 16:12:20 1.1.2.1
@@ -1,64 +1,64 @@ @@ -1,64 +1,64 @@
1#!@RCD_SCRIPTS_SHELL@ 1#!@RCD_SCRIPTS_SHELL@
2# 2#
3# $NetBSD: qmailofmipd.sh,v 1.1 2017/01/09 04:58:09 schmonz Exp $ 3# $NetBSD: qmailofmipd.sh,v 1.1.2.1 2017/04/17 16:12:20 bsiegert Exp $
4# 4#
5# @PKGNAME@ script to control ofmipd (SMTP submission service). 5# @PKGNAME@ script to control ofmipd (SMTP submission service).
6# 6#
7 7
8# PROVIDE: qmailofmipd mail 8# PROVIDE: qmailofmipd mail
9# REQUIRE: qmailsend 9# REQUIRE: qmailsend
10 10
11name="qmailofmipd" 11name="qmailofmipd"
12 12
13# User-settable rc.conf variables and their default values: 13# User-settable rc.conf variables and their default values:
14: ${qmailofmipd_postenv:=""} 14: ${qmailofmipd_postenv:=""}
15: ${qmailofmipd_tcpflags:="-vRl0"} 15: ${qmailofmipd_tcpflags:="-vRl0"}
16: ${qmailofmipd_tcphost:="127.0.0.1"} 16: ${qmailofmipd_tcphost:="127.0.0.1"}
17: ${qmailofmipd_tcpport:="26"} 17: ${qmailofmipd_tcpport:="26"}
18: ${qmailofmipd_datalimit:="146800640"} 18: ${qmailofmipd_datalimit:="146800640"}
19: ${qmailofmipd_pretcpserver:=""} 19: ${qmailofmipd_pretcpserver:=""}
20: ${qmailofmipd_preofmipd:=""} 20: ${qmailofmipd_preofmipd:=""}
21: ${qmailofmipd_postofmipd:=""} 21: ${qmailofmipd_postofmipd:=""}
22: ${qmailofmipd_log:="YES"} 22: ${qmailofmipd_log:="YES"}
23: ${qmailofmipd_logcmd:="logger -t nb${name} -p mail.info"} 23: ${qmailofmipd_logcmd:="logger -t nb${name} -p mail.info"}
24: ${qmailofmipd_nologcmd:="/usr/pkg/bin/multilog -*"} 24: ${qmailofmipd_nologcmd:="@PREFIX@/bin/multilog -*"}
25 25
26if [ -f /etc/rc.subr ]; then 26if [ -f /etc/rc.subr ]; then
27 . /etc/rc.subr 27 . /etc/rc.subr
28fi 28fi
29 29
30rcvar=${name} 30rcvar=${name}
31required_files="@PKG_SYSCONFDIR@/control/concurrencyofmip" 31required_files="@PKG_SYSCONFDIR@/control/concurrencyofmip"
32required_files="${required_files} @PKG_SYSCONFDIR@/tcp.ofmip.cdb" 32required_files="${required_files} @PKG_SYSCONFDIR@/tcp.ofmip.cdb"
33required_files="${required_files} @PKG_SYSCONFDIR@/control/rcpthosts" 33required_files="${required_files} @PKG_SYSCONFDIR@/control/rcpthosts"
34command="/usr/pkg/bin/tcpserver" 34command="@PREFIX@/bin/tcpserver"
35procname=${name} 35procname=${name}
36start_precmd="qmailofmipd_precmd" 36start_precmd="qmailofmipd_precmd"
37extra_commands="stat pause cont cdb" 37extra_commands="stat pause cont cdb"
38stat_cmd="qmailofmipd_stat" 38stat_cmd="qmailofmipd_stat"
39pause_cmd="qmailofmipd_pause" 39pause_cmd="qmailofmipd_pause"
40cont_cmd="qmailofmipd_cont" 40cont_cmd="qmailofmipd_cont"
41cdb_cmd="qmailofmipd_cdb" 41cdb_cmd="qmailofmipd_cdb"
42 42
43qmailofmipd_precmd() 43qmailofmipd_precmd()
44{ 44{
45 # tcpserver(1) is akin to inetd(8), but runs one service per process. 45 # tcpserver(1) is akin to inetd(8), but runs one service per process.
46 # We want to signal only the tcpserver process responsible for SMTP 46 # We want to signal only the tcpserver process responsible for SMTP
47 # service. Use argv0(1) to set procname to "qmailofmipd". 47 # service. Use argv0(1) to set procname to "qmailofmipd".
48 if [ -f /etc/rc.subr ]; then 48 if [ -f /etc/rc.subr ]; then
49 checkyesno qmailofmipd_log || qmailofmipd_logcmd=${qmailofmipd_nologcmd} 49 checkyesno qmailofmipd_log || qmailofmipd_logcmd=${qmailofmipd_nologcmd}
50 fi 50 fi
51 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}" 51 command="@SETENV@ - ${qmailofmipd_postenv} @PREFIX@/bin/softlimit -m ${qmailofmipd_datalimit} ${qmailofmipd_pretcpserver} @PREFIX@/bin/argv0 @PREFIX@/bin/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} @PREFIX@/bin/ofmipd ${qmailofmipd_postofmipd} 2>&1 | @PREFIX@/bin/setuidgid @QMAIL_LOG_USER@ ${qmailofmipd_logcmd}"
52 command_args="&" 52 command_args="&"
53 rc_flags="" 53 rc_flags=""
54} 54}
55 55
56qmailofmipd_stat() 56qmailofmipd_stat()
57{ 57{
58 run_rc_command status 58 run_rc_command status
59} 59}
60 60
61qmailofmipd_pause() 61qmailofmipd_pause()
62{ 62{
63 if ! statusmsg=`run_rc_command status`; then 63 if ! statusmsg=`run_rc_command status`; then
64 echo $statusmsg 64 echo $statusmsg
@@ -71,25 +71,25 @@ qmailofmipd_pause() @@ -71,25 +71,25 @@ qmailofmipd_pause()
71qmailofmipd_cont() 71qmailofmipd_cont()
72{ 72{
73 if ! statusmsg=`run_rc_command status`; then 73 if ! statusmsg=`run_rc_command status`; then
74 echo $statusmsg 74 echo $statusmsg
75 return 1 75 return 1
76 fi 76 fi
77 echo "Continuing ${name}." 77 echo "Continuing ${name}."
78 kill -CONT $rc_pid 78 kill -CONT $rc_pid
79} 79}
80 80
81qmailofmipd_cdb() 81qmailofmipd_cdb()
82{ 82{
83 echo "Reloading @PKG_SYSCONFDIR@/tcp.ofmip." 83 echo "Reloading @PKG_SYSCONFDIR@/tcp.ofmip."
84 /usr/pkg/bin/tcprules @PKG_SYSCONFDIR@/tcp.ofmip.cdb @PKG_SYSCONFDIR@/tcp.ofmip.tmp < @PKG_SYSCONFDIR@/tcp.ofmip 84 @PREFIX@/bin/tcprules @PKG_SYSCONFDIR@/tcp.ofmip.cdb @PKG_SYSCONFDIR@/tcp.ofmip.tmp < @PKG_SYSCONFDIR@/tcp.ofmip
85 /bin/chmod 644 @PKG_SYSCONFDIR@/tcp.ofmip.cdb 85 /bin/chmod 644 @PKG_SYSCONFDIR@/tcp.ofmip.cdb
86} 86}
87 87
88if [ -f /etc/rc.subr ]; then 88if [ -f /etc/rc.subr ]; then
89 load_rc_config $name 89 load_rc_config $name
90 run_rc_command "$1" 90 run_rc_command "$1"
91else 91else
92 echo -n " ${name}" 92 echo -n " ${name}"
93 qmailofmipd_precmd 93 qmailofmipd_precmd
94 eval ${command} ${qmailofmipd_flags} ${command_args} 94 eval ${command} ${qmailofmipd_flags} ${command_args}
95fi 95fi

cvs diff -r1.10 -r1.10.12.1 pkgsrc/mail/qmail-run/files/qmailpop3d.sh (expand / switch to unified diff)

--- pkgsrc/mail/qmail-run/files/qmailpop3d.sh 2015/11/25 12:51:30 1.10
+++ pkgsrc/mail/qmail-run/files/qmailpop3d.sh 2017/04/17 16:12:20 1.10.12.1
@@ -1,16 +1,16 @@ @@ -1,16 +1,16 @@
1#!@RCD_SCRIPTS_SHELL@ 1#!@RCD_SCRIPTS_SHELL@
2# 2#
3# $NetBSD: qmailpop3d.sh,v 1.10 2015/11/25 12:51:30 jperkin Exp $ 3# $NetBSD: qmailpop3d.sh,v 1.10.12.1 2017/04/17 16:12:20 bsiegert Exp $
4# 4#
5# @PKGNAME@ script to control qmail-pop3d (POP3 server for Maildirs). 5# @PKGNAME@ script to control qmail-pop3d (POP3 server for Maildirs).
6# 6#
7 7
8# PROVIDE: qmailpop3d mail 8# PROVIDE: qmailpop3d mail
9 9
10name="qmailpop3d" 10name="qmailpop3d"
11 11
12# User-settable rc.conf variables and their default values: 12# User-settable rc.conf variables and their default values:
13: ${qmailpop3d_postenv:=""} 13: ${qmailpop3d_postenv:=""}
14: ${qmailpop3d_tcpflags:="-vRHl0"} 14: ${qmailpop3d_tcpflags:="-vRHl0"}
15: ${qmailpop3d_tcphost:="0"} 15: ${qmailpop3d_tcphost:="0"}
16: ${qmailpop3d_tcpport:="110"} 16: ${qmailpop3d_tcpport:="110"}
@@ -38,27 +38,27 @@ extra_commands="stat pause cont cdb" @@ -38,27 +38,27 @@ extra_commands="stat pause cont cdb"
38stat_cmd="qmailpop3d_stat" 38stat_cmd="qmailpop3d_stat"
39pause_cmd="qmailpop3d_pause" 39pause_cmd="qmailpop3d_pause"
40cont_cmd="qmailpop3d_cont" 40cont_cmd="qmailpop3d_cont"
41cdb_cmd="qmailpop3d_cdb" 41cdb_cmd="qmailpop3d_cdb"
42 42
43qmailpop3d_precmd() 43qmailpop3d_precmd()
44{ 44{
45 # tcpserver(1) is akin to inetd(8), but runs one service per process. 45 # tcpserver(1) is akin to inetd(8), but runs one service per process.
46 # We want to signal only the tcpserver process responsible for POP 46 # We want to signal only the tcpserver process responsible for POP
47 # service. Use argv0(1) to set procname to "qmailpop3d". 47 # service. Use argv0(1) to set procname to "qmailpop3d".
48 if [ -f /etc/rc.subr ]; then 48 if [ -f /etc/rc.subr ]; then
49 checkyesno qmailpop3d_log || qmailpop3d_logcmd=${qmailpop3d_nologcmd} 49 checkyesno qmailpop3d_log || qmailpop3d_logcmd=${qmailpop3d_nologcmd}
50 fi 50 fi
51 command="@SETENV@ - ${qmailpop3d_postenv} @PREFIX@/bin/softlimit -m ${qmailpop3d_datalimit} ${qmailpop3d_pretcpserver} @PREFIX@/bin/argv0 @PREFIX@/bin/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} @PREFIX@/bin/qmail-pop3d ${qmailpop3d_maildirname} 2>&1 | @PREFIX@/bin/setuidgid qmaill ${qmailpop3d_logcmd}" 51 command="@SETENV@ - ${qmailpop3d_postenv} @PREFIX@/bin/softlimit -m ${qmailpop3d_datalimit} ${qmailpop3d_pretcpserver} @PREFIX@/bin/argv0 @PREFIX@/bin/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} @PREFIX@/bin/qmail-pop3d ${qmailpop3d_maildirname} 2>&1 | @PREFIX@/bin/setuidgid @QMAIL_LOG_USER@ ${qmailpop3d_logcmd}"
52 command_args="&" 52 command_args="&"
53 rc_flags="" 53 rc_flags=""
54} 54}
55 55
56qmailpop3d_stat() 56qmailpop3d_stat()
57{ 57{
58 run_rc_command status 58 run_rc_command status
59} 59}
60 60
61qmailpop3d_pause() 61qmailpop3d_pause()
62{ 62{
63 if ! statusmsg=`run_rc_command status`; then 63 if ! statusmsg=`run_rc_command status`; then
64 @ECHO@ $statusmsg 64 @ECHO@ $statusmsg

cvs diff -r1.10 -r1.10.12.1 pkgsrc/mail/qmail-run/files/qmailsmtpd.sh (expand / switch to unified diff)

--- pkgsrc/mail/qmail-run/files/qmailsmtpd.sh 2015/11/25 12:51:30 1.10
+++ pkgsrc/mail/qmail-run/files/qmailsmtpd.sh 2017/04/17 16:12:20 1.10.12.1
@@ -1,16 +1,16 @@ @@ -1,16 +1,16 @@
1#!@RCD_SCRIPTS_SHELL@ 1#!@RCD_SCRIPTS_SHELL@
2# 2#
3# $NetBSD: qmailsmtpd.sh,v 1.10 2015/11/25 12:51:30 jperkin Exp $ 3# $NetBSD: qmailsmtpd.sh,v 1.10.12.1 2017/04/17 16:12:20 bsiegert Exp $
4# 4#
5# @PKGNAME@ script to control qmail-smtpd (SMTP service). 5# @PKGNAME@ script to control qmail-smtpd (SMTP service).
6# 6#
7 7
8# PROVIDE: qmailsmtpd mail 8# PROVIDE: qmailsmtpd mail
9# REQUIRE: qmailsend 9# REQUIRE: qmailsend
10 10
11name="qmailsmtpd" 11name="qmailsmtpd"
12 12
13# User-settable rc.conf variables and their default values: 13# User-settable rc.conf variables and their default values:
14: ${qmailsmtpd_postenv:="QMAILQUEUE=@PREFIX@/bin/qmail-queue"} 14: ${qmailsmtpd_postenv:="QMAILQUEUE=@PREFIX@/bin/qmail-queue"}
15: ${qmailsmtpd_tcpflags:="-vRl0"} 15: ${qmailsmtpd_tcpflags:="-vRl0"}
16: ${qmailsmtpd_tcphost:="0"} 16: ${qmailsmtpd_tcphost:="0"}
@@ -38,27 +38,27 @@ extra_commands="stat pause cont cdb" @@ -38,27 +38,27 @@ extra_commands="stat pause cont cdb"
38stat_cmd="qmailsmtpd_stat" 38stat_cmd="qmailsmtpd_stat"
39pause_cmd="qmailsmtpd_pause" 39pause_cmd="qmailsmtpd_pause"
40cont_cmd="qmailsmtpd_cont" 40cont_cmd="qmailsmtpd_cont"
41cdb_cmd="qmailsmtpd_cdb" 41cdb_cmd="qmailsmtpd_cdb"
42 42
43qmailsmtpd_precmd() 43qmailsmtpd_precmd()
44{ 44{
45 # tcpserver(1) is akin to inetd(8), but runs one service per process. 45 # tcpserver(1) is akin to inetd(8), but runs one service per process.
46 # We want to signal only the tcpserver process responsible for SMTP 46 # We want to signal only the tcpserver process responsible for SMTP
47 # service. Use argv0(1) to set procname to "qmailsmtpd". 47 # service. Use argv0(1) to set procname to "qmailsmtpd".
48 if [ -f /etc/rc.subr ]; then 48 if [ -f /etc/rc.subr ]; then
49 checkyesno qmailsmtpd_log || qmailsmtpd_logcmd=${qmailsmtpd_nologcmd} 49 checkyesno qmailsmtpd_log || qmailsmtpd_logcmd=${qmailsmtpd_nologcmd}
50 fi 50 fi
51 command="@SETENV@ - ${qmailsmtpd_postenv} @PREFIX@/bin/softlimit -m ${qmailsmtpd_datalimit} ${qmailsmtpd_pretcpserver} @PREFIX@/bin/argv0 @PREFIX@/bin/tcpserver ${name} ${qmailsmtpd_tcpflags} -x @PKG_SYSCONFDIR@/tcp.smtp.cdb -c `@HEAD@ -1 @PKG_SYSCONFDIR@/control/concurrencyincoming` -u `@ID@ -u qmaild` -g `@ID@ -g qmaild` ${qmailsmtpd_tcphost} ${qmailsmtpd_tcpport} ${qmailsmtpd_presmtpd} @PREFIX@/bin/qmail-smtpd ${qmailsmtpd_postsmtpd} 2>&1 | @PREFIX@/bin/setuidgid qmaill ${qmailsmtpd_logcmd}" 51 command="@SETENV@ - ${qmailsmtpd_postenv} @PREFIX@/bin/softlimit -m ${qmailsmtpd_datalimit} ${qmailsmtpd_pretcpserver} @PREFIX@/bin/argv0 @PREFIX@/bin/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} @PREFIX@/bin/qmail-smtpd ${qmailsmtpd_postsmtpd} 2>&1 | @PREFIX@/bin/setuidgid @QMAIL_LOG_USER@ ${qmailsmtpd_logcmd}"
52 command_args="&" 52 command_args="&"
53 rc_flags="" 53 rc_flags=""
54} 54}
55 55
56qmailsmtpd_stat() 56qmailsmtpd_stat()
57{ 57{
58 run_rc_command status 58 run_rc_command status
59} 59}
60 60
61qmailsmtpd_pause() 61qmailsmtpd_pause()
62{ 62{
63 if ! statusmsg=`run_rc_command status`; then 63 if ! statusmsg=`run_rc_command status`; then
64 @ECHO@ $statusmsg 64 @ECHO@ $statusmsg

cvs diff -r1.8 -r1.8.12.1 pkgsrc/mail/qmail-run/files/qmailqread.sh (expand / switch to unified diff)

--- pkgsrc/mail/qmail-run/files/qmailqread.sh 2015/11/25 12:51:30 1.8
+++ pkgsrc/mail/qmail-run/files/qmailqread.sh 2017/04/17 16:12:20 1.8.12.1
@@ -1,16 +1,16 @@ @@ -1,16 +1,16 @@
1#!@RCD_SCRIPTS_SHELL@ 1#!@RCD_SCRIPTS_SHELL@
2# 2#
3# $NetBSD: qmailqread.sh,v 1.8 2015/11/25 12:51:30 jperkin Exp $ 3# $NetBSD: qmailqread.sh,v 1.8.12.1 2017/04/17 16:12:20 bsiegert Exp $
4# 4#
5# @PKGNAME@ script to control a service providing local non-root 5# @PKGNAME@ script to control a service providing local non-root
6# users access to see the queue. Adapted from a script by Steinar Haug. 6# users access to see the queue. Adapted from a script by Steinar Haug.
7# 7#
8 8
9# PROVIDE: qmailqread mail 9# PROVIDE: qmailqread mail
10# REQUIRE: qmailsend 10# REQUIRE: qmailsend
11 11
12name="qmailqread" 12name="qmailqread"
13 13
14# User-settable rc.conf variables and their default values: 14# User-settable rc.conf variables and their default values:
15: ${qmailqread_log:="YES"} 15: ${qmailqread_log:="YES"}
16: ${qmailqread_logcmd:="logger -t nb${name} -p mail.info"} 16: ${qmailqread_logcmd:="logger -t nb${name} -p mail.info"}
@@ -20,26 +20,26 @@ if [ -f /etc/rc.subr ]; then @@ -20,26 +20,26 @@ if [ -f /etc/rc.subr ]; then
20 . /etc/rc.subr 20 . /etc/rc.subr
21fi 21fi
22 22
23rcvar=${name} 23rcvar=${name}
24command="@PREFIX@/bin/tcpserver" 24command="@PREFIX@/bin/tcpserver"
25procname=${name} 25procname=${name}
26start_precmd="qmailqread_precmd" 26start_precmd="qmailqread_precmd"
27 27
28qmailqread_precmd() 28qmailqread_precmd()
29{ 29{
30 if [ -f /etc/rc.subr ]; then 30 if [ -f /etc/rc.subr ]; then
31 checkyesno qmailqread_log || qmailqread_logcmd=${qmailqread_nologcmd} 31 checkyesno qmailqread_log || qmailqread_logcmd=${qmailqread_nologcmd}
32 fi 32 fi
33 command="@SETENV@ - @PREFIX@/bin/argv0 @PREFIX@/bin/tcpserver ${name} -R -1 -u `@ID@ -u qmails` -g `@ID@ -g qmails` 127.0.0.1 20025 @PREFIX@/bin/qmail-qread 2>&1 | @PREFIX@/bin/setuidgid qmaill ${qmailqread_logcmd}" 33 command="@SETENV@ - @PREFIX@/bin/argv0 @PREFIX@/bin/tcpserver ${name} -R -1 -u `@ID@ -u @QMAIL_SEND_USER@` -g `@ID@ -g @QMAIL_SEND_USER@` 127.0.0.1 20025 @PREFIX@/bin/qmail-qread 2>&1 | @PREFIX@/bin/setuidgid @QMAIL_LOG_USER@ ${qmailqread_logcmd}"
34 command_args="&" 34 command_args="&"
35 rc_flags="" 35 rc_flags=""
36} 36}
37 37
38if [ -f /etc/rc.subr ]; then 38if [ -f /etc/rc.subr ]; then
39 load_rc_config $name 39 load_rc_config $name
40 run_rc_command "$1" 40 run_rc_command "$1"
41else 41else
42 @ECHO_N@ " ${name}" 42 @ECHO_N@ " ${name}"
43 qmailqread_precmd 43 qmailqread_precmd
44 eval ${command} ${qmailqread_flags} ${command_args} 44 eval ${command} ${qmailqread_flags} ${command_args}
45fi 45fi