🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #88766

Re: Google Groups spam - INN/Cleanfeed/etc solutions?

#88766
From: Retro Guy
Date: Thu, 09 Sep 2021 09:06
34 lines
2365 bytes
On Wed, 8 Sep 2021 10:43:29 -0600
Grant Taylor <gtaylor@tnetconsulting.net> wrote:

> On 9/8/21 1:58 AM, yamo' wrote:
> > When I'll have time I will share the script gaved to me by another
> > newsmaster and some tricks of my conf.
> 
> I'd be interested in seeing said script / tricks.

I'd like to see this also to see where I can improve/replace the way I do it.

For my servers, I check in cleanfeed.local by sending a copy of the message to a script:

$tempfile = rand(100);
        $tempfileP = "check/".$tempfile;
        saveart($tempfileP);
        $spamvalue = `/usr/bin/php /news/spam/bin/spamassassin.php $tempfile`;
        $isspam = "/news/spam/found/".$tempfile;
        if (-e $isspam) {
            return reject('Exceeds Spam Level');
        }

So, if the file (copy of message) exists in /news/spam/found, it was identified as spam and is rejected.

The script I wrote in php as that's easy for me. It just accepts the file name as an argument and runs it through spamc:

$spamcommand = $spamc.' -E < '.$spamfile;
$spamresult = passthru($spamcommand, $res);

If it's identified as spam, it moves the file to /news/spam/found, where cleanfeed then sees it there.

Those steps were easy, the hardest part is your spamassassin 'local.cf' file, where you need to make quite a few adjustments for it to work well with a news article instead of an email.

Retro Guy
Technical Details
Message-ID: <20210909020647.4f2f445c753a0f4857d79173@novabbs.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mail
References: <slrnsjctbm.3ik08.jgoerzen@slrnh.complete.org> <sh9qf9$9ba$1@pi2.pasdenom.info> <shape2$h93$1@tncsrv09.home.tnetconsulting.net>

Show Full Headers
Complete Article Headers
Message-ID: <20210909020647.4f2f445c753a0f4857d79173@novabbs.com>
Subject: Re: Google Groups spam - INN/Cleanfeed/etc solutions?
Date: Thu, 9 Sep 2021 02:06:47 -0700
From: Retro Guy <retroguy@novabbs.com>
References: <slrnsjctbm.3ik08.jgoerzen@slrnh.complete.org> <sh9qf9$9ba$1@pi2.pasdenom.info> <shape2$h93$1@tncsrv09.home.tnetconsulting.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mail
Newsgroups: news.software.nntp
Organization: Rocksolid Light
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Info: i2pn2.org; posting-account="retrobbs1"; posting-host="10.136.143.187"; logging-data="25440"; mail-complaints-to="usenet@i2pn2.org"
X-Newsreader: Sylpheed 3.5.0beta1 (GTK+ 2.24.25; x86_64-pc-linux-gnu)
Lines: 33