Thread View: news.software.nntp
9 messages
9 total messages
Started by Lawrence Lim
Mon, 06 Sep 2004 09:38
innd 2.4.1 any different from 2.2.2
Author: Lawrence Lim
Date: Mon, 06 Sep 2004 09:38
Date: Mon, 06 Sep 2004 09:38
36 lines
1446 bytes
1446 bytes
I am just writtiing an simple perl script to capture whatever it pass to
/var/news/newsfeeds, however on innd 2.2.2 is can capture but not on
innd.2.4.1
Can anyone pls answer, Russ???
Below is my newsfeeds and perl file named output:
newsfeeds:
---------
ME\
:!*::
pcbase@jaring.my/news2.jaring.my\
:*,!control\
:Tm:output!
output:
------
#!/usr/bin/perl -d
$Log = '/var/log/news/article.log';
$now = `date +%H:%M:%S` ;
chop($now);
open (LOG, ">>$Log") ;
while (<>) {
print LOG "$now\n";
print LOG "$_";
}
close LOG
--lawrence
Re: innd 2.4.1 any different from 2.2.2
Author: Jeffrey M. Vinocur
Date: Mon, 06 Sep 2004 12:14
Date: Mon, 06 Sep 2004 12:14
20 lines
1719 bytes
1719 bytes
In article <Pine.BSI.4.58.0409061734050.23577@netop.jaring.my>, Lawrence Lim <lawrence@jaring.my> wrote: >I am just writtiing an simple perl script to capture whatever it pass to >/var/news/newsfeeds, however on innd 2.2.2 is can capture but not on >innd.2.4.1 > >pcbase@jaring.my/news2.jaring.my\ > :*,!control\ > :Tm:output! I don't think "Tm" is the right thing for you here. You haven't described what the input to your script should be, so I can't tell you which one is right. Try reading the FEED TYPES section of newsfeeds(5) manpage. -- Jeffrey M. Vinocur jeff@litech.org
Re: innd 2.4.1 any different from 2.2.2
Author: Lawrence Lim
Date: Tue, 07 Sep 2004 10:18
Date: Tue, 07 Sep 2004 10:18
36 lines
2126 bytes
2126 bytes
The input is any article except ctrl msg that innd pass to /var/news/newsfeeds as in this syntax: :*,!control\ Meaning that if innd get a new article in news.software.nntp, my script would juz write it to /var/log/news/article.log Thats all that I wanted. The script works on inn-2.2.2 but not innd-2.4.1! --lawrence On Mon, 6 Sep 2004, Jeffrey M. Vinocur wrote: > In article <Pine.BSI.4.58.0409061734050.23577@netop.jaring.my>, > Lawrence Lim <lawrence@jaring.my> wrote: > >I am just writtiing an simple perl script to capture whatever it pass to > >/var/news/newsfeeds, however on innd 2.2.2 is can capture but not on > >innd.2.4.1 > > > >pcbase@jaring.my/news2.jaring.my\ > > :*,!control\ > > :Tm:output! > > I don't think "Tm" is the right thing for you here. You haven't > described what the input to your script should be, so I can't > tell you which one is right. > > Try reading the FEED TYPES section of newsfeeds(5) manpage. > > > -- > Jeffrey M. Vinocur > jeff@litech.org >
Re: innd 2.4.1 any different from 2.2.2
Author: Russ Allbery
Date: Tue, 07 Sep 2004 20:16
Date: Tue, 07 Sep 2004 20:16
21 lines
2061 bytes
2061 bytes
Lawrence Lim <lawrence@jaring.my> writes:
> The input is any article except ctrl msg that innd pass to
> /var/news/newsfeeds as in this syntax:
> :*,!control\
> Meaning that if innd get a new article in news.software.nntp, my script
> would juz write it to /var/log/news/article.log Thats all that I wanted.
> The script works on inn-2.2.2 but not innd-2.4.1!
Tm doesn't actually do anything at all except feed into another funnel
feed defined in newsfeeds, which you haven't shown us. I don't think we
have enough information to answer your question; you need to show us what
the definition of the output! feed is.
--
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: innd 2.4.1 any different from 2.2.2
Author: Lawrence Lim
Date: Wed, 08 Sep 2004 01:42
Date: Wed, 08 Sep 2004 01:42
61 lines
2552 bytes
2552 bytes
Sorry for giving insufficient info, here I am giving all the info that is
needed:
newsfeeds:
---------
ME\
:!*::
pcbase@jaring.my/news2.jaring.my\
:*,!control\
:Tm:output!
output!\
:!*\
:W*,Tp:/var/news/bin/output *
output:
------
#!/usr/bin/perl -d
$Log = '/var/log/news/article.log';
$now = `date +%H:%M:%S` ;
chop($now);
open (LOG, ">>$Log") ;
print LOG "$now\n";
while (<>) {
print LOG "$_";
}
close LOG
--lawrence
On Tue, 7 Sep 2004, Russ Allbery wrote:
> Lawrence Lim <lawrence@jaring.my> writes:
>
> > The input is any article except ctrl msg that innd pass to
> > /var/news/newsfeeds as in this syntax:
> > :*,!control\
>
> > Meaning that if innd get a new article in news.software.nntp, my script
> > would juz write it to /var/log/news/article.log Thats all that I wanted.
>
> > The script works on inn-2.2.2 but not innd-2.4.1!
>
> Tm doesn't actually do anything at all except feed into another funnel
> feed defined in newsfeeds, which you haven't shown us. I don't think we
> have enough information to answer your question; you need to show us what
> the definition of the output! feed is.
>
> --
> 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: innd 2.4.1 any different from 2.2.2
Author: Russ Allbery
Date: Wed, 08 Sep 2004 01:44
Date: Wed, 08 Sep 2004 01:44
27 lines
2173 bytes
2173 bytes
Lawrence Lim <lawrence@jaring.my> writes:
> Sorry for giving insufficient info, here I am giving all the info that is
> needed:
> newsfeeds:
> ---------
> ME\
> :!*::
> pcbase@jaring.my/news2.jaring.my\
> :*,!control\
> :Tm:output!
> output!\
> :!*\
> :W*,Tp:/var/news/bin/output *
Tp feeds don't work the same in current versions of INN. You need to put
an invocation of sm in there somewhere to get the actual article, probably
inside your output script. Your script is being passed storage API tokens
rather than file names that it can open.
--
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: innd 2.4.1 any different from 2.2.2
Author: Lawrence Lim
Date: Wed, 08 Sep 2004 02:45
Date: Wed, 08 Sep 2004 02:45
39 lines
2344 bytes
2344 bytes
Thanks for the pointer on sm. However my script output do not show any token at all. Should I see a list of token for my output using my script or my newsfeeds feeding option to my script is wrong? --lawrence On Tue, 7 Sep 2004, Russ Allbery wrote: > Lawrence Lim <lawrence@jaring.my> writes: > > > Sorry for giving insufficient info, here I am giving all the info that is > > needed: > > > newsfeeds: > > --------- > > ME\ > > :!*:: > > pcbase@jaring.my/news2.jaring.my\ > > :*,!control\ > > :Tm:output! > > > output!\ > > :!*\ > > :W*,Tp:/var/news/bin/output * > > Tp feeds don't work the same in current versions of INN. You need to put > an invocation of sm in there somewhere to get the actual article, probably > inside your output script. Your script is being passed storage API tokens > rather than file names that it can open. > > -- > 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: innd 2.4.1 any different from 2.2.2
Author: Russ Allbery
Date: Wed, 08 Sep 2004 02:50
Date: Wed, 08 Sep 2004 02:50
41 lines
3551 bytes
3551 bytes
Lawrence Lim <lawrence@jaring.my> writes:
> Thanks for the pointer on sm. However my script output do not show any
> token at all. Should I see a list of token for my output using my
> script or my newsfeeds feeding option to my script is wrong?
Hm. Good point. Actually, I may have misunderstood what you're doing; I
forgot how the * funnel feeds work.
Here's the relevant documentation:
A program feed (Tp) spawns a given program for every article that the
site receives. The parameter field must be the command line to
execute, and should contain one instance of %s, which will be replaced
by the storage API token of the article (the actual article can be
retrieved by the program using sm(8)). The program will not receive
anything on standard input (unlike earlier versions of INN, where the
article is sent to the program on stdin), and standard output and
error from the program will be set to the error log (pathlog/errlog).
innd will try to avoid spawning a shell if the command has no shell
meta-characters; this feature can be defeated if necessary for some
reason by appending a semi-colon to the end of the command. The full
path name of the program to be run must be specified unless the
command will be run by the shell (and it is strongly recommended that
the full path name always be specified regardless).
If a program feed is the target of a funnel, and if W* appears in the
flags of the site, a single asterisk may be present in the parameter
and will be replaced by a space-separated list of names of the sites
feeding into the funnel which received the relevant article. If the
site is not the target of a funnel, or if the W* flag is not used, the
asterisk has no special meaning.
So what is your program actually seeing as its input? Is it getting
invoked at all?
--
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: innd 2.4.1 any different from 2.2.2
Author: Lawrence Lim
Date: Thu, 09 Sep 2004 01:45
Date: Thu, 09 Sep 2004 01:45
19 lines
1896 bytes
1896 bytes
On Tue, 7 Sep 2004, Russ Allbery wrote:
> So what is your program actually seeing as its input? Is it getting
> invoked at all?
>
My program does not see anything at all but it did get invoked. Anyway
I've solved the problem, referring to newfeeds man pages:
Here's a cute, really simple news to mail gateway that also serves
as an example of a fairly fancy program feed:
mailer!:!*:W*,Tp\
:sm %s | innmail -s "News article" *
Remember that %s is replaced by the storage API token, so this
retrieves the article and pipes it into innmail
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