Xref: utzoo comp.mail.misc:2476 comp.sources.d:4182 Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!uunet!sugar!karl From: karl@sugar.hackercorp.com (Karl Lehenbauer) Newsgroups: comp.mail.misc,comp.sources.d Subject: simple smail 2.5 patch can save you lots of money Message-ID: <4347@sugar.hackercorp.com> Date: 14 Oct 89 06:07:11 GMT Reply-To: karl@sugar.hackercorp.com (Karl Lehenbauer) Organization: Sugar Land Unix - Houston Lines: 47 When smail 2.5 bounces a message, it bounces the whole thing, which can be awfully big. This trivial patch causes smail to only print the first twenty or so lines of the message. *** deliver.c.orig Sat Oct 14 00:58:55 1989 --- deliver.c Sat Oct 14 00:58:48 1989 *************** *** 472,477 ** Copy input. */ (void) fprintf(out, "From %s\n", from); while(fgets(buf, sizeof(buf), spoolfp) != NULL) { (void) fputs(buf, out); } --- 472,478 ----- ** Copy input. */ (void) fprintf(out, "From %s\n", from); + i = 0; while(fgets(buf, sizeof(buf), spoolfp) != NULL) { (void) fputs(buf, out); if (i++ > 20) { *************** *** 474,479 (void) fprintf(out, "From %s\n", from); while(fgets(buf, sizeof(buf), spoolfp) != NULL) { (void) fputs(buf, out); } (void) pclose(out); } --- 475,484 ----- i = 0; while(fgets(buf, sizeof(buf), spoolfp) != NULL) { (void) fputs(buf, out); + if (i++ > 20) { + (void) fprintf(out, "======= remainder of message truncated =======\n"); + break; + } } (void) pclose(out); } -- -- uunet!sugar!karl "There is hopeful symbolism in the fact that -- flags do not wave in a vacuum." -- Arthur C. Clarke -- Usenet access: (713) 438-5018