🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #41296

Re: inews on INN2.2

#41296
From: 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

Technical Details
Message-ID: <38217B57.44436A7C@capgemini.fr>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail
References: <381EA2D1.1D3AE75@capgemini.fr> <ylbt9dnuvl.fsf@windlord.stanford.edu>

Show Full Headers
Complete Article Headers
Message-ID: <38217B57.44436A7C@capgemini.fr>
Subject: Re: inews on INN2.2
Date: Thu, 04 Nov 1999 00:00:00 +0000
From: Etienne Gauthier <egauthie@capgemini.fr.nospam>
References: <381EA2D1.1D3AE75@capgemini.fr> <ylbt9dnuvl.fsf@windlord.stanford.edu>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail
X-Deja-AN: 544358388
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=us-ascii
X-Complaints-To: abuse@oleane.net
X-Trace: minus.oleane.net 941718169 26408 194.3.234.197 (4 Nov 1999 12:22:49 GMT)
Organization: Cap Gemini
Mime-Version: 1.0
NNTP-Posting-Date: 4 Nov 1999 12:22:49 GMT
Newsgroups: news.software.nntp