1997-11-22 04:02:51 +00:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
1998-01-26 02:26:29 +00:00
|
|
|
# $Id: 460.status-mail-rejects,v 1.3 1998/01/23 01:58:18 brian Exp $
|
1997-11-22 04:02:51 +00:00
|
|
|
#
|
1998-01-18 12:06:40 +00:00
|
|
|
|
1997-11-22 04:02:51 +00:00
|
|
|
if [ -d /etc/mail -a -f /var/log/maillog ]; then
|
1998-01-23 01:58:18 +00:00
|
|
|
echo
|
|
|
|
echo Checking for rejected mail hosts:
|
1997-11-22 04:02:51 +00:00
|
|
|
|
1998-01-23 01:58:18 +00:00
|
|
|
start=`date -v-1d '+%b %d' | sed 's/0\(.\)$/ \1/'`
|
|
|
|
zcat -fc /var/log/maillog.0* /var/log/maillog |
|
|
|
|
sed -n \
|
|
|
|
-e "s/^$start.*ruleset=check_mail, arg1=<.*@\\([^>]*\\)>.*reject=.*/ \\1/p" \
|
|
|
|
-e "s/^$start.*ruleset=check_relay, arg1=\\([^, ]*\\), .*reject=.*/ \\1/p" |
|
|
|
|
sort -u
|
1997-11-22 04:02:51 +00:00
|
|
|
fi
|