Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 6 Mar 2008 22:19:05 +0200
From:      Giorgos Keramidas <keramida@ceid.upatras.gr>
To:        Mike Makonnen <mtm@FreeBSD.Org>
Cc:        current@FreeBSD.Org
Subject:   Re: latest rc.subr breaks etc/rc.d/sendmail
Message-ID:  <20080306201905.GA11317@kobe.laptop>
In-Reply-To: <1204809780.885.3.camel@sol>
References:  <20080202012707.GA1800@kobe.laptop> <1204809780.885.3.camel@sol>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2008-03-06 16:23, Mike Makonnen <mtm@FreeBSD.Org> wrote:
> On Sat, 2008-02-02 at 03:27 +0200, Giorgos Keramidas wrote:
> > Hi Mike,
> > Revision 1.80 of src/etc/rc.subr stops Sendmail from starting
> > here with:
> > 
> > root@kobe:/root# /etc/rc.d/sendmail start
> > Cannot 'start' sendmail. Set sendmail_enable to YES in /etc/rc.conf or use 'onestart' instead of 'start'.
> > root@kobe:/root#
> > 
> > My /etc/rc.conf contains:
> > 
> > root@kobe:/root# grep sendmail /etc/rc.conf
> > sendmail_enable="NO"
> > sendmail_outbound_enable="NO"
> > sendmail_submit_enable="YES"
> > sendmail_msp_queue_enable="YES"
> > root@kobe:/root#
> 
> Can you try the attached patch please?

It worked, thanks :)

> In the long term I think the sendmail script will have to be broken up
> into its constituent parts, but this should fix the problem.

Agreed.  We should probably consult gshapiro about this, and just do it
if there's no objection.  AFAIK, /etc/rc.d/sendmail is also used to
start alternative MTAs, so we can commit this patch for now, and think
about splitting /etc/rc.d/sendmail to something like:

   src/etc/rc.d/sendmail
   src/etc/rc.d/sendmail-submit
   src/etc/rc.d/sendmail-outbound
   src/etc/rc.d/sendmail-msp-queue

One thing to consider before a switch like this is that admins may have
installed scripts which assume that /etc/rc.d/sendmail is all they need :/

> Index: etc/rc.d/sendmail
> ===================================================================
> RCS file: /home/ncvs/src/etc/rc.d/sendmail,v
> retrieving revision 1.18
> diff -u -r1.18 sendmail
> --- etc/rc.d/sendmail   8 Dec 2007 07:20:22 -0000       1.18
> +++ etc/rc.d/sendmail   21 Feb 2008 07:38:42 -0000
> @@ -72,7 +72,9 @@
>         fi
>  }
>  
> -run_rc_command "$1"
> +if checkyesno sendmail_enable; then
> +       run_rc_command "$1"
> +fi
>  
>  required_files=
>  
> @@ -90,9 +92,11 @@
>         run_rc_command "$1"
>  fi
>  
> -name="sendmail_clientmqueue"
> -rcvar="sendmail_msp_queue_enable"
> -start_cmd="${command} ${sendmail_msp_queue_flags}"
> -pidfile="${sendmail_mspq_pidfile:-/var/spool/clientmqueue/sm-client.pid}"
> -required_files="/etc/mail/submit.cf"
> -run_rc_command "$1"
> +if checkyesno sendmail_msp_queue_enable; then
> +       name="sendmail_clientmqueue"
> +       rcvar="sendmail_msp_queue_enable"
> +       start_cmd="${command} ${sendmail_msp_queue_flags}"
> +       pidfile="${sendmail_mspq_pidfile:-/var/spool/clientmqueue/sm-client.pid}"
> +       required_files="/etc/mail/submit.cf"
> +       run_rc_command "$1"
> +fi



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080306201905.GA11317>