🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
8 messages
8 total messages Started by J C Lawrence Sat, 26 Jun 2004 02:58
CNEWS -- passing NNTP retrieved articles through a rewriting filter
#69357
Author: J C Lawrence
Date: Sat, 26 Jun 2004 02:58
16 lines
1652 bytes
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?

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).

Thanks for any help.

-- 
J C Lawrence
claw+google@kanga.nu
Re: CNEWS -- passing NNTP retrieved articles through a rewriting filter
#69358
Author: Alan Connor
Date: Sat, 26 Jun 2004 05:14
24 lines
1968 bytes
On 25 Jun 2004 19:58:30 -0700, J C Lawrence <claw+google@kanga.nu> 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?
> 
> 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).
> 
> Thanks for any help.
> 

Sounds like a job for procmail/formail to me.

What kind of limitations on the number of newsgroups and subscribers
does CNEWS have?

AC
Re: CNEWS -- passing NNTP retrieved articles through a rewriting filter
#69360
Author: Gary L. Burnore
Date: Sat, 26 Jun 2004 12:09
32 lines
2943 bytes
On 25 Jun 2004 19:58:30 -0700, 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?
>
>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).

If you're going to modify the posts people send, do they know?  That
asked, you should do it before it gets to the news server.  man
procmail.


-- 
gburnore@databasix dot com          
---------------------------------------------------------------------------
                  How you look depends on where you go.
---------------------------------------------------------------------------
Gary L. Burnore                       |  ÝÛ³ºÝ³Þ³ºÝ³³Ýۺݳ޳ºÝ³Ý³Þ³ºÝ³ÝÝÛ³
                                      |  ÝÛ³ºÝ³Þ³ºÝ³³Ýۺݳ޳ºÝ³Ý³Þ³ºÝ³ÝÝÛ³
DataBasix                             |  ÝÛ³ºÝ³Þ³ºÝ³³Ýۺݳ޳ºÝ³Ý³Þ³ºÝ³ÝÝÛ³
                                      |  ÝÛ³ 3 4 1 4 2  ݳ޳ 6 9 0 6 9 ÝÛ³
Black Helicopter Repair Svcs Division |     Official Proof of Purchase
===========================================================================
      Want one?  GET one!   http://www.databasix.com
===========================================================================
Re: CNEWS -- passing NNTP retrieved articles through a rewriting filter
#69421
Author: J C Lawrence
Date: Sat, 10 Jul 2004 06:38
17 lines
2013 bytes
Alan Connor <zzzzzz@xxx.yyy> wrote in message news:<4D7Dc.1463$lh4.1020@newsread1.news.pas.earthlink.net>...

> Sounds like a job for procmail/formail to me.

Possibly, however that's not really the problem.  The problem is that
I need the article re-written at the time of request.  I need the raw
unchanged message to be in C NEWS' spool and for that message to be
dynamically re-written when NNTPd reads it and sends it down the wire
(yeah, each and every request of the same article may get a
"different" version due to different rewrites).
 
> What kind of limitations on the number of newsgroups and subscribers
> does CNEWS have?

For these purposes essentially none ("subscriber" is a largely
meaningless term at the NNTP level).  Given sufficient hardware C NEWS
is capable of handling a full feed.
Re: CNEWS -- passing NNTP retrieved articles through a rewriting filter
#69424
Author: 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.
Re: CNEWS -- passing NNTP retrieved articles through a rewriting filter
#69425
Author: Alan Connor
Date: Sat, 10 Jul 2004 18:49
36 lines
2605 bytes
On 9 Jul 2004 23:38:24 -0700, J C Lawrence <claw+google@kanga.nu> wrote:
> 
> 
> Alan Connor <zzzzzz@xxx.yyy> wrote in message news:<4D7Dc.1463$lh4.1020@newsread1.news.pas.earthlink.net>...
> 
>> Sounds like a job for procmail/formail to me.
> 
> Possibly, however that's not really the problem.  The problem is that
> I need the article re-written at the time of request.  I need the raw
> unchanged message to be in C NEWS' spool and for that message to be
> dynamically re-written when NNTPd reads it and sends it down the wire
> (yeah, each and every request of the same article may get a
> "different" version due to different rewrites).
>  

Still seems like piping *all* the outgoing posts through procmail calling 
formail would be the way to handle it. Might need a supporting shell 
script or two. Nothing fancy.

The posts that didn't need modification would be ignored by this filter,
just passed right on through.


>> What kind of limitations on the number of newsgroups and subscribers
>> does CNEWS have?
> 
> For these purposes essentially none ("subscriber" is a largely
> meaningless term at the NNTP level).  Given sufficient hardware C NEWS
> is capable of handling a full feed.


That's good news. I'd like to find something simpler than INN.

AC

Re: CNEWS -- passing NNTP retrieved articles through a rewriting filter
#69426
Author: Dr.Ruud
Date: Sun, 11 Jul 2004 14:30
17 lines
1974 bytes
Toen ik iMeowbot@mac.com kietelde, kwam er dit uit:

> 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.

Like this: save the output of 'diff original-article rewritten-article',
and just run 'patch original-article diff-output' when such diff-output
already exists.

-- 
Affijn, Ruud   `  -  ´
               + ` ´ *
                 ´ `     Jvr qvg yrrfg,
               ´  =  `   fgresg wbatre.

Re: CNEWS -- passing NNTP retrieved articles through a rewriting filter
#69430
Author: J C Lawrence
Date: Thu, 15 Jul 2004 13:36
32 lines
2582 bytes
iMeowbot@mac.com wrote in message news:<iMeowbot-67B06D.03400510072004@news.supernews.com>...
> 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?

I can yeah.  Looks like some source hacking much as you suggest is
required.  Thanks.
 
>> 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.

Good point.  I'll have to apply the same set of transforms to the
returned XOVER data as to the raw article data.  AFAICT this should be
safe as I won't be rewriting the Message-ID:.
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads