Article View: news.software.readers
Article #216430Re: [Leafnode] Filter for cigs?
From: Peter J Ross
Date: Tue, 05 Feb 2008 00:38
Date: Tue, 05 Feb 2008 00:38
53 lines
2510 bytes
2510 bytes
In news.software.readers on Tue, 5 Feb 2008 09:29:40 +1100, andrew <andrew@ilium.invalid> wrote: > Hi, > > I am setting up a Leafnode-2 filter for the subject cigarettes as > follows: > > newsgroups = .* > pattern = ^Subject:.*[Cc]igarettes > action = kill > > but this primitive filter has a few shortcomings in that it does not > filter: > > 1. CIGARETTES > 2. cigarett > 3. cigarette > > All of which I have seen in various groups. Any thoughts? Try pattern = ^Subject:.*(?i)cigarett or, more elaborately and probably unnecessarily so: pattern = ^Subject:.*(?i)\bcigarett(e|es|)\b "(?i)" makes whatever follows case-insensitive. "\b" matches a word boundary. "(e|es|)" matches "e", "es" or nothing. Leafnode fully supports PCRE, so you can use all the features described in the manual: $ man 3 pcrepattern Personally, I'd be inclined to do something like this: newsgroups = .* pattern = ^References: action = 2 pattern = ^Subject:.*(?i)cigarett action = -1 pattern = ^Subject:.*(?i)nike.*jordan action = -1 # [etc.] That will kill spam that doesn't have a References: line, but not replies asking how to filter it. -- PJR :-)
Technical Details
Message-ID:
<slrnfqfc11.8jl.pjr@pjr.gotdns.org>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!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!news.albasani.net!news.motzarella.org!motzarella.org!not-for-mailReferences:
<20080205092408@ilium.andrews-corner.org>Show Full Headers
Complete Article Headers
Message-ID: <slrnfqfc11.8jl.pjr@pjr.gotdns.org> Subject: Re: [Leafnode] Filter for cigs? Date: Tue, 05 Feb 2008 00:38:57 +0000 From: Peter J Ross <pjr@example.invalid> References: <20080205092408@ilium.andrews-corner.org> 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!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!news.albasani.net!news.motzarella.org!motzarella.org!not-for-mail Newsgroups: news.software.readers Organization: none Lines: 53 Reply-To: Peter J Ross <pjr.spam@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: feeder.motzarella.org U2FsdGVkX1/TR73coyUBM0zoDoJwbbq7GCVf6x1a4rZFrbqgnfjgPHBHAl0oP7GlQAJqCERuouRMaxQqalyukv24esLf49MM9LoNa1sJEF//NMXXTmd2rpWOqaiXyf8sB7CEIDN1aXM= X-Complaints-To: Please send complaints to abuse@motzarella.org with full headers NNTP-Posting-Date: Tue, 5 Feb 2008 00:40:06 +0000 (UTC) X-Auth-Sender: U2FsdGVkX19js/laKjSyymh/qDnoZOu+ Cancel-Lock: sha1:9F84xzl1aRlgOnzRx+ZsiamPooE= User-Agent: slrn/pre0.9.9-82 (Linux)