c5227e754c
(although only by Scheck_relay or Scheck_mail). Suggested by: ache
18 lines
478 B
Bash
Executable File
18 lines
478 B
Bash
Executable File
#!/bin/sh
|
|
#
|
|
# $Id: 460.status-mail-rejects,v 1.2 1998/01/18 12:06:40 ache Exp $
|
|
#
|
|
|
|
if [ -d /etc/mail -a -f /var/log/maillog ]; then
|
|
echo
|
|
echo Checking for rejected mail hosts:
|
|
|
|
start=`date -v-1d '+%b %d' | sed 's/0\(.\)$/ \1/'`
|
|
start=
|
|
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
|
|
fi
|