summaryrefslogtreecommitdiff
path: root/mail/qmail-run
diff options
context:
space:
mode:
authorschmonz <schmonz@pkgsrc.org>2017-04-04 07:51:03 +0000
committerschmonz <schmonz@pkgsrc.org>2017-04-04 07:51:03 +0000
commit40cb5ae179f5345eef77d5dd6e2fbf077fc5e429 (patch)
treea935b72a0e7ffd3be56032aadf9f2eddb685ac33 /mail/qmail-run
parent75254e1a3272eec8bc93394b6db4db2cde032934 (diff)
downloadpkgsrc-40cb5ae179f5345eef77d5dd6e2fbf077fc5e429.tar.gz
Substitute configured qmail users in rc.d scripts. Un-hardcode some
paths in qmailofmipd.sh, somehow missed in 20170109. Bump version.
Diffstat (limited to 'mail/qmail-run')
-rw-r--r--mail/qmail-run/Makefile8
-rw-r--r--mail/qmail-run/files/qmailofmipd.sh10
-rw-r--r--mail/qmail-run/files/qmailpop3d.sh4
-rw-r--r--mail/qmail-run/files/qmailqread.sh4
-rw-r--r--mail/qmail-run/files/qmailsmtpd.sh4
5 files changed, 17 insertions, 13 deletions
diff --git a/mail/qmail-run/Makefile b/mail/qmail-run/Makefile
index 33d47014bbd..c25ed2eb9d4 100644
--- a/mail/qmail-run/Makefile
+++ b/mail/qmail-run/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.31 2017/01/14 23:00:31 schmonz Exp $
+# $NetBSD: Makefile,v 1.32 2017/04/04 07:51:03 schmonz Exp $
#
-DISTNAME= qmail-run-20170114
+DISTNAME= qmail-run-20170404
CATEGORIES= mail
MASTER_SITES= # empty
DISTFILES= # empty
@@ -20,12 +20,16 @@ WRKSRC= ${WRKDIR}
NO_BUILD= yes
NO_CHECKSUM= yes
+FILES_SUBST+= QMAIL_DAEMON_USER=${QMAIL_DAEMON_USER:Q}
+FILES_SUBST+= QMAIL_LOG_USER=${QMAIL_LOG_USER:Q}
+FILES_SUBST+= QMAIL_SEND_USER=${QMAIL_SEND_USER:Q}
FILES_SUBST+= QMAIL_QUEUE_EXTRA=${QMAIL_QUEUE_EXTRA:Q}
FILES_SUBST+= PKGNAME=${PKGNAME:Q}
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_DAEMON_USER QMAIL_LOG_USER QMAIL_SEND_USER
BUILD_DEFS+= QMAIL_QUEUE_EXTRA
.include "../../mk/bsd.prefs.mk"
diff --git a/mail/qmail-run/files/qmailofmipd.sh b/mail/qmail-run/files/qmailofmipd.sh
index 8d6e029c863..522e5d5d59e 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.1 2017/01/09 04:58:09 schmonz Exp $
+# $NetBSD: qmailofmipd.sh,v 1.2 2017/04/04 07:51:03 schmonz Exp $
#
# @PKGNAME@ script to control ofmipd (SMTP submission service).
#
@@ -21,7 +21,7 @@ name="qmailofmipd"
: ${qmailofmipd_postofmipd:=""}
: ${qmailofmipd_log:="YES"}
: ${qmailofmipd_logcmd:="logger -t nb${name} -p mail.info"}
-: ${qmailofmipd_nologcmd:="/usr/pkg/bin/multilog -*"}
+: ${qmailofmipd_nologcmd:="@PREFIX@/bin/multilog -*"}
if [ -f /etc/rc.subr ]; then
. /etc/rc.subr
@@ -31,7 +31,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="/usr/pkg/bin/tcpserver"
+command="@PREFIX@/bin/tcpserver"
procname=${name}
start_precmd="qmailofmipd_precmd"
extra_commands="stat pause cont cdb"
@@ -48,7 +48,7 @@ qmailofmipd_precmd()
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="@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}"
command_args="&"
rc_flags=""
}
@@ -81,7 +81,7 @@ qmailofmipd_cont()
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
+ @PREFIX@/bin/tcprules @PKG_SYSCONFDIR@/tcp.ofmip.cdb @PKG_SYSCONFDIR@/tcp.ofmip.tmp < @PKG_SYSCONFDIR@/tcp.ofmip
/bin/chmod 644 @PKG_SYSCONFDIR@/tcp.ofmip.cdb
}
diff --git a/mail/qmail-run/files/qmailpop3d.sh b/mail/qmail-run/files/qmailpop3d.sh
index 74e80d5b322..e8be74b15c5 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.10 2015/11/25 12:51:30 jperkin Exp $
+# $NetBSD: qmailpop3d.sh,v 1.11 2017/04/04 07:51:03 schmonz Exp $
#
# @PKGNAME@ script to control qmail-pop3d (POP3 server for Maildirs).
#
@@ -48,7 +48,7 @@ qmailpop3d_precmd()
if [ -f /etc/rc.subr ]; then
checkyesno qmailpop3d_log || 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} @PREFIX@/bin/qmail-pop3d ${qmailpop3d_maildirname} 2>&1 | @PREFIX@/bin/setuidgid qmaill ${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} @PREFIX@/bin/qmail-pop3d ${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 21f4b256936..30270d269f5 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.8 2015/11/25 12:51:30 jperkin Exp $
+# $NetBSD: qmailqread.sh,v 1.9 2017/04/04 07:51:03 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.
@@ -30,7 +30,7 @@ qmailqread_precmd()
if [ -f /etc/rc.subr ]; then
checkyesno qmailqread_log || qmailqread_logcmd=${qmailqread_nologcmd}
fi
- 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}"
+ 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_args="&"
rc_flags=""
}
diff --git a/mail/qmail-run/files/qmailsmtpd.sh b/mail/qmail-run/files/qmailsmtpd.sh
index 94a7e4fa9b0..815c40bc217 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.10 2015/11/25 12:51:30 jperkin Exp $
+# $NetBSD: qmailsmtpd.sh,v 1.11 2017/04/04 07:51:03 schmonz Exp $
#
# @PKGNAME@ script to control qmail-smtpd (SMTP service).
#
@@ -48,7 +48,7 @@ qmailsmtpd_precmd()
if [ -f /etc/rc.subr ]; then
checkyesno qmailsmtpd_log || 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 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}"
+ 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}"
command_args="&"
rc_flags=""
}