Thread View: news.software.readers
18 messages
18 total messages
Started by Mike Mckinney
Tue, 02 Jul 1996 00:00
killing spam crossposts in slrn ?
Author: Mike Mckinney
Date: Tue, 02 Jul 1996 00:00
Date: Tue, 02 Jul 1996 00:00
22 lines
869 bytes
869 bytes
Can anyone tell me the correct syntax for the slrn score file,
if I want to kill any post that was posted to more than 10
news groups?
For some reason, using:
Xref: :.*\{10,\}
or:
Xref: :.*:\{10,\}
Does not seem to work.
Any help would be appreciated.
mike@bga.com
Re: killing spam crossposts in slrn ?
Author: Mike Mckinney
Date: Tue, 02 Jul 1996 00:00
Date: Tue, 02 Jul 1996 00:00
47 lines
2071 bytes
2071 bytes
On 2 Jul 1996 18:21:22 GMT, John E. Davis <davis@space.mit.edu> wrote:
>On 2 Jul 1996 07:39:27 GMT, Mike Mckinney <mike@bga.com>
>wrote:
> : if I want to kill any post that was posted to more than 10
> : news groups?
> : For some reason, using:
> :
> : Xref: :.*\{10,\}
>
>Use:
>
> Xref: :.*:.*:.*:.*:.*:.*:.*:.*:.*:.*:
>
>I think I will extend the syntax of the Xref score to support something like
>
> Xref:>10
Yes, I finally went ahead and set it up that way, mainly what
I was curious about is why it would'nt work the other way...
mainly because I wanted to Score it with the shortest possible
line..See what I mean.
The other thing I was curious about, is what regexp's slrn does
support, and which it does'nt..I can find no reference telling
me this information, and it's a lengthy process to try and de-
termine by trial & error. Is there any reference on this that I
missed?
For instance, I now know that slrn does'nt suport the \{10,\}
regexp syntax, but it took like 2 hours of editing the score
file, exiting the group, and then reentering to check whether
it worked..I would like to shorten this trial & error period
if possible.
That would be great, adding support for the > in the Score file
also.
Thanks for writing a really great news reader, it's 100% better
& faster than any other I've tried.
mike@bga.com
Re: killing spam crossposts in slrn ?
Author: John E. Davis
Date: Tue, 02 Jul 1996 00:00
Date: Tue, 02 Jul 1996 00:00
24 lines
1146 bytes
1146 bytes
On 2 Jul 1996 07:39:27 GMT, Mike Mckinney <mike@bga.com>
wrote:
: if I want to kill any post that was posted to more than 10
: news groups?
: For some reason, using:
:
: Xref: :.*\{10,\}
Use:
Xref: :.*:.*:.*:.*:.*:.*:.*:.*:.*:.*:
I think I will extend the syntax of the Xref score to support something like
Xref:>10
--
John E. Davis Center for Space Research/AXAF Science Center
617-258-8119 MIT 37-662c, Cambridge, MA 02139
http://space.mit.edu/~davis
Re: killing spam crossposts in slrn ?
Author: J.B. Nicholson-Owens
Date: Wed, 03 Jul 1996 00:00
Date: Wed, 03 Jul 1996 00:00
24 lines
1413 bytes
1413 bytes
On 2 Jul 1996 18:21:22 GMT, John E. Davis <davis@space.mit.edu> wrote:
> I think I will extend the syntax of the Xref score to support something like
>
> Xref:>10
How about adding support for grouping using \( and \) or \[ and \], thus
Xref: :.*:.*:.*:.*:.*:.*:.*:.*:.*:.*:
could be shortened to
Xref: \(:.*\)\{10,\}: % don't forget the trailing colon
Also, what do you think of adding some way to say OR in a regexp, so you
could get rid of the multiple regexp for slrn's ignore_quotes setting?
Thanks for implementing enhanced regexp (well, compared to my systems regexp
S-Lang's regexp is enhanced). I wish I had it in my RDBMS SQL.
--
Due to local news server and feed problems, I might not see all followups.
Re: killing spam crossposts in slrn ?
Author: Mike Mckinney
Date: Fri, 05 Jul 1996 00:00
Date: Fri, 05 Jul 1996 00:00
20 lines
1298 bytes
1298 bytes
>could be shortened to
>
> Xref: \(:.*\)\{10,\}: % don't forget the trailing colon
Well, either slrn is buggy on the regexp side, or I'm doing something
wrong, because I've tried several groups, with many many x-posts to
at least 15 groups, and sometimes as many as 50, and this score does
not kill them.
I tried it exactly as posted, and I tried without the \ around the {'s,
but neither helped..
Anyone have a comment on this? Has anyone actually gotten this score or
something similiar to work?
mike@bga.com
Re: killing spam crossposts in slrn ?
Author: Conrad Sabatier
Date: Fri, 05 Jul 1996 00:00
Date: Fri, 05 Jul 1996 00:00
34 lines
1852 bytes
1852 bytes
In article <slrn4tqpaf.19r.mike@apm0-43.realtime.net>,
Mike Mckinney <mike@bga.com> wrote:
>>could be shortened to
>>
>> Xref: \(:.*\)\{10,\}: % don't forget the trailing colon
> Well, either slrn is buggy on the regexp side, or I'm doing something
> wrong, because I've tried several groups, with many many x-posts to
> at least 15 groups, and sometimes as many as 50, and this score does
> not kill them.
> I tried it exactly as posted, and I tried without the \ around the {'s,
> but neither helped..
> Anyone have a comment on this? Has anyone actually gotten this score or
> something similiar to work?
I'm using trn, but the idea is the same. A simple way to do it is to
count the commas in the Newsgroups line, e.g.,
/.*,.*,.*,.*,/HNewsgroups:j
would kill any post that was crossposted to five or more groups.
You could do the same with the Xref line, e.g.,
/.*:.*:.*:.*:/HXref:j
I know the syntax is different for slrn, but you get the idea, right?
:-)
--
Conrad Sabatier -- http://www.neosoft.com/~conrads
Re: killing spam crossposts in slrn ?
Author: jamie
Date: Sat, 06 Jul 1996 00:00
Date: Sat, 06 Jul 1996 00:00
28 lines
1427 bytes
1427 bytes
On 3 Jul 1996 20:53:28 GMT, J.B. Nicholson-Owens <jbn@mystery-train.cu-online.com> wrote:
>On 2 Jul 1996 18:21:22 GMT, John E. Davis <davis@space.mit.edu> wrote:
>> I think I will extend the syntax of the Xref score to support something like
>>
>> Xref:>10
>
>How about adding support for grouping using \( and \) or \[ and \], thus
>
> Xref: :.*:.*:.*:.*:.*:.*:.*:.*:.*:.*:
Tried that....doesn't work.
>could be shortened to
>
> Xref: \(:.*\)\{10,\}: % don't forget the trailing colon
tried that, too, with and without \ on the curly braces.
....doesn't work. (slrn 8.8.3beta)
--
jamie (email via mike@bga.com)
"There's a seeker born every minute."
--Firesign Theatre
Re: killing spam crossposts in slrn ?
Author: John E. Davis
Date: Sat, 06 Jul 1996 00:00
Date: Sat, 06 Jul 1996 00:00
24 lines
1555 bytes
1555 bytes
On 5 Jul 1996 18:55:36 GMT, Mike Mckinney <mike@bga.com>
wrote:
: >could be shortened to
: >
: > Xref: \(:.*\)\{10,\}: % don't forget the trailing colon
:
: Well, either slrn is buggy on the regexp side, or I'm doing something
: wrong, because I've tried several groups, with many many x-posts to
: at least 15 groups, and sometimes as many as 50, and this score does
: not kill them.
While slrn supports the regular expression \{x,y\}, it does not support such
an expression applied to a group. For the time being, you will have to use:
Xref: :.*:.*:.*:.*:.*:.*:.*:.*:.*:
--
John E. Davis Center for Space Research/AXAF Science Center
617-258-8119 MIT 37-662c, Cambridge, MA 02139
http://space.mit.edu/~davis
Re: killing spam crossposts in slrn ?
Author: jamie
Date: Sat, 06 Jul 1996 00:00
Date: Sat, 06 Jul 1996 00:00
39 lines
1801 bytes
1801 bytes
On 2 Jul 1996 18:21:22 GMT, John E. Davis <davis@space.mit.edu> wrote:
>On 2 Jul 1996 07:39:27 GMT, Mike Mckinney <mike@bga.com>
>wrote:
> : if I want to kill any post that was posted to more than 10
> : news groups?
> : For some reason, using:
> :
> : Xref: :.*\{10,\}
>
>Use:
>
> Xref: :.*:.*:.*:.*:.*:.*:.*:.*:.*:.*:
This isn't working for me (slrn8.8.3beta), but I think it might be
because I don't get XOVER info (symptoms: even before I started to
try scoring spam crossposts, articles that I've already read in one
newsgroup were being displayed again when I come to them in the next
newsgroup).
However, Newsgroups: ,.*,.*,.*,.*,.*,.*,.* works,
but it takes SO LONG, it isn't worth using.
How do I actually determine if I am or am not getting the XOVER info,
and if not, what exactly do I ask my provider to change for them to
start sending it?
I had a patch for 8.8.2 that someone posted in here that handled
crossposts without XOVER for me, but I lost it when I upgraded to
8.8.3
--
jamie (email via mike@bga.com)
"There's a seeker born every minute."
--Firesign Theatre
Re: killing spam crossposts in slrn ?
Author: Felix von Leitner
Date: Sat, 06 Jul 1996 00:00
Date: Sat, 06 Jul 1996 00:00
217 lines
5859 bytes
5859 bytes
-----BEGIN PGP SIGNED MESSAGE-----
On 6 Jul 1996 13:31:16 GMT, jamie <jamie@bozo.local.net> wrote:
> I had a patch for 8.8.2 that someone posted in here that handled
> crossposts without XOVER for me, but I lost it when I upgraded to
> 8.8.3
I was thw one who posted it. I ported it to 0.8.8.3 now and here it
comes again.
BTW: The alt.fan.warlord patch is integrated into the base slrn
distribution now. The PGP patch still works without modification. The
tilde patch had to be modified slightly, too. I will post it, too.
Felix
- --- slrn/src/killdupe.c.orig Sun Jun 30 16:40:37 1996
+++ slrn/src/killdupe.c Sun Jun 30 16:40:37 1996
@@ -0,0 +1,125 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+unsigned short hash(const char *c) {
+ unsigned i=0;
+ while (*c) {
+ i=(i*7+(int) *c) % 4096;
+ c++;
+ }
+ return i;
+}
+
+struct node {
+ char *key,*key2;
+ struct node *next;
+};
+
+static struct node *hashtab[4096];
+static struct node *newsgroups[4096];
+static int dontgrow=0;
+
+void dump_hash(struct node *ht[]) {
+ int i;
+ struct node *h;
+ for (i=0;i<4096;i++) {
+ h=ht[i];
+ while (h) {
+ printf("%s %s\n",h->key,h->key2);
+ h=h->next;
+ }
+ }
+}
+
+struct node *hash_there(struct node *ht[], const char *c) {
+ int h=hash(c);
+ struct node *n=ht[h];
+ while (n) {
+ if (strcmp(n->key,c) == 0) {
+ return n;
+ }
+ n=n->next;
+ }
+ return 0;
+}
+
+int hash_add(struct node *ht[], const char *c, const char *second) {
+ int h=hash(c);
+ struct node *n=ht[h];
+ while (n) {
+ if (strcmp(n->key,c) == 0) {
+ return 1;
+ }
+ n=n->next;
+ }
+ if (dontgrow) return 0;
+ n=malloc(sizeof(struct node));
+ if (n == NULL) {
+ dontgrow=1;
+ return 0;
+ }
+ n->next = ht[h];
+ n->key = malloc(strlen(c)+1);
+ if (n->key==NULL) {
+ dontgrow=1;
+ return 0;
+ }
+ strcpy(n->key,c);
+ if (second) {
+ n->key2 = malloc(strlen(second)+1);
+ if (n->key2==NULL) {
+ dontgrow=1;
+ return 0;
+ }
+ strcpy(n->key2,second);
+ }
+ ht[h]=n;
+ return 0;
+}
+
+void inithashtab() {
+ int i;
+ for (i=0;i<4096;i++) {
+ hashtab[i]=0;
+ newsgroups[i]=0;
+ }
+}
+
+char *there(const char *c) {
+ struct node *n=hash_there(hashtab,c);
+ if (n)
+ return n->key2;
+ else
+ return NULL;
+}
+
+void add(const char *c,const char *n) {
+ hash_add(hashtab,c,n);
+}
+
+char *alloc_newsgroup(const char *c) {
+ struct node *n=hash_there(newsgroups,c);
+ if (n) return n->key;
+ hash_add(newsgroups,c,NULL);
+ n=hash_there(newsgroups,c);
+ return n->key;
+}
+
+/*
+int main()
+{
+ char s[1024];
+ int i;
+ inithashtab();
+ while (gets(s)) {
+ i = there(s);
+ if (i) {
+ printf("Huh: %d %s\n",i,s);
+ } else {
+ i=add(s);
+ }
+ }
+ return 0;
+}
+*/
- --- slrn/src/killdupe.h.orig Sun Jun 30 16:40:37 1996
+++ slrn/src/killdupe.h Sun Jun 30 16:40:37 1996
@@ -0,0 +1,5 @@
+
+void inithashtab(); /* Initialize the msgid dupe killer */
+char *there(const char *c); /* return newsgroup where c was first sighted or NULL */
+void add(const char *c,const char *n); /* add c in newsgroup n. */
+char *alloc_newsgroup(const char *c); /* if given a newsgroup, return a pointer to a string where it will be stored, so that newsgroups don't need to be allocated 1000 times */
- --- slrn/src/modules.lis.orig Fri Jun 28 19:37:02 1996
+++ slrn/src/modules.lis Sun Jun 30 16:40:37 1996
@@ -10,4 +10,5 @@
uudecode
mime
menu
+killdupe
server
- --- slrn/src/score.c.orig Fri Jun 28 19:37:01 1996
+++ slrn/src/score.c Sun Jun 30 16:41:25 1996
@@ -14,6 +14,7 @@
#include "score.h"
#include "misc.h"
#include "server.h"
+#include "killdupe.h"
/* This file will implement article scoring for slrn. Basically the idea is
* that the user will provide a set of regular expressions that will act on
@@ -134,6 +135,12 @@
char *s = NULL;
int ival = 0;
+ if ((s=there(h->msgid))) { /* This article is a dupe. */
+ if (strcmp(s,newsgroup)) return (-9999);
+ /* Kill it if this wasn't the newsgroup were we saw it */
+ }
+ add(h->msgid,alloc_newsgroup(newsgroup));
+ s=NULL;
st = Score_Root;
while (st != NULL)
- --- slrn/src/slrn.c.orig Fri Jun 28 19:37:01 1996
+++ slrn/src/slrn.c Sun Jun 30 16:41:12 1996
@@ -48,6 +48,7 @@
#include "startup.h"
#include "art.h"
#include "score.h"
+#include "killdupe.h"
#ifdef __os2__
# define INCL_VIO
@@ -821,6 +822,7 @@
slrn_exit_error ("Unable to select object.");
}
+ inithashtab();
fprintf (stdout, "slrn %s\n", Slrn_Version);
if (dsc_flag && create_flag)
-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: latin1
iQCVAwUBMd74CB/Da1Yoy+f1AQFFsAP+JtfFW7D9D3SBZorfcrTKUA097INjD6Iu
h9Ge9Uawfdl005Noez+cbTYWX64BEoBp8wubd4Ift46MAviSqbMlRmYm2qSU2u/n
KP0aRNYfYfc4iPjHK6NWfoWSjW+/0eaAtXHiiK09RE62y1BR9F5YwAGD8SQEVsKf
XrPETMd6UDk=
=/14b
-----END PGP SIGNATURE-----
Re: killing spam crossposts in slrn ?
Author: jamie
Date: Sat, 06 Jul 1996 00:00
Date: Sat, 06 Jul 1996 00:00
18 lines
1216 bytes
1216 bytes
On 6 Jul 1996 06:02:01 GMT, John E. Davis <davis@space.mit.edu> wrote:
>
>While slrn supports the regular expression \{x,y\}, it does not support such
>an expression applied to a group. For the time being, you will have to use:
>
> Xref: :.*:.*:.*:.*:.*:.*:.*:.*:.*:
This isn't working for me in slrn8.8.3beta.
--
jamie (email via mike@bga.com)
"There's a seeker born every minute."
--Firesign Theatre
Re: killing spam crossposts in slrn ?
Author: jamie
Date: Sat, 06 Jul 1996 00:00
Date: Sat, 06 Jul 1996 00:00
33 lines
1328 bytes
1328 bytes
On 2 Jul 1996 18:21:22 GMT, John E. Davis <davis@space.mit.edu> wrote:
>On 2 Jul 1996 07:39:27 GMT, Mike Mckinney <mike@bga.com>
>wrote:
> : if I want to kill any post that was posted to more than 10
> : news groups?
> : For some reason, using:
> :
> : Xref: :.*\{10,\}
>
>Use:
>
> Xref: :.*:.*:.*:.*:.*:.*:.*:.*:.*:.*:
This doesn't work. Nor does Newsgroups: ,.*,.*,.*,.*,.*,.*,.*,.*,.*
(I'm using slrn 8.8.3beta)
>I think I will extend the syntax of the Xref score to support something like
>
> Xref:>10
That would be nice.
--
jamie (email via mike@bga.com)
"There's a seeker born every minute."
--Firesign Theatre
Re: killing spam crossposts in slrn ?
Author: jamie
Date: Sat, 06 Jul 1996 00:00
Date: Sat, 06 Jul 1996 00:00
16 lines
1142 bytes
1142 bytes
On 5 Jul 1996 23:56:09 GMT, Conrad Sabatier <conrads@dolphin.neosoft.com> wrote: > >I know the syntax is different for slrn, but you get the idea, right? oh, yes, got the idea....just can't seem to get any of them to actually WORK in slrn8.8.3beta. -- jamie (email via mike@bga.com) "There's a seeker born every minute." --Firesign Theatre
Re: killing spam crossposts in slrn ?
Author: jamie
Date: Sun, 07 Jul 1996 00:00
Date: Sun, 07 Jul 1996 00:00
18 lines
1187 bytes
1187 bytes
On 6 Jul 1996 23:35:52 GMT, Felix von Leitner <leitner@xorn.prz.tu-berlin.de> wrote: >-----BEGIN PGP SIGNED MESSAGE----- > >On 6 Jul 1996 13:31:16 GMT, jamie <jamie@bozo.local.net> wrote: >> I had a patch for 8.8.2 that someone posted in here that handled >> crossposts without XOVER for me, but I lost it when I upgraded to >> 8.8.3 > >I was thw one who posted it. I ported it to 0.8.8.3 now and here it >comes again. Thanks! --jamie
Re: killing spam crossposts in slrn ?
Author: Conrad Sabatier
Date: Mon, 08 Jul 1996 00:00
Date: Mon, 08 Jul 1996 00:00
25 lines
1446 bytes
1446 bytes
In article <slrn4u2jrg.l2m.bet@ritz.mordor.com>, Bennett Todd <bet@mordor.com> wrote: >On 6 Jul 1996 06:02:01 GMT, John E. Davis <davis@space.mit.edu> wrote: >> >> Xref: :.*:.*:.*:.*:.*:.*:.*:.*:.*: > >I have been using that spam-slayer with glee; however, I've found it still >misses some. Don't know why, but it seems like the Xref header isn't always >working. So I added > > Newsgroups: ,.*,.*,.*,.*,.*,.*,.*,.*,.*, > >and that nailed 'em. Yes, using the newsgroups line rather than xref does seem more reliable for some reason. BTW, you're far more generous than I; I kill anything with five (or more) commas. :-) -- Conrad Sabatier -- http://www.neosoft.com/~conrads
Re: killing spam crossposts in slrn ?
Author: Bennett Todd
Date: Mon, 08 Jul 1996 00:00
Date: Mon, 08 Jul 1996 00:00
17 lines
1219 bytes
1219 bytes
On 6 Jul 1996 06:02:01 GMT, John E. Davis <davis@space.mit.edu> wrote: > > Xref: :.*:.*:.*:.*:.*:.*:.*:.*:.*: I have been using that spam-slayer with glee; however, I've found it still misses some. Don't know why, but it seems like the Xref header isn't always working. So I added Newsgroups: ,.*,.*,.*,.*,.*,.*,.*,.*,.*, and that nailed 'em. -Bennett
Re: killing spam crossposts in slrn ?
Author: Lars Balker Rasmussen
Date: Tue, 09 Jul 1996 00:00
Date: Tue, 09 Jul 1996 00:00
24 lines
1549 bytes
1549 bytes
bet@mordor.com (Bennett Todd) writes: > On 6 Jul 1996 06:02:01 GMT, John E. Davis <davis@space.mit.edu> wrote: > > Xref: :.*:.*:.*:.*:.*:.*:.*:.*:.*: > > I have been using that spam-slayer with glee; however, I've found it still > misses some. Don't know why, but it seems like the Xref header isn't always > working. So I added > > Newsgroups: ,.*,.*,.*,.*,.*,.*,.*,.*,.*, > > and that nailed 'em. You typically don't have all the newsgroups a given spam is crossposted to. Xref states what article-numbers in what groups the article represents on your news-server. Hence, the foo.blah group will not be mentioned in the Xref field, if your server doesn't carry that group. HTH, -- Lars Balker Rasmussen <URL:http://www.daimi.aau.dk/~gnort/> <URL:mailto:lars@rasmussen.org>
Re: killing spam crossposts in slrn ?
Author: J.B. Nicholson-Owens
Date: Tue, 09 Jul 1996 00:00
Date: Tue, 09 Jul 1996 00:00
21 lines
1642 bytes
1642 bytes
On 8 Jul 1996 19:01:39 GMT, Conrad Sabatier <conrads@dolphin.neosoft.com> wrote: > Yes, using the newsgroups line rather than xref does seem more > reliable for some reason. It's because Xref: only lists crossposted groups your server carries whereas Newsgroups: lists all the groups to which that article was posted. For any crosspost (that is, any article simultaneously posted to two or more newsgroups) Newsgroups: will be the only 100% accurate list of groups to which that article was posted. Even if your site gets every Usenet group available to it, there are some local and licensed groups involved, which means they're listed in the Newsgroups: header but not the Xref: header. Xref: is in the overview data, Newsgroups: is not, therefore scoring on Xref: is faster. -- Due to local news server and feed problems, I might not see all followups.
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