🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.readers
4 messages
4 total messages Started by *selah* Fri, 26 Dec 1997 00:00
problem using score.spam in slrn
#37762
Author: *selah*
Date: Fri, 26 Dec 1997 00:00
15 lines
937 bytes
I read that to get slrn to use a spam filter you need to add "Include:
/local/lib/slrn/Score.spam" to the News/Score file. But when I did that I
got a fatal error message and slrn wouldn't start. It seems that our
system doesn't have the Score.spam file.

I was wondering if the file is included with the slrn files after
compiling or, if not, where to get it ? 

Thanks.

-- 
Remove nospam from address to reply.

Re: problem using score.spam in slrn
#37807
Author: Sylvain Robitaille
Date: Tue, 30 Dec 1997 00:00
114 lines
4569 bytes
On 26 Dec 1997 11:42:30 GMT, *selah* <soma@nospam.dorsai.org> wrote:

> I read that to get slrn to use a spam filter you need to add "Include:
> /local/lib/slrn/Score.spam" to the News/Score file. But when I did that I
> got a fatal error message and slrn wouldn't start. It seems that our
> system doesn't have the Score.spam file.
> 
> I was wondering if the file is included with the slrn files after
> compiling or, if not, where to get it ? 

This is actually a "local" feature I added to our installation of the
newsreader, since we have a large community of users, many of whom were
asking for some sort of global killfile.

I'll append the patch to add this feature after my signature. Note that
you can include any file you wish, (you would need to create your own
spam score file, though, I'm afraid).

-- 
----------------------------------------------------------------------
Sylvain Robitaille                              syl@alcor.concordia.ca

Assistant to the System Managers                  Concordia University
Computing Services Department                 Montreal, Quebec, Canada
----------------------------------------------------------------------

From: Sylvain Robitaille <syl@alcor.concordia.ca>
(With minor changes by Anne Bennett)

*** src/score.c.original	Sat Jul 12 16:29:01 1997
--- src/score.c	Mon Aug 18 20:42:51 1997
***************
*** 793,802 ****
     unsigned long today;
     int start_new_score = 0, score_has_expired = 0;
     unsigned int pscore_flags = 0;
     
     today = get_today ();
!    
!    if (Group_Score_Root != NULL)
       {
  	free_group_scores ();
       }
--- 793,812 ----
     unsigned long today;
     int start_new_score = 0, score_has_expired = 0;
     unsigned int pscore_flags = 0;
+    static int numfiles = 0;
     
     today = get_today ();
! 
! /***
!  *** 1997/08/15  Sylvain Robitaille  (sp_robi@alcor.concordia.ca)
!  *** ------------------------------------------------------------
!  ***
!  *** Added keyword "Include" causes this function to re-call itself,
!  *** but we only want it to call free_group_scores() the first time
!  *** through, or else we lose what was set previously. numfiles
!  *** counts the number of times the function has recursed.
!  ***/
!    if ((Group_Score_Root != NULL) && (numfiles == 0))
       {
  	free_group_scores ();
       }
***************
*** 852,857 ****
--- 862,905 ----
  	     continue;
  	  }
  	
+ /***
+  *** 1997/08/17  Sylvain Robitaille  (sp_robi@alcor.concordia.ca)
+  *** ------------------------------------------------------------
+  ***
+  *** What we want is a way to permit users to include a "machine wide"
+  *** score file, where we can maintain a list of usenet spammers for
+  *** instance, and we can kill those out of local newsgroups. This will of
+  *** course permit other flexibility, but in my mind, this is the main
+  *** objective.
+  ***/
+ 	if (!slrn_case_strncmp (lp, (unsigned char *)"Include:", 8))
+ 	  {
+ 	    int success;
+ 	    char include_file[SLRN_MAX_PATH_LEN];
+ 	    unsigned char *filename = lp + 8;
+ 
+ 	    filename = (unsigned char *) slrn_skip_whitespace ((char *) filename);
+ 	    slrn_make_home_filename (filename, include_file);
+ 	    numfiles++;  /* ensure included files won't clear previous work done. */
+ 	    slrn_trim_string(include_file);
+ 
+ 	    success = slrn_read_score_file(include_file);
+           numfiles--;
+ 	    if (success > 0)
+ 	      {
+ 		continue;
+ 	      }
+ 	    else if (success == 0)
+ 	      {
+ 		score_error ("Can't include file.", line, linenum, file);
+ 	      }
+ 	    else /* success < 0 */
+ 	      {
+ 		score_error ("Error in include file.", line, linenum, file);
+ 	      }
+ 	    goto error_return;
+ 	  }
+ 
  	if (!slrn_case_strncmp (lp, (unsigned char *)"Score:", 6))
  	  {
  	     unsigned char *lpp = lp + 6;

Re: problem using score.spam in slrn
#37811
Author: *selah*
Date: Wed, 31 Dec 1997 00:00
21 lines
1389 bytes
On 30 Dec 1997 08:39:38 GMT, Sylvain Robitaille <syl@alcor.concordia.ca> wrote:
>This is actually a "local" feature I added to our installation of the
>newsreader, since we have a large community of users, many of whom were
>asking for some sort of global killfile.
>
>I'll append the patch to add this feature after my signature. Note that
>you can include any file you wish, (you would need to create your own
>spam score file, though, I'm afraid).

Would appreicate any information on how to create the spam score file. 

I assume the file you included replaces the score.c file in slrn/src but
I'm not sure what syntax to use for the spam score file. Also, does
"Include: Score.spam" get used in the Score file? 

Thanks.
--
Remove nospam from address to reply.

Re: problem using score.spam in slrn
#37834
Author: Sylvain Robitaille
Date: Thu, 01 Jan 1998 00:00
89 lines
4372 bytes
On 31 Dec 1997 09:41:07 GMT, *selah* <soma@nospam.dorsai.org> wrote:

> Would appreicate any information on how to create the spam score file. 

Well, what I do is grab the headers of a message I find to be utter spam
and place those in the global score file as comments. Then, out of those
headers, I pick a regexp pattern which will with some certainty catch
similar messages in the future. A simplified example:

The user's Score file contains

Include: /local/lib/slrn/Score.spam

among other entries. In fact, my own score file contains several Include
lines, and I try and organize my score entries into the different files.

On this system, we keep the global score file in /local/lib/slrn/Score.spam,
which I maintain. A sample entry from this file (which is too long to post
is something like:

[*]
% What we want is to never see articles matching any of the following
% conditions:
 Score:: -9999
% 1997/08/17   (syl)
% Get money in the mail scam
% Subject: Do you like to receive $2 million ?
% Organization: World Online
% Message-ID: <5t66h2$53r$12431@news.worldonline.nl>
% NNTP-Posting-Host: nmgn1-p96.worldonline.nl
  From: mailservice@bulkmail\.net

There is much you can do, but you should monitor carefully using a low
(non-kill) score like -9998 for a while to be sure you don't get false
positives. You'll need to read the docs from the distribution for an
explanation of the settings above, but simplified it causes any message
with a From: line containing the string "mailservice@bulkmail.net" to be
killed (the user never needs to see it).

Once you're sure a particular formula doesn't catch false positives, you
can apply a kill score (-9999) to it, and never have to see those messages
again!  :-)

You'll actually need to be creative to find ways to catch all the possible
attempts some spam houses might try. These people know we're trying to
filter them, so they spend a lot of energy trying to get us to need to
loosen our filters, or live with false positives.

Unfortunately I don't have a magic formula. I take it one message at a
time, and try and pick the header(s) that will best identify only the
spam.

> I assume the file you included replaces the score.c file in slrn/src

It's a patch that gets applied to src/score.c, yes. From the top level of
the source tree, if you feed my previous post to the stdin of the patch
program, the changes should get automatically made for you. You'll need to
rebuild and re-install slrn, of course.

eg:
  : alcor[syl] /local/src/slrn/slrn-0.9.4.3; patch <globalscorefile.patch

will make the changes to the score.c file.

> but I'm not sure what syntax to use for the spam score file.

The syntax used for any included files is identical to the "regular" score
file syntax. The only difference is a new keyword, "Include" which causes
slrn to read the referenced file as though its contents were at that spot
in the score file.

> Also, does "Include: Score.spam" get used in the Score file? 

Yes it does. The syntax for Include is "Include: </path/to/file>"

Included files can themselves include other files, which can include still
other files. One must make certain however, not to create an endless loop
of file includes.

-- 
----------------------------------------------------------------------
Sylvain Robitaille                              syl@alcor.concordia.ca

Assistant to the System Managers                  Concordia University
Computing Services Department                 Montreal, Quebec, Canada
----------------------------------------------------------------------

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