440.status-mailq revision 61981
1#!/bin/sh 2# 3# $FreeBSD: head/etc/periodic/daily/440.status-mailq 61981 2000-06-23 01:18:31Z brian $ 4# 5 6# If there is a global system configuration file, suck it in. 7# 8if [ -r /etc/defaults/periodic.conf ] 9then 10 . /etc/defaults/periodic.conf 11 source_periodic_confs 12fi 13 14case "$daily_status_mailq_enable" in 15 [Yy][Ee][Ss]) 16 if [ -x /usr/bin/mailq -a -d /var/spool/mqueue ] 17 then 18 echo "" 19 echo "Mail in local queue:" 20 21 case "$daily_status_mailq_shorten" in 22 [Yy][Ee][Ss]) 23 mailq | 24 perl -ne 'print if /^\s+\S+@/' | 25 sort | 26 uniq -c | 27 sort -nr | 28 awk '$1 > 1 {print $1, $2}';; 29 *) 30 mailq;; 31 esac 32 fi;; 33esac 34