Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!clyde!rutgers!husc6!necntc!ci-dandelion!ulowell!page From: page@ulowell.UUCP Newsgroups: news.software.b,news.admin Subject: How to get rid of "submission for moderated-group" Message-ID: <1101@ulowell.cs.ulowell.edu> Date: Tue, 24-Feb-87 18:02:48 EST Article-I.D.: ulowell.1101 Posted: Tue Feb 24 18:02:48 1987 Date-Received: Fri, 27-Feb-87 04:01:47 EST Reply-To: page@ulowell.uucp (Bob Page) Distribution: world Organization: University of Lowell Lines: 72 Xref: utgpu news.software.b:317 news.admin:165 This patch fixes the problem that 2.11 introduced when posting messages to mail reflectors (like mod.computers.vax and laser-printers). It is based on patch 4, but you should be able to apply it to any version of 2.11 news pretty easily, as there isn't much code to change. Keep this patch around in case you ever need to 'unpatch' inews.c in the future. This is not an official patch, although I have mailed it to Rick for possible inclusion in future versions. ..Bob -- Bob Page, U of Lowell CS Dept. ulowell!page, page@ulowell.CSNET ------ (feed me to 'patch') ------- *** inews.c.orig Tue Feb 24 10:46:45 1987 --- inews.c Tue Feb 24 17:17:16 1987 *************** *** 839,847 **** if (is_mod[0] != '\0' /* one of the groups is moderated */ && header.approved[0] == '\0') { /* and unapproved */ struct hbuf mhdr; ! FILE *mfd; register char *p; ! char modadd[BUFLEN]; #ifdef DONTFOWARD if(mode == PROC) { logerr("Unapproved article in moderated group %s", --- 839,847 ---- if (is_mod[0] != '\0' /* one of the groups is moderated */ && header.approved[0] == '\0') { /* and unapproved */ struct hbuf mhdr; ! FILE *mfd, *mhopen(); register char *p; ! char modadd[BUFLEN], *replyname(); #ifdef DONTFOWARD if(mode == PROC) { logerr("Unapproved article in moderated group %s", *************** *** 864,880 **** LIB); } while (strcmp(bfr, "backbone") != 0 && !ngmatch(is_mod, bfr)); (void) fclose(mfd); - /* fake a header for mailhdr */ - mhdr.from[0] = '\0'; - mhdr.replyto[0] = '\0'; p = is_mod; while (*++p) if (*p == '.') *p = '-'; - sprintf(bfr, "Submission for %s", is_mod); sprintf(mhdr.path, modadd, is_mod); ! mfd = mailhdr(&mhdr, bfr); ! if (mfd == NULL) xerror("Can't send mail to %s", mhdr.path); lhwrite(&header, mfd); while ((c = getc(infp)) != EOF) --- 864,877 ---- LIB); } while (strcmp(bfr, "backbone") != 0 && !ngmatch(is_mod, bfr)); (void) fclose(mfd); p = is_mod; while (*++p) if (*p == '.') *p = '-'; sprintf(mhdr.path, modadd, is_mod); ! if ((mfd = mhopen(&mhdr)) != NULL) ! fprintf(mfd, "To: %s\n", replyname(&mhdr)); ! else xerror("Can't send mail to %s", mhdr.path); lhwrite(&header, mfd); while ((c = getc(infp)) != EOF)