FreeBSD Bugzilla – Attachment 19735 Details for
Bug 35018
[patch] enhancing daily/460.status-mail-rejects
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 1.39 KB, created by
Mikhail Teterin
on 2002-02-17 03:30:00 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
Mikhail Teterin
Created:
2002-02-17 03:30:00 UTC
Size:
1.39 KB
patch
obsolete
>--- 460.status-mail-rejects Tue Oct 31 18:47:27 2000 >+++ 460.status-mail-rejects Sat Feb 16 22:05:02 2002 >@@ -33,23 +33,32 @@ > echo Checking for rejected mail hosts: > >- start=`date -v-1d '+%b %d' | sed 's/0\(.\)$/ \1/'` >- n=$(($daily_status_mail_rejects_logs - 2)) > rc=$({ >- while [ $n -ge 0 ] >+ for f in `find /var/log -name maillog\* \ >+ \( -mtime 1 -o -mtime 2 \) | xargs ls -tr` > do >- if [ -f /var/log/maillog.$n ] >- then >- cat /var/log/maillog.$n >- elif [ -f /var/log/maillog.$n.gz ] >- then >- zcat -fc /var/log/maillog.$n.gz >- fi >- n=$(($n - 1)) >+ case $f in >+ *.gz) zcat -fc $f;; >+ *.bz2) bzip2 -cd $f;; >+ *) cat $f;; >+ esac > done >- cat /var/log/maillog >- } | >- 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) >+ } | awk ' >+ BEGIN { >+ today=systime(); >+ yesterday=strftime("%b %d", today-86400); >+ today=strftime("%b %d", today); >+ } >+ { >+ relay=gensub("^" yesterday ".*, relay=([^,]+), reject=.*", >+ "\\1", 1); >+ if (relay != $0) >+ rejects[relay]++; >+ else if (match($0, "^" today)) >+ exit; >+ } >+ END { >+ for (relay in rejects) >+ printf("%4d %s\n", rejects[relay], relay); >+ }' | sort -fnr | tee /dev/stderr | wc -l) > [ $rc -gt 0 ] && rc=1 > fi;;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 35018
: 19735 |
19736