🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
21 messages
21 total messages Started by Steve Tue, 24 Jan 2006 10:56
Filter yEnc postings
#73100
Author: Steve
Date: Tue, 24 Jan 2006 10:56
12 lines
1282 bytes
Hello,

I run a small news service that carries a small subsection of Usenet.
At the moment it's being plagued by people posting hundreds of yEnc
messages to non-binary groups.  I have cleanfeed installed but I don't
believe it treats these postings as binaries.

I could probably hack something together in cleanfeed to filter them
based on the article length, but I suspect there is probably a better
solution.  Could anyone advise me please?

Steve
Re: Filter yEnc postings
#73101
Author: Jeffrey M. Vinocur
Date: Tue, 24 Jan 2006 11:13
23 lines
1934 bytes
In article <dr515q$3cc$1@bananasplit.info>,
Steve  <fleegle@bananasplit.info> wrote:
>
>I run a small news service that carries a small subsection of Usenet.
>At the moment it's being plagued by people posting hundreds of yEnc
>messages to non-binary groups.  I have cleanfeed installed but I don't
>believe it treats these postings as binaries.
>
>I could probably hack something together in cleanfeed to filter them
>based on the article length, but I suspect there is probably a better
>solution.  Could anyone advise me please?

Well, if all you want to do is filter on size, you could simply
use maxartsize in inn.conf to set a limit.

There are several patches to make Cleanfeed treat yEnc posts as
binaries; if you go to Google Groups and search for "yenc
cleanfeed" you should have no trouble finding them.


-- 
Jeffrey M. Vinocur
jeff@litech.org
Re: Filter yEnc postings
#73102
Author: wkronert
Date: Tue, 24 Jan 2006 11:30
35 lines
2289 bytes
Steve <fleegle@bananasplit.info> wrote:
> Hello,
> I run a small news service that carries a small subsection of Usenet.
> At the moment it's being plagued by people posting hundreds of yEnc
> messages to non-binary groups.  I have cleanfeed installed but I don't
> believe it treats these postings as binaries.

> I could probably hack something together in cleanfeed to filter them
> based on the article length, but I suspect there is probably a better
> solution.  Could anyone advise me please?

The old version of cleanfeed, from Jeremy, did not have a filter for yEnc.
You can add in a filter.  I was given the following which work well when I
had the old version running:

        #yEnc Binary Filter
                if ($hdr{__BODY__} =~ /^(\s*\n)?\=ybegin/ ) {
                return reject('yEnc post');
        }


If you are using the new version of cleanfeed from Marco
http://www.bofh.it/~md/cleanfeed/ it does have a
yEnc filter already in the code, i.e.:

     if ($hdr{__BODY__} =~ /^=ybegin (.+)$/m) {
                local $_ = $1;
                if (/line=/ and /size=/ and /name=/) {
                        $Cache_Is_Binary = 1;
                        return 1;

Hope that may help.

Bill
Re: Filter yEnc postings
#73103
Author: Steve
Date: Tue, 24 Jan 2006 11:54
23 lines
1693 bytes
On Tue, 24 Jan 2006 11:30:41 +0000 (UTC), wkronert@sunstroke.sdsu.edu wrote in
Message-Id: <dr5351$a56$1@gondor.sdsu.edu>:

> If you are using the new version of cleanfeed from Marco
> http://www.bofh.it/~md/cleanfeed/ it does have a
> yEnc filter already in the code, i.e.:
>
>      if ($hdr{__BODY__} =~ /^=ybegin (.+)$/m) {
>                 local $_ = $1;
>                 if (/line=/ and /size=/ and /name=/) {
>                         $Cache_Is_Binary = 1;
>                         return 1;
>
> Hope that may help.

Bill,

Thanks for the info.  I am running the later version and it does have
the section of code you highlighted, (although I didn't know it).
Despite this, for some reason these articles are still getting through.

I'll do some more checking and try to figure out what's going wrong.
Re: Filter yEnc postings
#73104
Author: wkronert
Date: Tue, 24 Jan 2006 12:48
32 lines
2534 bytes
Steve <fleegle@bananasplit.info> wrote:
> On Tue, 24 Jan 2006 11:30:41 +0000 (UTC), wkronert@sunstroke.sdsu.edu wrote in
> Message-Id: <dr5351$a56$1@gondor.sdsu.edu>:
>> If you are using the new version of cleanfeed from Marco

> Thanks for the info.  I am running the later version and it does have
> the section of code you highlighted, (although I didn't know it).
> Despite this, for some reason these articles are still getting through.

> I'll do some more checking and try to figure out what's going wrong.

If by chance you find a better code for this, fill us in.

I tend to think there is a small percent that leaks through this filter.
Though, I haven't actually followed through on it.  I haven't worried to
much about it in part because our total in take volume is under 550MB for
a full text feed and we typically reject under 6,000 misplaced
binaries/day that are from our feeds that do not filter misplaced
binaries.

I have tried to work around these leaks and the overall load on our 
network by placing size limits on our incoming feeds.  We have 36 incoming
feeds, some feeds filter misplaced binaries and some do not.  The incoming
feeds that do not filter misplaced binaries, I have requested a size limit
of 50k whereas our feeds that do filter misplaced binaries have a limit of
1MB.

You may want consider size limits on some of your feeds, just a thought.
Good luck.

Bill
Re: Filter yEnc postings
#73106
Author: wkronert
Date: Tue, 24 Jan 2006 15:07
33 lines
2323 bytes
I stand somewhat corrected on this subject.  I started to look around to
see if I could find any yEnc articles that got through our filter. I
couldn't find any yEnc but I came across something I can't explain.

Below is an example of a misplaced binary that got through our filter
(this is one of many). So far all the misplaced binaries that got through
our filter that I could find seem to come from High Winds and look very
similar to the one below.

Is anyone else having this problem with their binary filter?


>newshub.sdsu.edu!hwmnpeer01.lga!hwmedia!news.highwinds-media.com!hw-filter.phx!n
>ewsfe07.phx.POSTED!2041a163!not-for-mail
>Newsgroups: alt.sex.femdom
>Subject: 123/16 !!!   - perfect slave
>Lines: 445
>Message-ID: <Rb6Bf.48079$4K4.40414@newsfe07.phx>
>X-Complaints-To: abuse@100ProofNews.com
>NNTP-Posting-Date: Mon, 23 Jan 2006 08:00:01 MST
>Date: Mon, 23 Jan 2006 15:00:01 GMT
>Xref: newshub.sdsu.edu alt.sex.femdom:336683
>
>www.perfectslave.70d.org
>
>
>
>begin 644 07.jpg
>M_]C_X``02D9)1@`!`0```0`!``#__@`^0U)%051/4CH@9V0M:G!E9R!V,2XP
>M("AU<VEN9R!)2D<@2E!%1R!V-C(I+"!D969A=6QT('%U86QI='D*_]L`0P`(

[deleted the rest of the binary]
Re: Filter yEnc postings
#73107
Author: Steve
Date: Tue, 24 Jan 2006 15:58
14 lines
1662 bytes
On Tue, 24 Jan 2006 15:07:57 +0000 (UTC), wkronert@sunstroke.sdsu.edu wrote in
Message-Id: <dr5fsd$f5u$1@gondor.sdsu.edu>:

> Below is an example of a misplaced binary that got through our filter
> (this is one of many). So far all the misplaced binaries that got through
> our filter that I could find seem to come from High Winds and look very
> similar to the one below.
>
> Is anyone else having this problem with their binary filter?

I'm back to the drawing board at the moment.  I thought I had a yEnc
issue but it seems that all binaries get through my cleanfeed.  I'm
testing to a local.test newsgroup and whilst other cleanfeed traps are
working fine, binaries are all getting through.
Re: Filter yEnc postings
#73108
Author: wkronert
Date: Tue, 24 Jan 2006 16:16
29 lines
2610 bytes
Steve <fleegle@bananasplit.info> wrote:
> On Tue, 24 Jan 2006 15:07:57 +0000 (UTC), wkronert@sunstroke.sdsu.edu wrote in
> Message-Id: <dr5fsd$f5u$1@gondor.sdsu.edu>:

>> Below is an example of a misplaced binary that got through our filter
>> (this is one of many). So far all the misplaced binaries that got through
>> our filter that I could find seem to come from High Winds and look very
>> similar to the one below.
>>
>> Is anyone else having this problem with their binary filter?

back to this odd misplaced binary - I have look through the spool and
every case of a misplaced binary getting through the filter is exactly as
the one I posted, all from High Winds with the same sytle...odd.

> I'm back to the drawing board at the moment. I thought I had a yEnc 
> issue but it seems that all binaries get through my cleanfeed.  I'm
> testing to a local.test newsgroup and whilst other cleanfeed traps are
> working fine, binaries are all getting through.

Reminds me of when I took over running our news server.  The filter was
working well but the binary filter wasn't working at all.  I spent a long
time trying to figure it out but never thought of the most obvious answer,
the permission was wrong.  I assumed when I took over running the server,
the permissions were correct - my mistake.  A chmod 755 took care of it.
Hopefully your problem is as simple as that.

Bill
Re: Filter yEnc postings
#73109
Author: Steve
Date: Tue, 24 Jan 2006 16:53
15 lines
1851 bytes
On Tue, 24 Jan 2006 16:16:12 +0000 (UTC), wkronert@sunstroke.sdsu.edu wrote in
Message-Id: <dr5jsc$g44$1@gondor.sdsu.edu>:

> Reminds me of when I took over running our news server.  The filter was
> working well but the binary filter wasn't working at all.  I spent a long
> time trying to figure it out but never thought of the most obvious answer,
> the permission was wrong.  I assumed when I took over running the server,
> the permissions were correct - my mistake.  A chmod 755 took care of it.
> Hopefully your problem is as simple as that.

I think I must have a similar problem.  I've downloaded a fresh copy of
cleanfeed and stripped out everything in cleanfeed.local but I'm still
failing to trap binaries.

What file/dir are you referring to when you say chmod 755?
Re: Filter yEnc postings
#73110
Author: wkronert
Date: Tue, 24 Jan 2006 17:08
19 lines
2044 bytes
Steve <fleegle@bananasplit.info> wrote:
> On Tue, 24 Jan 2006 16:16:12 +0000 (UTC), wkronert@sunstroke.sdsu.edu wrote in
> Message-Id: <dr5jsc$g44$1@gondor.sdsu.edu>:
>> the permissions were correct - my mistake.  A chmod 755 took care of it.
>> Hopefully your problem is as simple as that.

> I think I must have a similar problem.  I've downloaded a fresh copy of
> cleanfeed and stripped out everything in cleanfeed.local but I'm still
> failing to trap binaries.

> What file/dir are you referring to when you say chmod 755?

The file that becomes your: filter_innd.pl.  I don't know if that is your
problem but it sure sounds like what happen to me.  I spent about a month
trying to figure what was wrong before I look at the permissions :-).
Good luck.

Bill
Re: Filter yEnc postings
#73111
Author: Marco d'Itri
Date: Tue, 24 Jan 2006 17:20
9 lines
1261 bytes
wkronert@sunstroke.sdsu.edu wrote:

>Is anyone else having this problem with their binary filter?
Yes. INN has a bug which makes (some?) pattern matching operations
against $hdr{__BODY__} fail, so cleanfeed misses the binaries.

-- 
ciao, |
Marco | * The Internet is full. Go away.  -- Joel Furr *
Re: Filter yEnc postings
#73112
Author: wkronert
Date: Tue, 24 Jan 2006 18:05
11 lines
1575 bytes
Marco d'Itri <md@linux.it> wrote:
> wkronert@sunstroke.sdsu.edu wrote:
>>Is anyone else having this problem with their binary filter?

> Yes. INN has a bug which makes (some?) pattern matching operations
> against $hdr{__BODY__} fail, so cleanfeed misses the binaries.

That explains why I see a very limited amount of these binaries.  Thanks
for confirming.

Bill
Re: Filter yEnc postings
#73117
Author: Russ Allbery
Date: Tue, 24 Jan 2006 21:42
20 lines
2051 bytes
Marco d'Itri <md@Linux.IT> writes:
> wkronert@sunstroke.sdsu.edu wrote:

>> Is anyone else having this problem with their binary filter?

> Yes. INN has a bug which makes (some?) pattern matching operations
> against $hdr{__BODY__} fail, so cleanfeed misses the binaries.

I'd love to have a clearly identified problem that could be called a bug,
but alas, the situation is murky.  I don't understand why what INN does
would cause matches to fail; as near as I can tell, it's some sort of
problem in Perl, at least in terms of documentation of what one should do
with variables, but I don't know how to reproduce it sufficiently to track
it down.

-- 
Russ Allbery (rra@stanford.edu)             <http://www.eyrie.org/~eagle/>

          Please post questions rather than mailing me directly.
     <http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
Re: Filter yEnc postings
#73130
Author: Sylvain Robitaille
Date: Thu, 26 Jan 2006 03:31
15 lines
1789 bytes
Steve wrote:

> I've downloaded a fresh copy of cleanfeed and stripped out everything
> in cleanfeed.local but I'm still failing to trap binaries.

At the risk of pointing out the obvious, 'block_binaries' in
cleanfeed.conf?

-- 
----------------------------------------------------------------------
Sylvain Robitaille                              syl@alcor.concordia.ca
 
Systems and Network analyst / Newsmaster          Concordia University
Instructional & Information Technology        Montreal, Quebec, Canada
----------------------------------------------------------------------
Re: Filter yEnc postings
#73131
Author: Sylvain Robitaille
Date: Thu, 26 Jan 2006 03:49
37 lines
3004 bytes
Marco d'Itri wrote:

> INN has a bug which makes (some?) pattern matching operations
> against $hdr{__BODY__} fail, so cleanfeed misses the binaries.

In case it helps, the following seems to work quite well on my Inn-2.4.2
installation, (line numbers are against a significantly modified
cleanfeed-0.95.7a, and please excuse the long lines):

@@ -858,6 +871,10 @@
                         (($hdr{"__BODY__"} =~ /(?:^[\t >]*$base64_chars{59,76}[\t ]*\r?\n){$config{'max_encoded_lines'}}/mo) ||
                          ($hdr{"__BODY__"} =~ /(?:^[\t >]*M$uu_chars{60,61}[\t ]*\r?\n){$config{'max_encoded_lines'}}/mo)) &&
                              (return reject ("Binary in non-binary group"));
+                        # 2002/10/22 Sylvain Robitaille
+                        # Separate check for yEnc encoded posts:
+                        $hdr{"__BODY__"} =~ /^\s*=ybegin\s+/m &&
+                            return reject ("yEnc encoding in non-binary group");
                     }
                 }
             }


That's only slightly different than the patch that was suggested a few
posts previously in this thread, but the above has not let through any
misplaced yEnc encoded binaries (that I've become aware of) since the
day I put it into place, and has so far today resulted in 13012 rejected
messages, according to news.notice.

(I hope it's a useful data point, anyway ...)

-- 
----------------------------------------------------------------------
Sylvain Robitaille                              syl@alcor.concordia.ca
 
Systems and Network analyst / Newsmaster          Concordia University
Instructional & Information Technology        Montreal, Quebec, Canada
----------------------------------------------------------------------
Re: Filter yEnc postings
#73132
Author: Marco d'Itri
Date: Thu, 26 Jan 2006 09:01
13 lines
1529 bytes
syl@alcor.concordia.ca wrote:

>In case it helps, the following seems to work quite well on my Inn-2.4.2
>installation, (line numbers are against a significantly modified
>cleanfeed-0.95.7a, and please excuse the long lines):
The bug is not specific to yEnc detection but breaks uuencoded files
detection too, so it looks like that your system does not hit it.
On which platform are you running INN, and which version of perl are you
using?

-- 
ciao, |
Marco | * The Internet is full. Go away.  -- Joel Furr *
Re: Filter yEnc postings
#73134
Author: Steve
Date: Thu, 26 Jan 2006 11:21
20 lines
1783 bytes
On Thu, 26 Jan 2006 03:31:49 +0000 (UTC), Sylvain Robitaille wrote in
Message-Id: <slrndtggl5.smg.syl@alcor.concordia.ca>:

> Steve wrote:
>
>> I've downloaded a fresh copy of cleanfeed and stripped out everything
>> in cleanfeed.local but I'm still failing to trap binaries.
>
> At the risk of pointing out the obvious, 'block_binaries' in
> cleanfeed.conf?

Yes, this is set correctly and reported so in cleanfeed.stats:

bin_allowed: ^alt\.anonymous\.messages$|^alt.security.keydist$
binaries_in_mod_groups: 0
block_binaries: 1

I have discovered that if I copy the yenc binary filter from
filter_innd.pl (cleanfeed) to local_filter_last in cleanfeed.local, then
it works.
Re: Filter yEnc postings
#73136
Author: Sylvain Robitaille
Date: Thu, 26 Jan 2006 17:40
25 lines
2229 bytes
Marco d'Itri wrote:

> The bug is not specific to yEnc detection but breaks uuencoded files
> detection too, so it looks like that your system does not hit it.

Right.  I should have considered that, of course.

> On which platform are you running INN,

Inn-2.4.2 on Slackware 9.1.0 now, though this was an upgrade (early last
year) from Inn-1.7 (heavily patched) on a DEC/OSF-4.0E system that ran
flawlessly for years.  Hardware is an IBM xSeries 335, with dual Xeons,
and 2GB RAM.

> and which version of perl are you using?

locally installed Perl-5.8.0.

-- 
----------------------------------------------------------------------
Sylvain Robitaille                              syl@alcor.concordia.ca
 
Systems and Network analyst / Postmaster          Concordia University
Instructional & Information Technology        Montreal, Quebec, Canada
----------------------------------------------------------------------
Re: Filter yEnc postings
#73139
Author: Bozweb
Date: Thu, 26 Jan 2006 18:43
31 lines
2428 bytes
On Tue, 24 Jan 2006 13:42:31 -0800, Russ Allbery <rra@stanford.edu>
wrote:

>Marco d'Itri <md@Linux.IT> writes:
>> wkronert@sunstroke.sdsu.edu wrote:
>
>>> Is anyone else having this problem with their binary filter?
>
>> Yes. INN has a bug which makes (some?) pattern matching operations
>> against $hdr{__BODY__} fail, so cleanfeed misses the binaries.
>
>I'd love to have a clearly identified problem that could be called a bug,
>but alas, the situation is murky.  I don't understand why what INN does
>would cause matches to fail; as near as I can tell, it's some sort of
>problem in Perl, at least in terms of documentation of what one should do
>with variables, but I don't know how to reproduce it sufficiently to track
>it down.


Hm, I have no problems with yEnk of other binaries.
server 192.... rejected post to newsgroup(s) bozweb.test
437 binary in non-binary group
yEnkfile cc_20060107_0013.reg.ntx
Inn-2.4.3 openbsd 3.7 perl5 cleanfeed-20020501



-- 
Posted
http://news.bozweb.net/
Key: 0x82DEE1A0
Re: Filter yEnc postings
#73142
Author: Marco d'Itri
Date: Thu, 26 Jan 2006 22:27
20 lines
1942 bytes
syl@alcor.concordia.ca wrote:

>Inn-2.4.2 on Slackware 9.1.0 now, though this was an upgrade (early last
>year) from Inn-1.7 (heavily patched) on a DEC/OSF-4.0E system that ran
>flawlessly for years.  Hardware is an IBM xSeries 335, with dual Xeons,
>and 2GB RAM.
I do not think that the bug happened on inn 1.x, IIRC I started noticing
the problem after october 2001 but before may 2002 (when I released the
last two versions of cleanfeed).
Maybe this depends from the storage method?

>> and which version of perl are you using?
>locally installed Perl-5.8.0.
Recent enough, and I experienced the bug with much older versions, so
it's probably not relevant (maybe it only happens when perl is compiled
with specific options?).

-- 
ciao, |
Marco | * The Internet is full. Go away.  -- Joel Furr *
Re: Filter yEnc postings
#73143
Author: Sylvain Robitaille
Date: Thu, 26 Jan 2006 22:45
66 lines
4488 bytes
Marco d'Itri wrote:

> Maybe this depends from the storage method?

That's certainly possible.  I'm using tradspool, mostly, except for
control.* and junk, both of which are on CNFS.

>>locally installed Perl-5.8.0.
> Recent enough, and I experienced the bug with much older versions, so
> it's probably not relevant (maybe it only happens when perl is compiled
> with specific options?).

In case it helps (again, please excuse the long lines), "perl -V" output
is appended below my siganture ...

-- 
----------------------------------------------------------------------
Sylvain Robitaille                              syl@alcor.concordia.ca
 
Systems and Network analyst / Newsmaster          Concordia University
Instructional & Information Technology        Montreal, Quebec, Canada
----------------------------------------------------------------------

: newsflash[syl] ~; perl -V
Summary of my perl5 (revision 5.0 version 8 subversion 0) configuration:
  Platform:
    osname=linux, osvers=2.4.20, archname=i686-linux
    uname='linux newsflash 2.4.20 #2 mon mar 17 22:02:15 pst 2003 i686 unknown '
    config_args='-de -Uinstallusrbinperl -Dperladmin=none -Dcf_email=root@newsflash -Dprefix=/local/pkg/perl/root-perl-5.8.0 -Dprivlib=/local/pkg/perl/root-perl-5.8.0/lib -Dman1dir=/local/pkg/perl/root-perl-5.8.0/man -Dman3dir=/local/pkg/perl/root-perl-5.8.0/man -Dman1ext=1 -Dman3ext=3 -Dsitelib=/local/pkg/perl/root-perl-5.8.0/lib/site_perl -Dsiteman1=/local/pkg/perl/root-perl-5.8.0/man -Dsiteman3=/local/pkg/perl/root-perl-5.8.0/man'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
    useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
    use64bitint=undef use64bitall=undef uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='cc', ccflags ='-fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
    optimize='-O3',
    cppflags='-fno-strict-aliasing'
    ccversion='', gccversion='3.2.2', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=4, prototype=define
  Linker and Libraries:
    ld='cc', ldflags =''
    libpth=/lib /usr/lib
    libs=-lnsl -lgdbm -ldb -ldl -lm -lc -lcrypt -lutil
    perllibs=-lnsl -ldl -lm -lc -lcrypt -lutil
    libc=/lib/libc-2.3.1.so, so=so, useshrplib=false, libperl=libperl.a
    gnulibc_version='2.3.1'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
    cccdlflags='-fpic', lddlflags='-shared'


Characteristics of this binary (from libperl): 
  Compile-time options: USE_LARGE_FILES
  Built under linux
  Compiled at Aug 29 2003 11:32:34
  @INC:
    /local/pkg/perl/root-perl-5.8.0/lib/i686-linux
    /local/pkg/perl/root-perl-5.8.0/lib
    /local/pkg/perl/root-perl-5.8.0/lib/site_perl/i686-linux
    /local/pkg/perl/root-perl-5.8.0/lib/site_perl
    /local/pkg/perl/root-perl-5.8.0/lib/site_perl
    .
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