6 # If there is a global system configuration file, suck it in.
8 if [ -r /etc/defaults/periodic.conf ]
10 . /etc/defaults/periodic.conf
14 case "$daily_status_mailq_enable" in
16 if [ ! -x /usr/bin/mailq ]
18 echo '$daily_status_mailq_enable is set but /usr/bin/mailq' \
23 echo "Mail in local queue:"
25 rc=$(case "$daily_status_mailq_shorten" in
28 egrep -e '^[[:space:]]+[^[:space:]]+@' |
32 awk '$1 >= 1 {print $1, $2}';;
35 esac | tee /dev/stderr |
36 egrep -v '(mqueue is empty|Total requests)' | wc -l)
37 [ $rc -gt 0 ] && rc=1 || rc=0
39 case "$daily_status_include_submit_mailq" in
41 if [ -f /etc/mail/submit.cf ]
44 echo "Mail in submit queue:"
46 rc_submit=$(case "$daily_status_mailq_shorten" in
49 egrep -e '^[[:space:]]+[^[:space:]]+@' |
53 awk '$1 >= 1 {print $1, $2}';;
56 esac | tee /dev/stderr |
57 egrep -v '(mqueue is empty|Total requests)' | wc -l)
58 [ $rc_submit -gt 0 ] && rc=1