🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #231581

Re: filter on body

#231581
From: Rom
Date: Tue, 17 Mar 2009 16:37
47 lines
2714 bytes
On Tue, 17 Mar 2009 13:47:44 +0000, Whiskers wrote:

> On 2009-03-17, Piepkuiken <nee@ooknee.kr> wrote:
>> I want to make my newsreader automatically delete messages based on a 
>> keyword found in the BODY of the message (not the subject line).
>> such messages should either not be downloaded from the server or are 
>> downloaded to my pc and then deleted. either is acceptable.

>> (windows xp)
> 
> The body will have to be fetched before anything can be done with it. 

Dialog <http://www.40tude.com/dialog/> can filter bodies.
Download 2.0.15.1 and update to at least 2.0.15.41 from here:
<http://dialog.datalist.org/downloads/download.html>

Bodies must be downloaded for group(s) for body filtering/scoring:
Group menu > Default/Selected group options > Retrieving
[x]Retrieve bodies for all new messages

Here's the script:
<http://www.40tude.com/dialog/wiki/index.php/ScriptXBody>
Settings > Scripting > > Enable scripting (if not already).
Copy script into Settings > Scripting > Scripting... > Event scripts
tab > OnBeforeSavingMessage, then Script > Compile, and Script >
Reload all compiled script in Dialog's main window.

The script adds an X-Body1: header with the words (without spaces) of
the non-quoted text from the message body so can score/filter.

Filtering/scoring/actions:
Settings > Scoring and actions > Scoring and action rules tab.

Some examples:
[news.software.readers]
!delete Header "Linux" "Microsoft"
!delete Header {^(X-Body1: ).*?linux.*?}
!ignore,markread Header "someword"
+10 Header "Vista" "Win7"
-10 Header "boring"

See these topics in Dialog's Help:
Regular Expressions <dialog.chm::/RegularExpressions.htm>,
Scoring/Actions Syntax <dialog.chm::/scoringactionsyntax.htm>

-- 
Rom
Technical Details
Message-ID: <tt5ryla2e55s$.1w5w7vj3a3mhp.dlg@40tude.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!border1.nntp.ams.giganews.com!nntp.giganews.com!newsfeed.freenet.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
References: <49bf6457_3@news4us.nl> <slrngrvag0.bpi.catwheezel@ID-107770.user.individual.net>

Show Full Headers
Complete Article Headers
Message-ID: <tt5ryla2e55s$.1w5w7vj3a3mhp.dlg@40tude.net>
Subject: Re: filter on body
Date: Wed, 18 Mar 2009 03:37:34 +1100
From: Rom <-@-.invalid>
References: <49bf6457_3@news4us.nl> <slrngrvag0.bpi.catwheezel@ID-107770.user.individual.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!border1.nntp.ams.giganews.com!nntp.giganews.com!newsfeed.freenet.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
Newsgroups: news.software.readers
Lines: 47
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Trace: individual.net PyDzO/yLWFcKIGZi+Zxfcw/p77jNzlT0dCdz/kEh7jKay7jKdq
Cancel-Lock: sha1:CrPxQ9zlwlb+gWw74eoDDPkb+VA=
User-Agent: 40tude_Dialog/2.0.15.41
Archive: no
X-No-Archive: yes