🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
2 messages
2 total messages Started by Etienne Gauthier Tue, 02 Nov 1999 00:00
inews on INN2.2
#41223
Author: Etienne Gauthier
Date: Tue, 02 Nov 1999 00:00
24 lines
1489 bytes

Hi,

  I'm trying on INN 2.2 a script I've already tested against INN 2.1
(where it used to work, of course).
I use a perl -T script.

 My trouble is quite simple : this script fork itself, and then send
output through a pipe to inews. Everything works fine on INN 2.1.
 But, with INN 2.2, I get this error :
Warning Can't connect to server -- Article will be spooled.

  And, as promised by this message, the article is stored in the
incoming directory. The configuration files seem similar with both my
INN 2.1 and 2.2.

I have to add, that INN was not installed into the default directory,
but in another one (/opt/inn which is also the home directory for news).

Any clue would be welcome...
Etienne

Re: inews on INN2.2
#41296
Author: Etienne Gauthier
Date: Thu, 04 Nov 1999 00:00
81 lines
2960 bytes

Russ Allbery wrote:
> 
> Etienne Gauthier <egauthie@capgemini.fr.nospam> writes:
> 
> > My trouble is quite simple : this script fork itself, and then send
> > output through a pipe to inews. Everything works fine on INN 2.1.  But,
> > with INN 2.2, I get this error : Warning Can't connect to server --
> > Article will be spooled.
> 
> Is inews setgid news, and what user/group is the script running as?
> 
> --
> Russ Allbery (rra@stanford.edu)         <URL:http://www.eyrie.org/~eagle/>



Thanks for your answer,

  Currently, the script is run by the user 'news' ...
So I didn't bother about setgid. I do a fork like this (perl) :

  $pid = open(PIPE_TO_INEWS, "|-");
  if (! $pid)  {
    exec ("$news::PATH_INN/bin/inews", "-h");
  }
  open (handle_fichier, $nom_fichier)
  or do {
    print "<P> Can't open $nom_fichier</P>\n";
    exit (1);
  };

  LIGNE: foreach my $ligne (<handle_fichier>)  {
    if ( ! $entete_finie) {
      if (  $ligne =~ /^Path:/
         || $ligne =~ /^From:/
         #|| $ligne =~ /^Newsgroups:/
         || $ligne =~ /^Subject:/
         || $ligne =~ /^Date:/
         || $ligne =~ /^Organization:/
         || $ligne =~ /^Lines:/
         #|| $ligne =~ /^Sender:/
         #|| $ligne =~ /^Message-ID:/
         #|| $ligne =~ /^NNTP-Posting-Host:/
         #|| $ligne =~ /^X-Trace:/
         #|| $ligne =~ /^X-Complaints-To:/
         #|| $ligne =~ /^NNTP-Posting-Date:/
         #|| $ligne =~ /^X-Newsreader:/
         #|| $ligne =~ /^X-MimeOLE:/
         #|| $ligne =~ /^Xref:/
       )  {
        print PIPE_TO_INEWS $ligne;
      }
      elsif ($ligne =~ /^Newsgroups:/)  {
        print PIPE_TO_INEWS "Newsgroups: $newname\n"
      }
      elsif ($ligne =~ /^$/)  {
        print PIPE_TO_INEWS "\n";
        $entete_finie = 1;
      }
    }
    else {
      #No more in the header, just write the line :
      print PIPE_TO_INEWS $ligne;
    }
  }#LIGNE:

  close (PIPE_TO_INEWS);
  close (handle_fichier);




I didn't see changes on the man page about inews on INN 2.2 (compared to
2.1).

Regards
Etienne

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