Proper use of channel newsfeeds.

Ron Jarrell jarrell at solaris.cc.vt.edu
Thu Aug 2 20:30:08 UTC 2001


At 12:25 PM 8/2/01 -0400, gabriel rosenkoetter wrote:

>newsfeeds(5) is a little bit vague about just how channel newsfeeds
>work, so I'm hoping someone here can clear things up a little bit
>for me.
>
>In my storage.conf, I have:
>
>method tradspool {
>        newsgroups: *
>        class: 0
>}
>
>Though, just recently, I had the method set to timehash. I have
>since completely restarted innd. So I hope that's not the cause of
>the weird token I'm getting below.
>
>I have a channel newsfeed, declared like this:
>
>foobar!:foo.*:Tc,Ac,Wmn:/path/to/foobar.pl
>
>(Never mind what it's going to do, all it does right now is print
>its standard input into a file.)
>
>If I understand newsfeeds(5), especially its examples section,
>properly, this *should* produce something like this on my Perl
>script's stdin when I post an article to the newsgroup foo.test:
>
>   <123 at my.host.dom> foo/test/999
>
>Instead, it's producing this:
>
>  <9kbu4v$e0u$1 at my.host.dom> @050000000008000000090000000000000000@
>
>What might I have set wrong to be getting a token like this instead
>of a path (relative to patharticles in inn.conf) to the file
>containing the article? Just what does this token *mean* anyhow?

The other methods use storage manager tokens, since they don't *have* 
filenames.  Filenames make no real sense in timecaf, timehas,
or cnfs, because multiple articles are in one file.  Instead you get a token,
which the storage manager can translate to a particular location and offset
in a file, for whatever needs to read it.

You can fake this, for programs that you don't (or can't) re-write to call
storagemanager article access routines, by changing your feed just slightly.
Make it:

foobar!:foo.*:Tc,Ac,Wmn:/path/to/foobar-wrapper

Make foobar-wrapper be

/path/to/news/bin/sm $1 | /path/to/foobar.pl


Basically, you just write a wrapper for any channel that's getting "filenames",
to call sm with the *last* argument first, then the real program with all the
other arguments.

sm is a command line interface to the storage manager, which, when
called with just the token, cats out the article.



More information about the inn-workers mailing list