🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #264635

Re: Using logical opeartors in Dialog Filters

#264635
From: VanguardLH
Date: Fri, 22 Jan 2021 03:25
66 lines
4306 bytes
Bernd Rose <b.rose.tmpbox@arcor.de> wrote:

> On Wed, 20th Jan 2021 12:31:23 -0600, VanguardLH wrote:
> 
>> I was pondering if what I wrote about the +@ and -@ where correct.  
> 
> Yes. The +@ can be considered as "AND" and -@ as "AND NOT". To get "OR",
> several separate scoring lines have to be written.
> 
>> I have run across where a multiple header rule doesn't fire, everything
>> looked correct, testing on individual header clauses in the rule would
>> work in the regex tester on the header string, so I had to come up with
>> different rule(s) to effect what I was trying to accomplish within one
>> rule.  Mostly I try to stick to just one additional header, like: 
>> 
>>   From {...} -@Message-ID:{....}
>> 
>> because sometimes I have used 3, or more, headers in a rule, like:
>>  
>>   From {...} -@Message-ID:{...} +Header:{^Path: ...}
>>   
>> and the rule doesn't fire.  Seems if it gets too complicated then the
>> rule gets missed.  Or maybe it's the 2-pass scheme when exercising
>> rules, and I'm mixing overview and non-overview rules in the same rule.
>> I've not narrowed down why a 3+ multiple-header rule doesn't fire
>> despite in header clause with the rule works by itself.
> 
> You missed the "@" char between "+" and "Header". 

That was a typo.

> In general, multiple
> conditions /can/ be defined. As an example, the following works in this
> group:
> 
> !setcolor(green;yellow) From "Bernd Rose" -@Message-ID: {b\.rose[^ ]*\.(uk|com)} +@Header: "User-Agent: 40tude_Dialog"
> 
> Too complicated rules /are/ prone to error, though.  ;-)

I thought the +@ (or -@) syntax required no space between +@<hdrname>:
or +@Header: and the following curly brace.  I also see you sometimes
don't delineate the regex criteria, or used double-quote instead of
curly braces.  The parsing syntax is indeed, um, abundant.

Yeah, sometimes the regex or clauses get a bit overwhelming in trying to
define a rule that eliminate false positive, and only fires on the posts
or posters that I intend to flag.

I also found out there is a max line length limit, but find it by
accident.  A rule might get so long that the parser won't handle it.
I've had to split a rule across multiple rules.  Not sure what it the
maximum line length for a rule.  Currently the longest rule I have is
411 characters long, but I've tried longer, found they didn't fire,
sliced them up into multiple rules, and those work.  That one was for a
troll that nymshifts on nearly every submission, but there was still
enough unique in his headers to identify the troll (but a lot were on
non-overview headers).  

Because of false positives when using pattern matching via regex, I
don't delete "bad" messages.  I flag them as Ignored, and use a default
view of "Hide Ignored Messages".  I also configured Dialog to hide any
replies (subthreads) to the ignore-flagged messages since I don't want
to see replies to "bad" messages.  Occasionally I use "Show All Message"
to check if some messages should not have gotten flagged, or someone
makes reference to an otherwise hidden post where I need to see what was
said in the hidden subthread.
Technical Details
Message-ID: <d1y3ngj2nra4$.dlg@v.nguard.lh>
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: <lo1iu4iamqxs$.dlg@sqwertz.com> <ie3bbwuzo6wp.dlg@v.nguard.lh> <ru6rve.ars.1@ID-201911.user.individual.net> <1aa8twtz0lrzb$.dlg@v.nguard.lh> <ru7ed9.lk8.1@ID-201911.user.individual.net> <18r629zo0t48b.dlg@v.nguard.lh> <z882tgbtf5z3.dlg@b.rose.tmpbox.news.arcor.de> <1na89nr1j05zy.dlg@v.nguard.lh> <1fz8tnrbm7g3g$.dlg@b.rose.tmpbox.news.arcor.de>

Show Full Headers
Complete Article Headers
Message-ID: <d1y3ngj2nra4$.dlg@v.nguard.lh>
Subject: Re: Using logical opeartors in Dialog Filters
Date: Thu, 21 Jan 2021 21:25:33 -0600
From: VanguardLH <V@nguard.LH>
References: <lo1iu4iamqxs$.dlg@sqwertz.com> <ie3bbwuzo6wp.dlg@v.nguard.lh> <ru6rve.ars.1@ID-201911.user.individual.net> <1aa8twtz0lrzb$.dlg@v.nguard.lh> <ru7ed9.lk8.1@ID-201911.user.individual.net> <18r629zo0t48b.dlg@v.nguard.lh> <z882tgbtf5z3.dlg@b.rose.tmpbox.news.arcor.de> <1na89nr1j05zy.dlg@v.nguard.lh> <1fz8tnrbm7g3g$.dlg@b.rose.tmpbox.news.arcor.de>
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
Keywords: VanguardLH VLH811
Lines: 66
X-Trace: individual.net o4PDsHvf3TLhN2ZBy0XT3Q3QZmt7Bbc53omrigTtiUYyPqHPVn
Mime-Version: 1.0
User-Agent: 40tude_Dialog/2.0.15.41
Organization: Usenet Elder
Newsgroups: news.software.readers
Content-Transfer-Encoding: 7bit
Cancel-Lock: sha1:GgV+9FJSQNSIsbymuVpfpOZYYNs=
Content-Type: text/plain; charset="us-ascii"