Subversion Repositories sysadmin_scripts

Rev

Rev 14 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
14 rodolico 1
#! /bin/bash
2
# simply look for the number of messages incoming in a particular day
3
# reads mail.log, looking for some key phrase that only shows up in incoming mail
4
# can be used on source machine to see if any additional mail has come in (though getStats does this better)
5
# and on target machine to see if e-mail is correctly coming in.
6
# note: kind of sloppy if keyphrase is not set right.
7
 
8
# change this to some key that will only show up in deliveries
9
KEYPHRASE="deliver"
10
# log file to check
11
LOGFILE=/var/log/mail.log
12
 
13
if [ "$1" = "" ] 
14
then
15
   echo Usage: checkTraffic maildomain
16
else
17
   grep $1 $LOGFILE | grep $KEYPHRASE | wc
18
fi