Date: Mon, 11 Nov 2002 12:14:27 -0800 (PST) From: Alan Batie <alan@agora.rdrop.com> To: FreeBSD-gnats-submit@FreeBSD.org Subject: misc/45222: daily rejected mail hosts report too long Message-ID: <200211112014.gABKER3V017923@agora.rdrop.com>
next in thread | raw e-mail | index | archive | help
>Number: 45222
>Category: misc
>Synopsis: daily rejected mail hosts report too long
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Mon Nov 11 12:20:01 PST 2002
>Closed-Date:
>Last-Modified:
>Originator: Alan Batie
>Release: FreeBSD 4.7-PRERELEASE i386
>Organization:
RainDrop Laboratories
>Environment:
System: FreeBSD agora.rdrop.com 4.7-PRERELEASE FreeBSD 4.7-PRERELEASE #0: Tue Sep 3 00:09:20 PDT 2002 root@agora.rdrop.com:/usr/src/freebsd/src/sys/compile/AGORA i386
>Description:
The daily mail reject report runs around 300 lines on my system,
which makes it a pain to get to the rest of the daily report.
>How-To-Repeat:
Wait just a little too long to put in the anti-relay filter in
sendmail way back before it was in by default, so your system
gets listed in spam software as a relay, though I doubt that's
a requirement these days.
>Fix:
I added a variable to limit the length of the output the top N
reportees.
*** 460.status-mail-rejects.org Mon Nov 11 12:01:16 2002
--- 460.status-mail-rejects Mon Nov 11 12:06:09 2002
***************
*** 32,37 ****
--- 32,42 ----
echo
echo Checking for rejected mail hosts:
+ if [ "$daily_status_mail_rejects_limit" -le 0 ]
+ then
+ daily_status_mail_rejects_limit=10
+ fi
+
start=`date -v-1d '+%b %d' | sed 's/0\(.\)$/ \1/'`
n=$(($daily_status_mail_rejects_logs - 2))
rc=$({
***************
*** 50,56 ****
} |
perl -ne "print \"\$2\n\"
if (/reject=/ and /^$start.*ruleset=check_\S+,\s+arg1=(<[^@]+@)?([^>,]+).*reject=/o);" |
! sort -f | uniq -ic | sort -fnr | tee /dev/stderr | wc -l)
[ $rc -gt 0 ] && rc=1
fi;;
--- 55,61 ----
} |
perl -ne "print \"\$2\n\"
if (/reject=/ and /^$start.*ruleset=check_\S+,\s+arg1=(<[^@]+@)?([^>,]+).*reject=/o);" |
! sort -f | uniq -ic | sort -fnr | head -n $daily_status_mail_rejects_limit | tee /dev/stderr | wc -l)
[ $rc -gt 0 ] && rc=1
fi;;
>Release-Note:
>Audit-Trail:
>Unformatted:
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200211112014.gABKER3V017923>
