ports/mail/sendmail/files/sendmail.sh
Dirk Meyer b26e4e183b - Update to new release: sendmail-8.12.3
- Patches removed that are now in the distribution
- More MILTER dokumentation
- sm-client.sh.sample have now 'restart' command.
- Add standalone startupscript for all sendmail deamons
- Update pkg-message

This version fixes a long-standing MIME (7 to 8-bit) conversion bug
and several smaller problems, e.g., a possible communication problem
between the MTA and libmilter, a bug in handling (invalid) addresses
containing 8-bit characters, a possible problem with small timeouts
being lost on slow machines if itimers are used, and the handling of
the 421 reply code and timeouts in the SMTP delivery code.  There are
two changes in the msp feature that may change the behavior: MX lookups
are turned on for the SMTP mailers and hence `[localhost]' is used as
default instead of `localhost', and confTIME_ZONE is set to USE_TZ in
submit.mc.  A complete list of changes can be found in the release notes.
2002-04-06 08:17:34 +00:00

58 lines
1.3 KiB
Bash

#!/bin/sh
#
# $FreeBSD$
#
if ! test -x %%PREFIX%%/sbin/sendmail
then
exit 0
fi
#
case "$1" in
start)
# If there is a global system configuration file, suck it in.
#
if [ -r /etc/defaults/rc.conf ]; then
. /etc/defaults/rc.conf
source_rc_confs
elif [ -r /etc/rc.conf ]; then
. /etc/rc.conf
fi
# Flags to sendmail (as a server)
sendmail_flags="${sendmail_flags--L sm-mta -bd -q30m}"
# Flags for sendmail_msp_queue daemon.
sendmail_msp_queue_flags=\
"${sendmail_msp_queue_flags--L sm-msp-queue -Ac -q30m}"
#
%%PREFIX%%/sbin/sendmail ${sendmail_flags} &&
echo -n ' sendmail'
%%PREFIX%%/sbin/sendmail ${sendmail_msp_queue_flags} &&
echo -n ' sm-msp-queue'
;;
stop)
if test -e /var/run/sendmail.pid
then
kill `head -1 /var/run/sendmail.pid`
rm -f /var/run/sendmail.pid
fi
if test -e /var/spool/clientmqueue/sm-client.pid
then
kill `head -1 /var/spool/clientmqueue/sm-client.pid`
rm -f /var/spool/clientmqueue/sm-client.pid
fi
;;
restart)
if test -e /var/run/sendmail.pid
then
kill -1 `head -1 /var/run/sendmail.pid`
fi
if test -e /var/spool/clientmqueue/sm-client.pid
then
kill -1 `head -1 /var/spool/clientmqueue/sm-client.pid`
fi
;;
*)
echo "Usage: ${0##*/}: { start | stop | restart }" 2>&1
exit 65
;;
esac