jp@tygra.Michigan.COM (John Palmer) (05/11/91)
I need to find a way to exclude all posts from a particular site from even making it into my junk group let alone any other groups. The: sitea/siteb:groups,.... in "sys" wont't work because that excludes all articles that have been through siteb, not just those that have come from siteb. BNEWS had an "excluded user" file. I'm running CNEWS, March-25-1990. Does a newer version have such a feature? I hate hacking relaynews any more than I've already done, but have had to for the time being. Below is the modification (including a new function that I wrote for "procart.c") to take care of this one site. The name's hardwired into the function, as you can see. John Palmer /* This function, gets the name of the site from which the article came * from the Path: header. Didn't see anything like this in * libcnews/string.c, so I wrote it myself. */ /* * Return name of original site which sent this article * */ void senthost(path,host) char *path; char host[]; { char *p,*p2; if (strchr(path,'!') == NULL) { strcpy(host, hostname()); return; } p = path+(strlen(path)-1); while (*p != '!') p--; p2 = p-1; while ((*p2 != '!') && (p2 != path)) p2--; if (*p2 == '!') p2++; *p = '\0'; strcpy(host, p2); *p = '!'; } /* * Reject articles. This can be arbitrarily picky. * Only the headers are used to decide, so this can be called before * the article is filed. * Be sure to put the fastest tests first, especially if they often result * in rejections. * NOTE from John Palmer, 05-10-91: This function is in charge or rejecting * articles that fail several tests for validity (like duplication, etc) * I've just added another nested IF to test what senthost returns to * see if its the offending site. This is probably slowing relaynews down * quite a bit, but I see no choice. */ void reject(art) register struct article *art; { register char *msgid = art->h.h_msgid; register char *path = art->h.h_path; register char *ngs = art->h.h_ngs; register char *from = art->h.h_sender; char snthost[60]; senthost(path,snthost); /* extract name of sending host from Path: */ if (path == NULL) { prefuse(art); (void) printf("no Path: header\n"); } else if (msgid == NULL || msgid[0] == '\0') { prefuse(art); (void) printf("missing Message-ID\n"); } else if (strchr(msgid, ' ') != NULL || strchr(msgid, '\t') != NULL) { prefuse(art); (void) printf("whitespace in Message-ID\n"); } else if (!strcmp(snthost,"zorch")) { prefuse(art); /* Dump it: More of Kent's ravings */ (void) printf("whoops - caught one from zorch\n"); } else if (msgid[0] != '<' || msgid[strlen(msgid)-1] != '>') { prefuse(art); (void) printf("<> brackets missing in Message-ID\n"); } else if (alreadyseen(msgid)) { prefuse(art); (void) printf("duplicate\n"); } else if (path != NULL && hopcount(path) > 0 && !ngmatch(oursys()->sy_ngs, ngs)) { extern boolean histreject; /* * non-local article, with all bad groups. * (local articles with bad groups will be bounced * by fileart when the groups aren't in active.) */ if (histreject) history(art, NOLOG); prefuse(art); (void) printf("no subscribed groups in `%s'\n", ngs); } else if (art->h.h_approved == NULL && moderated(ngs)) { prefuse(art); (void) printf("unapproved article in moderated group(s) `%s'\n", ngs); } else return; /* art was accepted */ art->a_status |= ST_REFUSED; if (!okrefusal) art->a_status |= ST_DROPPED; } -- CAT-TALK Conferencing System | "Buster Bunny is an abused | E-MAIL: +1 313 343 0800 (USR HST) | child. Trust me - I'm a | jp@Michigan.COM +1 313 343 2925 (TELEBIT PEP) | professional..." | ********EIGHT NODES*********** | -- Roger Rabbit |
fwp1@CC.MsState.Edu (Frank Peters) (05/11/91)
: On 11 May 91 04:50:46 GMT, jp@tygra.Michigan.COM (John Palmer) said: > I need to find a way to exclude all posts from a particular site from > even making it into my junk group let alone any other groups. Great idea! Then you could dump zorch and the rest of us could dump tygra and everyone would be happy again. Frank -- Frank Peters Internet: fwp1@CC.MsState.Edu Bitnet: FWP1@MsState Phone: (601)325-2942 FAX: (601)325-8921
guest@geech.ai.mit.edu (Guest Account) (05/11/91)
In article <1991May11.045046.14148@tygra.Michigan.COM> jp@tygra.Michigan.COM (John Palmer) writes: if (path == NULL) { prefuse(art); (void) printf("no Path: header\n"); } else if (msgid == NULL || msgid[0] == '\0') { prefuse(art); (void) printf("missing Message-ID\n"); } else if (strchr(msgid, ' ') != NULL || strchr(msgid, '\t') != NULL) { prefuse(art); (void) printf("whitespace in Message-ID\n"); } else if (!strcmp(snthost,"zorch")) { prefuse(art); /* Dump it: More of Kent's ravings */ (void) printf("whoops - caught one from zorch\n"); } else if (!strcmp(snthost,"tygra")) { prefuse(art); /* Dump it: More of Palmer's dingleberries */ (void) fprintf(FBI, "RICO ALERT! RICO ALERT! RICO ALERT!\n"); } else .... ---DICK THORNBURGH
henry@zoo.toronto.edu (Henry Spencer) (05/12/91)
In article <1991May11.045046.14148@tygra.Michigan.COM> jp@tygra.Michigan.COM (John Palmer) writes: >I need to find a way to exclude all posts from a particular site from >even making it into my junk group let alone any other groups. Not provided for in the software as shipped. We thought about it a bit, but decided that overall it would do more harm than good. -- And the bean-counter replied, | Henry Spencer @ U of Toronto Zoology "beans are more important". | henry@zoo.toronto.edu utzoo!henry
elg@elgamy.RAIDERNET.COM (Eric Lee Green) (05/12/91)
From article <1991May11.045046.14148@tygra.Michigan.COM>, by jp@tygra.Michigan.COM (John Palmer): > I need to find a way to exclude all posts from a particular site from > even making it into my junk group let alone any other groups. Note that this is often known as "being a bad net.citizen", due to the possibilities that this creates for censorship and abuse. There was much discussion about adding such a feature to CNEWS, and the end result was that most people agreed that it'd be a Bad Idea, causing too much disruption of news flows as people around the net plunked sites into their Usenet Death Penalty file and never took them out. If you really have problems with the postings of a certain person at a certain site, just put that person in your kill file. That's a lot more network-friendly than arbitrarily removing postings from the flow of netnews. -- Eric Lee Green (318) 984-1820 P.O. Box 92191 Lafayette, LA 70509 elg@elgamy.RAIDERNET.COM uunet!mjbtn!raider!elgamy!elg
brad@looking.on.ca (Brad Templeton) (05/15/91)
I don't think it's being a bad net citizen if you want to not feed postings to your own site that you don't like. It is your site, after all. Newsclip can do this, of course, controlling feeding as finely as you care to program. You can shut off users, sites, domains, article threads, crosspostings, long signatures, excessive included text, anything you like, fairly easily. -- Brad Templeton, ClariNet Communications Corp. -- Waterloo, Ontario 519/884-7473
chip@chinacat.unicom.com (Chip Rosenthal) (05/16/91)
In article <1991May15.063243.28475@looking.on.ca> brad@looking.on.ca (Brad Templeton) writes: >I don't think it's being a bad net citizen if you want to not feed postings >to your own site that you don't like. No, but it's eye raising when the person who wants to do it runs a public access system. I would expect that most people who pay to receive news do not want censored news. I wouldn't worry about. I'm sure John Palmer will find a way to solve the problem thru his copious staff of litigators. -- Chip Rosenthal 512-482-8260 | Unicom Systems Development | I saw Elvis in my wtmp file. <chip@chinacat.Unicom.COM> |
mjr@hussar.dco.dec.com (Marcus J. Ranum) (05/16/91)
chip@chinacat.unicom.com (Chip Rosenthal) writes: [about dropping some articles from news] >No, but it's eye raising when the person who wants to do it runs a >public access system. I would expect that most people who pay to >receive news do not want censored news. Naah, most of his customers probably asked for it, because they were sick of all the flames directed at ddmi.com for being net.buttheads, and couldn't figure out how to use killfiles. mjr.