🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #91294

Re: force expiration by path?

#91294
From: Julien ÉLIE
Date: Mon, 11 Dec 2023 20:38
45 lines
2441 bytes
Hi Dave,

> Can anyone tell me if there's a way to tell INN to expire 
> a set of articles, as a one-time operation, based on their path?

Grant's method naturally works on tradspool and you can use it.

In a more general case, you can parse the history file (in <pathdb> as 
set in inn.conf), retrieve the headers of each article (sm -H) and run 
the regexps you wish on these headers.
As you're asking for a search based on the Path header field, the 
following command will write to a googlegroups.tokens file the storage 
tokens of articles sent from Google Groups:

   perl -ne 'chomp; our ($hash, $timestamps, $_) = split " "; print 
"$_\n" if $_ and qx/sm -q -H "$_" | grep Path/ =~ 
/!google-groups\.googlegroups\.com!not-for-mail$/' history > 
googlegroups.tokens

The command will take a bit of time to run, as INN retrieves every article.

Then, to delete these articles from your history file, just run "sm -d" 
on them.  Something like:

   xargs sm -d < googlegroups.tokens


Before doing that, check that your regexp worked, by retrieving a few 
storage tokens and verifying they're coming from Google Groups.  You can 
see the contents of an article with:

   sm -R '@...token...@'

(-R in uppercase)


> A perusal of the docs for expire and such have turned up nothing, so 
> I'd appreciate some advice on whether or not there's a way to do this.

The next run of news.daily will properly clean the overview, etc.

-- 
Julien ÉLIE

« Qui habet aures audiendi, audiat. » (Évangiles)
Technical Details
Message-ID: <ul7rvb$3k8q$1@news.trigofacile.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mail
References: <ul5nl4$18j4$1@mail.neurotica.com>

Show Full Headers
Complete Article Headers
Message-ID: <ul7rvb$3k8q$1@news.trigofacile.com>
Subject: Re: force expiration by path?
Date: Mon, 11 Dec 2023 21:38:03 +0100
From: Julien ÉLIE <iulius@nom-de-mon-site.com.invalid>
References: <ul5nl4$18j4$1@mail.neurotica.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mail
Newsgroups: news.software.nntp
Organization: Groupes francophones par TrigoFACILE
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 11 Dec 2023 20:38:03 -0000 (UTC)
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:JOn0d7/6EtDLhSjudat+tlHuDSQ= sha256:1CQRa/82zMTZBz/vCM4C5rVMGjfhFzzi3hIMWo+/UA4=
In-Reply-To: <ul5nl4$18j4$1@mail.neurotica.com>