🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #80015

Re: Cleanfeed - "body ()" rejections

#80015
From: Julien ÉLIE
Date: Sun, 11 Jan 2009 14:12
55 lines
3200 bytes
Hi Steve,

> Thanks for the report, this behaviour was caused by the extended regex
> syntax (?:foo|bar) instead of just (foo|bar).  The result is that $1
> isn't populated with the match within parenthesis.

Sure, but matching is useless because it is exactly $control_type
in the reject call.
And $control_group is also useless with its "my" scope here:

    } elsif ($hdr{Control} =~ /^\s*(\w+)(?:\s+(.*))?/) {
        my $control_type = $1;
        my $control_group = $2;

        return reject("$control_type with Supersedes header")
            if $hdr{Supersedes};

        return reject("Unwanted $1 message", 'Bad control message')
            if $config{drop_useless_controls}
                and $control_type =~ /^(sendsys|senduuname|version)$/;
        return reject("Unwanted $1 message", 'Bad control message')
            if $config{drop_ihave_sendme}
                and $control_type =~ /^(ihave|sendme)$/;

    }


> I've corrected this in svn now and would appreciate it if you could
> confirm it resolves your problem.
> http://www.mixmin.net/svn/cleanfeed/trunk/cleanfeed

Yep, it works fine:

% inews -h sendsys-test
inews: cannot send article to server: 441 437 Unwanted sendsys message
inews: article not posted



> If that works, I'll do a formal update, there are a few changes since
> the last that should go into mainstream.

I especially like the scoring feature with "!" and "*".

However, note that stars are missing here:
                #$score -= 3;
                $score .= "**Refs";
                #$score -= 2 if $hdr{References} =~ /^<[^>]+>\s+</;
                $score .= "*GoodRefs"

-- 
Julien ÉLIE

« Un seul être vous manque et tout est dépeuplé. » (Alphonse de Lamartine)
Technical Details
Message-ID: <gkcuor$q2o$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!feeder2-2.proxad.net!proxad.net!feeder1-2.proxad.net!fdn.fr!gegeweb.org!news.trigofacile.com!not-for-mail
References: <gjs7fc$s4a$1@snarked.org> <slrngm3pic.5c4.steve@news.mixmin.net> <gkcn4i$gpl$1@news.trigofacile.com> <slrngmjtkm.itl.steve@news.mixmin.net>

Show Full Headers
Complete Article Headers
Message-ID: <gkcuor$q2o$1@news.trigofacile.com>
Subject: Re: Cleanfeed - "body ()" rejections
Date: Sun, 11 Jan 2009 15:12:41 +0100
From: Julien ÉLIE <iulius@nom-de-mon-site.com.invalid>
References: <gjs7fc$s4a$1@snarked.org> <slrngm3pic.5c4.steve@news.mixmin.net> <gkcn4i$gpl$1@news.trigofacile.com> <slrngmjtkm.itl.steve@news.mixmin.net>
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!feeder2-2.proxad.net!proxad.net!feeder1-2.proxad.net!fdn.fr!gegeweb.org!news.trigofacile.com!not-for-mail
Newsgroups: news.software.nntp
Organization: TrigoFACILE -- http://www.trigofacile.com/
Lines: 55
NNTP-Posting-Host: aaubervilliers-151-1-72-158.w81-48.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 1231683163 26712 81.48.75.158 (11 Jan 2009
X-Complaints-To: abuse@trigofacile.com
NNTP-Posting-Date: Sun, 11 Jan 2009 14:12:43 +0000 (UTC)
In-Reply-To: <slrngmjtkm.itl.steve@news.mixmin.net>
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Windows Mail 6.0.6001.18000
X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6001.18049