🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #60082

Re: innxmit errors

#60082
From: Tricia Sesar
Date: Tue, 27 Aug 2002 09:11
105 lines
4699 bytes
Russ Allbery wrote:

> Tricia Sesar <trixee@rcn.com> writes:
>
> > I am using innxmit to transfer articles from a 2.2 server to a 2.3.2
> > server. Both servers store articles using tradspool.
>
> > From the FAQ:
>
> > 1. ctlinnd param c 0
> > 2. xrefslave true ; restart INND
> > 3. cd pathdb; perl -ne 'chomp; ($a,$b,$_) = split " "; print "$_\n if
> > $_' history | tr . / > pathoutgoing/list
> > 4. innxmit <destination server> list
>
> > While I'm running innxmit, I am tailing the pathnews/news file and all
> > articles arrive with the following error:
>
> > 437 Invalid Xref Header ""
>
> Unfortunately, that technique only works if all the articles have Xref
> headers.  It sounds like you've got a fairly old spool and not all of your
> articles have Xref headers.  You'll need to add them.  (Did you import an
> old spool into your 2.2 system?)
>
> The following script may help.  (Note that to try again, you'll need to
> wipe the history on your new server if possible, or otherwise remove the
> entries added by the failed attempt.)
>
> #!/usr/bin/perl
> $ID = q$Id: fixref,v 1.1 2001/01/10 11:27:37 eagle Exp $;
> #
> # fixref -- Fix the Xref headers in a tree of news articles.
> #
> # Written by Russ Allbery <rra@stanford.edu>
> # Copyright 2000 Board of Trustees, Leland Stanford Jr. University
> #
> # Copy a tree of traditional spool news articles, fixing the Xref headers as
> # we go.  Add Xref headers if missing (based on the path to the article),
> # and if an Xref header is present, trim out hierarchies other than those
> # given on the command line.
> #
> # Usage: fixref -a <hierarchy-pattern> <from> <to> <hierarchy>
>
> use strict;
> use vars qw($ALLOW $COUNT %DONE $FROM $ID $TO);
>
> use File::Find qw(find);
> use File::Path qw(mkpath);
> use Getopt::Long qw(GetOptions);
>
> sub copy {
>     return unless -f $_;
>     return unless /^\d+$/;
>     my $path = $File::Find::dir;
>     $path =~ s%^\Q$FROM\E/*%%;
>     open (SRC, "< $_") or die "Can't open $File::Find::name: $!\n";
>     mkpath ("$TO/$path", 0, 0755) unless $DONE{$path}++;
>     open (DST, "> $TO/$path/$_") or die "Can't open $TO/$path/$_: $!\n";
>     my $header = 1;
>     my $havexref = 0;
>     while ($header) {
>         my $line = <SRC>;
>         if ($line =~ /^Xref: /) {
>             if ($ALLOW) {
>                 my ($xref, $server, @groups) = split (' ', $line);
>                 @groups = grep { /$ALLOW/ } @groups;
>                 $line = join (' ', $xref, $server, @groups) . "\n";
>             }
>             $havexref = 1;
>         } elsif ($line =~ /^[\r\n]*$/) {
>             unless ($havexref) {
>                 my $group = $path;
>                 $group =~ tr%/%.%;
>                 $group .= ":$_";
>                 print DST "Xref: fixref $group\n";
>             }
>             $header = 0;
>         }
>         print DST $line;
>     }
>     local $_;
>     print DST while <SRC>;
>     close SRC;
>     close DST or die "Can't flush $TO/$path/$_: $!\n";
>     print "$COUNT articles processed\n" if ((++$COUNT % 100) == 0);
> }
>
> GetOptions ('allow|a=s' => \$ALLOW) or exit 1;
> my $hierarchy;
> ($FROM, $TO, $hierarchy) = @ARGV;
> die "Usage: fixref [-a <allow>] <from> <to> <hierarchy>\n"
>     unless $hierarchy;
> find (\&copy, "$FROM/$hierarchy");
>
> --
> 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.

Thanks! But, could you explain the command line switches to me? I'm a bit
confused.

Technical Details
Message-ID: <3D6B4246.19FDB9C0@rcn.com>
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!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!feed2.news.rcn.net!feed1.news.rcn.net!rcn!not-for-mail
References: <3D6AE0DB.D3F46C7F@rcn.com> <yladn9owht.fsf@windlord.stanford.edu>

Show Full Headers
Complete Article Headers
Message-ID: <3D6B4246.19FDB9C0@rcn.com>
Subject: Re: innxmit errors
Date: Tue, 27 Aug 2002 05:11:35 -0400
From: Tricia Sesar <trixee@rcn.com>
References: <3D6AE0DB.D3F46C7F@rcn.com> <yladn9owht.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!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!feed2.news.rcn.net!feed1.news.rcn.net!rcn!not-for-mail
Newsgroups: news.software.nntp
Lines: 104
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Trace: UmFuZG9tSVZb2UCsm9PqzIYI4H2mD7aYnMRw+jes0etwNLQ2bv3pIplNHFrX599C
X-Complaints-To: abuse@rcn.com
NNTP-Posting-Date: 27 Aug 2002 09:15:05 GMT
X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.4.14 i586)
X-Accept-Language: en