Solution to NFilter problems

NFilter didn't seem to be executing many lines which I had in my nfilter.dat file. These lines I copied from other users posts. It turns out that for these to function properly regexp must be turned on. To do this go to Edit-Configuration-General and check the "Enable Regular Expressions" box in NFilter.
This immediately caused a major problem. The line in nfilter.dat reading "rec.woodworking Drop xref:*:*:*:*" now caused every post to be dropped. The solution is to replace it with the following. To drop items xposted to 2 or more groups: rec.woodworking Drop xref:[^:]*:[^:]*:.* To drop items xposted to 3 or more groups: rec.woodworking Drop xref:[^:]*:[^:]*:[^:]*:.*
Filter for specific words in the subject line as follows. rec.woodworking Drop subject:.*[Jj][Ee][Ww][Ss].* This targets the word "Jews", with any combination of upper & lower case, anywhere in the subject line.
My nfilter.dat file works really well now and I've added the text to the end of this post. These have been tested by replacing "Drop" with "Flag:JEWS" as in the above example.
I had to learn the regexp syntax for this effort and I don't pretend to be an expert. So if those who are can improve on what I've done - please do, and post it.
Tutorials on Regular Expressions can be found at http://etext.lib.virginia.edu/helpsheets/regex.html http://sitescooper.org/tao_regexps.html
Art
PS Yes David, feel free to incorporate anything from this post into the faq.
********************************************** rec.woodworking Drop from:.*[Pp][Uu][Pp]+[Yy].* rec.woodworking Drop subject:.*[Jj][Ee][Ww][Ss].* rec.woodworking Drop subject:.*[Cc][Hh][Rr][Ii][Ss][Tt][Ii][Aa][Nn].* rec.woodworking Drop subject:.*[Mm][Uu][Ss][Ll][Ii][Mm].* rec.woodworking Drop subject:.*[Jj][Ee][Ss][Uu][Ss].* rec.woodworking Drop subject:.*[Pp][Ee][Nn][Ii][Ss].* rec.woodworking Drop subject:.*[Ff][Uu][Cc][Kk].* rec.woodworking Drop subject:.*[Cc][Oo][Cc][Kk].* rec.woodworking Drop subject:.*[Ss][Hh][Ii][Tt].* rec.woodworking Drop xref:.*rec/.pets.* #Drop x-posted to 3+ groups rec.woodworking Drop xref:[^:]*:[^:]*:[^:]*:.* #Drop x-posted to 2+ groups #rec.woodworking Drop xref:[^:]*:[^:]*:.*
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
wrote:

Should be a backslash \ instead of forward slash /

xref::([^:]+:)
xref::([^:]+:)
-- Regards, Doug Miller (alphageek-at-milmac-dot-com)
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Doug- Thanks for the / vs \ correction.
When I tested: rec.woodworking Flag:X-POST3+ xref::([^:]+:) I found it flags 4 or more xposted groups. Likewise, rec.woodworking Flag:X-POST2 xref::([^:]+:) flags 3 or more xposted groups.
In trying to flag 2+ groups the obvious rec.woodworking Flag:X-POST2 xref::([^:]+:) also flagged 3 or more xposted groups.
How would your expression be modified to select for 2+ groups?
When testing I created a second account for newsgroups and subscribed and unsubscribed to the wreck as many times as needed to test my different settings. This way I could use the real troll posts instead of running test posts everywhere. I also changed all Drops to Flags so I could see if the hits were on target vs false positives.
Art

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
wrote:

Hmmm. Back to the drawing board for me, I guess.

Dunno -- I thought the other would work. Frankly, I didn't pay much attention to whether it was catching 3+ crossposts or 4+, either way, I didn't want to see them. I'm not sure that we really want to kill posts that are cross-posted to more than just two groups: it seems legitimate to me that a post might be relevant to at least three of rec.woodworking, rec.crafts.woodturning, abpw, or abpf.
This works real well for me:
# KEEP anything crossposted to abpw, abpf, or rcw ... # rec.woodworking score:-100 xref:*alt.binaries.pictures.woodworking.* rec.woodworking score:-100 xref:*alt.binaries.pictures.furniture* rec.woodworking score:-100 xref:*rec.crafts.woodturning* # # ... and drop anything else that was crossposted into the alt. hierarchy # rec.woodworking score:+100 xref:*alt.* rec.woodworking drop score:100
-- Regards, Doug Miller (alphageek-at-milmac-dot-com)
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Thanks
--
Young Carpenter

"Violin playing and Woodworking are similar, it takes plenty of money,
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Site Timeline

HomeOwnersHub.com is a website for homeowners and building and maintenance pros. It is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.