🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
9 messages
9 total messages Started by D. Stussy Fri, 23 May 2008 01:27
Wanted: Perl filter routine (for cleanfeed) - newsgroup name as message-ID domain part?
#79067
Author: D. Stussy
Date: Fri, 23 May 2008 01:27
7 lines
1439 bytes
I'm not a perl expert or an expert on cleanfeed.  However, I've noted that
the "operation sudden fall" spam uses the newsgroup name as the domain part
of the message ID.  Certainly there are no hosts that happen to coincide
with newsgroup names - so has anyone written a snippet for this that one may
add to cleanfeed to disallow this behavior?

Re: Wanted: Perl filter routine (for cleanfeed) - newsgroup name as message-ID domain part?
#79068
Author: Matija Nalis
Date: Fri, 23 May 2008 23:59
24 lines
2185 bytes
On Thu, 22 May 2008 18:27:25 -0700, D. Stussy <spam@bde-arc.ampr.org> wrote:
> I'm not a perl expert or an expert on cleanfeed.  However, I've noted that
> the "operation sudden fall" spam uses the newsgroup name as the domain part
> of the message ID.  Certainly there are no hosts that happen to coincide
> with newsgroup names - so has anyone written a snippet for this that one may
> add to cleanfeed to disallow this behavior?

Dunno, but probably not, as it is mostly useless unless you're currently
suffering under a attack. It is trivial for spammer to modify and avoid, and
next spam run probably won't be using it. And you do accumulate cruft, and
it might hit a false positive (some annonce-bot might be using similar
scheme, or something like that)

However (untried, from the top of my head, and I haven't seen the spam in
the first place), if you really want it, something along the lines of:

foreach my $g (@groups) {
	return reject('spam') if $hdr{'Message-ID'} =~ /$g/;
}

in your local_filter_last() or similar.

-- 
Opinions above are GNU-copylefted.
Re: Wanted: Perl filter routine (for cleanfeed) - newsgroup name as message-ID domain part?
#79069
Author: D. Stussy
Date: Sat, 24 May 2008 05:39
34 lines
2662 bytes
"Matija Nalis" <mnalis-news@voyager.hr> wrote in message
news:slrng3emj3.v4r.mnalis-news@eagle102.home.lan...
> On Thu, 22 May 2008 18:27:25 -0700, D. Stussy <spam@bde-arc.ampr.org>
wrote:
> > I'm not a perl expert or an expert on cleanfeed.  However, I've noted
that
> > the "operation sudden fall" spam uses the newsgroup name as the domain
part
> > of the message ID.  Certainly there are no hosts that happen to coincide
> > with newsgroup names - so has anyone written a snippet for this that one
may
> > add to cleanfeed to disallow this behavior?
>
> Dunno, but probably not, as it is mostly useless unless you're currently
> suffering under a attack. It is trivial for spammer to modify and avoid,
and
> next spam run probably won't be using it. And you do accumulate cruft, and
> it might hit a false positive (some annonce-bot might be using similar
> scheme, or something like that)
>
> However (untried, from the top of my head, and I haven't seen the spam in
> the first place), if you really want it, something along the lines of:
>
> foreach my $g (@groups) {
> return reject('spam') if $hdr{'Message-ID'} =~ /$g/;
> }
>
> in your local_filter_last() or similar.

Thanks.  One question:  Is the "@groups" variable a list of all groups from
the active file?  If so, then this could be placed in the message-ID
checking routine thus avoiding transfer of the message (or headers).

Re: Wanted: Perl filter routine (for cleanfeed) - newsgroup name as message-ID domain part?
#79070
Author: Ray Banana
Date: Sat, 24 May 2008 05:59
27 lines
2393 bytes
Thus spake "D. Stussy" <spam@bde-arc.ampr.org>
 
>> foreach my $g (@groups) {
>> return reject('spam') if $hdr{'Message-ID'} =~ /$g/;
>> }
>> in your local_filter_last() or similar.
> Thanks.  One question:  Is the "@groups" variable a list of all groups from
> the active file?  If so, then this could be placed in the message-ID
> checking routine thus avoiding transfer of the message (or headers).

>From cleanfeed:

sub filter_art {
    [...]
    @groups = split(/[,\s]+/, $hdr{Newsgroups});

    [...]

}

So it's a list of all groups the article is actually posted to.
And I wouldn't run the above code snippet against all groups in the
active file for performance reasons.

-- 
Too many ingredients in the soup, no room for a spoon.
http://news.motzarella.org
Re: Wanted: Perl filter routine (for cleanfeed) - newsgroup name as message-ID domain part?
#79071
Author: D. Stussy
Date: Sat, 24 May 2008 06:12
29 lines
2117 bytes
"Ray Banana" <rayban@banana.shacknet.nu> wrote in message
news:80zlqgjl7z.fsf@banana.shacknet.nu...
> Thus spake "D. Stussy" <spam@bde-arc.ampr.org>
> >> foreach my $g (@groups) {
> >> return reject('spam') if $hdr{'Message-ID'} =~ /$g/;
> >> }
> >> in your local_filter_last() or similar.
> > Thanks.  One question:  Is the "@groups" variable a list of all groups
from
> > the active file?  If so, then this could be placed in the message-ID
> > checking routine thus avoiding transfer of the message (or headers).
>
> From cleanfeed:
>
> sub filter_art {
>     [...]
>     @groups = split(/[,\s]+/, $hdr{Newsgroups});
>
>     [...]
>
> }
>
> So it's a list of all groups the article is actually posted to.
> And I wouldn't run the above code snippet against all groups in the
> active file for performance reasons.

Ok.  Thanks again.

Re: Wanted: Perl filter routine (for cleanfeed) - newsgroup name as message-ID domain part?
#79072
Author: Julien ÉLIE
Date: Sat, 24 May 2008 06:37
47 lines
3548 bytes
Hi Matija,

>> the newsgroup name as the domain part of the message ID.
>
>
> foreach my $g (@groups) {
> return reject('spam') if $hdr{'Message-ID'} =~ /$g/;
> }

I would tend to prefer $hdr{'Message-ID'} =~ /\Q$g\E>$/
because $g contains dots (.) and maybe pluses (+, ++).
It should also be the end of the Message-ID (with '>$' I think).

HOWEVER, even that this routine will catch some cancel messages like:

May 22 22:39:36.844 <cancel.ca9c5158.78922423@fr.comp.os.linux.annonces>
                    Cancelling <dHyvnvuqpR.kcCTjg0R1huD@observe.edu.sg>

which should NOT have been rejected!


I believe the best thing to do is using NoCeM because bleachbot (maintained
by Xavier Roche) already deals with such spam:

[...]
May 22 22:31:48 news innd: SERVER cancelled <87e37059.85bf5de5@geometry.pre-college>
May 22 22:31:48 news innd: SERVER cancelled <4df4b4b1.725b63fc@hannet.ml.netbsd.current>
May 22 22:31:48 news innd: SERVER cancelled <0567dcac.5f25a0a6@gov.us.topic.ecommerce.announce>
May 22 22:31:48 news innd: SERVER cancelled <f2e235bd.ecd2b6fa@sat.eff>
May 22 22:31:48 news innd: SERVER cancelled <bfe5fc9c.b941d06f@comp.ai.vision>
May 22 22:31:48 news innd: SERVER cancelled <8e458890.4664136b@gov.us.topic.nat-resources.minerals>
May 22 22:31:48 news innd: SERVER cancelled <5534d589.54874eef@muc.lists.suns-at-home>
May 22 22:31:48 news innd: SERVER cancelled <c4bace51.a7a2398b@soc.politics.marxism>
May 22 22:32:18 news innd: SERVER cancelled <5c77f1c4.c993289b@sura.announce>
May 22 22:32:18 news innd: SERVER cancelled <16321d8d.84118016@alt.penthouse.sex.testeless>
May 22 22:32:18 news innd: SERVER cancelled <4478a467.71213d80@info.bytecounters>
May 22 22:32:18 news innd: SERVER cancelled <d8c40c58.7ec6b328@soc.genealogy.jewish>
May 22 22:32:19 news innd: SERVER cancelled <a85cc6f2.a5d5a3e5@comp.ai>
May 22 22:32:19 news innd: SERVER cancelled <ed59bf6b.d3dda984@gov.topic.transport.navigation>
[...]

-- 
Julien ÉLIE

« Les amis de la vérité sont ceux qui la cherchent,
  et non ceux qui se vantent de l'avoir trouvée. » (Condorcet) 
Re: Wanted: Perl filter routine (for cleanfeed) - newsgroup name as message-ID domain part?
#79073
Author: D. Stussy
Date: Sat, 24 May 2008 23:45
30 lines
2203 bytes
"Julien ÉLIE" <iulius@nom-de-mon-site.com.invalid> wrote in message
news:g18d3b$clj$1@news.trigofacile.com...
> >> the newsgroup name as the domain part of the message ID.
> >
> >
> > foreach my $g (@groups) {
> > return reject('spam') if $hdr{'Message-ID'} =~ /$g/;
> > }
>
> I would tend to prefer $hdr{'Message-ID'} =~ /\Q$g\E>$/
> because $g contains dots (.) and maybe pluses (+, ++).
> It should also be the end of the Message-ID (with '>$' I think).
>
> HOWEVER, even that this routine will catch some cancel messages like:
>
> May 22 22:39:36.844 <cancel.ca9c5158.78922423@fr.comp.os.linux.annonces>
>                     Cancelling <dHyvnvuqpR.kcCTjg0R1huD@observe.edu.sg>
>
> which should NOT have been rejected!
>
> I believe the best thing to do is using NoCeM because bleachbot
(maintained
> by Xavier Roche) already deals with such spam:
> [...]

So there are legitimate messages that follow the pattern?   ...OR only
cancels?


Re: Wanted: Perl filter routine (for cleanfeed) - newsgroup name as message-ID domain part?
#79074
Author: Julien ÉLIE
Date: Sun, 25 May 2008 09:13
18 lines
1967 bytes
Hi D. Stussy,

> So there are legitimate messages that follow the pattern?   ...OR only
> cancels?

It seems odd to use that pattern for legitimate messages.  But nobody
says it is forbidden...

If you really want to filter, I believe you should do it on "*@news.group.name>"
and not "*news.group.name*".

-- 
Julien ÉLIE

« -- Je vous dresserai !
  -- Vous me dressez déjà les cheveux sur la tête,
  c'est un bon début. » (Astérix) 
Re: Wanted: Perl filter routine (for cleanfeed) - newsgroup name as message-ID domain part?
#79075
Author: D. Stussy
Date: Mon, 26 May 2008 22:59
16 lines
1819 bytes
"Julien ÉLIE" <iulius@nom-de-mon-site.com.invalid> wrote in message
news:g1bak4$54i$1@news.trigofacile.com...
> > So there are legitimate messages that follow the pattern?   ...OR only
> > cancels?
>
> It seems odd to use that pattern for legitimate messages.  But nobody
> says it is forbidden...
>
> If you really want to filter, I believe you should do it on
"*@news.group.name>"
> and not "*news.group.name*".

Noted.  I haven't actually implemented any filter for this yet - I'm still
considering my options.

Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads