🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #89854

Re: Cleanfeed & User-Agents

#89854
From: Julien ÉLIE
Date: Sun, 18 Dec 2022 21:33
45 lines
2433 bytes
Hi Grant,

> Does Cleanfeed support filtering based on User-Agent's out of the box?

It is the $Xbot variable at the very end of the configuration part of 
cleanfeed:

# assorted spamware names found in X-Newreader/X-Mailer/etc headers
$Xbot = ...



This pattern will match the following header fields:

# Attempt to determine the client software
sub x_reader {
     return  lc $hdr{'X-Newsreader'} ||
             lc $hdr{'User-Agent'}   ||
             lc $hdr{'X-Newsposter'} ||
             lc $hdr{'X-Poster'}     ||
             lc $hdr{'X-Mailer'}     || '';
}

$state{xreader} = x_reader();
return reject("X-Bot ($state{xreader})", 'Bot signature')
     if $state{xreader} =~ /$Xbot/;




> I assume that it can be made to do so with some effort if it doesn't 
> already do so.

You can naturally add your own rules in cleanfeed.local; you won't lose 
them in case you update cleanfeed.

if ($hdr{'User-Agent'} =~ /.../) {
     # what to do
}

-- 
Julien ÉLIE

« The first entry of Sin into the mind occurs when, out of cowardice or
   conformity or vanity, the Real is replaced by a comforting lie. »
Technical Details
Message-ID: <tno105$33orl$1@news.trigofacile.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: <tnd3au$d77$1@tncsrv09.home.tnetconsulting.net>

Show Full Headers
Complete Article Headers
Message-ID: <tno105$33orl$1@news.trigofacile.com>
Subject: Re: Cleanfeed & User-Agents
Date: Sun, 18 Dec 2022 22:33:57 +0100
From: Julien ÉLIE <iulius@nom-de-mon-site.com.invalid>
References: <tnd3au$d77$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: Groupes francophones par TrigoFACILE
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Sun, 18 Dec 2022 21:33:57 -0000 (UTC)
Injection-Info: news.trigofacile.com; posting-account="julien"; posting-host="176.143-2-105.abo.bbox.fr:176.143.2.105"; logging-data="3269493"; 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.6.0
Cancel-Lock: sha1:4hvcS5VukJHVRB4WyZ6MgZzz/RA= sha256:WRQEUlXjR1BPoGG1t4PiJqo9l8/JnIPaJsYF80MQWqo= sha1:x+HnNgHUgsHFOdcECDMfSf40Y/Y= sha256:uWaN6ZBr/617X06scf0DAdhDhQjD3XZMHvSSMxadSN8=
In-Reply-To: <tnd3au$d77$1@tncsrv09.home.tnetconsulting.net>
Lines: 44