From 0e33b011cf291f4782fcc2cd409a972a45623a9d Mon Sep 17 00:00:00 2001 From: Eric Allman Date: Fri, 18 Feb 1983 20:41:52 -0800 Subject: [PATCH] Give an error if the message is terminated with an EOF and we are running SMTP (it must be terminated with a dot). SCCS-mr: usr.sbin/sendmail/src/collect.c 185 SCCS-vsn: usr.sbin/sendmail/src/collect.c 3.57 --- usr/src/usr.sbin/sendmail/src/collect.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/usr/src/usr.sbin/sendmail/src/collect.c b/usr/src/usr.sbin/sendmail/src/collect.c index 40411f2854..66377a6bed 100644 --- a/usr/src/usr.sbin/sendmail/src/collect.c +++ b/usr/src/usr.sbin/sendmail/src/collect.c @@ -1,7 +1,7 @@ # include # include "sendmail.h" -SCCSID(@(#)collect.c 3.56 %G%); +SCCSID(@(#)collect.c 3.57 %G%); /* ** COLLECT -- read & parse message header & make temp file. @@ -184,6 +184,10 @@ maketemp(from) } (void) fclose(tf); + /* An EOF when running SMTP is an error */ + if (feof(InChannel) && OpMode == MD_SMTP) + syserr("collect: unexpected close"); + /* ** Find out some information from the headers. ** Examples are who is the from person & the date. -- 2.20.1