🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
7 messages
7 total messages Started by Mark W Modrall Mon, 29 Jan 2001 22:25
new to channel feeds
#50298
Author: Mark W Modrall
Date: Mon, 29 Jan 2001 22:25
36 lines
2154 bytes
Hi...

	I've been trying to implement some post-processing on
new posts with the perl hook.  Andrew recently repointed me
at channel feeds as the more appropriate place to be doing 
this sort of thing, but i still have a few questions...

	From what i can tell, programs that are sent channel
feeds get, at most, some of the header information about new
articles, not the article itself...  Presumably, one's program
has to fetch the article out to process it?  Does one use
the message id or the token (what is the token anyway?  some
kind of local messageid?)?

	I read the newsfeeds man page, the archive man page,
and the innfeed man page...  The newsfeeds man page says 
that if inn can't start the designated program, it will
spool the articles to a file named for the site and try to
restart it later.  But when i tried to rename my program and
test that, inn just crashed.  Any attempt to restart it as
long as it couldn't find the program file got it to core dump
again...  Is the spooling thing no longer applicable?

	I'm also not entirely clear on what happens to cross-
posted articles in the channel feed program.  Does it get just
one notice for the article?  or does it get one for each group
it's being fed to?  i'd imagine the former, but the newsfeeds
man page config options "g" and "G" confused me...  It seemed
to say that it would operate one ng at a time...

	Sorry if this is too remedial; i'm still acclimating...

thanks
-mark

Re: new to channel feeds
#50301
Author: Andrew Gierth
Date: Mon, 29 Jan 2001 22:46
40 lines
3056 bytes
[bogus "Distribution: na" removed]

>>>>> "Mark" == Mark W Modrall <modrall@world.std.com> writes:

 Mark> 	From what i can tell, programs that are sent channel feeds
 Mark> get, at most, some of the header information about new
 Mark> articles, not the article itself...  Presumably, one's program
 Mark> has to fetch the article out to process it?  Does one use the
 Mark> message id or the token (what is the token anyway?  some kind
 Mark> of local messageid?)?

The token defines where the article is stored locally. You can pass it
to the sm program to get the whole article, or alternatively I think
there's a Perl interface somewhere on http://members.nbci.com/meowing

 Mark> 	I read the newsfeeds man page, the archive man page, and the
 Mark> innfeed man page...  The newsfeeds man page says that if inn
 Mark> can't start the designated program, it will spool the articles
 Mark> to a file named for the site and try to restart it later.  But
 Mark> when i tried to rename my program and test that, inn just
 Mark> crashed.  Any attempt to restart it as long as it couldn't find
 Mark> the program file got it to core dump again...  Is the spooling
 Mark> thing no longer applicable?

what can you find out from the core? where exactly is it crashing?

 Mark> 	I'm also not entirely clear on what happens to cross-
 Mark> posted articles in the channel feed program.  Does it get just
 Mark> one notice for the article?  or does it get one for each group
 Mark> it's being fed to?  i'd imagine the former, but the newsfeeds
 Mark> man page config options "g" and "G" confused me...  It seemed
 Mark> to say that it would operate one ng at a time...

Any given channel gets only one entry for each article, regardless of
crossposting. The Gn flag simply says "don't feed the article to this
channel if it's crossposted to more than n newsgroups".

-- 
Andrew.
Re: new to channel feeds
#50309
Author: Russ Allbery
Date: Tue, 30 Jan 2001 08:13
61 lines
3433 bytes
Mark W Modrall <modrall@world.std.com> writes:

> From what i can tell, programs that are sent channel feeds get, at most,
> some of the header information about new articles, not the article
> itself...

Correct.

> Presumably, one's program has to fetch the article out to process it?

Right.

> Does one use the message id or the token (what is the token anyway?
> some kind of local messageid?)?

The token.  The token is a black-box string that you pass to the storage
API to retrieve the article; it's interpreted differently depending on
what type of storage the article is in.  For scripts, you generally pass
it to sm(8) to get the article.

> I read the newsfeeds man page, the archive man page, and the innfeed man
> page...  The newsfeeds man page says that if inn can't start the
> designated program, it will spool the articles to a file named for the
> site and try to restart it later.

Yes, that's what should happen.

> But when i tried to rename my program and test that, inn just crashed.
> Any attempt to restart it as long as it couldn't find the program file
> got it to core dump again...  Is the spooling thing no longer
> applicable?

No, it sounds like you've found a bug.  If you can get a backtrace from
that core file, I'd be very interested, along with any additional
information you can provide.

> I'm also not entirely clear on what happens to cross-posted articles in
> the channel feed program.  Does it get just one notice for the article?

Yes.

> i'd imagine the former, but the newsfeeds man page config options "g"
> and "G" confused me...  It seemed to say that it would operate one ng at
> a time...

This may help, from the rewrite of the newsfeeds man page in CURRENT:

     g  The newsgroup the article is in; if cross-posted, then the first
        of the groups to which the article was posted that this site gets.
        (The difference from "G" is that this sends the newsgroup to which
        the article was posted even if it's a control message.)

     G  Where the article is stored.  If the newsgroup is crossposted,
        this is generally the first of the groups to which it was posted
        that this site receives; however, control messages are filed in
        control or control.* (which is the difference between this item
        and "g").

-- 
Russ Allbery (rra@stanford.edu)             <http://www.eyrie.org/~eagle/>
Re: new to channel feeds
#50324
Author: Mark W Modrall
Date: Tue, 30 Jan 2001 22:42
16 lines
1172 bytes
Hi Andrew...

In article <87ofwqkmdl.fsf@erlenstar.demon.co.uk>,
Andrew Gierth  <andrew@erlenstar.demon.co.uk> wrote:
>[bogus "Distribution: na" removed]
>what can you find out from the core? where exactly is it crashing?

	From the core, it says SITEstartprocess() at site.c:611.  It
appears to have trashed the stack pretty good because nothing else
survives of the traceback...

thanks
-mark


Re: new to channel feeds
#50319
Author: Mark W Modrall
Date: Tue, 30 Jan 2001 22:49
33 lines
2121 bytes
Hi Russ...

In article <ylk87dtq3s.fsf@windlord.stanford.edu>,
Russ Allbery  <rra@stanford.edu> wrote:
>The token.  The token is a black-box string that you pass to the storage
>API to retrieve the article; it's interpreted differently depending on
>what type of storage the article is in.  For scripts, you generally pass
>it to sm(8) to get the article.

	okay, i'll go read the sm(8) page...  I'm thinking of using some
java programs to process it; someone pointed me at the Oro java interface.
I don't know which method will take the token yet, though...

>No, it sounds like you've found a bug.  If you can get a backtrace from
>that core file, I'd be very interested, along with any additional
>information you can provide.

	as i just responded to Andrew, the core file says it was at
SITEstartprocess() at site.c:611 (a close statement).  It looked like
the stack was pretty trashed, as no other information was traceable...

	All i had was a little perl script that read from stdin and 
printed what it got to stdout (a quick little test of the channel feed).
To try and test the spooling, i renamed the script to something else and
shot the running instance of it.  Innd itself crashed immediately.  All
attempts to restart innd also crashed.  I renamed the script back and all
was right again...

thanks
-mark


Re: new to channel feeds
#50333
Author: Mark W Modrall
Date: Wed, 31 Jan 2001 18:59
23 lines
1669 bytes
Hi Russ...

In article <ylk87dtq3s.fsf@windlord.stanford.edu>,
Russ Allbery  <rra@stanford.edu> wrote:
>The token.  The token is a black-box string that you pass to the storage
>API to retrieve the article; it's interpreted differently depending on
>what type of storage the article is in.  For scripts, you generally pass
>it to sm(8) to get the article.

	I've been playing with sm and can see what it does as a black box.
I tried to use the oro nntp classes to get an article out by message id,
though, and it said that the ARTICLE command isn't implemented...

	Can anyone recommend a good library class in java or perl to get
an article out (either by token or by message id) for processing?  I'm
going to try and read the source to sm, but i thought someone out there
might know of a good library and/or why it tells me that ARTICLE isn't
implemented...

thanks
-mark

Re: new to channel feeds
#50334
Author: Russ Allbery
Date: Wed, 31 Jan 2001 19:53
13 lines
1534 bytes
Mark W Modrall <modrall@world.std.com> writes:

> I've been playing with sm and can see what it does as a black box.  I
> tried to use the oro nntp classes to get an article out by message id,
> though, and it said that the ARTICLE command isn't implemented...

Sounds like it's not sending MODE READER first.  Is there a separate
command to send that command?  Otherwise, you're probably talking to innd,
which doesn't implement article reading commands.

-- 
Russ Allbery (rra@stanford.edu)             <http://www.eyrie.org/~eagle/>
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