summaryrefslogtreecommitdiffstats
path: root/etc/periodic/daily/460.status-mail-rejects
blob: 88faccd380a2ddcb83cbe34677a05d6759b0a47e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/sh
#
# $Id: 460.status-mail-rejects,v 1.3 1998/01/23 01:58:18 brian 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/'`
  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
OpenPOWER on IntegriCloud