conf/57075: rc.sendmail needs to honour
${sendmail_msp_queue_enable} on stop
Jonathan Chen
jonc at chen.org.nz
Sun Sep 21 19:30:24 PDT 2003
>Number: 57075
>Category: conf
>Synopsis: rc.sendmail needs to honour ${sendmail_msp_queue_enable} on stop
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Sun Sep 21 19:30:20 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator: Jonathan Chen
>Release: FreeBSD 4.9-PRERELEASE i386
>Organization:
>Environment:
System: FreeBSD grimoire.chen.org.nz 4.9-PRERELEASE FreeBSD 4.9-PRERELEASE #0: Thu Sep 18 20:42:35 NZST 2003 root at grimoire.chen.org.nz:/usr/obj/usr/src/sys/GRIMOIRE i386
>Description:
If we decide to use an MTA other than sendmail, and configure /etc/rc.conf
and mailer.conf to reflect this, the system stop/restart arguments on
rc.sendmail echos out spurious:
"stop-mspq: /var/spool/clientmqueue/sm-client.pid not found"
or
"XXXX: No such process"
/etc/rc.sendmail honours ${sendmail_msp_queue} from /etc/rc.conf for
"start", but ignores it for "stop" and "restart".
>How-To-Repeat:
Taking Postfix MTA installation as an example. We make the necessary
changes /etc/mail/mailer.conf and have the following in /etc/rc.conf
(as recommended in the postfix/pkg-message):
sendmail_enable="YES"
sendmail_flags="-bd"
sendmail_pidfile="/var/spool/postfix/pid/master.pid"
sendmail_outbound_enable="NO"
sendmail_submit_enable="NO"
sendmail_msp_queue_enable="NO"
As root:
# sh /etc/rc.sendmail start
# sh /etc/rc.sendmail stop
>Fix:
Patches for /etc/rc.sendmail:
--- rc.sendmail.orig Mon Sep 22 14:01:57 2003
+++ rc.sendmail Mon Sep 22 14:05:32 2003
@@ -122,22 +122,34 @@
stop_mspq()
{
- if [ -r ${sendmail_mspq_pidfile} ]; then
- echo -n ' sendmail-clientmqueue'
- kill -TERM `head -1 ${sendmail_mspq_pidfile}`
- else
- echo "$0: stop-mspq: ${sendmail_mspq_pidfile} not found"
- fi
+ case ${sendmail_msp_queue_enable} in
+ [Yy][Ee][Ss])
+ if [ -r ${sendmail_mspq_pidfile} ]; then
+ echo -n ' sendmail-clientmqueue'
+ kill -TERM `head -1 ${sendmail_mspq_pidfile}`
+ else
+ echo "$0: stop-mspq: ${sendmail_mspq_pidfile} not found"
+ fi
+ ;;
+ *)
+ ;;
+ esac
}
restart_mspq()
{
- if [ -r ${sendmail_mspq_pidfile} ]; then
- echo -n ' sendmail-clientmqueue'
- kill -HUP `head -1 ${sendmail_mspq_pidfile}`
- else
- echo "$0: restart-mspq: ${sendmail_mspq_pidfile} not found"
- fi
+ case ${sendmail_msp_queue_enable} in
+ [Yy][Ee][Ss])
+ if [ -r ${sendmail_mspq_pidfile} ]; then
+ echo -n ' sendmail-clientmqueue'
+ kill -HUP `head -1 ${sendmail_mspq_pidfile}`
+ else
+ echo "$0: restart-mspq: ${sendmail_mspq_pidfile} not found"
+ fi
+ ;;
+ *)
+ ;;
+ esac
}
# If no argument is given, assume we are being called at boot time.
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list