🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #19594

Re: Q: refuse no NNTP-Posting hostname

#19594
From: Urs Janßen
Date: Thu, 24 Jul 1997 00:00
44 lines
1901 bytes
In <5r05q5$ss8@rap.SanDiegoCA.NCR.COM>,
    Richard 'Rick' Hernandez <rick@sparc.SanDiegoCA.NCR.COM> wrote:
> how would you go about refusing articles that do not have an
> NNTP-Posting-Host: header?

with inn1.5.1 and perlfiltering enabled you could:
hack innd/art.c ~ line 139 that filter_innd.pl also get's the
NNTP-Posting-Host header if defined,

art.c
[...]
{ "Relay-Version", HTobs},
{ "NTTP-Posting-Host", HTstd}, /* inster this line */
};
[...]

now write a small filter that
rejects all articles without that header 
sub filter_art {
	$rval="";

	if (!defined $hdr("NNTP-Posting-Host")) {
		$rval="artilce without NNTP-Posting-Host rejected";
	}
	return $rval;
}

recompile your inn, shutdown old inn, replace old inn, startup new
inn - ready.

WARNING: this is totally untesed und just right out of my head!

urs

p.s.: I don' think that dropping postings without NNTP-Posting-Host
      is a good idea, most CNews servers still don't insert it, and
      so might do several other servers.
-- 
Jef Poskanzer:                                                       
"When people aren't stupid Usenet is even more useful. Too bad this happens
 so rarely."

Technical Details
Message-ID: <5r6b54$cv6$4@nz12.rz.uni-karlsruhe.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!not-for-mail
References: <5r05q5$ss8@rap.SanDiegoCA.NCR.COM>

Show Full Headers
Complete Article Headers
Message-ID: <5r6b54$cv6$4@nz12.rz.uni-karlsruhe.de>
Subject: Re: Q: refuse no NNTP-Posting hostname
Date: Thu, 24 Jul 1997 00:00:00 +0000
From: Urs Janßen <urs@akk.uni-karlsruhe.de>
References: <5r05q5$ss8@rap.SanDiegoCA.NCR.COM>
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: 258518968
Sender: Urs Janßen <urs@rzstud1.karlsruhe.org>
Organization: Arbeitskreis Kultur & Kommunikation (AKK)
Newsgroups: news.software.nntp
NNTP-Posting-User: urs