Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

"You need tender loving care once a week - so that I can slap you into shape." -- Ellyn Mustard


computers / news.software.nntp / Re: Custom cleanfeed rules

SubjectAuthor
* Custom cleanfeed rulesGrant Taylor
`* Re: Custom cleanfeed rulesyamo'
 `* Re: Custom cleanfeed rulesGrant Taylor
  `* Re: Custom cleanfeed rulesyamo'
   `- Re: Custom cleanfeed rulesGrant Taylor

1
Custom cleanfeed rules

<tai40t$cjj$1@tncsrv09.home.tnetconsulting.net>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=981&group=news.software.nntp#981

  copy link   Newsgroups: news.software.nntp
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!tncsrv06.tnetconsulting.net!tncsrv09.home.tnetconsulting.net!.POSTED.alpha.home.tnetconsulting.net!not-for-mail
From: gtaylor@tnetconsulting.net (Grant Taylor)
Newsgroups: news.software.nntp
Subject: Custom cleanfeed rules
Date: Mon, 11 Jul 2022 18:17:34 -0600
Organization: TNet Consulting
Message-ID: <tai40t$cjj$1@tncsrv09.home.tnetconsulting.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 11 Jul 2022 21:17:17 -0000 (UTC)
Injection-Info: tncsrv09.home.tnetconsulting.net; posting-host="alpha.home.tnetconsulting.net:198.18.18.251";
logging-data="12915"; mail-complaints-to="newsmaster@tnetconsulting.net"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
Thunderbird/78.13.0
X-Mozilla-News-Host: snews://tncsrv09.home.tnetconsulting.net:563
Content-Language: en-US
 by: Grant Taylor - Tue, 12 Jul 2022 00:17 UTC

Hi,

Can anyone point me in a direction to start creating my own custom
cleanfeed rules?

I'd like to translate what -- I think -- is a simple filter in
Thunderbird to be a cleanfeed rule to reject posts at thee server.

subject contains "blank"
subject contains "card"
subject doesn't start with "re"
from contains "@gmail.com"

I'm also okay if the "doesn't start with" is a less precise "doesn't
contain".

Thank you for any pointers you can offer.

--
Grant. . . .
unix || die

Re: Custom cleanfeed rules

<tajbeq$9r2$1@rasp.pasdenom.info>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=982&group=news.software.nntp#982

  copy link   Newsgroups: news.software.nntp
Path: i2pn2.org!i2pn.org!news.niel.me!pasdenom.info!.POSTED.2a01:e0a:21:ea80:2bcd:1898:8c71:814c!not-for-mail
From: yamo@beurdin.invalid (yamo')
Newsgroups: news.software.nntp
Subject: Re: Custom cleanfeed rules
Date: Tue, 12 Jul 2022 10:30:18 +0200
Organization: <https://pasdenom.info/news.html>
Message-ID: <tajbeq$9r2$1@rasp.pasdenom.info>
References: <tai40t$cjj$1@tncsrv09.home.tnetconsulting.net>
Reply-To: yamo@groumpf.org
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 12 Jul 2022 08:30:18 -0000 (UTC)
Injection-Info: rasp.pasdenom.info; posting-account="stephane@usenet"; posting-host="2a01:e0a:21:ea80:2bcd:1898:8c71:814c";
logging-data="10082"; mail-complaints-to="abuse@pasdenom.info"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101
Firefox/68.0 SeaMonkey/2.53.12
Cancel-Lock: sha256:BS49p7Q//h/uckQCjaO/XFIrsPBixqpfcjtXwzxYPA8=
In-Reply-To: <tai40t$cjj$1@tncsrv09.home.tnetconsulting.net>
X-Face: 3KI0f?#fLTG@kKi{}=#:0_|0/Yj`]d3fD_\O0w{?AFf"Cw9|V~#Nd.Wks
 by: yamo' - Tue, 12 Jul 2022 08:30 UTC

Hi,
Grant Taylor a tapoté le 12/07/2022 02:17:
> Can anyone point me in a direction to start creating my own custom
> cleanfeed rules?
>
> I'd like to translate what -- I think -- is a simple filter in
> Thunderbird to be a cleanfeed rule to reject posts at thee server.

In cleanfeed.local

Into the function local_filter_last
>
> subject contains "blank"
> subject contains "card"
> subject doesn't start with "re"
> from contains "@gmail.com"

if ($hdr{From} =~ /\@gmail/) {
if (not $hdr{Subject} =~ /^re/i) {
if ( $hdr{Subject} =~ /card/i) {
if ( $hdr{Subject} =~ /card/i) {
return reject( 'Bad post!');
}

}
}
};

> I'm also okay if the "doesn't start with" is a less precise "doesn't
> contain".
>
> Thank you for any pointers you can offer.

I'm sure that someone will give a two or three lines solution...

--
Stéphane

Re: Custom cleanfeed rules

<tajpof$8vq$1@tncsrv09.home.tnetconsulting.net>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=983&group=news.software.nntp#983

  copy link   Newsgroups: news.software.nntp
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!tncsrv06.tnetconsulting.net!tncsrv09.home.tnetconsulting.net!.POSTED.alpha.home.tnetconsulting.net!not-for-mail
From: gtaylor@tnetconsulting.net (Grant Taylor)
Newsgroups: news.software.nntp
Subject: Re: Custom cleanfeed rules
Date: Tue, 12 Jul 2022 09:34:40 -0600
Organization: TNet Consulting
Message-ID: <tajpof$8vq$1@tncsrv09.home.tnetconsulting.net>
References: <tai40t$cjj$1@tncsrv09.home.tnetconsulting.net>
<tajbeq$9r2$1@rasp.pasdenom.info>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 12 Jul 2022 12:34:23 -0000 (UTC)
Injection-Info: tncsrv09.home.tnetconsulting.net; posting-host="alpha.home.tnetconsulting.net:198.18.18.251";
logging-data="9210"; mail-complaints-to="newsmaster@tnetconsulting.net"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
Thunderbird/78.13.0
In-Reply-To: <tajbeq$9r2$1@rasp.pasdenom.info>
Content-Language: en-US
 by: Grant Taylor - Tue, 12 Jul 2022 15:34 UTC

On 7/12/22 2:30 AM, yamo' wrote:
> Hi,

Hi Stéphane,

> In cleanfeed.local
>
> Into the function local_filter_last
>
> if ($hdr{From} =~ /\@gmail/) {
> if (not $hdr{Subject} =~ /^re/i) {
> if ( $hdr{Subject} =~ /card/i) {
> if ( $hdr{Subject} =~ /card/i) {
> return reject( 'Bad post!');
> }
>
> }
> }
> };

Thank you for that example.

I believe I understand it well enough to make the following bug report.

It looks like you're checking if the Subject header contains a case
insensitive "card" string twice. I suspect you copy and pasted lines
and meant to change one of them to "blank". ;-)

I believe I will be able to take your good example and add it to my
cleanfeed.local file.

> I'm sure that someone will give a two or three lines solution...

I could be ornery and say that there's no possible way to do that,
thereby guaranteeing that multiple people will prove me wrong. }:-)

Thank you again Stéphane. :-)

--
Grant. . . .
unix || die

Re: Custom cleanfeed rules

<talrbq$6le$1@rasp.pasdenom.info>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=984&group=news.software.nntp#984

  copy link   Newsgroups: news.software.nntp
Path: i2pn2.org!i2pn.org!aioe.org!pasdenom.info!.POSTED.2a01:e0a:21:ea80:2bcd:1898:8c71:814c!not-for-mail
From: yamo@beurdin.invalid (yamo')
Newsgroups: news.software.nntp
Subject: Re: Custom cleanfeed rules
Date: Wed, 13 Jul 2022 09:14:01 +0200
Organization: <https://pasdenom.info/news.html>
Message-ID: <talrbq$6le$1@rasp.pasdenom.info>
References: <tai40t$cjj$1@tncsrv09.home.tnetconsulting.net>
<tajbeq$9r2$1@rasp.pasdenom.info>
<tajpof$8vq$1@tncsrv09.home.tnetconsulting.net>
Reply-To: news <news@pasdenom.info>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 13 Jul 2022 07:14:02 -0000 (UTC)
Injection-Info: rasp.pasdenom.info; posting-account="stephane@usenet"; posting-host="2a01:e0a:21:ea80:2bcd:1898:8c71:814c";
logging-data="6830"; mail-complaints-to="abuse@pasdenom.info"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101
Firefox/68.0 SeaMonkey/2.53.13
Cancel-Lock: sha256:/3DHCg0DcNd53j4zd6fwhjCG4Ent2dt8zfEZ3YdXEAQ=
X-Face: 3KI0f?#fLTG@kKi{}=#:0_|0/Yj`]d3fD_\O0w{?AFf"Cw9|V~#Nd.Wks
In-Reply-To: <tajpof$8vq$1@tncsrv09.home.tnetconsulting.net>
 by: yamo' - Wed, 13 Jul 2022 07:14 UTC

Hi Grant,

Grant Taylor a tapoté le 12/07/2022 17:34:

> It looks like you're checking if the Subject header contains a case
> insensitive "card" string twice. I suspect you copy and pasted lines
> and meant to change one of them to "blank". ;-)
>

Yes, it's a big source of bugs...

Maybe you can simplify the two copied pasted rules by this one :

if ( $hdr{Subject} =~ /blank.{0,50}card|card.{0,50}blank/i) {

> I believe I will be able to take your good example and add it to my
> cleanfeed.local file.

Local rules work well!
--
Stéphane

Re: Custom cleanfeed rules

<tamg4o$ot9$3@tncsrv09.home.tnetconsulting.net>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=985&group=news.software.nntp#985

  copy link   Newsgroups: news.software.nntp
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!tncsrv06.tnetconsulting.net!tncsrv09.home.tnetconsulting.net!.POSTED.alpha.home.tnetconsulting.net!not-for-mail
From: gtaylor@tnetconsulting.net (Grant Taylor)
Newsgroups: news.software.nntp
Subject: Re: Custom cleanfeed rules
Date: Wed, 13 Jul 2022 10:09:00 -0600
Organization: TNet Consulting
Message-ID: <tamg4o$ot9$3@tncsrv09.home.tnetconsulting.net>
References: <tai40t$cjj$1@tncsrv09.home.tnetconsulting.net>
<tajbeq$9r2$1@rasp.pasdenom.info>
<tajpof$8vq$1@tncsrv09.home.tnetconsulting.net>
<talrbq$6le$1@rasp.pasdenom.info>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 13 Jul 2022 13:08:40 -0000 (UTC)
Injection-Info: tncsrv09.home.tnetconsulting.net; posting-host="alpha.home.tnetconsulting.net:198.18.18.251";
logging-data="25513"; mail-complaints-to="newsmaster@tnetconsulting.net"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
Thunderbird/78.13.0
In-Reply-To: <talrbq$6le$1@rasp.pasdenom.info>
Content-Language: en-US
 by: Grant Taylor - Wed, 13 Jul 2022 16:09 UTC

On 7/13/22 1:14 AM, yamo' wrote:
> Hi Grant,

Hi Stéphane,

> Yes, it's a big source of bugs...

:-)

> Maybe you can simplify the two copied pasted rules by this one :
>
> if ( $hdr{Subject} =~ /blank.{0,50}card|card.{0,50}blank/i) {

I probably could.

I use regular expressions extensively. But I've learned that it's
better for me if I try to avoid over optimizing REs. Instead, my
ability to maintain them long term is greatly enhanced if I keep them as
a set of multiple simpler REs rather than a single more complex RE.
Maybe that's just me.

> Local rules work well!

I look forward to trying it out as soon as I find a spare Round-Tuit.

--
Grant. . . .
unix || die


computers / news.software.nntp / Re: Custom cleanfeed rules

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor