Highly Available HP-UX Internet Services (May 2008)
echo "Unable to start Sendmail "| $LOGGER
rval=1
fi
else
echo "Need to run 'gen_cf' manually in /usr/newconfig/etc/mail/cf/cf directory to"
echo "generate Receive ONLY mode sendmail.cf file. You need to merge your
site-specific"
echo "customizations with this newly created,
/usr/newconfig/etc/mail/cf/cf/sendmail.cf.gen"
echo "file and can be copied as /etc/mail/sendmail.cf. Then start sendmail."
echo ""
fi
elif [ $SEND_ONLY -eq 1 ] ; then
if grep "^Scheck_compat" /etc/mail/sendmail.cf > /dev/null 2>/dev/null
then
echo "Need to run 'gen_cf' manually in /usr/newconfig/etc/mail/cf/cf directory to"
echo "generate Send ONLY mode sendmail.cf file. You need to merge your
site-specific"
echo "customizations with this newly created,
/usr/newconfig/etc/mail/cf/cf/sendmail.cf.gen"
echo "file and can be copied as /etc/mail/sendmail.cf. Then start sendmail."
echo ""
else
check_pid_file
# Make a note with syslogd that the sendmail daemon is being started
echo "#### Starting sendmail ####" | $LOGGER
if [ -f /etc/mail/sendmail.cf ]; then
newaliases | $LOGGER
/usr/sbin/sendmail -L sm-mta -bd -q30m && echo "Starting sendmail : send only [Done]"
set_return
if [ $rval -eq 0 ]; then
if [ -f /etc/mail/submit.cf ]; then
/usr/sbin/sendmail -L sm-msp-queue -Ac -q30m && echo "Starting
sm-client : send only [Done]"
set_return
if [ $rval -ne 0 ]; then
echo "Unable to start sendmail client : send only"
echo "Unable to start sendmail client : send only" | $LOGGER
[ -f "$pidfile_msp" ] && rm -f "$pidfile_msp" >/dev/null
rval=1
fi
else
echo "Unable to start sendmail client : send only"
echo "/etc/mail/submit.cf is missing" | $LOGGER
echo "Unable to start sendmail client : send only" | $LOGGER
echo "\nFor more information see $LOG_FILE"
fi
else
echo "Unable to start Sendmail : send only"
echo "Unable to start Sendmail : send only" | $LOGGER
[ -f "$pidfile_mta" ] && rm -f "$pidfile_mta" >/dev/null
rval=1
fi
else
echo "Unable to start Sendmail"
echo "/etc/mail/sendmail.cf file missing" | $LOGGER
echo "Unable to start Sendmail "| $LOGGER
rval=1
fi
fi
else
echo " Sendmail server is disabled, You cannot start it manually using"
echo " sendmail script."
exit 2
fi
if [ $rval -eq 1 -o $rval -eq 2 ]; then
echo "\nFor more information see $LOG_FILE"
fi
;;
'stop')
/usr/sbin/killsm
Appendix B: Sample Scripts for Sendmail 27