🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #81225

Re: Another INN 2.5.0 rc2 bug - control.ctl processing

#81225
From: Julien ÉLIE
Date: Wed, 03 Jun 2009 17:35
93 lines
4629 bytes
Hi D. Stussy,

>>> Well , if the pattern were "all:*:hierarchy1.*|*a*:log=...", then
>>> "hierarchy5.*" would match, so I don't see a problem.
>>
>> It was just an example for "*a*"...  Then consider "*z*".
>
> Then a checkgroups for "hierarchy5.*" groups would NOT match *z*, yet
> copying the message to a log file would still occur.  That is wrong.  No
> matching groups means that the action should not occur.

I think you and I keep telling the same thing :)
But in case I was not clear enough, the pattern in control.ctl matches
newsgroup names (*every* line of a checkgroups) and not the first component
of a hierarchy.

I understood your wish for the "log" action in checkgroups and
I will try to address it.



>> chkscope            = 1*( 1*WSP ["!"] newsgroup-name )
>
> The BNF syntax doesn't show it, but logically, one cannot have a "negative
> hierarchy."

Neither does the paragraph below the BNF syntax.
It is not "logical" to assume "+" will come before "-".  It is commutative.



> The BNF may describe "checkgroups !hr.admin hr" as
> syntactically correct, but it is semantically wrong.  I would read it as
> covering all of "hr.*" INCLUDING "hr.admin"(.*) since the negation is
> overridden by a subsequent pattern that reincludes it and is thusly
> ignored.  Multiple patterns are applied left to right in order of
> occurance.

You would read it like that, OK, but you would not be compliant with
RFC 5537.
Just take the checkgroups, remove hr.admin.* and then keep hr.*; it
is the same as taking the checkgroups, keeping hr.* and then removing
hr.admin.* (grep commutativity).

  ** Do not mix up RFC 3977 where the rightmost pattern matches in
     NNTP wildmats and RFC 5537 where it is not the case. **



> @@ -37,6 +38,7 @@
>         my $charset_newsgroup = $charset_message;
>
>         next if ($ngname =~ /$exclusionpats/ or $ngname =~ /$droppats/);
> +        $counter++ if ($ngname =~ /$newsgrouppats/);
>
>         # Find the right charset if absent or forced by control.ctl.
>         foreach (@$charset_from) {

Hmm...  Why not

+         next if ($ngname !~ /$newsgrouppats/);

instead of the counter?  This way, we could use @newbody and not execute
the rest of the function if @newbody is empty.

Wouldn't it fix your issue?


HOWEVER, if we do that, as I already told you, there is the problem
of the active file to deal with.
Because if you have in your active file:

foo.bar.misc
foo.test

and that you receive the following checkgroups:

foo.admin    Admin group.
foo.test     Test group.

and have the following control.ctl line:

checkgroups:*:foo.bar.*:log=ignore

the checkgroups will NOT be logged any longer in your log file and
therefore you will NEVER know that foo.bar.misc has been removed.

-- 
Julien ÉLIE

« Vous savez, les idées, elles sont dans l'air. Il suffit que quelqu'un
  vous en parle de trop près, pour que vous les attrapiez ! » (Raymond Devos) 
Technical Details
Message-ID: <h06c9j$tv7$1@news.trigofacile.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!border1.nntp.ams.giganews.com!nntp.giganews.com!de-l.enfer-du-nord.net!gegeweb.org!news.trigofacile.com!not-for-mail
References: <gvpshs$7c4$1@aux.snarked.org> <gvqsba$6o2$1@news.trigofacile.com> <gvsgbm$gfm$1@aux.snarked.org> <gvtjcl$nmf$1@news.trigofacile.com> <gvut8f$l3m$1@aux.snarked.org> <gvv0ha$21b$1@news.trigofacile.com> <gvv6uq$mvv$1@aux.snarked.org> <h004v2$4d1$1@news.trigofacile.com> <h025go$vin$1@aux.snarked.org> <h02hfe$bki$1@news.trigofacile.com> <h04a6c$44k$1@aux.snarked.org>

Show Full Headers
Complete Article Headers
Message-ID: <h06c9j$tv7$1@news.trigofacile.com>
Subject: Re: Another INN 2.5.0 rc2 bug - control.ctl processing
Date: Wed, 3 Jun 2009 19:35:42 +0200
From: Julien ÉLIE <iulius@nom-de-mon-site.com.invalid>
References: <gvpshs$7c4$1@aux.snarked.org> <gvqsba$6o2$1@news.trigofacile.com> <gvsgbm$gfm$1@aux.snarked.org> <gvtjcl$nmf$1@news.trigofacile.com> <gvut8f$l3m$1@aux.snarked.org> <gvv0ha$21b$1@news.trigofacile.com> <gvv6uq$mvv$1@aux.snarked.org> <h004v2$4d1$1@news.trigofacile.com> <h025go$vin$1@aux.snarked.org> <h02hfe$bki$1@news.trigofacile.com> <h04a6c$44k$1@aux.snarked.org>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!border1.nntp.ams.giganews.com!nntp.giganews.com!de-l.enfer-du-nord.net!gegeweb.org!news.trigofacile.com!not-for-mail
Newsgroups: news.software.nntp
Organization: TrigoFACILE -- http://www.trigofacile.com/
Lines: 93
NNTP-Posting-Host: aaubervilliers-151-1-45-218.w83-114.abo.wanadoo.fr
Mime-Version: 1.0
Content-Type: text/plain; format=flowed; charset="Windows-1252";
 reply-type=original
Content-Transfer-Encoding: 8bit
X-Trace: news.trigofacile.com 1244050548 30695 83.114.135.218 (3 Jun 2009
X-Complaints-To: abuse@trigofacile.com
NNTP-Posting-Date: Wed, 3 Jun 2009 17:35:48 +0000 (UTC)
In-Reply-To: <h04a6c$44k$1@aux.snarked.org>
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Windows Mail 6.0.6001.18000
X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6001.18049