Article View: news.software.nntp
Article #80017Re: Cleanfeed - "body ()" rejections
From: Steve
Date: Sun, 11 Jan 2009 16:21
Date: Sun, 11 Jan 2009 16:21
61 lines
3714 bytes
3714 bytes
On Sun, 11 Jan 2009 15:12:41 +0100, =?Windows-1252?Q?Julien_=C9LIE?= wrote in
Message-Id: <gkcuor$q2o$1@news.trigofacile.com>:
> 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:
I think I'm missing your point, lets try walking through the section.
> } elsif ($hdr{Control} =~ /^\s*(\w+)(?:\s+(.*))?/) {
> my $control_type = $1;
> my $control_group = $2;
So if the Control header matches that regex, control_type must exist and
gets set to $1 (matching the (\w+). control_group will be set to $2 but
that could be null as the entire bracketed section in the regex is
suffixed with a ?.
> return reject("$control_type with Supersedes header")
> if $hdr{Supersedes};
This only applies to Supersedes headers and matches regardless of the
Control type.
> return reject("Unwanted $1 message", 'Bad control message')
> if $config{drop_useless_controls}
> and $control_type =~ /^(sendsys|senduuname|version)$/;
In this section, the message gets rejected if control_type is sendsys,
senduuname or version. If there is a match, $1 is set to the exact
control header type. Slightly odd logic as $1 will be identical to
$control_type. Due to this, you could say "Unwanted $control_type
message" instead.
> return reject("Unwanted $1 message", 'Bad control message')
> if $config{drop_ihave_sendme}
> and $control_type =~ /^(ihave|sendme)$/;
As above, but this only applies if $config{drop_ihave_sendme} is true.
$control_group should be fine as it's not used anywhere outside of the
filter_art function.
> I especially like the scoring feature with "!" and "*".
I only planned to use that for some diagnosis on scoring and then
decided it was worth leaving in as it brings some clarity as to why
messages score.
> However, note that stars are missing here:
> #$score -= 3;
> $score .= "**Refs";
> #$score -= 2 if $hdr{References} =~ /^<[^>]+>\s+</;
> $score .= "*GoodRefs"
I deliberately reduced the positive scores for these checks. Many of
the spam messages I checked out had perfectly valid References headers
(in terms of format) but didn't reference real articles. The header was
only included in order to circumvent such a check. Since reducing this
I've been keeping a careful eye on what's being rejected to make sure
real messages aren't trapped.
--
pub 1024D/228761E7 2003-06-04 Steven Crook
Key fingerprint = 1CD9 95E1 E9CE 80D6 C885 B7EB B471 80D5 2287 61E7
uid Steven Crook <steve@mixmin.net>
Technical Details
Message-ID:
<slrngmk74a.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!newsfeed.straub-nv.de!news.mixmin.net!not-for-mailReferences:
<gjs7fc$s4a$1@snarked.org> <slrngm3pic.5c4.steve@news.mixmin.net> <gkcn4i$gpl$1@news.trigofacile.com> <slrngmjtkm.itl.steve@news.mixmin.net> <gkcuor$q2o$1@news.trigofacile.com>Show Full Headers
Complete Article Headers
Message-ID: <slrngmk74a.itl.steve@news.mixmin.net> Subject: Re: Cleanfeed - "body ()" rejections Date: Sun, 11 Jan 2009 16:21:30 +0000 From: Steve <steve@mixmin.net> References: <gjs7fc$s4a$1@snarked.org> <slrngm3pic.5c4.steve@news.mixmin.net> <gkcn4i$gpl$1@news.trigofacile.com> <slrngmjtkm.itl.steve@news.mixmin.net> <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!newsfeed.straub-nv.de!news.mixmin.net!not-for-mail Newsgroups: news.software.nntp Organization: Mixmin Lines: 61 NNTP-Posting-Host: b421ff0445b5e915dcbceaec1788b827 X-Complaints-To: abuse@mixmin.net NNTP-Posting-Date: Sun, 11 Jan 2009 16:21:30 +0000 (UTC) User-Agent: slrn/0.9.8.1pl1 (Debian)