Article View: news.software.nntp
Article #60080Re: innxmit errors
From: Russ Allbery
Date: Tue, 27 Aug 2002 02:39
Date: Tue, 27 Aug 2002 02:39
99 lines
4382 bytes
4382 bytes
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 (\©, "$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.
Technical Details
Message-ID:
<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!nntp.stanford.edu!not-for-mailReferences:
<3D6AE0DB.D3F46C7F@rcn.com>Show Full Headers
Complete Article Headers
Message-ID: <yladn9owht.fsf@windlord.stanford.edu> Subject: Re: innxmit errors Date: Mon, 26 Aug 2002 19:39:58 -0700 From: Russ Allbery <rra@stanford.edu> References: <3D6AE0DB.D3F46C7F@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!nntp.stanford.edu!not-for-mail Newsgroups: news.software.nntp Organization: The Eyrie Lines: 98 NNTP-Posting-Host: windlord.stanford.edu Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: news.Stanford.EDU 1030415998 22322 171.64.13.23 (27 Aug 2002 02:39:58 GMT) X-Complaints-To: news@news.stanford.edu User-Agent: Gnus/5.090008 (Oort Gnus v0.08) XEmacs/21.4 (Honest Recruiter, sparc-sun-solaris2.6) Cancel-Lock: sha1:YWCyvSK05ADRKX5S6VySuHFaOt8=