🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #88480

Re: Cleanfeed and arbitrary headers.

#88480
From: Grant Taylor
Date: Sat, 29 Aug 2020 16:04
60 lines
2843 bytes
On 8/29/20 3:04 AM, yamo' wrote:
> Hi,

Hi Stéphane,

> You can edit your cleanfeed.local

Okay.

That's definitely better than nothing.  Though it does mean that I will 
have to re-do this every time that I upgrade Cleanfeed, which admittedly 
isn't that often.

I wonder if I can have this customization in a file that's included. 
I'll have to go brush up on my Perl.

> sub local_filter_last {
>     if ($hdr{Injection-Info} =~ /what you want|another spam/i/) {

I believe this is where I would list the multiple (sub)strings that I 
wanted to match and reject based on.  E.g.  /posting-account=\w{32}/i/

I think that "\w" includes a-z A-Z 0-9 and underscore.

Though as I look at sample data, I may need to include hyphens.

I'd rather not write out this full set, but it may be needed until I 
figure out a more concise way to do it.

    [abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-]

>          saveart('badhosts', 'Bad Injection-Info');

If I'm reading cleanfeed.pl correctly, saveart() saves (part of) the 
article to a local file.  Is that strictly required?  Or can I 
eventually forego that step by remarking that line?

>          return reject('filtre local', 'Spammeur habituel');

It looks like I might want to use something like the following:

    return reject('Messages from <bla> posting-account are banned.', 
'Banned posting-account');

It would be really nice if I could fill <bla> with the actual value.

>      };
> };

Presuming I'm understanding what needs to be done and that I can make it 
work, I may try to add a bad_injection_info file and get it to be read 
like bad_from and co.

Thank you again Stéphane.



-- 
Grant. . . .
unix || die
Technical Details
Message-ID: <ridudk$f2c$1@tncsrv09.home.tnetconsulting.net>
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: <ricgun$ti2$1@tncsrv09.home.tnetconsulting.net> <rid5n1$3bl$1@nemo.pasdenom.info>

Show Full Headers
Complete Article Headers
Message-ID: <ridudk$f2c$1@tncsrv09.home.tnetconsulting.net>
Subject: Re: Cleanfeed and arbitrary headers.
Date: Sat, 29 Aug 2020 10:04:20 -0600
From: Grant Taylor <gtaylor@tnetconsulting.net>
References: <ricgun$ti2$1@tncsrv09.home.tnetconsulting.net> <rid5n1$3bl$1@nemo.pasdenom.info>
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: TNet Consulting
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 29 Aug 2020 16:06:12 -0000 (UTC)
Injection-Info: tncsrv09.home.tnetconsulting.net; posting-host="alpha.home.tnetconsulting.net:198.18.18.251"; logging-data="15436"; mail-complaints-to="newsmaster@tnetconsulting.net"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0
In-Reply-To: <rid5n1$3bl$1@nemo.pasdenom.info>
Content-Language: en-US
Lines: 59