latest rc.subr breaks etc/rc.d/sendmail

Giorgos Keramidas keramida at ceid.upatras.gr
Thu Mar 6 12:34:56 PST 2008


On 2008-03-06 16:23, Mike Makonnen <mtm at 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 at 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 at kobe:/root#
> > 
> > My /etc/rc.conf contains:
> > 
> > root at kobe:/root# grep sendmail /etc/rc.conf
> > sendmail_enable="NO"
> > sendmail_outbound_enable="NO"
> > sendmail_submit_enable="YES"
> > sendmail_msp_queue_enable="YES"
> > root at 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


More information about the freebsd-current mailing list