Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.3 4.3bsd-beta 6/6/85; site moncol.UUCP Path: utzoo!watmath!clyde!cbosgd!ihnp4!houxm!hjuxa!petsd!moncol!john From: john@moncol.UUCP (John Ruschmeyer) Newsgroups: net.news.adm Subject: Minor fix for recmail Message-ID: <158@moncol.UUCP> Date: Wed, 29-Jan-86 23:44:03 EST Article-I.D.: moncol.158 Posted: Wed Jan 29 23:44:03 1986 Date-Received: Sat, 1-Feb-86 00:41:51 EST Organization: Monmouth College, W. Long Branch, NJ Lines: 60 Keywords: 2.10.3 4.3 bsd beta, cc:, recmail, dead.letter Summary: Minor fix for handling of empty cc: lines. Program: recmail.c (2.10.3 4.3 bsd beta) Problem: The program incorrectly handles a line containing a cc: with no destinations in that it attemps to send a copy of the mail to noone. Needless to say, this fails, leaving the user a copy of his mail in dead.letter and a note from recmail. Action: Apply the following context diff: *** recmail.c.orig Wed Jan 29 02:06:22 1986 --- recmail.c Wed Jan 29 22:47:27 1986 *************** *** 52,59 break; if (strncmp(linebuf, "To: ", 4) == 0 || strncmp(linebuf, "to: ", 4) == 0 || ! strncmp(linebuf, "TO: ", 4) == 0 || ! strncmp(linebuf, "Cc: ", 4) == 0 || strncmp(linebuf, "cc: ", 4) == 0 || strncmp(linebuf, "CC: ", 4) == 0) addrecips(linebuf+4); --- 52,60 ----- break; if (strncmp(linebuf, "To: ", 4) == 0 || strncmp(linebuf, "to: ", 4) == 0 || ! strncmp(linebuf, "TO: ", 4) == 0) ! addrecips(linebuf+4); ! else if (strncmp(linebuf, "Cc: ", 4) == 0 || strncmp(linebuf, "cc: ", 4) == 0 || strncmp(linebuf, "CC: ", 4) == 0) if (linebuf[4] != '\n') *************** *** 57,62 strncmp(linebuf, "cc: ", 4) == 0 || strncmp(linebuf, "CC: ", 4) == 0) ! addrecips(linebuf+4); } if (!feof(stdin)) { while (fgets(linebuf, sizeof linebuf, stdin) != NULL) { --- 58,64 ----- strncmp(linebuf, "cc: ", 4) == 0 || strncmp(linebuf, "CC: ", 4) == 0) ! if (linebuf[4] != '\n') ! addrecips(linebuf+4); } if (!feof(stdin)) { while (fgets(linebuf, sizeof linebuf, stdin) != NULL) { -- Name: John Ruschmeyer US Mail: Monmouth College, W. Long Branch, NJ 07764 Phone: (201) 571-3451 UUCP: ...!vax135!petsd!moncol!john ...!princeton!moncol!john ...!pesnta!moncol!john Give an ape control of its environment and it will fill the world with bananas.