| Summary: | [PATCH] 'Nother bug in periodic scripts | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Base System | Reporter: | howardjp <howardjp> | ||||
| Component: | conf | Assignee: | Brian Somers <brian> | ||||
| Status: | Closed FIXED | ||||||
| Severity: | Affects Only Me | ||||||
| Priority: | Normal | ||||||
| Version: | 5.0-CURRENT | ||||||
| Hardware: | Any | ||||||
| OS: | Any | ||||||
| Attachments: |
|
||||||
|
Description
howardjp
2000-06-29 21:10:01 UTC
Responsible Changed From-To: freebsd-bugs->brian Over to the effective maintainer. ;-) > >Number: 19587 > >Category: conf > >Synopsis: [PATCH] 'Nother bug in periodic scripts [.....] > --- 460.status-mail-rejects.orig Thu Jun 29 15:42:10 2000 > +++ 460.status-mail-rejects Thu Jun 29 15:42:42 2000 > @@ -8,7 +8,7 @@ > 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 | grep reject= | > + zcat -fc /var/log/maillog.* /var/log/maillog | grep reject= | > perl -ne "print \"\$2\n\" > if /^$start.*ruleset=check_\S+,\s+arg1=(<[^@]+@)?([^>,]+).*reject=/o;" | > sort | uniq -c | sort -nr Hi, I don't think this is the right answer to the problem. Some people may keep lots of old mail logs.... I've added another variable - daily_status_mail_rejects_logs that defaults to 3 (the previous code only did two files, leaving a window of missed lines at the end of maillog.1* if the logs were rotated after midnight and before 460.status-mail-rejects). Cheers. -- Brian <brian@Awfulhak.org> <brian@[uk.]FreeBSD.org> <http://www.Awfulhak.org> <brian@[uk.]OpenBSD.org> Don't _EVER_ lose your sense of humour ! State Changed From-To: open->closed A slightly different patch has been applied. Thanks |