summaryrefslogtreecommitdiffstats
path: root/etc/periodic/daily/460.status-mail-rejects
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>1998-01-23 01:58:18 +0000
committerbrian <brian@FreeBSD.org>1998-01-23 01:58:18 +0000
commitf5c8de67c0530d0e071e92bb212f5afc7426694e (patch)
tree5dabf975f60fe692d06ad3daf401c776f591715e /etc/periodic/daily/460.status-mail-rejects
parent68d4a23fe0b42958037571a88cf05bb7e142743f (diff)
downloadFreeBSD-src-f5c8de67c0530d0e071e92bb212f5afc7426694e.zip
FreeBSD-src-f5c8de67c0530d0e071e92bb212f5afc7426694e.tar.gz
Just list one of each domain that was rejected
(although only by Scheck_relay or Scheck_mail). Suggested by: ache
Diffstat (limited to 'etc/periodic/daily/460.status-mail-rejects')
-rwxr-xr-xetc/periodic/daily/460.status-mail-rejects22
1 files changed, 10 insertions, 12 deletions
diff --git a/etc/periodic/daily/460.status-mail-rejects b/etc/periodic/daily/460.status-mail-rejects
index 5452492..8c3b1bc 100755
--- a/etc/periodic/daily/460.status-mail-rejects
+++ b/etc/periodic/daily/460.status-mail-rejects
@@ -1,19 +1,17 @@
#!/bin/sh
#
-# $Id: 460.status-mail-rejects,v 1.1 1997/11/22 04:02:49 brian Exp $
+# $Id: 460.status-mail-rejects,v 1.2 1998/01/18 12:06:40 ache Exp $
#
-#
-# Do not run by default. Can grow your root mailbox up to 2Mb per day
-# since SPAMmers like to retry often
-#
-
-exit 0
-
if [ -d /etc/mail -a -f /var/log/maillog ]; then
- echo
- echo Checking for rejected mail:
+ echo
+ echo Checking for rejected mail hosts:
- start=`date -v-1d '+%b %d' | sed 's/0\(.\)$/ \1/'`
- grep "^$start.*reject=" /var/log/maillog
+ 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
OpenPOWER on IntegriCloud