🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.readers
7 messages
7 total messages Started by Ian Rastall Thu, 04 Aug 2005 03:14
[Dialog] Filter out poster and responses
#170497
Author: Ian Rastall
Date: Thu, 04 Aug 2005 03:14
10 lines
1763 bytes
I'm kind of dense when it comes to figuring out filtering rules for
Dialog. :-) I'm looking to filter out not just a poster, but every
response to said poster. I'm thinking this has to do with message-ID
and references, but that's about where my knowledge ends. Can anyone
lend a hand here?

TIA,
Ian
-- 
http://www.bookstacks.org/
Re: [Dialog] Filter out poster and responses
#170501
Author: John the R-T
Date: Thu, 04 Aug 2005 07:05
17 lines
2103 bytes
On Wed, 3 Aug 2005 23:14:38 -0400, Ian Rastall wrote:

> 'm kind of dense when it comes to figuring out filtering rules for
> Dialog. :-) I'm looking to filter out not just a poster, but every
> response to said poster. I'm thinking this has to do with message-ID
> and references, but that's about where my knowledge ends. Can anyone
> lend a hand here?

I'm just a novice but I use
!markread,ignore From "postername"

-- 
John the R-T
Do NOT reply to the heypete address.  Reply to is valid   
http://www.ukpeoplesilversurfers.co.uk - newsgroup web site
http://homepage.ntlworld.com/john.payne32/pages/ups-facilities.html
http://homepage.ntlworld.com/john.payne32/
Re: [Dialog] Filter out poster and responses
#170648
Author: Enrico Bauer
Date: Sat, 06 Aug 2005 13:11
22 lines
1973 bytes
04.08.2005 05:14:38, *Ian Rastall*:
> I'm kind of dense when it comes to figuring out filtering rules for
> Dialog. :-) I'm looking to filter out not just a poster, but every
> response to said poster.

!delete Message-ID "FQDN of the bad boy/girl"
!delete References "FQDN of the bad boy/girl"

> I'm thinking this has to do with message-ID and references, [...]

Right, you'll have to filter on the MID for the poster and that MID
again in the references. This is only possible if that particular poster
uses a FQDN, so that you can track it.

There's no way to do that with your posts and answers to it, but you can
practice with me ... ;-)

HTH
Enrico
-- 
No fear. No distractions. The ability to let that
which does not matter truly slide.
Re: [Dialog] Filter out poster and responses
#170931
Author: JoeB
Date: Tue, 09 Aug 2005 12:38
69 lines
3675 bytes
On Sat, 6 Aug 2005 15:11:19 +0200, Enrico Bauer wrote:

> 04.08.2005 05:14:38, *Ian Rastall*:
>> I'm kind of dense when it comes to figuring out filtering rules for
>> Dialog. :-) I'm looking to filter out not just a poster, but every
>> response to said poster.
> 
> !delete Message-ID "FQDN of the bad boy/girl"
> !delete References "FQDN of the bad boy/girl"
> 
>> I'm thinking this has to do with message-ID and references, [...]
> 
> Right, you'll have to filter on the MID for the poster and that MID
> again in the references. This is only possible if that particular poster
> uses a FQDN, so that you can track it.
> 
> There's no way to do that with your posts and answers to it, but you can
> practice with me ... ;-)
> 
> HTH
> Enrico

<delurk>

I originally started using Dialog because its scripting would let me do
this :-)

I have a script which works for me - it's a bit clunky, but it does the
job. I can post it if people would like...

Here's the readme:

// OnXover script to identify and kill posts by banned authors, and
// followups to those posts.

// How it works:
// As each set of headers are retrieved, the From and Message-ID headers
// are checked against lists of banned strings, allowing you to kill posts
// that are either from specific authors or posted through specific ISPs
// (for trolls who morph a lot.)
// If any of the banned strings are found anywhere in the relevant header,
// the message is killed and its message id is added to a list of banned
// message ids.
// If a message passes these two checks, its References header is checked
// against the list of banned message ids. If a match is found, then the
// message is a followup, and is killed.

// To use:
// 1) Create a folder called c:\killfile
// 2) In this folder create blank text files called
//      killmsg.txt
//      killmid.txt
//      killfrom.txt

// In killfrom.txt, enter the strings in the From: header that you want to
// kill on.
// For example, if you want to kill messages from Iamatroll@troll.biz you
// could put Iamatroll or @troll.biz in killfrom.txt.

// In killmid.txt, enter the strings in the Message-ID header that you want
// to kill on.
// For example, if you want to kill all posts from googlegroups, you could
// put googlegroups.com in killmid.txt

-- 
JoeB
I will not include a self-destruct mechanism unless absolutely necessary.
If it *is* necessary, it will not be a large red button labelled "Danger:
Do Not Push". - The Evil Overlord's Handbook
Re: [Dialog] Filter out poster and responses
#170932
Author: Enrico Bauer
Date: Tue, 09 Aug 2005 13:26
36 lines
3005 bytes
*JoeB*  09.08.2005:
> On Sat, 6 Aug 2005 15:11:19 +0200, Enrico Bauer wrote:
>> 04.08.2005 05:14:38, *Ian Rastall*:
>>> I'm kind of dense when it comes to figuring out filtering rules for
>>> Dialog. :-) I'm looking to filter out not just a poster, but every
>>> response to said poster.
>>> I'm thinking this has to do with message-ID and references, [...]
>> Right, you'll have to filter on the MID for the poster and that MID
>> again in the references. This is only possible if that particular poster
>> uses a FQDN, so that you can track it.
> <delurk>

Hi there! :-)

> I have a script which works for me - it's a bit clunky, but it does the
> job. I can post it if people would like...
> // OnXover script to identify and kill posts by banned authors, and
> // followups to those posts.
> // How it works:
> // As each set of headers are retrieved, the From and Message-ID headers
> // are checked against lists of banned strings, allowing you to kill posts
> // that are either from specific authors or posted through specific ISPs
> // (for trolls who morph a lot.)
> // If any of the banned strings are found anywhere in the relevant header,
> // the message is killed and its message id is added to a list of banned
> // message ids.

Brillant, Master Joe! Go ahead, show your script so we can test an wiki 
it!

Take care!
Enrico B.


-- 
My finger is on the button.
Re: [Dialog] Filter out poster and responses
#170941
Author: Disciple
Date: Tue, 09 Aug 2005 14:32
22 lines
1632 bytes
On Tue, 9 Aug 2005 13:38:31 +0100, JoeB wrote:

<snipped: for full text see JoeB's post above> 

> I originally started using Dialog because its scripting would let me do
> this :-)
> 
> I have a script which works for me - it's a bit clunky, but it does the
> job. I can post it if people would like...

<snipped script readme: for full text see JoeB's post above> 

I am new to scripting and have a difficult time visualizing some of the
concepts, so yes I would really appreciate seeing the actual script
text/structure.

Thank you for sharing.

-- 
Disciple - Team Z
And now abide faith, hope, love, these three; but the greatest of these is
love. 1 Cor. 13:13
Re: [Dialog] Filter out poster and responses
#170942
Author: JoeB
Date: Tue, 09 Aug 2005 15:11
190 lines
7835 bytes
On Tue, 09 Aug 2005 15:26:12 +0200, Enrico Bauer wrote:

> *JoeB*  09.08.2005:
>> On Sat, 6 Aug 2005 15:11:19 +0200, Enrico Bauer wrote:
>>> 04.08.2005 05:14:38, *Ian Rastall*:
>>>> I'm kind of dense when it comes to figuring out filtering rules for
>>>> Dialog. :-) I'm looking to filter out not just a poster, but every
>>>> response to said poster.
>>>> I'm thinking this has to do with message-ID and references, [...]
>>> Right, you'll have to filter on the MID for the poster and that MID
>>> again in the references. This is only possible if that particular poster
>>> uses a FQDN, so that you can track it.
>> <delurk>
> 
> Hi there! :-)
> 
>> I have a script which works for me - it's a bit clunky, but it does the
>> job. I can post it if people would like...
>> // OnXover script to identify and kill posts by banned authors, and
>> // followups to those posts.
>> // How it works:
>> // As each set of headers are retrieved, the From and Message-ID headers
>> // are checked against lists of banned strings, allowing you to kill posts
>> // that are either from specific authors or posted through specific ISPs
>> // (for trolls who morph a lot.)
>> // If any of the banned strings are found anywhere in the relevant header,
>> // the message is killed and its message id is added to a list of banned
>> // message ids.
> 
> Brillant, Master Joe! Go ahead, show your script so we can test an wiki 
> it!

Well, I'm not sure about "Master"... :-)

Script is given below between the //START and //END markers.

Known issues: It's pretty inefficient, and will slow down header retrieval.
Also it doesn't manage the list of banned message ids, so periodically you
have to go and clear out that file.

I would definitely welcome any comments or improvements people can think of
- especially to make it more elegant or efficient.

//START

program OnXover; 
// OnXover script to identify and kill posts by banned authors, and
// followups to those posts.

// How it works:
// As each set of headers are retrieved, the From and Message-ID headers
// are checked against lists of banned strings, allowing you to kill posts
// that are either from specific authors or posted through specific ISPs
// (for trolls who morph a lot.)
// If any of the banned strings are found anywhere in the relevant header,
// the message is killed and its message id is added to a list of banned
// message ids.
// If a message passes these two checks, its References header is checked
// against the list of banned message ids. If a match is found, then the
// message is a followup, and is killed.

// To use:
// 1) Create a folder called c:\killfile
// 2) In this folder create blank text files called
//      killmsg.txt
//      killmid.txt
//      killfrom.txt

// In killfrom.txt, enter the strings in the From: header that you want to
// kill on.
// For example, if you want to kill messages from Iamatroll@troll.biz you
// could put Iamatroll or @troll.biz in killfrom.txt.

// In killmid.txt, enter the strings in the Message-ID header that you want
// to kill on.
// For example, if you want to kill all posts from googlegroups, you could
// put googlegroups.com in killmid.txt

// set these variables as the paths to the working files
const
  KillFromFile = 'c:\killfile\killfrom.txt';
  KillMidFile = 'c:\killfile\killMid.txt';
  KillMsgIdFile = 'c:\killfile\killmsg.txt';
  
function CheckFrom(FromHeader : string): boolean;
// check if author is to be killed
VAR 
   BadFromList : TStringList;
   Counter : Integer;
   Position : Integer;
   LowFromHeader : String;
   LowBadFrom : String;
begin      
   Result := false;
   BadFromList := TStringList.Create();
   BadFromList.LoadFromFile(KillFromFile);
   for counter := 0 to BadFromList.Count - 1 do
   begin
   LowFromHeader := AnsiLowerCase(FromHeader)
   LowBadFrom := AnsiLowerCase(BadFromList[Counter])
   Position := AnsiPos(LowBadFrom, LowFromHeader)
   if Position <> 0 then Result := true;
   if Result = true then Break;
   end;
   BadFromList.free;
end;

function CheckMid(Mid : string): boolean;
// check if mid is to be killed
VAR 
   MidList : TStringList;
   Counter : Integer;
   Position : Integer; 
begin      
   Result := false;
   MidList := TStringList.Create();
   MidList.LoadFromFile(KillMidFile);
   for counter := 0 to MidList.Count - 1 do
   begin
   Position := AnsiPos(MidList[Counter], Mid)
   if Position <> 0 then Result := true;
   if Result = true then Break;
   end;
   //Result := MidList.indexof(Mid) > -1
   MidList.free;
end;

function CheckKnownId(KnownId : string): boolean;
// check to see if we already knowthis msgid so we don't add it again
VAR 
   KnownIdList : TStringList; 
begin
   KnownIdList := TStringList.Create();
   KnownIdlist.LoadFromFile(KillMsgIdFile);
   Result := KnownIdlist.indexof(KnownId) > -1 
   KnownIdList.free;
end;  

procedure AddNewId(NewId: string);
// add a new msgid to the kill list 
VAR 
   IdList: TStringList;  
begin
   IdList := TStringList.Create();
   IdList.LoadFromFile(KillMsgIdFile);
   IdList.Add(NewId);
   IdList.SaveToFile(KillMsgIdFile);
   IdList.Free;
end;

procedure OnXover(Var XoverData:TXoverData);
var 
   Msglist: TStringList; 
   n: integer;         
begin // check to see if we kill this author                 
   if CheckFrom(xoverdata.from) then
      // if we do, check to see if this is a new msgid 
       begin
         if not checkknownid(xoverdata.msgid) then // if it's new, add it 
         addnewid(xoverdata.msgid);
         xoverdata.deleted := true; // and kill the parent article  
       end;
   if CheckMid(xoverdata.msgid) then
      // if we do, check to see if this is a new msgid 
       begin
         if not checkknownid(xoverdata.msgid) then // if it's new, add it 
         addnewid(xoverdata.msgid);
         xoverdata.deleted := true; // and kill the parent article  
       end;
      // if it's not a killed mid, check to see if it's a followup  
      // if it's not a killed author, check to see if it's a followup   
   msglist := TStringList.Create();     
   msglist.LoadFromFile(KillMsgIdFile);   
   for n := 0 to msglist.count - 1 do 
   begin
      IF AnsiPos(msglist[n],XoverData.References)>0
      THEN xoverdata.deleted := true; // and kill the followup
   end
   msglist.free;    
end;   

begin
end.

//END

JoeB
-- 
The address in the headers is a spamtrap - please use joe at fallingonion
dot com if you prefer to use email.
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads