Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

TRANSACTION CANCELLED - FARECARD RETURNED


computers / news.software.nntp / inn filtering question (and cleanfeed problem?)

SubjectAuthor
* inn filtering question (and cleanfeed problem?)Adam W.
+* Re: inn filtering question (and cleanfeed problem?)Adam W.
|`* Re: inn filtering question (and cleanfeed problem?)Neodome Admin
| `* Re: inn filtering question (and cleanfeed problem?)Adam W.
|  `- Re: inn filtering question (and cleanfeed problem?)Neodome Admin
+- Re: inn filtering question (and cleanfeed problem?)Russ Allbery
`* Re: inn filtering question (and cleanfeed problem?)Marc SCHAEFER
 `* Re: inn filtering question (and cleanfeed problem?)Adam W.
  +* Re: inn filtering question (and cleanfeed problem?)Marc SCHAEFER
  |`* Re: inn filtering question (and cleanfeed problem?)Adam W.
  | `* Re: inn filtering question (and cleanfeed problem?)Marc SCHAEFER
  |  `* Re: inn filtering question (and cleanfeed problem?)Adam W.
  |   `* Re: inn filtering question (and cleanfeed problem?)Marc SCHAEFER
  |    `- Re: inn filtering question (and cleanfeed problem?)Julien ÉLIE
  `- Re: inn filtering question (and cleanfeed problem?)Julien ÉLIE

1
inn filtering question (and cleanfeed problem?)

<u5sogj$ish$6$arnold@news.chmurka.net>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=1782&group=news.software.nntp#1782

  copy link   Newsgroups: news.software.nntp
Path: i2pn2.org!rocksolid2!i2pn.org!news.chmurka.net!.POSTED.s.v.chmurka.net!not-for-mail
From: gof-cut-this-news@cut-this-chmurka.net.invalid (Adam W.)
Newsgroups: news.software.nntp
Subject: inn filtering question (and cleanfeed problem?)
Date: Thu, 8 Jun 2023 14:27:32 -0000 (UTC)
Organization: news.chmurka.net
Message-ID: <u5sogj$ish$6$arnold@news.chmurka.net>
NNTP-Posting-Host: s.v.chmurka.net
Injection-Date: Thu, 8 Jun 2023 14:27:32 -0000 (UTC)
Injection-Info: news.chmurka.net; posting-account="arnold"; posting-host="s.v.chmurka.net:172.24.44.20";
logging-data="19345"; mail-complaints-to="abuse-news.(at).chmurka.net"
User-Agent: tin/2.6.1-20211226 ("Convalmore") (Linux/5.15.32-v7+ (armv7l))
Cancel-Lock: sha1:ZzRjdg6AYBvteAOLlSmLgX1zoG8=
sha1:uhpPIbIf7w2irn92xkZRpDN/IdY= sha256:aAM+gn0rl4oIVA+PlnIRlhodjho+5o3FdhzCj3OwYqI=
sha1:HuW8j7oRYQ7G4yTb1mZGc9ogO/U= sha256:ITzVVUosw1eTlahkSTn7qWfGy8qXYigiestriqUX3cY=
 by: Adam W. - Thu, 8 Jun 2023 14:27 UTC

Hi,

Just to make sure, because I can't find this information anywhere...

When is filter_innd.pl used? Is it used only for articles coming from
other servers (via a newsfeed), or also for locally posted articles?

If it's the latter, then where in this picture filter_nnrpd.pl fits in?
What if both are enabled, and someone posts the article (via nnrpd)?
filter_nnrpd.pl is executed, but is filter_innd.pl executed also?

Why am I asking...

I have cleanfeed installed. filter_innd.pl is a symlink to cleanfeed. I
would expect cleanfeed to reject certain posts posted to my server via
nnrpd (for example, binary postings to non-binary groups), and I vaguely
remember that it worked this way, but now it doesn't happen. Server
happily accepts these posts.

In logs I can only see that filtering is enabled.

Jun 8 16:16:16 kvm innd: SERVER perl filtering enabled

cleanfeed directory contains logs subdirectory, but it's empty.

What can be wrong here?

Re: inn filtering question (and cleanfeed problem?)

<u5sp6u$n3c$2$arnold@news.chmurka.net>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=1783&group=news.software.nntp#1783

  copy link   Newsgroups: news.software.nntp
Path: i2pn2.org!i2pn.org!news.chmurka.net!.POSTED.s.v.chmurka.net!not-for-mail
From: gof-cut-this-news@cut-this-chmurka.net.invalid (Adam W.)
Newsgroups: news.software.nntp
Subject: Re: inn filtering question (and cleanfeed problem?)
Date: Thu, 8 Jun 2023 14:39:26 -0000 (UTC)
Organization: news.chmurka.net
Message-ID: <u5sp6u$n3c$2$arnold@news.chmurka.net>
References: <u5sogj$ish$6$arnold@news.chmurka.net>
NNTP-Posting-Host: s.v.chmurka.net
Injection-Date: Thu, 8 Jun 2023 14:39:26 -0000 (UTC)
Injection-Info: news.chmurka.net; posting-account="arnold"; posting-host="s.v.chmurka.net:172.24.44.20";
logging-data="23660"; mail-complaints-to="abuse-news.(at).chmurka.net"
User-Agent: tin/2.6.1-20211226 ("Convalmore") (Linux/5.15.32-v7+ (armv7l))
Cancel-Lock: sha1:/fP0Ehlvj5vQF4YuwpNxA0WgWag=
sha1:TfFxZ3bWUbY51lFGGGAkQ5apmFg= sha256:9fS66XY2PZUdKI3TKDXiPiXfktwatYQ+4kM4EnIWnoA=
sha1:vKsJW/l80DIOcJHlkAMUq23IXCo= sha256:780vqyqxByMzr9NKO+Ronu6dDPt93kYSWTl1LyE+3oY=
 by: Adam W. - Thu, 8 Jun 2023 14:39 UTC

Adam W. <gof-cut-this-news@cut-this-chmurka.net.invalid> wrote:

> I have cleanfeed installed. filter_innd.pl is a symlink to cleanfeed. I
> would expect cleanfeed to reject certain posts posted to my server via
> nnrpd (for example, binary postings to non-binary groups), and I vaguely
> remember that it worked this way, but now it doesn't happen. Server
> happily accepts these posts.

An update.

When I try to post an article with a forbidden subject (simpbiz.software),
it gets rejected, so the filtering is enabled. But still, binary postings
get through.

I'm testing it with (prefixing here with : so it doesn't get flagged as a
binary posting):

: begin 664 test
: `
: end

Re: inn filtering question (and cleanfeed problem?)

<87bkhq80m9.fsf@hope.eyrie.org>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=1784&group=news.software.nntp#1784

  copy link   Newsgroups: news.software.nntp
Path: i2pn2.org!i2pn.org!paganini.bofh.team!news.killfile.org!news.eyrie.org!.POSTED!not-for-mail
From: eagle@eyrie.org (Russ Allbery)
Newsgroups: news.software.nntp
Subject: Re: inn filtering question (and cleanfeed problem?)
Date: Thu, 08 Jun 2023 07:55:26 -0700
Organization: The Eyrie
Message-ID: <87bkhq80m9.fsf@hope.eyrie.org>
References: <u5sogj$ish$6$arnold@news.chmurka.net>
Mime-Version: 1.0
Content-Type: text/plain
Injection-Info: hope.eyrie.org;
logging-data="1035"; mail-complaints-to="news@eyrie.org"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)
Cancel-Lock: sha1:RmxtGwadWJJEc7YPFNbCQMLTZwY=
 by: Russ Allbery - Thu, 8 Jun 2023 14:55 UTC

gof-cut-this-news@cut-this-chmurka.net.invalid (Adam W.) writes:

> When is filter_innd.pl used? Is it used only for articles coming from
> other servers (via a newsfeed), or also for locally posted articles?

It's used for both.

> If it's the latter, then where in this picture filter_nnrpd.pl fits in?
> What if both are enabled, and someone posts the article (via nnrpd)?
> filter_nnrpd.pl is executed, but is filter_innd.pl executed also?

filter_nnrpd.pl is invoked first, inside nnrpd, and then filter_innd.pl is
invoked when nnrpd passes the article to innd.

(I don't know why Cleanfeed isn't working for you.)

--
Russ Allbery (eagle@eyrie.org) <https://www.eyrie.org/~eagle/>

Please post questions rather than mailing me directly.
<https://www.eyrie.org/~eagle/faqs/questions.html> explains why.

Re: inn filtering question (and cleanfeed problem?)

<u5sq5i$tf0$4@shakotay.alphanet.ch>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=1785&group=news.software.nntp#1785

  copy link   Newsgroups: news.software.nntp
Path: i2pn2.org!i2pn.org!news.alphanet.ch!alphanet.ch!.POSTED!not-for-mail
From: schaefer@alphanet.ch (Marc SCHAEFER)
Newsgroups: news.software.nntp
Subject: Re: inn filtering question (and cleanfeed problem?)
Date: Thu, 8 Jun 2023 14:55:46 -0000 (UTC)
Organization: Posted through news.alphanet.ch
Message-ID: <u5sq5i$tf0$4@shakotay.alphanet.ch>
References: <u5sogj$ish$6$arnold@news.chmurka.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 8 Jun 2023 14:55:46 -0000 (UTC)
Injection-Info: shakotay.alphanet.ch; posting-account="schaefer";
logging-data="30176"; mail-complaints-to="usenet@alphanet.ch"; posting-host="634ce6c9682d817d72f6177875e2bb4f.nnrp.alphanet.ch"
User-Agent: tin/2.4.3-20181224 ("Glen Mhor") (UNIX) (Linux/4.19.0-23-amd64 (x86_64))
Cancel-Lock: sha256:38+DTqtrtJ2IUJYAOhVKgA9JJvCxFU0xiGIfi+VuCR4= sha256:8lxUI6j61Lw8w/sGMoOjqw+PULepp+mV4O1OO6NsTG4=
 by: Marc SCHAEFER - Thu, 8 Jun 2023 14:55 UTC

On Thu, 08 Jun 2023 16:27:32, Adam W. <gof-cut-this-news@cut-this-chmurka.net.invalid> wrote:
> When is filter_innd.pl used? Is it used only for articles coming from

On my installation, /etc/news/filters/filter_innd.pl calls
/etc/news/cleanfeed/cleanfeed.local and is called for every article
going through the server, I would think also for locally posted articles
once they have passed through /etc/news/filters/filter_nnrpd.pl.

> If it's the latter, then where in this picture filter_nnrpd.pl fits in?

The main difference in my usage is that you can reject the article in a
way that the news client sees it (e.g. for bad quoting, for example),
and you can add headers or modify headers (I tend to modify
Injection-Info and add/update Cancel-Lock, since I don't
use an INN version which has internal support for it).

/etc/news/filters/filter_innd.pl and cleanfeed are not allowed to modify
articles (for good reasons).

> What if both are enabled, and someone posts the article (via nnrpd)?
> filter_nnrpd.pl is executed, but is filter_innd.pl executed also?

I think so, but I am not sure 100%.

> I have cleanfeed installed. filter_innd.pl is a symlink to cleanfeed. I
> would expect cleanfeed to reject certain posts posted to my server via
> nnrpd (for example, binary postings to non-binary groups), and I vaguely
> remember that it worked this way, but now it doesn't happen. Server
> happily accepts these posts.

In /etc/news/cleanfeed/cleanfeed.local there are some toggles you can
set to modify the behaviour.

--
Attention: limitez le nombre de lignes de citation à l'essentiel, sinon
je ne verrai pas votre réponse. Et si vous écrivez souvent des bobards,
je ne vous lirai plus et je recommanderai (NoCeM) de ne plus vous lire.

Re: inn filtering question (and cleanfeed problem?)

<u5sth5$n3c$14$arnold@news.chmurka.net>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=1786&group=news.software.nntp#1786

  copy link   Newsgroups: news.software.nntp
Path: i2pn2.org!i2pn.org!news.chmurka.net!.POSTED.s.v.chmurka.net!not-for-mail
From: gof-cut-this-news@cut-this-chmurka.net.invalid (Adam W.)
Newsgroups: news.software.nntp
Subject: Re: inn filtering question (and cleanfeed problem?)
Date: Thu, 8 Jun 2023 15:53:09 -0000 (UTC)
Organization: news.chmurka.net
Message-ID: <u5sth5$n3c$14$arnold@news.chmurka.net>
References: <u5sogj$ish$6$arnold@news.chmurka.net> <u5sq5i$tf0$4@shakotay.alphanet.ch>
NNTP-Posting-Host: s.v.chmurka.net
Injection-Date: Thu, 8 Jun 2023 15:53:09 -0000 (UTC)
Injection-Info: news.chmurka.net; posting-account="arnold"; posting-host="s.v.chmurka.net:172.24.44.20";
logging-data="23660"; mail-complaints-to="abuse-news.(at).chmurka.net"
User-Agent: tin/2.6.1-20211226 ("Convalmore") (Linux/5.15.32-v7+ (armv7l))
Cancel-Lock: sha1:Yl6S38EzEqNGhIz0VQ0fPHQN0Rg=
sha1:LrcMsmnvfK3N0124J70TK5vW0FQ= sha256:GGEu5CGAEnM0x5V7Hpk/BM5oio04WImwiDrG2oZ1Woc=
sha1:We0Y67r48O6tTFHjMcxF1zAZKJs= sha256:9zkkEGFro9BkiKKULPuaMUhqiwWdW27wj90H4shyjiA=
 by: Adam W. - Thu, 8 Jun 2023 15:53 UTC

Marc SCHAEFER <schaefer@alphanet.ch> wrote:

> On my installation, /etc/news/filters/filter_innd.pl calls
> /etc/news/cleanfeed/cleanfeed.local and is called for every article

/etc/news/cleanfeed/cleanfeed I guess?

> /etc/news/filters/filter_innd.pl and cleanfeed are not allowed to modify
> articles (for good reasons).

Ok, now clear :)

> In /etc/news/cleanfeed/cleanfeed.local there are some toggles you can
> set to modify the behaviour.

It gets even weirder. I had the default configuration:

block_binaries => 1, # block misplaced binaries
block_all_binaries => 0, # Reject all binary regardless of distribution

I changed block_all_binaries to 1 just to be sure. Now:

- yEd-encoded binaries are rejected (Misplaced binary). Example:

: =ybegin line=128 size=0 name=test
:
: =yend size=0 crc32=00000000

- Images encoded with base64 are rejected (Misplaced jpg). Example:

: begin 664 test.jpg
: `
: end

- File with no extension encoded with base64 is accepted. Example:

: begin 664 test
: `
: end

- MIME-encoded image is accepted. Example (full post):

: From: test@test.test
: Newsgroups: chmurka.test
: Subject: test mime
: MIME-Version: 1.0
: Content-Type: multipart/mixed;
: boundary="------------AOXUEIFuRgZjEKO0fa0IFPxL"
: : This is a multi-part message in MIME format.
: --------------AOXUEIFuRgZjEKO0fa0IFPxL
: Content-Type: text/plain; charset=UTF-8; format=flowed
: Content-Transfer-Encoding: 8bit
: : test
: : --------------AOXUEIFuRgZjEKO0fa0IFPxL
: Content-Type: image/png; name="test.png"
: Content-Disposition: attachment; filename="test.png"
: Content-Transfer-Encoding: base64
: : test
: : --------------AOXUEIFuRgZjEKO0fa0IFPxL--

To me, it looks like a bug in cleanfeed, but is it possible that such
basic loophole in a filter used by most news servers went unnoticed?

Re: inn filtering question (and cleanfeed problem?)

<u5t7fa$sii$1@shakotay.alphanet.ch>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=1788&group=news.software.nntp#1788

  copy link   Newsgroups: news.software.nntp
Path: i2pn2.org!i2pn.org!news.alphanet.ch!alphanet.ch!.POSTED!not-for-mail
From: schaefer@alphanet.ch (Marc SCHAEFER)
Newsgroups: news.software.nntp
Subject: Re: inn filtering question (and cleanfeed problem?)
Date: Thu, 8 Jun 2023 18:42:50 -0000 (UTC)
Organization: Posted through news.alphanet.ch
Message-ID: <u5t7fa$sii$1@shakotay.alphanet.ch>
References: <u5sogj$ish$6$arnold@news.chmurka.net> <u5sq5i$tf0$4@shakotay.alphanet.ch> <u5sth5$n3c$14$arnold@news.chmurka.net>
Injection-Date: Thu, 8 Jun 2023 18:42:50 -0000 (UTC)
Injection-Info: shakotay.alphanet.ch; posting-account="schaefer";
logging-data="29266"; mail-complaints-to="usenet@alphanet.ch"; posting-host="634ce6c9682d817d72f6177875e2bb4f.nnrp.alphanet.ch"
User-Agent: tin/2.4.3-20181224 ("Glen Mhor") (UNIX) (Linux/4.19.0-23-amd64 (x86_64))
Cancel-Lock: sha256:ttQK1jCkhYM+BWo/PpMKH0U64GqaUvppzJPbi6Hof/k= sha256:y21MHAkDY/bp48Guq1gVZ/hiidy2cDdCOEI5V04xMCw=
 by: Marc SCHAEFER - Thu, 8 Jun 2023 18:42 UTC

On Thu, 08 Jun 2023 17:53:09, Adam W. <gof-cut-this-news@cut-this-chmurka.net.invalid> wrote:
>> On my installation, /etc/news/filters/filter_innd.pl calls
>> /etc/news/cleanfeed/cleanfeed.local and is called for every article
>
> /etc/news/cleanfeed/cleanfeed I guess?

Not in my installation, but I guess it was manually installed.

> - MIME-encoded image is accepted. Example (full post):

Maybe this is just not handled by this version?

I don't think mine does it either, however I have not encountered,
recently, anyone posting that kind of stuff. If it's in the big8 and you
have a Message-ID I could look for it.

There are also bots, for example in the USENET-fr hierarchy that will
kill that kind of stuff automatically (using a global cyberspam cancel
and/or a NoCeM).

I guess rejecting Content-Type: multipart/mixed in the header checks
could be enough. It would be even better to do it in filter_nnrpd.pl so
that the user gets some info (if it's a local post).

I have some experience in tweaking cleanfeed for my needs (the last
changed I am trying soon is to transform ALL rejects into NoCeM so that
my users can, through my NNTP/NNRP proxy, select which one they want to
apply, see https://nnrp.alphanet.ch/config for a web demo).

> To me, it looks like a bug in cleanfeed, but is it possible that such
> basic loophole in a filter used by most news servers went unnoticed?

Could well be either an old version, or a bug, yes.

Doing a quick search shows me that the original author has not released
anything since 1998, and that there are various patches floating around
and a mixmin version on GitHub, dating > 10 years ago.

Anyone has a more recent version?

Re: inn filtering question (and cleanfeed problem?)

<u5t9vt$k7$1$arnold@news.chmurka.net>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=1789&group=news.software.nntp#1789

  copy link   Newsgroups: news.software.nntp
Path: i2pn2.org!i2pn.org!news.chmurka.net!.POSTED.s.v.chmurka.net!not-for-mail
From: gof-cut-this-news@cut-this-chmurka.net.invalid (Adam W.)
Newsgroups: news.software.nntp
Subject: Re: inn filtering question (and cleanfeed problem?)
Date: Thu, 8 Jun 2023 19:25:49 -0000 (UTC)
Organization: news.chmurka.net
Message-ID: <u5t9vt$k7$1$arnold@news.chmurka.net>
References: <u5sogj$ish$6$arnold@news.chmurka.net> <u5sq5i$tf0$4@shakotay.alphanet.ch> <u5sth5$n3c$14$arnold@news.chmurka.net> <u5t7fa$sii$1@shakotay.alphanet.ch>
NNTP-Posting-Host: s.v.chmurka.net
Injection-Date: Thu, 8 Jun 2023 19:25:49 -0000 (UTC)
Injection-Info: news.chmurka.net; posting-account="arnold"; posting-host="s.v.chmurka.net:172.24.44.20";
logging-data="647"; mail-complaints-to="abuse-news.(at).chmurka.net"
User-Agent: tin/2.6.1-20211226 ("Convalmore") (Linux/5.15.32-v7+ (armv7l))
Cancel-Lock: sha1:AlY4um4z4mHrNucoUr4WP/MfTVo=
sha1:EWfh8052wti3ezbJ+iQludHP7wY= sha256:bER03o/09mUQ3hw/vqpaalgyT/n5iJNQlUzikVPDolQ=
sha1:Afnn5t9fe150eStGLyZidEKK1K8= sha256:C6Y0iGk1IqZ+5WZBGGQqF5kGaMHrwYirdA2DNhdVRdE=
 by: Adam W. - Thu, 8 Jun 2023 19:25 UTC

Marc SCHAEFER <schaefer@alphanet.ch> wrote:

>>> /etc/news/cleanfeed/cleanfeed.local and is called for every article
>>
>> /etc/news/cleanfeed/cleanfeed I guess?
>
> Not in my installation, but I guess it was manually installed.

Hmm, but these files are different. There's a large file (cleanfeed, 95
KiB) and smaller cleanfeed.local.sample to be edited (~7 KiB). cleanfeed
uses cleanfeed.local, it has path configured in $config_dir.

> Maybe this is just not handled by this version?

Might be, yes...

I'm using this one: http://www.mixmin.net/cleanfeed/cleanfeed.tar.gz

I just grabbed latest from git:

https://github.com/crooks/cleanfeed

And all files are identical.

> I don't think mine does it either, however I have not encountered,
> recently, anyone posting that kind of stuff. If it's in the big8 and you
> have a Message-ID I could look for it.

It's not in big8, I made some tests on my local chmurka.test newsgroup
(accessible on news.chmurka.net for reading; if you're willing to do
some tests then I can create the account for posting).

Example Message-IDs in this group:

Message-ID: <u5ssht$n3c$6$arnold@news.chmurka.net> (with begin)
Message-ID: <u5snv1$m0v$1$pk@news.chmurka.net> (with MIME)

> I guess rejecting Content-Type: multipart/mixed in the header checks
> could be enough. It would be even better to do it in filter_nnrpd.pl so
> that the user gets some info (if it's a local post).

When I'm trying to post yEnc-encoded data, I'm getting the info in a
rejection message, so I guess filter_innd.pl is enough for that.

> Doing a quick search shows me that the original author has not released
> anything since 1998, and that there are various patches floating around
> and a mixmin version on GitHub, dating > 10 years ago.
>
> Anyone has a more recent version?

mixmin version (from that mentioned github) seems to be somewhat
maintained, but there are very few commits during the last years.

Date: Mon Mar 2 22:56:18 2020 +0000
Date: Sun Jun 2 11:24:47 2019 +0100
Date: Sat Jun 1 16:26:53 2019 +0100
Date: Fri Oct 28 14:15:09 2016 +0100
Date: Sun Sep 30 17:40:31 2012 +0100

And there are a few issues created (most by Julien), but they seem to be
ignored by the maintainer.

https://github.com/crooks/cleanfeed/issues

If there's any other cleanfeed-like tool (or cleanfeed fork) that's still
maintained I'll be happy to switch.

Re: inn filtering question (and cleanfeed problem?)

<u5tao4$9tc$1@shakotay.alphanet.ch>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=1790&group=news.software.nntp#1790

  copy link   Newsgroups: news.software.nntp
Path: i2pn2.org!i2pn.org!news.alphanet.ch!alphanet.ch!.POSTED!not-for-mail
From: schaefer@alphanet.ch (Marc SCHAEFER)
Newsgroups: news.software.nntp
Subject: Re: inn filtering question (and cleanfeed problem?)
Date: Thu, 8 Jun 2023 19:38:45 -0000 (UTC)
Organization: Posted through news.alphanet.ch
Message-ID: <u5tao4$9tc$1@shakotay.alphanet.ch>
References: <u5sogj$ish$6$arnold@news.chmurka.net> <u5sq5i$tf0$4@shakotay.alphanet.ch> <u5sth5$n3c$14$arnold@news.chmurka.net> <u5t7fa$sii$1@shakotay.alphanet.ch> <u5t9vt$k7$1$arnold@news.chmurka.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 8 Jun 2023 19:38:45 -0000 (UTC)
Injection-Info: shakotay.alphanet.ch; posting-account="schaefer";
logging-data="10156"; mail-complaints-to="usenet@alphanet.ch"; posting-host="634ce6c9682d817d72f6177875e2bb4f.nnrp.alphanet.ch"
User-Agent: tin/2.4.3-20181224 ("Glen Mhor") (UNIX) (Linux/4.19.0-23-amd64 (x86_64))
Cancel-Lock: sha256:kFJBpI4XRKFSyS2m8kFmi/fzDG8f3eohSAOs3bByrdg= sha256:lFKtfqqzC/Ipdb9Ebn/pcTg4VWNftdxvHr47lVC0sRg=
 by: Marc SCHAEFER - Thu, 8 Jun 2023 19:38 UTC

On Thu, 08 Jun 2023 21:25:49, Adam W. <gof-cut-this-news@cut-this-chmurka.net.invalid> wrote:
> When I'm trying to post yEnc-encoded data, I'm getting the info in a
> rejection message, so I guess filter_innd.pl is enough for that.

Rejection message to the NNTP/NNRP client? that's filter_nnrpd.pl.

> If there's any other cleanfeed-like tool (or cleanfeed fork) that's still
> maintained I'll be happy to switch.

There was also a tool used by AIOE (postfilter) [1], some french news server
installed it recently apparently with good success [2], although he
asked for help for configuration details.

[1] https://github.com/Aioe/postfilter
[2] https://usenet-fr.alphanet.ch/search/message-id/%3Ctvjqtq%2468o%241%40ns507557.dodin.fr.nf%3E/0

--
Attention: limitez le nombre de lignes de citation à l'essentiel, sinon
je ne verrai pas votre réponse. Et si vous écrivez souvent des bobards,
je ne vous lirai plus et je recommanderai (NoCeM) de ne plus vous lire.

Re: inn filtering question (and cleanfeed problem?)

<u5tfa6$k7$2$arnold@news.chmurka.net>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=1791&group=news.software.nntp#1791

  copy link   Newsgroups: news.software.nntp
Path: i2pn2.org!i2pn.org!news.chmurka.net!.POSTED.s.v.chmurka.net!not-for-mail
From: gof-cut-this-news@cut-this-chmurka.net.invalid (Adam W.)
Newsgroups: news.software.nntp
Subject: Re: inn filtering question (and cleanfeed problem?)
Date: Thu, 8 Jun 2023 20:56:38 -0000 (UTC)
Organization: news.chmurka.net
Message-ID: <u5tfa6$k7$2$arnold@news.chmurka.net>
References: <u5sogj$ish$6$arnold@news.chmurka.net> <u5sq5i$tf0$4@shakotay.alphanet.ch> <u5sth5$n3c$14$arnold@news.chmurka.net> <u5t7fa$sii$1@shakotay.alphanet.ch> <u5t9vt$k7$1$arnold@news.chmurka.net> <u5tao4$9tc$1@shakotay.alphanet.ch>
NNTP-Posting-Host: s.v.chmurka.net
Injection-Date: Thu, 8 Jun 2023 20:56:38 -0000 (UTC)
Injection-Info: news.chmurka.net; posting-account="arnold"; posting-host="s.v.chmurka.net:172.24.44.20";
logging-data="647"; mail-complaints-to="abuse-news.(at).chmurka.net"
User-Agent: tin/2.6.1-20211226 ("Convalmore") (Linux/5.15.32-v7+ (armv7l))
Cancel-Lock: sha1:3Hj5nWSKvBU2at0XfQI+FwdZhgM=
sha1:118islXMVpFhveCYCs3twGE5Tfk= sha256:I1xVrK8g+ozUr6eJN6hssaleHUdKNvma4cN32lhOiCw=
sha1:/CIY/XCAFSfvvYrlD3bgCLZ0s3E= sha256:I2SYYJRPvL1hT+5xJNBUiS8oYVpo9Bpux1Mfj3mSORI=
 by: Adam W. - Thu, 8 Jun 2023 20:56 UTC

Marc SCHAEFER <schaefer@alphanet.ch> wrote:

>> When I'm trying to post yEnc-encoded data, I'm getting the info in a
>> rejection message, so I guess filter_innd.pl is enough for that.
>
> Rejection message to the NNTP/NNRP client? that's filter_nnrpd.pl.

I got a rejection message during posting from filter_innd.pl.

: $ telnet news.chmurka.net nntp
: Trying 176.56.237.216...
: Connected to kvm.chmurka.net.
: Escape character is '^]'.
: 200 news.chmurka.net InterNetNews NNRP server INN 2.7.0 ready (no posting)
: authinfo user (...)
: 381 Enter password
: authinfo pass (...)
: 281 Authentication succeeded
: post
: 340 Ok, recommended Message-ID <u5tf3a$4b1$1@news.chmurka.net>
: from: test@test.test
: subject: test
: newsgroups: chmurka.test
: : =ybegin line=128 size=0 name=test
: .
: 441 437 Binary: misplaced binary

> There was also a tool used by AIOE (postfilter) [1], some french news server
> installed it recently apparently with good success [2], although he
> asked for help for configuration details.
>
> [1] https://github.com/Aioe/postfilter
> [2] https://usenet-fr.alphanet.ch/search/message-id/%3Ctvjqtq%2468o%241%40ns507557.dodin.fr.nf%3E/0

Merci, I'll take a look.

Re: inn filtering question (and cleanfeed problem?)

<u5timj$ava$3@shakotay.alphanet.ch>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=1792&group=news.software.nntp#1792

  copy link   Newsgroups: news.software.nntp
Path: i2pn2.org!i2pn.org!news.alphanet.ch!alphanet.ch!.POSTED!not-for-mail
From: schaefer@alphanet.ch (Marc SCHAEFER)
Newsgroups: news.software.nntp
Subject: Re: inn filtering question (and cleanfeed problem?)
Date: Thu, 8 Jun 2023 21:54:27 -0000 (UTC)
Organization: Posted through news.alphanet.ch
Message-ID: <u5timj$ava$3@shakotay.alphanet.ch>
References: <u5sogj$ish$6$arnold@news.chmurka.net> <u5sq5i$tf0$4@shakotay.alphanet.ch> <u5sth5$n3c$14$arnold@news.chmurka.net> <u5t7fa$sii$1@shakotay.alphanet.ch> <u5t9vt$k7$1$arnold@news.chmurka.net> <u5tao4$9tc$1@shakotay.alphanet.ch> <u5tfa6$k7$2$arnold@news.chmurka.net>
Injection-Date: Thu, 8 Jun 2023 21:54:27 -0000 (UTC)
Injection-Info: shakotay.alphanet.ch; posting-account="schaefer";
logging-data="11242"; mail-complaints-to="usenet@alphanet.ch"; posting-host="634ce6c9682d817d72f6177875e2bb4f.nnrp.alphanet.ch"
User-Agent: tin/2.4.3-20181224 ("Glen Mhor") (UNIX) (Linux/4.19.0-23-amd64 (x86_64))
Cancel-Lock: sha256:Kx9kb87nx4mnIQknVaMZWatKmM38wZ8gBUJP5aNlcjE= sha256:Cb6ZDFx75YWdMgLb5G501r/+JetLLSeQ6fivXpnDU5Q=
 by: Marc SCHAEFER - Thu, 8 Jun 2023 21:54 UTC

On Thu, 08 Jun 2023 22:56:38, Adam W. <gof-cut-this-news@cut-this-chmurka.net.invalid> wrote:
> I got a rejection message during posting from filter_innd.pl.

Ok, this contradicts what I thought was happening, aka filter_innd.pl is
run too late to be able to tell anything to the posting client, but
filter_nnrpd.pl is not.

But, indeed:

> : 441 437 Binary: misplaced binary

this message comes from /etc/news/filter/filter_innd.pl also in my
installation.

So, maybe I was wrong, and filter_nnrpd.pl AND filter_innd.pl (cleanfeed
here) can transmit error messages to the user.

Re: inn filtering question (and cleanfeed problem?)

<u5ulef$t35$1@neodome.net>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=1793&group=news.software.nntp#1793

  copy link   Newsgroups: news.software.nntp
Path: i2pn2.org!i2pn.org!news.neodome.net!.POSTED!not-for-mail
From: admin@neodome.net (Neodome Admin)
Newsgroups: news.software.nntp
Subject: Re: inn filtering question (and cleanfeed problem?)
Date: Fri, 9 Jun 2023 07:47:27 -0000 (UTC)
Organization: Neodome
Message-ID: <u5ulef$t35$1@neodome.net>
References: <u5sogj$ish$6$arnold@news.chmurka.net>
<u5sp6u$n3c$2$arnold@news.chmurka.net>
Mime-Version: 1.0
Content-Type: text/plain
Injection-Date: Fri, 9 Jun 2023 07:47:27 -0000 (UTC)
Injection-Info: neodome.net; mail-complaints-to="abuse@neodome.net"
User-Agent: Gnus/5.13 (Gnus v5.13)
 by: Neodome Admin - Fri, 9 Jun 2023 07:47 UTC

gof-cut-this-news@cut-this-chmurka.net.invalid (Adam W.) writes:

> Adam W. <gof-cut-this-news@cut-this-chmurka.net.invalid> wrote:
>
>> I have cleanfeed installed. filter_innd.pl is a symlink to cleanfeed. I
>> would expect cleanfeed to reject certain posts posted to my server via
>> nnrpd (for example, binary postings to non-binary groups), and I vaguely
>> remember that it worked this way, but now it doesn't happen. Server
>> happily accepts these posts.
>
> An update.
>
> When I try to post an article with a forbidden subject (simpbiz.software),
> it gets rejected, so the filtering is enabled. But still, binary postings
> get through.
>
> I'm testing it with (prefixing here with : so it doesn't get flagged as a
> binary posting):
>
> : begin 664 test
> : `
> : end

Try to do bigger file, at leat couple of lines long.

Re: inn filtering question (and cleanfeed problem?)

<u5v2hb$94m$1$arnold@news.chmurka.net>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=1794&group=news.software.nntp#1794

  copy link   Newsgroups: news.software.nntp
Path: i2pn2.org!i2pn.org!news.chmurka.net!.POSTED.s.v.chmurka.net!not-for-mail
From: gof-cut-this-news@cut-this-chmurka.net.invalid (Adam W.)
Newsgroups: news.software.nntp
Subject: Re: inn filtering question (and cleanfeed problem?)
Date: Fri, 9 Jun 2023 11:30:51 -0000 (UTC)
Organization: news.chmurka.net
Message-ID: <u5v2hb$94m$1$arnold@news.chmurka.net>
References: <u5sogj$ish$6$arnold@news.chmurka.net> <u5sp6u$n3c$2$arnold@news.chmurka.net> <u5ulef$t35$1@neodome.net>
NNTP-Posting-Host: s.v.chmurka.net
Injection-Date: Fri, 9 Jun 2023 11:30:51 -0000 (UTC)
Injection-Info: news.chmurka.net; posting-account="arnold"; posting-host="s.v.chmurka.net:172.24.44.20";
logging-data="9366"; mail-complaints-to="abuse-news.(at).chmurka.net"
User-Agent: tin/2.6.1-20211226 ("Convalmore") (Linux/5.15.32-v7+ (armv7l))
Cancel-Lock: sha1:8y8TOAsF6S4tPi65qR+LVS3Ls6o=
sha1:+gfbY7klm5zKnqiCSFqv2mxa9XA= sha256:QXJe34mfrknJs7g8yOLkdMhWy8Zxgdr8f2PiZTZXWro=
sha1:LTT2//OIAZ+MbEC/YeJ+O5xU2Dk= sha256:1vfdqs2MPkbhadpWu9m2990SmThEU8NHtT/dGBFibgM=
 by: Adam W. - Fri, 9 Jun 2023 11:30 UTC

Neodome Admin <admin@neodome.net> wrote:

>> : begin 664 test
>> : `
>> : end
>
> Try to do bigger file, at leat couple of lines long.

It looks like it's triggered when the extension is .jpg.

The most important issue is that MIME-encoded binaries are accepted...

Re: inn filtering question (and cleanfeed problem?)

<u5v6di$olh$1@neodome.net>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=1795&group=news.software.nntp#1795

  copy link   Newsgroups: news.software.nntp
Path: i2pn2.org!i2pn.org!news.neodome.net!.POSTED!not-for-mail
From: admin@neodome.net (Neodome Admin)
Newsgroups: news.software.nntp
Subject: Re: inn filtering question (and cleanfeed problem?)
Date: Fri, 9 Jun 2023 12:37:06 -0000 (UTC)
Organization: Neodome
Message-ID: <u5v6di$olh$1@neodome.net>
References: <u5sogj$ish$6$arnold@news.chmurka.net>
<u5sp6u$n3c$2$arnold@news.chmurka.net> <u5ulef$t35$1@neodome.net>
<u5v2hb$94m$1$arnold@news.chmurka.net>
Mime-Version: 1.0
Content-Type: text/plain
Injection-Date: Fri, 9 Jun 2023 12:37:06 -0000 (UTC)
Injection-Info: neodome.net; mail-complaints-to="abuse@neodome.net"
User-Agent: Gnus/5.13 (Gnus v5.13)
 by: Neodome Admin - Fri, 9 Jun 2023 12:37 UTC

gof-cut-this-news@cut-this-chmurka.net.invalid (Adam W.) writes:

> Neodome Admin <admin@neodome.net> wrote:
>
>>> : begin 664 test
>>> : `
>>> : end
>>
>> Try to do bigger file, at leat couple of lines long.
>
> It looks like it's triggered when the extension is .jpg.

I think it will be triggered when you'll try to post actual file, not
something that is 0 bytes long, because it's looking for actual
UU-encoded string. I might be wrong, though.

> The most important issue is that MIME-encoded binaries are accepted...

I don't remember if I ever had issues with that, however, I always had
two more filters in filter_nnrpd.pl, I called them whitelisted headers
and blacklisted headers. "Blacklisted headers" were checks for any
headers that my server wouldn't allow, and "whitelisted headers" would
be headers that, if exist, should conform to some kind of regex. If you
don't want to see any kind of MIME messages with attachments, you can
try to "blacklist" any Content-Type header except of "text/plain", or,
perharps, you can "whitelist" Content-Type header that only says
"text/plain".

Take a look at "Perl Hooks" page:

<https://www.eyrie.org/~eagle/software/inn/docs/hook-perl.html>

Apparently, Content-Type is one of the "standard" headers that can be
processed by filter_innd.pl. As far as I know, absolute most of
MIME-conforming text messages would have "text/plain" string in
Content-Type header. Usually it's something like "text/plain;
charset=us-ascii".

Re: inn filtering question (and cleanfeed problem?)

<u5vqah$18h4m$1@news.trigofacile.com>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=1796&group=news.software.nntp#1796

  copy link   Newsgroups: news.software.nntp
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!news.trigofacile.com!.POSTED.san13-h02-176-143-2-105.dsl.sta.abo.bbox.fr!not-for-mail
From: iulius@nom-de-mon-site.com.invalid (Julien ÉLIE)
Newsgroups: news.software.nntp
Subject: Re: inn filtering question (and cleanfeed problem?)
Date: Fri, 9 Jun 2023 20:16:49 +0200
Organization: Groupes francophones par TrigoFACILE
Message-ID: <u5vqah$18h4m$1@news.trigofacile.com>
References: <u5sogj$ish$6$arnold@news.chmurka.net>
<u5sq5i$tf0$4@shakotay.alphanet.ch> <u5sth5$n3c$14$arnold@news.chmurka.net>
<u5t7fa$sii$1@shakotay.alphanet.ch> <u5t9vt$k7$1$arnold@news.chmurka.net>
<u5tao4$9tc$1@shakotay.alphanet.ch> <u5tfa6$k7$2$arnold@news.chmurka.net>
<u5timj$ava$3@shakotay.alphanet.ch>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 9 Jun 2023 18:16:49 -0000 (UTC)
Injection-Info: news.trigofacile.com; posting-account="julien"; posting-host="san13-h02-176-143-2-105.dsl.sta.abo.bbox.fr:176.143.2.105";
logging-data="1328278"; mail-complaints-to="abuse@trigofacile.com"
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0)
Gecko/20100101 Thunderbird/102.11.2
Cancel-Lock: sha1:1xoUp1ZiXCCGTAnDz0ctuXSb72I= sha256:hLAI6Y6qy92I21HK/lvK1xIsqrBTnYbNgr9mHmjxV+A=
sha1:hKnry86IIMrIiHx8pWxasoFWV+E= sha256:YOwQyO3vrjaRK2gaxQ6xmK6fHphkCkR8cj2WK2RVnT4=
In-Reply-To: <u5timj$ava$3@shakotay.alphanet.ch>
 by: Julien ÉLIE - Fri, 9 Jun 2023 18:16 UTC

Salut Marc,

>> 441 437 Binary: misplaced binary
>
> So, maybe I was wrong, and filter_nnrpd.pl AND filter_innd.pl (cleanfeed
> here) can transmit error messages to the user.

Yes, nnrpd transmits the very error message innd gives when trying to
inject the article. When POSTing, nnrpd just sends the article to local
innd or whichever server is specified in nnrpdposthost in inn.conf.

441 is a reject code for POST, followed with a comment. The comment is
the response from innd (437 reject code for IHAVE with the reason coming
from the Perl filter for innd).

--
Julien ÉLIE

« – Debout paresseux ! Le coq a déjà salué le soleil levant !
– Ben il n'a plus besoin de moi alors… laissez-moi dormir barbares ! »
(Astérix)

Re: inn filtering question (and cleanfeed problem?)

<u5vqal$18h4m$2@news.trigofacile.com>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=1797&group=news.software.nntp#1797

  copy link   Newsgroups: news.software.nntp
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!news.trigofacile.com!.POSTED.san13-h02-176-143-2-105.dsl.sta.abo.bbox.fr!not-for-mail
From: iulius@nom-de-mon-site.com.invalid (Julien ÉLIE)
Newsgroups: news.software.nntp
Subject: Re: inn filtering question (and cleanfeed problem?)
Date: Fri, 9 Jun 2023 20:16:52 +0200
Organization: Groupes francophones par TrigoFACILE
Message-ID: <u5vqal$18h4m$2@news.trigofacile.com>
References: <u5sogj$ish$6$arnold@news.chmurka.net>
<u5sq5i$tf0$4@shakotay.alphanet.ch> <u5sth5$n3c$14$arnold@news.chmurka.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 9 Jun 2023 18:16:53 -0000 (UTC)
Injection-Info: news.trigofacile.com; posting-account="julien"; posting-host="san13-h02-176-143-2-105.dsl.sta.abo.bbox.fr:176.143.2.105";
logging-data="1328278"; mail-complaints-to="abuse@trigofacile.com"
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0)
Gecko/20100101 Thunderbird/102.11.2
Cancel-Lock: sha1:dhbhaJaOjCxHWaco8IQsP61G/zE= sha256:lv+d3mfJ6Kx8+z57b8o3FKxmPK0SU7nbqqvVDa+h5pw=
sha1:9t9kxyf4l6/eLxbc+5vQmon8kNU= sha256:edE5tQFytEchM87C2qrZj6zyBPC4MkUtU9dIg4gjOuc=
In-Reply-To: <u5sth5$n3c$14$arnold@news.chmurka.net>
 by: Julien ÉLIE - Fri, 9 Jun 2023 18:16 UTC

Hi Adam,

> It gets even weirder. I had the default configuration:
>
> block_binaries => 1, # block misplaced binaries
> block_all_binaries => 0, # Reject all binary regardless of distribution
>
> I changed block_all_binaries to 1 just to be sure.

It should have worked with only block_binaries set to 1. Are you sure
you correctly reloaded the Perl filter after the change?
It may be worthwhile retrying.

> - File with no extension encoded with base64 is accepted. Example:

[...]

> - MIME-encoded image is accepted. Example (full post):
>
> : --------------AOXUEIFuRgZjEKO0fa0IFPxL
> : Content-Type: image/png; name="test.png"
> : Content-Disposition: attachment; filename="test.png"
> : Content-Transfer-Encoding: base64
> :
> : test
> :
> : --------------AOXUEIFuRgZjEKO0fa0IFPxL--

The attachment is not large enough, as Neodome Admin already spot.

Cleanfeed would have considered the article as a binary if there had
been more than max_base64_lines lines (150 by default).

--
Julien ÉLIE

« Ce qui m'intéresse chez une femme, c'est ce que je n'ose pas lui
demander. » (Wolinski)

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor