freebsd-skq/etc/periodic/daily/500.queuerun
Gregory Neil Shapiro 14a349d554 Update mail queue related periodic scripts to account for sendmail 8.12's
clientmqueue (submit mail queue).

The new mailq display is only active if both the old
daily_status_mailq_enable is set to "YES" and the new
daily_status_include_submit_mailq is set to "YES" so people who disabled
440.status-mailq won't have any surprises.

Likewise, the new queue run is only active if both the old
daily_queuerun_enable is set to "YES" and the new daily_submit_queuerun
is set to "YES" so people who disabled 500.queuerun won't have any
surprises.

While I am here, remove the [ ! -d /var/spool/mqueue ] checks from
both scripts as the queue directory isn't always /var/spool/mqueue for
the main daemon -- it can be set to anything in the sendmail.cf file.

MFC after:	1 week
2002-04-10 03:58:40 +00:00

37 lines
646 B
Bash
Executable File

#!/bin/sh
#
# $FreeBSD$
#
# If there is a global system configuration file, suck it in.
#
if [ -r /etc/defaults/periodic.conf ]
then
. /etc/defaults/periodic.conf
source_periodic_confs
fi
case "$daily_queuerun_enable" in
[Yy][Ee][Ss])
if [ ! -x /usr/sbin/sendmail ]
then
echo '$daily_queuerun_enable is set but /usr/sbin/sendmail' \
"isn't executable"
rc=2
else
/usr/sbin/sendmail -q >/dev/null 2>&1 &
case "$daily_submit_queuerun" in
[Yy][Ee][Ss])
if [ -f /etc/mail/submit.cf ]
then
/usr/sbin/sendmail -q -Ac >/dev/null 2>&1 &
fi;;
esac
rc=0
fi;;
*) rc=0;;
esac
exit $rc