Failing newsfeeds piped to programs

Christopher P. Lindsey at
Wed Feb 19 09:24:12 UTC 2003

>      A program feed (Tp) spawns a given program for every article that the
>      site receives.  The paramter 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).

Cool, thanks!  At the risk of sounding stupid, where did you find this?

> You'll need to wrap a script around your programs that runs sm on the
> token that is passed on the command line and pipes the results into the
> program.

I ended up changing my line to look like

   newsclip:*:Tp:/usr/services/news/bin/sm -q %s | /usr/bin/procmail -m /usr/services/news/etc/

It's an extra fork, but it does what I need.  :)



More information about the inn-workers mailing list