🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #76176

Re: INN 2.4.3: overview rebuild left out some groups.

#76176
From: Julien ÉLIE
Date: Mon, 11 Jun 2007 15:54
87 lines
4344 bytes
En réponse à Tim Fardell :
> I rebuilt the overview for those groups using tdx-util, renumbered the
> active file, and all the posts are now showing up correctly for those
> groups.

That's great.


> For the public groups, these are all set to expire after just 31 days, so
> after a month of normal operation the problem will have gone away for
> those groups without any intervention, so I have decided to just ignore
> those.

All right.  That is wise :)


> The only problem with this approach is that I will end up with bunches of
> orphan articles in the spool which will never get expired. Is there a
> quick way of tidying up these orphans?

Well, you just have to go through all your folders.
I use a script to delete the articles whose HIGHmark is too high
buy you can very easily adapt the last ligne [if ($_ > $hi)]
with [if ($_ < $lo)] for instance.


#!/usr/bin/perl

# Énumère les messages dont le higkmark est trop haut par rapport
# Ă  l'active.
# Peut les supprimer automatiquement (en décommentant la ligne adéquate).
#
# Ce script est utile pour purifier le spool après une coupure de courant qui
# aurait corrompu l'active, ou après une erreur de suppression d'un groupe
# (une fois recréé, il repart de 1).
#
# Script trouvé sur Usenet.
# Amélioré par Julien Élie (03/06/06).

$rep = '/var/spool/news/articles';
$active = '/var/lib/news/active';

open (ACTIVE, $active) or die "Can't open $active: $!\n";
while (<ACTIVE>) {
  my ($group, $hi, $lo, $flag) = split;
  my $directory = $group;
  next if ($hi == 0 and $lo <= 1);
  $directory =~ tr%.%/%;
  $directory = $rep . '/' . $directory;
  if(-e $directory) {
  opendir (DIR, $directory) or die "Can't open $directory: $!\n";
  while (defined ($_ = readdir DIR)) {
#### Uncomment one [or both] of these two lines either to *do* or to *see*.
#    unlink "$directory/$_" if ($_ > $hi);
#    print STDERR "$directory/$_\n" if ($_ > $hi);
  }
  closedir DIR;
  }
}



By the way, another solution is to do in your /var/spool/news/articles:

% find . -mtime +32 -type f -print > ~/old-articles

then wait (or use it in a screen).  You will have all the articles
older than 32 days (so they should have expired).
See if everything is good in the file and just remove them:

% awk '{print "rm -f " $1}' ~/old-articles | sh


I do that sometimes (some articles are not removed by expire for a reason
I do not know and articles in removed newsgroups also need to be deleted).


> Still a bit of a mystery as to why the rebuild went wrong! Even though I
> have now recovered the situation, I would be very interested to understand
> what caused the problem in the first place.

I too...

-- 
Julien ÉLIE

« L'ordinateur obéit à vos ordres, pas à vos intentions. »
Technical Details
Message-ID: <f4jr7g$fjr$1@news.trigofacile.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.20141118.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!postnews.google.com!news3.google.com!proxad.net!feeder1-2.proxad.net!usenet-fr.net!gegeweb.org!news.trigofacile.com!not-for-mail
References: <2s1j63hc1m2jqfao7dvd1pgacv0visjclo@4ax.com> <f4c9la$fj9$1@news.trigofacile.com> <2pbj63tmn945su0i9rpglps8ncftufugvd@4ax.com> <f4cddr$itt$1@news.trigofacile.com> <f8gj63tsknek0huf0lqetkflo4pi147mdp@4ax.com> <f4chbl$mes$1@news.trigofacile.com> <Pine.LNX.4.44.0706111555060.23745-100000@menace.crumblenet.co.uk>

Show Full Headers
Complete Article Headers
Message-ID: <f4jr7g$fjr$1@news.trigofacile.com>
Subject: Re: INN 2.4.3: overview rebuild left out some groups.
Date: Mon, 11 Jun 2007 17:54:25 +0200
From: Julien ÉLIE <iulius@nom-de-mon-site.com.invalid>
References: <2s1j63hc1m2jqfao7dvd1pgacv0visjclo@4ax.com> <f4c9la$fj9$1@news.trigofacile.com> <2pbj63tmn945su0i9rpglps8ncftufugvd@4ax.com> <f4cddr$itt$1@news.trigofacile.com> <f8gj63tsknek0huf0lqetkflo4pi147mdp@4ax.com> <f4chbl$mes$1@news.trigofacile.com> <Pine.LNX.4.44.0706111555060.23745-100000@menace.crumblenet.co.uk>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!postnews.google.com!news3.google.com!proxad.net!feeder1-2.proxad.net!usenet-fr.net!gegeweb.org!news.trigofacile.com!not-for-mail
Newsgroups: news.software.nntp
Organization: Gens Iulia -- http://www.trigofacile.com/
Lines: 87
NNTP-Posting-Host: goret.via.ecp.fr
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-15
Content-Transfer-Encoding: 8bit
X-Trace: news.trigofacile.com 1181577326 15995 138.195.145.22 (11 Jun 2007
X-Complaints-To: abuse@trigofacile.com
NNTP-Posting-Date: Mon, 11 Jun 2007 15:55:26 +0000 (UTC)
User-Agent: Thunderbird 2.0.0.0 (Windows/20070326)
In-Reply-To: <Pine.LNX.4.44.0706111555060.23745-100000@menace.crumblenet.co.uk>