Article View: news.software.nntp
Article #90952Re: Getting spamassassin and clamav as inn filters
From: Gea-Suan Lin
Date: Thu, 12 Oct 2023 04:26
Date: Thu, 12 Oct 2023 04:26
36 lines
1765 bytes
1765 bytes
On 2023-10-09, The Doctor <doctor@doctor.nl2k.ab.ca> wrote:
> Any recipes how?
Yeah, I just implemented a simple hack within `cleanfeed.local`. Have
tried, but not so useful. Still many spam into comp.lang.c and other
groups.
The most efficient way to avoid Google Groups spam for now is just
giving up anything from Google Groups.
```
use Mail::SpamAssassin;
my $sa_agent = Mail::SpamAssassin->new();
sub local_filter_last {
return unless $hdr{Path} =~ /google-groups\.googlegroups\.com/;
my %myhdr = %hdr;
delete $myhdr{__BODY__};
delete $myhdr{__LINES__};
my $header_str = join "\n", map { "$_: $hdr{$_}" } keys %myhdr;
my $article_str = "$header_str\n\n$hdr{__BODY__}";
my $mail = $sa_agent->parse($article_str);
my $status = $sa_agent->check($mail);
return reject("Reject Google Groups posting to $hdr{Newsgroups} by SpamAssassin") if $status->is_spam();
$status->finish();
$mail->finish();
return;
}
```
Technical Details
Message-ID:
<ug7sh8$pcc$1@colo-sc-1.gslin.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-mailReferences:
<ug14cb$a9g$15@gallifrey.nk.ca>Show Full Headers
Complete Article Headers
Message-ID: <ug7sh8$pcc$1@colo-sc-1.gslin.com> Subject: Re: Getting spamassassin and clamav as inn filters Date: Thu, 12 Oct 2023 04:26:16 +0000 From: Gea-Suan Lin <gslin@gslin.org> References: <ug14cb$a9g$15@gallifrey.nk.ca> 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: Hasname Injection-Date: Thu, 12 Oct 2023 04:26:16 -0000 (UTC) Injection-Info: colo-sc-1.gslin.com; posting-host="114-34-121-114.hinet-ip.hinet.net:114.34.121.114"; logging-data="25996"; mail-complaints-to="usenet@colo-sc-1.gslin.com" User-Agent: slrn/1.0.3 (Linux)