🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
10 messages
10 total messages Started by Marcus Mönnig Thu, 29 May 2003 21:58
INN: Filtering incoming and moving some elsewhere
#65558
Author: Marcus Mönnig
Date: Thu, 29 May 2003 21:58
19 lines
1776 bytes
Hi,

I didn't even install INN yet, but just checking if it will do what I want.
I found filter_innd.pl, but I am not sure if it can be tweaked like this.

I basically want to look at all incoming article headers from a
(header-only) feed, not add any of them to their group(s), but if some
patterns match on the article header I want to store them in a
local.somename group.

I'd appreciate if someone could enlighten me if and how this can be done
with INN. Thanks!

Marcus

P.S.: No outgoing feeds planned... ;-)
-- 
Despite the high cost of living, it remains popular.
Re: INN: Filtering incoming and moving some elsewhere
#65559
Author: Russ Allbery
Date: Thu, 29 May 2003 22:17
15 lines
1588 bytes
Marcus M�nnig <dialog@40tude.com> writes:

> I basically want to look at all incoming article headers from a
> (header-only) feed, not add any of them to their group(s), but if some
> patterns match on the article header I want to store them in a
> local.somename group.

I don't think it would be easy to do this with INN.

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

          Please post questions rather than mailing me directly.
     <http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
Re: INN: Filtering incoming and moving some elsewhere
#65563
Author: greg andruk
Date: Fri, 30 May 2003 00:17
29 lines
2819 bytes
Russ Allbery <rra@stanford.edu> writes:

> Marcus M�nnig <dialog@40tude.com> writes:
>
>> I basically want to look at all incoming article headers from a
>> (header-only) feed, not add any of them to their group(s), but if some
>> patterns match on the article header I want to store them in a
>> local.somename group.
>
> I don't think it would be easy to do this with INN.

Well sure, but nothing's easy with INN.  Isn't that kind of the point?

It's possible to edo what Marcus wants with INN 2.4, if the remote
site is handed to nnrpd instead of innd.  A tiny patch to post.c may
be necessary, depending on what's in the local active file.

In readers.conf, the remote host will need to get ihave permission, of
course.  Such articles are passed to filter_nnrpd.pl, and if
$modify_headers is set in there, the Newsgroups: header can be changed
as desired.

Why a patch may be needed? In nnrpd/post.c, ValidNewsgroups() is
called twice before HandleHeaders() happens.  This means that the
server will reject newsgroups not in active before the nnrpd filter
has a chance to make its changes.  Possible workarounds are to comment
out the checks, move them to after the DO_PERL section, or leave the
code alone and add the newsgroups of interest to active.
Re: INN: Filtering incoming and moving some elsewhere
#65568
Author: Marcus Mönnig
Date: Fri, 30 May 2003 09:12
29 lines
2468 bytes
Thanks Greg and Russ.

On Fri, 30 May 2003 00:17:12 GMT, greg andruk wrote:

> Why a patch may be needed? In nnrpd/post.c, ValidNewsgroups() is
> called twice before HandleHeaders() happens.  This means that the
> server will reject newsgroups not in active before the nnrpd filter
> has a chance to make its changes.  
> Possible workarounds are to comment
> out the checks, move them to after the DO_PERL section, or leave the
> code alone and add the newsgroups of interest to active.

I want to do this for non-binary groups only anyway and I might come up with
additional groups that I don't want to include, so what if I simply keep my
active file up-to-date? 
As far as I understand, the articles that I am interested in would pass the
ValidNewsgroup test and by rewriting the Newsgroups header in nnrpd.pl they
would either end up in a local.something group or not be added at all. 
Does this sound like it will work?

Btw, since I'll only need a very simple nnrpd filter, so I don't care too
much which languages it's in it, what will generally run faster, perl,
python or tcl?

Marcus
-- 
Usenet: I came, I read, I unsubscribed
Re: INN: Filtering incoming and moving some elsewhere
#65569
Author: Curt Welch
Date: Fri, 30 May 2003 12:29
21 lines
2107 bytes
Marcus M�nnig <dialog@40tude.com> wrote:
> I'd appreciate if someone could enlighten me if and how this can be done
> with INN. Thanks!

I don't know any of the answers to the details about INN, but I would like
to point out that since INN comes with source, you can do anything you want
with it.  I would expect the type of things you are trying to do to take
only 10 lines of C code to make work.  If you know C, then an afternoon
spent studying the souce should give you enough information to figure out
what 10 lines of code are needed and where it needs to be added.

It's common for news servers to file articles in groups other than what
shows up in the Newsgroups: header.  This happens to control messages for
example.  Look at how the server does this for control messages and make
your hack do something similar - assuming you can't make it work like you
want with the external filters.

-- 
Curt Welch                                            http://CurtWelch.Com/
curt@kcwc.com                          Webmaster for http://NewsReader.Com/
Re: INN: Filtering incoming and moving some elsewhere
#65570
Author: Marcus Mönnig
Date: Fri, 30 May 2003 12:53
26 lines
2456 bytes
On 30 May 2003 12:29:11 GMT, Curt Welch wrote:

> I don't know any of the answers to the details about INN, but I would like
> to point out that since INN comes with source, you can do anything you want
> with it.  I would expect the type of things you are trying to do to take
> only 10 lines of C code to make work.  If you know C, then an afternoon
> spent studying the souce should give you enough information to figure out
> what 10 lines of code are needed and where it needs to be added.
> 
> It's common for news servers to file articles in groups other than what
> shows up in the Newsgroups: header.  This happens to control messages for
> example.  Look at how the server does this for control messages and make
> your hack do something similar - assuming you can't make it work like you
> want with the external filters.

Well, I generally like the idea of using the latest stable package for my
distribution to be able to upgrade quickly in case there is an issue, so I
was looking into build-in options.

I left the main development branch with other software too often already...
:-)

Marcus
-- 
It takes 2 to tango, but 3 makes it more interesting
Re: INN: Filtering incoming and moving some elsewhere
#65571
Author: A Meooooooooooooowbot
Date: Fri, 30 May 2003 13:01
17 lines
1705 bytes
Marcus M�nnig <usenet-apr03@40tude.com> wrote:

> I want to do this for non-binary groups only anyway and I might come up with
> additional groups that I don't want to include, so what if I simply keep my
> active file up-to-date?

Yes, if you know what the groups will be before the articles arrive,
that will work fine.

> Btw, since I'll only need a very simple nnrpd filter, so I don't care too
> much which languages it's in it, what will generally run faster, perl,
> python or tcl?

For the nnrpd filter, Perl is your only option.  The Python hooks in
nnrpd are currently only for authenticastion, and the Tcl hooks only
appear in innd.
Re: INN: Filtering incoming and moving some elsewhere
#65582
Author: Marcus Mönnig
Date: Sat, 31 May 2003 21:06
16 lines
1968 bytes
On Fri, 30 May 2003 00:17:12 GMT, greg andruk wrote:

> In readers.conf, the remote host will need to get ihave permission, of
> course.  Such articles are passed to filter_nnrpd.pl, and if
> $modify_headers is set in there, the Newsgroups: header can be changed
> as desired.

I am stuck here. How exactly would I grant "ihave permission in
readers.conf"? I only see RPANL for "access:" in man readers.conf and the
messages I feed in don't seem to go through filter_nnrpd.pl. 

Marcus
-- 
# wall "Mwuahahahaha!!!"; newfs /dev/userdisk
		-- Michael Hinz
Re: INN: Filtering incoming and moving some elsewhere
#65583
Author: Russ Allbery
Date: Sat, 31 May 2003 21:15
14 lines
1632 bytes
Marcus M�nnig <dialog@40tude.com> writes:

> I am stuck here. How exactly would I grant "ihave permission in
> readers.conf"? I only see RPANL for "access:" in man readers.conf and
> the messages I feed in don't seem to go through filter_nnrpd.pl.

You need INN 2.4.0.

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

          Please post questions rather than mailing me directly.
     <http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
Re: INN: Filtering incoming and moving some elsewhere
#65584
Author: Marcus Mönnig
Date: Sat, 31 May 2003 21:52
15 lines
1933 bytes
On Sat, 31 May 2003 14:15:46 -0700, Russ Allbery wrote:

>> I am stuck here. How exactly would I grant "ihave permission in
>> readers.conf"? I only see RPANL for "access:" in man readers.conf and
>> the messages I feed in don't seem to go through filter_nnrpd.pl.
> 
> You need INN 2.4.0.

So much for sticking with the stable package for my distro... :-)

Thanks Russ!
Marcus
-- 
"There's nothing wrong with bed-hopping... intrinsically."  -- Jen Setlow
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