page@ulowell.UUCP (02/25/87)
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)