diff options
author | schmonz <schmonz> | 2017-04-10 15:04:56 +0000 |
---|---|---|
committer | schmonz <schmonz> | 2017-04-10 15:04:56 +0000 |
commit | a8564914f2a72f6f71794edb73ec4f3cb712702e (patch) | |
tree | 4b98f6b72f7c19ce5cd1afb9ac94481f88082533 /mail | |
parent | 1e2e27cd412953343b905f34007a7fbe6ca9c127 (diff) | |
download | pkgsrc-a8564914f2a72f6f71794edb73ec4f3cb712702e.tar.gz |
Wrap (or shorten) long lines. Parameterize some qmailqread config to
match other scripts. Bump version.
Diffstat (limited to 'mail')
-rw-r--r-- | mail/qmail-run/Makefile | 4 | ||||
-rw-r--r-- | mail/qmail-run/files/qmailofmipd.sh | 19 | ||||
-rw-r--r-- | mail/qmail-run/files/qmailpop3d.sh | 17 | ||||
-rw-r--r-- | mail/qmail-run/files/qmailqread.sh | 19 | ||||
-rw-r--r-- | mail/qmail-run/files/qmailsend.sh | 10 | ||||
-rw-r--r-- | mail/qmail-run/files/qmailsmtpd.sh | 17 |
6 files changed, 63 insertions, 23 deletions
diff --git a/mail/qmail-run/Makefile b/mail/qmail-run/Makefile index 8956d2e3935..2f852cceac7 100644 --- a/mail/qmail-run/Makefile +++ b/mail/qmail-run/Makefile @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.33 2017/04/09 12:58:46 schmonz Exp $ +# $NetBSD: Makefile,v 1.34 2017/04/10 15:04:56 schmonz Exp $ # -DISTNAME= qmail-run-20170409 +DISTNAME= qmail-run-20170410 CATEGORIES= mail MASTER_SITES= # empty DISTFILES= # empty diff --git a/mail/qmail-run/files/qmailofmipd.sh b/mail/qmail-run/files/qmailofmipd.sh index 3e3d5b39cce..56253e21374 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.3 2017/04/09 12:58:46 schmonz Exp $ +# $NetBSD: qmailofmipd.sh,v 1.4 2017/04/10 15:04:56 schmonz Exp $ # # @PKGNAME@ script to control ofmipd (SMTP submission service). # @@ -44,12 +44,21 @@ 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 + # 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 ]; then - checkyesno qmailofmipd_log || qmailofmipd_logcmd=${qmailofmipd_nologcmd} + if [ -f /etc/rc.subr ] && ! checkyesno qmailofmipd_log; then + qmailofmipd_logcmd=${qmailofmipd_nologcmd} fi - 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} ${qmailofmipd_ofmipdcmd} ${qmailofmipd_postofmipd} 2>&1 | @PREFIX@/bin/setuidgid @QMAIL_LOG_USER@ ${qmailofmipd_logcmd}" + 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} ${qmailofmipd_ofmipdcmd} ${qmailofmipd_postofmipd} +2>&1 | +@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 e720734dd66..8af77bcd246 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.12 2017/04/09 12:58:46 schmonz Exp $ +# $NetBSD: qmailpop3d.sh,v 1.13 2017/04/10 15:04:56 schmonz Exp $ # # @PKGNAME@ script to control qmail-pop3d (POP3 server for Maildirs). # @@ -46,10 +46,19 @@ 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 ]; then - checkyesno qmailpop3d_log || qmailpop3d_logcmd=${qmailpop3d_nologcmd} + if [ -f /etc/rc.subr ] && ! checkyesno qmailpop3d_log; then + qmailpop3d_logcmd=${qmailpop3d_nologcmd} fi - 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} ${qmailpop3d_pop3dcmd} ${qmailpop3d_maildirname} 2>&1 | @PREFIX@/bin/setuidgid @QMAIL_LOG_USER@ ${qmailpop3d_logcmd}" + 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} ${qmailpop3d_pop3dcmd} ${qmailpop3d_maildirname} +2>&1 | +@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 30270d269f5..449ce08bbc6 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.9 2017/04/04 07:51:03 schmonz Exp $ +# $NetBSD: qmailqread.sh,v 1.10 2017/04/10 15:04:56 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. @@ -12,6 +12,10 @@ name="qmailqread" # User-settable rc.conf variables and their default values: +: ${qmailqread_postenv:=""} +: ${qmailqread_tcpflags:="-R1"} +: ${qmailqread_tcphost:="127.0.0.1"} +: ${qmailqread_tcpport:="20025"} : ${qmailqread_log:="YES"} : ${qmailqread_logcmd:="logger -t nb${name} -p mail.info"} : ${qmailqread_nologcmd:="@PREFIX@/bin/multilog -*"} @@ -27,10 +31,17 @@ start_precmd="qmailqread_precmd" qmailqread_precmd() { - if [ -f /etc/rc.subr ]; then - checkyesno qmailqread_log || qmailqread_logcmd=${qmailqread_nologcmd} + if [ -f /etc/rc.subr ] && ! checkyesno qmailqread_log; then + qmailqread_logcmd=${qmailqread_nologcmd} fi - 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}" + command="@SETENV@ - ${qmailqread_postenv} +@PREFIX@/bin/argv0 @PREFIX@/bin/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}" command_args="&" rc_flags="" } diff --git a/mail/qmail-run/files/qmailsend.sh b/mail/qmail-run/files/qmailsend.sh index ecabfcaf8da..63a08211a18 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.8 2015/11/25 12:51:30 jperkin Exp $ +# $NetBSD: qmailsend.sh,v 1.9 2017/04/10 15:04:56 schmonz Exp $ # # @PKGNAME@ script to control qmail-send (local and outgoing mail). # @@ -41,10 +41,12 @@ qmailsend_precmd() { # qmail-start(8) starts the various qmail processes, then exits. # qmail-send(8) is the process we want to signal later. - if [ -f /etc/rc.subr ]; then - checkyesno qmailsend_log || qmailsend_logcmd=${qmailsend_nologcmd} + if [ -f /etc/rc.subr ] && ! checkyesno qmailsend_log; then + qmailsend_logcmd=${qmailsend_nologcmd} fi - command="@SETENV@ - ${qmailsend_postenv} qmail-start '$qmailsend_defaultdelivery' ${qmailsend_logcmd}" + command="@SETENV@ - ${qmailsend_postenv} +qmail-start '$qmailsend_defaultdelivery' +${qmailsend_logcmd}" command_args="&" rc_flags="" } diff --git a/mail/qmail-run/files/qmailsmtpd.sh b/mail/qmail-run/files/qmailsmtpd.sh index 0e4408e511f..8ea8d565026 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.12 2017/04/09 12:58:46 schmonz Exp $ +# $NetBSD: qmailsmtpd.sh,v 1.13 2017/04/10 15:04:56 schmonz Exp $ # # @PKGNAME@ script to control qmail-smtpd (SMTP service). # @@ -46,10 +46,19 @@ 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 ]; then - checkyesno qmailsmtpd_log || qmailsmtpd_logcmd=${qmailsmtpd_nologcmd} + if [ -f /etc/rc.subr ] && ! checkyesno qmailsmtpd_log; then + qmailsmtpd_logcmd=${qmailsmtpd_nologcmd} fi - 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} ${qmailsmtpd_smtpdcmd} ${qmailsmtpd_postsmtpd} 2>&1 | @PREFIX@/bin/setuidgid @QMAIL_LOG_USER@ ${qmailsmtpd_logcmd}" + 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} ${qmailsmtpd_smtpdcmd} ${qmailsmtpd_postsmtpd} +2>&1 | +@PREFIX@/bin/setuidgid @QMAIL_LOG_USER@ ${qmailsmtpd_logcmd}" command_args="&" rc_flags="" } |