Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!killer!ernest!lae From: lae@ernest.ti.com (Alan Edmonds) Newsgroups: news.sysadmin Subject: Re: question on bad newsgroups Keywords: nomatch Message-ID: <922@ernest.ti.com> Date: 30 May 89 20:35:43 GMT References: <185@icdi10.uucp> <804@ivucsb.sba.ca.us> <137@swituc.UUCP> Reply-To: lae@ernest.UUCP (0000-Admin(0000)) Distribution: na Organization: Texas Instruments, Inc. Dallas TX Lines: 83 In article <137@swituc.UUCP> pmb@swituc.UUCP (Pat Berry) writes: >In article <804@ivucsb.sba.ca.us>, news@ivucsb.sba.ca.us (Todd Day) writes: >> ~Bad Newsgroups Received >> ~a.politic 18 This is the stuff I'm talking about. >> ~a.single 1 >> ~alk.politics.gun 5 >> ~lt.bb 1 >> ~lt.conspirac 1 >We are getting the same thing to the tune of 10 to 15 per day. It appears >to be a handshaking problem, clipping off the first few chars of the group >names. Actually, there is a bug in the script I got as part of the news sources. Enclosed is a context-diff of the fix. I thought everyone had already fixed this, so I kept the fix to myself. I also added a Subject: line header. Enjoy. ====================== cut here ================= *** report_awk --- /usr/lib/news/report_awk ************** *** 60,66 # Fix up the counting of gatewayed material, add counting of "linecount" # problems. Additional cleanup to make things faster. # ! BEGIN{ # # this is the prefix that your site uses in hostnames to identify your # hosts (e.g. ucbarpa, ucbvax, su-score, mit-mc, mit-ai) --- 37,45 ----- # Fix up the counting of gatewayed material, add counting of "linecount" # problems. Additional cleanup to make things faster. # ! # Alan Edmonds (alan@ernest.ti.com) ! # Add subject line to output message ! # fix length problem with bad newsgroups section # BEGIN{ # ************** *** 62,67 # BEGIN{ # # this is the prefix that your site uses in hostnames to identify your # hosts (e.g. ucbarpa, ucbvax, su-score, mit-mc, mit-ai) # You will probably want to change (or add to) the following line --- 41,52 ----- # Add subject line to output message # fix length problem with bad newsgroups section # + BEGIN{ + # + # print subject line for mail + # + printf("Subject: USENET Activity Log\n\n"); + # # this is the prefix that your site uses in hostnames to identify your # hosts (e.g. ucbarpa, ucbvax, su-score, mit-mc, mit-ai) # You will probably want to change (or add to) the following line ************** *** 219,226 $6 == "valid" { junked[sys]++; next } $6 == "too" { junked[sys]++; old++; next } $5 == "Unknown" { ! x = length($7) - 2; ! ng = substr($7, 2, x); badng[ng]++; badgrp++; next; --- 204,213 ----- $6 == "valid" { junked[sys]++; next } $6 == "too" { junked[sys]++; old++; next } $5 == "Unknown" { ! # x = length($7) - 2; ! x = length($7); ! # ng = substr($7, 2, x); ! ng = substr($7, 1, x); badng[ng]++; badgrp++; next; ======================== end =================