| 1 |
#!/bin/sh |
| 2 |
#/usr/local/bin/mailq -v |
| 3 |
echo "Working." |
| 4 |
LOGFILE=/var/spool/exim/log/mainlog |
| 5 |
|
| 6 |
DAY=`date "+19%y-%m-%d"` |
| 7 |
|
| 8 |
QUE=`ls /var/spool/exim/input/*-H | wc -l | sed -e "s/ //g"` |
| 9 |
DAYDEL=`/usr/local/bin/grep -c " [=-]> " $LOGFILE` |
| 10 |
DAYREC=`/usr/local/bin/grep -c " <= " $LOGFILE` |
| 11 |
|
| 12 |
cat << EOM |
| 13 |
====================================================================== |
| 14 |
E-mail status information for `hostname` |
| 15 |
|
| 16 |
Current Date/Time is: `date "+%A, %D %R %Z"` |
| 17 |
|
| 18 |
Number of messages currently in the queue: $QUE |
| 19 |
|
| 20 |
Number of messages received so far today: $DAYREC |
| 21 |
Number of messages delivered so far today: $DAYDEL |
| 22 |
EOM |