πŸš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #91461

Re: INN2 artcutoff

#91461
From: Jesse Rehmer
Date: Sun, 21 Jan 2024 10:51
81 lines
4132 bytes
On Jan 21, 2024 at 4:27:39β€―AM CST, "Julien Γ‰LIE"
<iulius@nom-de-mon-site.com.invalid> wrote:

> Hi Nigel,
> 
>> I still intend to backfill a number of my groups, I'm just nervous
>> about propagating old articles while still being able to receive and
>> send new ones.
> 
> Did you try to add a fake hop when using pullnews?  (-F flag)
>    https://www.eyrie.org/~eagle/software/inn/docs/pullnews.html
> 
> """
> In case you have running peers and don't want to propagate them the
> articles you are pulling from upstream servers, you should add a fake
> hop with the -F flag to all the pulled articles, and add that very fake
> hop in the exclusion sub-field of all the sites configured in your
> newsfeeds file.  (For example, using "pullnews -F myserverimported",
> change "sitename:*:Tm:innfeed!" to
> "sitename/myserverimported:*:Tm:innfeed!" for every sitename in
> newsfeeds you don't want to feed the pulled articles to.)
> """
> 
> This way, you will never be nervous again when running pullnews :-)
> 
> 
> 
> P.-S.: If someone has a better or quicker way to prevent pulled articles
> from being sent to peers, please tell, and I'll update the pullnews
> documentation accordingly.
> 
> I don't know whether suck has a similar facility.

With suck you need to use the post filter function. From the man page:

"POST FILTER
       if the -y post_filter option is specified on the command line in
       conjunction with any of the batch modes, then suck will call the post
       filter specified, after downloading the articles, and before
       batching/posting the articles.  The filter is passed the directory
       where the articles are stored (the -dm option).  The filter program is
       responsible for parsing the contents of the directory.  See
       sample/post_filter.pl for a sample post filter.  This option was
       designed to allow you to add your own host name to the Path: header,
       but if you need to do anything else to the messages, you can."

The sample post_filter.pl:

#!/usr/local/bin/perl

# sample program for editting/changing the downloaded articles.
# this program is passed the directory where the articles are
# stored

# it modifies the Path: header, so you can add your own unique
# host to it, so you can tell INN not to upload these articles

opendir (DIRP, $ARGV[0]) or die "Can't open $ARGV[0]";

# get list of files, skipping hidden files
@files = grep ( !/^\./, readdir(DIRP));

foreach $file ( @files) {

        # read the file in
        $path  = "${ARGV[0]}/${file}";
        open FIP, "<${path}" or die "Can't read ${path}\n";@file = <FIP>;
        close FIP;

        # find the line and change it
        foreach $line ( @file) {
                if ( $line =~ /^Path: /) {
                        $line =~ s/^Path: /Path: myhost\!/
                }
        }

        # save it back out
        open FIP, ">${path}" or die "Can't write to ${path}\n";
        print FIP @file;
        close FIP;
}
Technical Details
Message-ID: <uoisvq$1n7d$1@nnrp.usenet.blueworldhosting.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: <20240119182116.1ef6434d@wibble.sysadmininc.com> <AABlrNYUzFIAAAza.A3.flnews@yamo.pasdenom.info> <20240121035610.05c3b043@wibble.sysadmininc.com> <uoirir$3m3e6$1@news.trigofacile.com>

Show Full Headers
Complete Article Headers
Message-ID: <uoisvq$1n7d$1@nnrp.usenet.blueworldhosting.com>
Subject: Re: INN2 artcutoff
Date: Sun, 21 Jan 2024 10:51:38 +0000
From: Jesse Rehmer <jesse.rehmer@blueworldhosting.com>
References: <20240119182116.1ef6434d@wibble.sysadmininc.com> <AABlrNYUzFIAAAza.A3.flnews@yamo.pasdenom.info> <20240121035610.05c3b043@wibble.sysadmininc.com> <uoirir$3m3e6$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
Newsgroups: news.software.nntp
Organization: BWH Usenet Archive (https://usenet.blueworldhosting.com)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=fixed
Content-Transfer-Encoding: 8bit
Injection-Date: Sun, 21 Jan 2024 10:51:38 -0000 (UTC)
Injection-Info: nnrp.usenet.blueworldhosting.com;
User-Agent: Usenapp for MacOS
Cancel-Lock: sha1:7PHo+l4gFmw6IYl5QMdkImcCOEg= sha256:MCIaFhjCjL0Kr3JG9QMJfGohzIr+HHyj58T4HBLIOYM=
X-Usenapp: v1.27.2/d - Full License