diff options
Diffstat (limited to 'etc/periodic')
-rwxr-xr-x | etc/periodic/daily/460.status-mail-rejects | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/etc/periodic/daily/460.status-mail-rejects b/etc/periodic/daily/460.status-mail-rejects index 88faccd..696e4ed 100755 --- a/etc/periodic/daily/460.status-mail-rejects +++ b/etc/periodic/daily/460.status-mail-rejects @@ -1,6 +1,6 @@ #!/bin/sh # -# $Id: 460.status-mail-rejects,v 1.3 1998/01/23 01:58:18 brian Exp $ +# $Id: 460.status-mail-rejects,v 1.4 1998/01/26 02:26:29 brian Exp $ # if [ -d /etc/mail -a -f /var/log/maillog ]; then @@ -8,9 +8,9 @@ if [ -d /etc/mail -a -f /var/log/maillog ]; then echo Checking for rejected mail hosts: 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 + zcat -fc /var/log/maillog.0* /var/log/maillog | grep reject= | + perl -ne "print \"\$1\n\" + if (/^$start.*ruleset=check_mail, arg1=<.*@([^>]*)>.*reject=/o || + /^$start.*ruleset=check_relay, arg1=([^, ]*), .*reject=/o)" | + sort -u fi |