Article View: news.software.nntp
Article #57526Re: INN: upgrading from 1.4 to 2.3.2
From: Russ Allbery
Date: Thu, 21 Mar 2002 21:24
Date: Thu, 21 Mar 2002 21:24
89 lines
4238 bytes
4238 bytes
John Schmidt <js@saltmine.radix.net> writes:
> It should work - the innxmit syntax looks right. The only question would
> be how the 1.4 innxmit handles message IDs not in the spool - such as
> articles that have been expired, were recieved less than /remember/ days
> ago.
It'll be fine; that won't be a problem.
What will be a problem, unfortunately, is that 1.4 doesn't add Xref
headers to every article, only to crossposted articles. You need to have
an Xref header in every article to use innxmit with xrefslave to a new
server.
This Perl script may help. You can then generate a list of files in the
new <to> tree and feed just that list of filenames to innxmit.
#!/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:
<yl7ko5d36m.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:
<f6ofhk621r.fsf@pcyma.elca.ch> <Pine.GSO.4.43.0203191214540.13271-100000@saltmine.radix.net> <a7c1l7$iri$1@marduk.litech.org> <Pine.GSO.4.43.0203211313240.10882-100000@saltmine.radix.net>Show Full Headers
Complete Article Headers
Message-ID: <yl7ko5d36m.fsf@windlord.stanford.edu> Subject: Re: INN: upgrading from 1.4 to 2.3.2 Date: Thu, 21 Mar 2002 13:24:49 -0800 From: Russ Allbery <rra@stanford.edu> References: <f6ofhk621r.fsf@pcyma.elca.ch> <Pine.GSO.4.43.0203191214540.13271-100000@saltmine.radix.net> <a7c1l7$iri$1@marduk.litech.org> <Pine.GSO.4.43.0203211313240.10882-100000@saltmine.radix.net> 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: 88 NNTP-Posting-Host: windlord.stanford.edu Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: news.Stanford.EDU 1016745889 9877 171.64.13.23 (21 Mar 2002 21:24:49 GMT) X-Complaints-To: news@news.stanford.edu User-Agent: Gnus/5.090005 (Oort Gnus v0.05) XEmacs/21.4 (Common Lisp, sparc-sun-solaris2.6) Cancel-Lock: sha1:fvssTuSdRA66Yh4YS4iHNFkERDQ=