From owner-freebsd-bugs Mon Nov 11 12:20: 5 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A67F237B401 for ; Mon, 11 Nov 2002 12:20:02 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id DFBA943E4A for ; Mon, 11 Nov 2002 12:20:01 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.6/8.12.6) with ESMTP id gABKK1x3013413 for ; Mon, 11 Nov 2002 12:20:01 -0800 (PST) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.6/8.12.6/Submit) id gABKK1bF013412; Mon, 11 Nov 2002 12:20:01 -0800 (PST) Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5DD5137B401 for ; Mon, 11 Nov 2002 12:14:33 -0800 (PST) Received: from agora.rdrop.com (agora.rdrop.com [199.26.172.34]) by mx1.FreeBSD.org (Postfix) with ESMTP id 091A443E75 for ; Mon, 11 Nov 2002 12:14:33 -0800 (PST) (envelope-from alan@agora.rdrop.com) Received: from agora.rdrop.com (202@localhost [127.0.0.1]) by agora.rdrop.com (8.12.5/8.12.2) with ESMTP id gABKERrQ017924 for ; Mon, 11 Nov 2002 12:14:27 -0800 (PST) (envelope-from alan@agora.rdrop.com) Received: (from alan@localhost) by agora.rdrop.com (8.12.5/8.12.2/Submit) id gABKER3V017923; Mon, 11 Nov 2002 12:14:27 -0800 (PST) Message-Id: <200211112014.gABKER3V017923@agora.rdrop.com> Date: Mon, 11 Nov 2002 12:14:27 -0800 (PST) From: Alan Batie Reply-To: Alan Batie To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: misc/45222: daily rejected mail hosts report too long Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >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