Thread View: news.software.nntp
8 messages
8 total messages
Started by Steve
Fri, 06 Sep 2002 10:05
INN Appending Headers
Author: Steve
Date: Fri, 06 Sep 2002 10:05
Date: Fri, 06 Sep 2002 10:05
18 lines
1263 bytes
1263 bytes
Hello, Is there a way to append a header (or modify an existing one) based on the content of a message body? For example: If a message contains the word Honda, I want to append a header of "X- Model: Honda" The server in question is running INN 2.3.3 on a local LAN and has various incoming feeds, but does not push anything back out to the Internet. I have also installed Cleanfeed which is great for filtering, but I don't know if I can use it to append a header in this manner. Cheers, Steve
Re: INN Appending Headers
Author: Jeffrey M. Vinocur
Date: Fri, 06 Sep 2002 10:22
Date: Fri, 06 Sep 2002 10:22
16 lines
1427 bytes
1427 bytes
In article <3d787df0$1_2@news5.nntpserver.com>, Steve <steve@nospam.invalid.com> wrote: > >Is there a way to append a header (or modify an existing one) based on the >content of a message body? Yeah. The Perl posting filters can do this (there's a flag to set if you want to change the headers). You didn't say which version you're reading, but there should be some documentation in ~news/doc for whatever version. -- Jeffrey M. Vinocur jeff@litech.org
Re: INN Appending Headers
Author: Steve
Date: Sat, 07 Sep 2002 08:52
Date: Sat, 07 Sep 2002 08:52
30 lines
1931 bytes
1931 bytes
Jeffrey M. Vinocur wrote: > In article <3d787df0$1_2@news5.nntpserver.com>, > Steve <steve@nospam.invalid.com> wrote: >> >>Is there a way to append a header (or modify an existing one) based on >>the content of a message body? > > Yeah. The Perl posting filters can do this (there's a flag to > set if you want to change the headers). You didn't say which > version you're reading, but there should be some documentation in > ~news/doc for whatever version. > > Hi Jeffery, Regarding the versions, my INN is 2.3.3 and cleanfeed is 20020501. I've spent a while looking for documentation regarding what I'm trying to do, but it seems to be a bit thin. I got the man pages from an older version of cleanfeed which are quite insightful but still don't give me any guidance on how to append a header. I'm far from being a Perl expert and I'm really working off the sample file that Marco D'itri supplies with it. This is easy to modify from a filtering perspective, but not for the functionality I'm looking for. Any pointers would be gratefully received. Steve
Re: INN Appending Headers
Author: Jeffrey M. Vinocur
Date: Sat, 07 Sep 2002 13:59
Date: Sat, 07 Sep 2002 13:59
15 lines
1544 bytes
1544 bytes
In article <3d79be33$1_6@news5.nntpserver.com>, Steve <steve@nospam.invalid.com> wrote: >Jeffrey M. Vinocur wrote: > >> Yeah. The Perl posting filters can do this (there's a flag to >> set if you want to change the headers). > >I've spent a while looking for documentation regarding what I'm trying to >do, but it seems to be a bit thin. You're looking for INN documentation, actually. For your version it should be README.perl_hook in the source tree. There's information there about modifying headers.
Re: INN Appending Headers
Author: Steve
Date: Sun, 08 Sep 2002 09:14
Date: Sun, 08 Sep 2002 09:14
25 lines
1895 bytes
1895 bytes
Jeffrey M. Vinocur wrote: > In article <3d79be33$1_6@news5.nntpserver.com>, > Steve <steve@nospam.invalid.com> wrote: >>Jeffrey M. Vinocur wrote: >> >>> Yeah. The Perl posting filters can do this (there's a flag to >>> set if you want to change the headers). >> >>I've spent a while looking for documentation regarding what I'm trying >>to do, but it seems to be a bit thin. > > You're looking for INN documentation, actually. For your version > it should be README.perl_hook in the source tree. There's > information there about modifying headers. > Thanks, I found it this time, was looking in the wrong place as usual. :) If my limited understanding is correct though, the filter_nnrpd.pl routine is only called for articles received via a POST command. In the case of my server, they are being received via an IHAVE type feed and so the filter_innd.pl routine is called instead which doesn't have the capability to modify or append header fields.
Re: INN Appending Headers
Author: Andrew - Supernews
Date: Sun, 08 Sep 2002 18:23
Date: Sun, 08 Sep 2002 18:23
18 lines
1868 bytes
1868 bytes
In article <3d7b14f8$1_2@news5.nntpserver.com>, Steve wrote: > If my limited understanding is correct though, the filter_nnrpd.pl > routine is only called for articles received via a POST command. In the > case of my server, they are being received via an IHAVE type feed and so > the filter_innd.pl routine is called instead which doesn't have the > capability to modify or append header fields. which is as it should be - you have no business messing with the headers of articles that originated elsewhere. However, you might want to take a look at the keyword-generation code if it still exists and hasn't rotted - that adds to the _overview_ rather than to the real headers. -- Andrew, Supernews http://www.supernews.com - individual and corporate NNTP services
Re: INN Appending Headers
Author: Steve
Date: Mon, 09 Sep 2002 09:13
Date: Mon, 09 Sep 2002 09:13
36 lines
2569 bytes
2569 bytes
Andrew - Supernews wrote: > In article <3d7b14f8$1_2@news5.nntpserver.com>, Steve wrote: >> If my limited understanding is correct though, the filter_nnrpd.pl >> routine is only called for articles received via a POST command. In >> the case of my server, they are being received via an IHAVE type feed >> and so the filter_innd.pl routine is called instead which doesn't >> have the capability to modify or append header fields. > > which is as it should be - you have no business messing with the > headers of articles that originated elsewhere. That's why I pointed out in my original posting that the server in question has no outgoing feeds to the Internet. It's purely an internal server. I wouldn't want to propogate modified messages back to the public domain. Perhaps a better solution would be to filter the incoming feeds so the server only holds articles with seemingly relevent information, but this would inevitably lead to employee cries of "censorship" and dropped articles that could be of benefit. The idea of appending a header to enable users to employ their own filters and searches seemed a much more user friendly approach. > > However, you might want to take a look at the keyword-generation code > if it still exists and hasn't rotted - that adds to the _overview_ > rather than to the real headers. > Thanks, I'll check it out. Although I'm pretty sure that the bulk of users with Windows based readers will not have filtering capabilities on anything but the message headers. Thanks for the reply, Steve
Re: INN Appending Headers
Author: Jeffrey M. Vinocur
Date: Sat, 14 Sep 2002 23:37
Date: Sat, 14 Sep 2002 23:37
44 lines
2617 bytes
2617 bytes
In article <3d7c664e_2@news5.nntpserver.com>, Steve <steve@nospam.invalid.com> wrote: >Andrew - Supernews wrote: > >> which is as it should be - you have no business messing with the >> headers of articles that originated elsewhere. > >That's why I pointed out in my original posting that the server in >question has no outgoing feeds to the Internet. It's purely an internal >server. I wouldn't want to propogate modified messages back to the >public domain. > >Perhaps a better solution would be to filter the incoming feeds so the >server only holds articles with seemingly relevent information, but this >would inevitably lead to employee cries of "censorship" and dropped >articles that could be of benefit. What is it you'd be getting rid of? >The idea of appending a header to enable users to employ their >own filters and searches seemed a much more user friendly approach. Do you think they actually will? >> However, you might want to take a look at the keyword-generation code >> if it still exists and hasn't rotted - that adds to the _overview_ >> rather than to the real headers. Hmm. I think it's probably ok, or perhaps only slightly rotted. >Thanks, I'll check it out. Although I'm pretty sure that the bulk of >users with Windows based readers will not have filtering capabilities on >anything but the message headers. If they filter before downloading articles, then they may be doing it off overview data. -- Jeffrey M. Vinocur jeff@litech.org
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