Article View: news.software.nntp
Article #8296patch to innd to screen wide crossposts
From: Eric Pettersen
Date: Wed, 05 Jun 1996 00:00
Date: Wed, 05 Jun 1996 00:00
72 lines
3700 bytes
3700 bytes
I got tired of receiving binaries (and other articles) crossposted to
dozens of groups. Here is a patch to the art.c file of innd to reject
articles posted to more than MAX_CROSSPOST groups (defined to be 25,
redefine it if you like).
I was surprised by how many articles are rejected even with the threshold
set at 25. Since applying the patch yesterday, about 24 hours ago, ~400
articles were rejected by it. The limit could be much lower. It wouldn't
be out of line to make the limit 12, or even 6.
This patch was generated from an INN1.4-sec distribution.
---
Eric Pettersen
pett@cgl.ucsf.edu (NeXTmail capable)
*** art.c.orig Wed Jun 05 13:42:43 1996
--- art.c Tue Jun 04 18:59:26 1996
***************
*** 1902,1912 ****
* If ngp == GroupPointers, then all the new articles newsgroups are
* "j" entries in the active file. In that case, we have to file it
* under junk so that downstream feeds can get it. */
! if (!Accepted || ngptr == GroupPointers) {
! if (!Accepted) {
! (void)sprintf(buff, "%d Unwanted newsgroup \"%s\"",
! NNTP_REJECTIT_VAL,
! MaxLength(HDR(_newsgroups), HDR(_newsgroups)));
ARTlog(&Data, ART_REJECT, buff);
#if defined(DONT_WANT_TRASH)
#if defined(DO_REMEMBER_TRASH)
--- 1902,1919 ----
* If ngp == GroupPointers, then all the new articles newsgroups are
* "j" entries in the active file. In that case, we have to file it
* under junk so that downstream feeds can get it. */
! #define MAX_CROSSPOST 25
! if (!Accepted || Data.Groupcount > MAX_CROSSPOST || ngptr ==
GroupPointers){
! if (!Accepted || Data.Groupcount > MAX_CROSSPOST) {
! if (!Accepted)
! (void)sprintf(buff, "%d Unwanted newsgroup \"%s\"",
! NNTP_REJECTIT_VAL,
! MaxLength(HDR(_newsgroups), HDR(_newsgroups)));
! else
! (void)sprintf(buff,
! "%d Unwanted large crosspost \"%s\" (%d groups)",
! NNTP_REJECTIT_VAL, MaxLength(HDR(_subject),
HDR(_subject)),
! Data.Groupcount);
ARTlog(&Data, ART_REJECT, buff);
#if defined(DONT_WANT_TRASH)
#if defined(DO_REMEMBER_TRASH)
***************
*** 1924,1930 ****
* we should throw the article away: if you have define
* DO_WANT_TRASH, then you want all trash except that which
* you explicitly excluded in your active file. */
! if (!GroupMissing) {
if (distributions)
DISPOSE(distributions);
ARTreject(buff, article);
--- 1931,1937 ----
* we should throw the article away: if you have define
* DO_WANT_TRASH, then you want all trash except that which
* you explicitly excluded in your active file. */
! if (!GroupMissing || Data.Groupcount > MAX_CROSSPOST) {
if (distributions)
DISPOSE(distributions);
ARTreject(buff, article);
Technical Details
Message-ID:
<4p4s4t$oa2@cgl.ucsf.edu>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mailShow Full Headers
Complete Article Headers
Message-ID: <4p4s4t$oa2@cgl.ucsf.edu> Subject: patch to innd to screen wide crossposts Date: Wed, 05 Jun 1996 00:00:00 +0000 From: pett@cgl.ucsf.edu (Eric Pettersen) Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail X-Deja-AN: 158654242 Distribution: inet Organization: UCSF Computer Graphics Lab Newsgroups: news.software.nntp,news.software.b