Date: Mon, 22 Sep 2003 14:20:02 +1200 (NZST) From: Jonathan Chen <jonc@chen.org.nz> To: FreeBSD-gnats-submit@FreeBSD.org Subject: conf/57075: rc.sendmail needs to honour ${sendmail_msp_queue_enable} on stop Message-ID: <20030922022002.C3EB01364C@chen.org.nz> Resent-Message-ID: <200309220230.h8M2UKUA003789@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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@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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030922022002.C3EB01364C>