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.diff -r1.2 -r1.2.106.1 pkgsrc/mail/qmail-run/DESCR
(bsiegert)
@@ -1,3 +1,3 @@ | @@ -1,3 +1,3 @@ | |||
1 | This package creates all the needed basic config files to run qmail, | 1 | This package creates all the needed basic config files to run qmail, | |
2 | and provides NetBSD-style rc.d scripts and an example mailer.conf. | 2 | provides example {mailer,spamdyke,stunnel}.conf and wrapper scripts for | |
3 | It also includes wrapper scripts for procmail and qmail-qfilter. | 3 | procmail and qmail-qfilter, and installs NetBSD-style rc.d scripts. |
@@ -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 | |||
4 | DISTNAME= qmail-run-20170114 | 4 | DISTNAME= qmail-run-20170404 | |
5 | CATEGORIES= mail | 5 | CATEGORIES= mail | |
6 | MASTER_SITES= # empty | 6 | MASTER_SITES= # empty | |
7 | DISTFILES= # empty | 7 | DISTFILES= # empty | |
8 | 8 | |||
9 | MAINTAINER= schmonz@NetBSD.org | 9 | MAINTAINER= schmonz@NetBSD.org | |
10 | COMMENT= Configures qmail to receive and deliver mail | 10 | COMMENT= Configures qmail to receive and deliver mail | |
11 | LICENSE= 2-clause-bsd | 11 | LICENSE= 2-clause-bsd | |
12 | 12 | |||
13 | DEPENDS+= mess822-[0-9]*:../../mail/mess822 | 13 | DEPENDS+= mess822-[0-9]*:../../mail/mess822 | |
14 | DEPENDS_QMAIL= qmail>=1.03nb8:../../mail/qmail | 14 | DEPENDS_QMAIL= qmail>=1.03nb8:../../mail/qmail | |
15 | DEPENDS+= ${DEPENDS_QMAIL} | 15 | DEPENDS+= ${DEPENDS_QMAIL} | |
16 | 16 | |||
17 | CONFLICTS+= qmail-qfilter-1.5nb1 | 17 | CONFLICTS+= qmail-qfilter-1.5nb1 | |
18 | 18 | |||
19 | WRKSRC= ${WRKDIR} | 19 | WRKSRC= ${WRKDIR} | |
20 | NO_BUILD= yes | 20 | NO_BUILD= yes | |
21 | NO_CHECKSUM= yes | 21 | NO_CHECKSUM= yes | |
22 | 22 | |||
23 | FILES_SUBST+= QMAIL_DAEMON_USER=${QMAIL_DAEMON_USER:Q} | |||
24 | FILES_SUBST+= QMAIL_LOG_USER=${QMAIL_LOG_USER:Q} | |||
25 | FILES_SUBST+= QMAIL_SEND_USER=${QMAIL_SEND_USER:Q} | |||
23 | FILES_SUBST+= QMAIL_QUEUE_EXTRA=${QMAIL_QUEUE_EXTRA:Q} | 26 | FILES_SUBST+= QMAIL_QUEUE_EXTRA=${QMAIL_QUEUE_EXTRA:Q} | |
24 | FILES_SUBST+= PKGNAME=${PKGNAME:Q} | 27 | FILES_SUBST+= PKGNAME=${PKGNAME:Q} | |
25 | MESSAGE_SUBST+= PKG_SYSCONFBASE=${PKG_SYSCONFBASE} | 28 | MESSAGE_SUBST+= PKG_SYSCONFBASE=${PKG_SYSCONFBASE} | |
26 | RCD_SCRIPTS= qmail qmailofmipd qmailpop3d qmailqread qmailsend qmailsmtpd | 29 | RCD_SCRIPTS= qmail qmailofmipd qmailpop3d qmailqread qmailsend qmailsmtpd | |
27 | 30 | |||
28 | INSTALLATION_DIRS= bin share/doc/qmail-run share/examples/qmail-run | 31 | INSTALLATION_DIRS= bin share/doc/qmail-run share/examples/qmail-run | |
32 | BUILD_DEFS+= QMAIL_DAEMON_USER QMAIL_LOG_USER QMAIL_SEND_USER | |||
29 | BUILD_DEFS+= QMAIL_QUEUE_EXTRA | 33 | BUILD_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) | |
37 | PKG_SYSCONFDIR.qmail-run!= \ | 41 | PKG_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) |
@@ -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 | |||
11 | name="qmailofmipd" | 11 | name="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 | |||
26 | if [ -f /etc/rc.subr ]; then | 26 | if [ -f /etc/rc.subr ]; then | |
27 | . /etc/rc.subr | 27 | . /etc/rc.subr | |
28 | fi | 28 | fi | |
29 | 29 | |||
30 | rcvar=${name} | 30 | rcvar=${name} | |
31 | required_files="@PKG_SYSCONFDIR@/control/concurrencyofmip" | 31 | required_files="@PKG_SYSCONFDIR@/control/concurrencyofmip" | |
32 | required_files="${required_files} @PKG_SYSCONFDIR@/tcp.ofmip.cdb" | 32 | required_files="${required_files} @PKG_SYSCONFDIR@/tcp.ofmip.cdb" | |
33 | required_files="${required_files} @PKG_SYSCONFDIR@/control/rcpthosts" | 33 | required_files="${required_files} @PKG_SYSCONFDIR@/control/rcpthosts" | |
34 | command="/usr/pkg/bin/tcpserver" | 34 | command="@PREFIX@/bin/tcpserver" | |
35 | procname=${name} | 35 | procname=${name} | |
36 | start_precmd="qmailofmipd_precmd" | 36 | start_precmd="qmailofmipd_precmd" | |
37 | extra_commands="stat pause cont cdb" | 37 | extra_commands="stat pause cont cdb" | |
38 | stat_cmd="qmailofmipd_stat" | 38 | stat_cmd="qmailofmipd_stat" | |
39 | pause_cmd="qmailofmipd_pause" | 39 | pause_cmd="qmailofmipd_pause" | |
40 | cont_cmd="qmailofmipd_cont" | 40 | cont_cmd="qmailofmipd_cont" | |
41 | cdb_cmd="qmailofmipd_cdb" | 41 | cdb_cmd="qmailofmipd_cdb" | |
42 | 42 | |||
43 | qmailofmipd_precmd() | 43 | qmailofmipd_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 | |||
56 | qmailofmipd_stat() | 56 | qmailofmipd_stat() | |
57 | { | 57 | { | |
58 | run_rc_command status | 58 | run_rc_command status | |
59 | } | 59 | } | |
60 | 60 | |||
61 | qmailofmipd_pause() | 61 | qmailofmipd_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() | |||
71 | qmailofmipd_cont() | 71 | qmailofmipd_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 | |||
81 | qmailofmipd_cdb() | 81 | qmailofmipd_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 | |||
88 | if [ -f /etc/rc.subr ]; then | 88 | if [ -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" | |
91 | else | 91 | else | |
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} | |
95 | fi | 95 | fi |
@@ -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 | |||
10 | name="qmailpop3d" | 10 | name="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" | |||
38 | stat_cmd="qmailpop3d_stat" | 38 | stat_cmd="qmailpop3d_stat" | |
39 | pause_cmd="qmailpop3d_pause" | 39 | pause_cmd="qmailpop3d_pause" | |
40 | cont_cmd="qmailpop3d_cont" | 40 | cont_cmd="qmailpop3d_cont" | |
41 | cdb_cmd="qmailpop3d_cdb" | 41 | cdb_cmd="qmailpop3d_cdb" | |
42 | 42 | |||
43 | qmailpop3d_precmd() | 43 | qmailpop3d_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 | |||
56 | qmailpop3d_stat() | 56 | qmailpop3d_stat() | |
57 | { | 57 | { | |
58 | run_rc_command status | 58 | run_rc_command status | |
59 | } | 59 | } | |
60 | 60 | |||
61 | qmailpop3d_pause() | 61 | qmailpop3d_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 |
@@ -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 | |||
11 | name="qmailsmtpd" | 11 | name="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" | |||
38 | stat_cmd="qmailsmtpd_stat" | 38 | stat_cmd="qmailsmtpd_stat" | |
39 | pause_cmd="qmailsmtpd_pause" | 39 | pause_cmd="qmailsmtpd_pause" | |
40 | cont_cmd="qmailsmtpd_cont" | 40 | cont_cmd="qmailsmtpd_cont" | |
41 | cdb_cmd="qmailsmtpd_cdb" | 41 | cdb_cmd="qmailsmtpd_cdb" | |
42 | 42 | |||
43 | qmailsmtpd_precmd() | 43 | qmailsmtpd_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 | |||
56 | qmailsmtpd_stat() | 56 | qmailsmtpd_stat() | |
57 | { | 57 | { | |
58 | run_rc_command status | 58 | run_rc_command status | |
59 | } | 59 | } | |
60 | 60 | |||
61 | qmailsmtpd_pause() | 61 | qmailsmtpd_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 |
@@ -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 | |||
12 | name="qmailqread" | 12 | name="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 | |
21 | fi | 21 | fi | |
22 | 22 | |||
23 | rcvar=${name} | 23 | rcvar=${name} | |
24 | command="@PREFIX@/bin/tcpserver" | 24 | command="@PREFIX@/bin/tcpserver" | |
25 | procname=${name} | 25 | procname=${name} | |
26 | start_precmd="qmailqread_precmd" | 26 | start_precmd="qmailqread_precmd" | |
27 | 27 | |||
28 | qmailqread_precmd() | 28 | qmailqread_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 | |||
38 | if [ -f /etc/rc.subr ]; then | 38 | if [ -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" | |
41 | else | 41 | else | |
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} | |
45 | fi | 45 | fi |