🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #69424

Re: CNEWS -- passing NNTP retrieved articles through a rewriting filter

#69424
From: iMeowbot
Date: Sat, 10 Jul 2004 07:40
31 lines
2851 bytes
In article <49682b7e.0406251858.74e1f52a@posting.google.com>,
 claw+google@kanga.nu (J C Lawrence) wrote:

> I'm running CNEWS and would like to have articles passed through a
> script which rewrites the article (headers and body) before sending it
> to the NNTP-based reader.  Any pointers on where to start implementing
> such a thing?

What are you using, nntp-1.5.something?

You'll find that it uses a very straightforward method of reading 
articles, just plain old stdio.  If should be straightforward to change 
the fopens to read something other than the original article file, but 
you do want it to be something that's seekable.  If your OS supports 
some sort of RAM disk facility, you could pipe your transmogrifications 
out to a temp file located there, and keep the modifications within 
nntpd to a minimum.

> Specifically I'm gating moderated mailing lists to/from CNEWS and need
> to rewrite retrieved messages during the NNTP conversation for various
> email-address rewriting/spam-hiding etc purposes.  Unfortunately
> external requirements don't allow me to rewrite the articles before
> storage (the re-writing algorithm is rather dynamic).

Ugh.  If you are supporting the XOVER command, you'll also have to take 
.overview contents into account.  Newsreaders can become very confused 
if XOVER contents don't match the article read later, so you might want 
to consider a more static approach.

-- 
Style is an alive ability mouse.
Technical Details
Message-ID: <iMeowbot-67B06D.03400510072004@news.supernews.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.20140818.mbox.gz!number1.nntp.sjc.giganews.com!number1.nntp.dca.giganews.com!internal1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!elnk-atl-nf1!newsfeed.earthlink.net!feed2.news.rcn.net!feed1.news.rcn.net!rcn!logbridge.uoregon.edu!sn-xit-03!sn-xit-06!sn-post-01!supernews.com!news.supernews.com!iMeowbot
References: <49682b7e.0406251858.74e1f52a@posting.google.com>

Show Full Headers
Complete Article Headers
Message-ID: <iMeowbot-67B06D.03400510072004@news.supernews.com>
Subject: Re: CNEWS -- passing NNTP retrieved articles through a rewriting filter
Date: Sat, 10 Jul 2004 03:40:05 -0400
From: iMeowbot@mac.com
References: <49682b7e.0406251858.74e1f52a@posting.google.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.20140818.mbox.gz!number1.nntp.sjc.giganews.com!number1.nntp.dca.giganews.com!internal1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!elnk-atl-nf1!newsfeed.earthlink.net!feed2.news.rcn.net!feed1.news.rcn.net!rcn!logbridge.uoregon.edu!sn-xit-03!sn-xit-06!sn-post-01!supernews.com!news.supernews.com!iMeowbot
Newsgroups: news.software.nntp
Organization: uJane
Mail-Copies-To: nobody
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
User-Agent: MT-NewsWatcher/3.4 (PPC Mac OS X)
X-Meow: Wouf
X-No-Repost: yes
Injection-Info: http://www.halfbakery.com/idea/Tarantula_20injector
X-Face: GoP_M4IkjWG/y%ym?jo5gyL.y/nBJmU+$gW+nH>P1jU\r6ZePn|suM%F2'kMu
 *hx4-uRHbyV'nd1sm'W+U/N@bvLY%O+kw6u%R9[vee-p.xk}X*8C{E-Dx$|<)_WSTBHl
 }w8$pvbD=<)p|i*imBJ*.eEYlX[]_+YN
X-Complaints-To: abuse@supernews.com
Lines: 31