🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #50700

Re: Transport server and wanttrash

#50700
From: Andrew Gierth
Date: Sun, 18 Feb 2001 21:48
109 lines
5068 bytes
>>>>> "Frank" == Frank D Cringle <fdc@cliwe.ping.de> writes:

 > fdc@cliwe.ping.de (Frank D. Cringle) writes:
 >> Am I right in assuming that there is no point in having more than
 >> a minimal active file (junk and control*) if I set wanttrash on a
 >> transport-only server running inn-2.3.2?

 Frank> Experiments show that this is not going to be useful in the
 Frank> way I was hoping for.  INN complains to the feeding sites
 Frank> about all the "junk" they are sending, and only feeds to peers
 Frank> that are subscribed to the junk group.  So it is not like
 Frank> diablo in transit mode.  Oh well.

It's actually fairly easy to patch INN to work the way you expect in
this case. This patch is against INN 2.2.2, it may need some tweaking
for newer versions; it works by adding a new inn.conf parameter
"feedtrash" which if set to true, causes articles in nonexistent
groups to be fed as though the groups really existed. (wanttrash must
also be set for this to work.)


diff -c -r1.1.1.3 -r1.1.1.3.2.1
*** include/innconf.h	2000/02/28 19:34:10	1.1.1.3
--- include/innconf.h	2000/03/20 06:58:22	1.1.1.3.2.1
***************
*** 320,326 ****
      { _CONF_NNRPPERLAUTH,			"",	2, 1 },
  #define _CONF_NNRPDPOSTPORT			"nnrpdpostport"
  #define CONF_VAR_NNRPDPOSTPORT			99
!     { _CONF_NNRPDPOSTPORT,			"",	2, 1 }
  };
! #define MAX_CONF_VAR 100
  
--- 320,329 ----
      { _CONF_NNRPPERLAUTH,			"",	2, 1 },
  #define _CONF_NNRPDPOSTPORT			"nnrpdpostport"
  #define CONF_VAR_NNRPDPOSTPORT			99
!     { _CONF_NNRPDPOSTPORT,			"",	2, 1 },
! #define _CONF_FEEDTRASH				"feedtrash"
! #define CONF_VAR_FEEDTRASH			100
!     { _CONF_FEEDTRASH,				"",	2, 0 }
  };
! #define MAX_CONF_VAR 101
  

diff -c -r1.1.1.4 -r1.1.1.4.2.1
*** include/libinn.h	2000/02/28 19:38:24	1.1.1.4
--- include/libinn.h	2000/03/20 06:58:22	1.1.1.4.2.1
***************
*** 100,105 ****
--- 100,106 ----
  	int verifycancels;	/* Verify cancels against article author */
  	int logcancelcomm;	/* Log "ctlinnd cancel" commands to syslog? */
  	int wanttrash;		/* Put unwanted articles in 'junk' */
+ 	int feedtrash;		/* Feed the junk group as though the groups really existed */
  	int remembertrash;	/* Put unwanted article ID's into history */
  	int linecountfuzz;	/* Check linecount and adjust of out by more */
  	int peertimeout;	/* How long peers can be inactive */

diff -c -r1.1.1.5 -r1.1.1.5.2.3
*** innd/art.c	2000/02/28 19:38:27	1.1.1.5
--- innd/art.c	2000/03/22 05:51:44	1.1.1.5.2.3
***************
*** 2390,2395 ****
--- 2450,2460 ----
  		 * would or would have had the group if it were created. */
  		ARTsendthegroup(*groups);
  		Accepted = TRUE;
+ 	    } else if (innconf->wanttrash && innconf->feedtrash) {
+ 		/* dont set Accepted in this case, because we may still end
+ 		 * up filing the article in the junk group. */
+ 		ARTsendthegroup(*groups);
+ 		NonExist = TRUE;
  	    } else
  		NonExist = TRUE;
  	    ARTpoisongroup(*groups);

diff -c -r1.1.1.4 -r1.1.1.4.2.1
*** lib/getconfig.c	2000/02/28 19:36:58	1.1.1.4
--- lib/getconfig.c	2000/03/20 06:58:24	1.1.1.4.2.1
***************
*** 193,198 ****
--- 193,199 ----
      innconf->verifycancels = FALSE;
      innconf->logcancelcomm = FALSE;
      innconf->wanttrash = FALSE;
+     innconf->feedtrash = FALSE;
      innconf->remembertrash = TRUE;
      innconf->linecountfuzz = 0;
      innconf->peertimeout = 1 * 60 * 60;
***************
*** 614,619 ****
--- 615,625 ----
  		TEST_CONFIG(CONF_VAR_WANTTRASH, bit);
  		if (!bit && boolval != -1) innconf->wanttrash = boolval;
  		SET_CONFIG(CONF_VAR_WANTTRASH);
+ 	    } else
+ 	    if (EQ(ConfigBuff,_CONF_FEEDTRASH)) {
+ 		TEST_CONFIG(CONF_VAR_FEEDTRASH, bit);
+ 		if (!bit && boolval != -1) innconf->feedtrash = boolval;
+ 		SET_CONFIG(CONF_VAR_FEEDTRASH);
  	    } else
  	    if (EQ(ConfigBuff,_CONF_REMEMBERTRASH)) {
  		TEST_CONFIG(CONF_VAR_REMEMBERTRASH, bit);


-- 
Andrew.
Technical Details
Message-ID: <87lmr3zmpn.fsf@erlenstar.demon.co.uk>
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!supernews.google.com!sn-xit-03!supernews.com!news-feed.riddles.org.uk!erlenstar.demon.co.uk!newsmonster
References: <vt1yswe31g.fsf@cliwe.ping.de> <vtu25rdhqh.fsf@cliwe.ping.de>

Show Full Headers
Complete Article Headers
Message-ID: <87lmr3zmpn.fsf@erlenstar.demon.co.uk>
Subject: Re: Transport server and wanttrash
Date: Sun, 18 Feb 2001 21:48:52 +0000
From: Andrew Gierth <andrew@erlenstar.demon.co.uk>
References: <vt1yswe31g.fsf@cliwe.ping.de> <vtu25rdhqh.fsf@cliwe.ping.de>
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!supernews.google.com!sn-xit-03!supernews.com!news-feed.riddles.org.uk!erlenstar.demon.co.uk!newsmonster
Newsgroups: news.software.nntp
Organization: disorganised
Lines: 108
NNTP-Posting-Host: erlenstar.demon.co.uk (4e53:0b75)
Cc: fdc@cliwe.ping.de (Frank D. Cringle)
X-Mayan-Date: Long count = 12.19.7.17.14; tzolkin = 7 Ix; haab = 17 Pax
X-Pgp-0x0E9FFBE9: 87 25 7F 14 41 24 B3 51 E0 19 8B DE 49 74 0C 29
X-Attribution: AG
X-P-Persistent-Headers: are a bad idea.
X-Newsreader: Gnus v5.5/Emacs 20.2
X-Complaints-To: andrew@erlenstar.demon.co.uk
X-Post-Filter: postfilter v0.6 alpha