global error cleanup; log "lost connection" at level 20 if not
authorEric Allman <eric@ucbvax.Berkeley.EDU>
Sat, 17 Jul 1993 01:31:31 +0000 (17:31 -0800)
committerEric Allman <eric@ucbvax.Berkeley.EDU>
Sat, 17 Jul 1993 01:31:31 +0000 (17:31 -0800)
in transaction

SCCS-vsn: usr.sbin/sendmail/src/srvrsmtp.c 8.4

usr/src/usr.sbin/sendmail/src/srvrsmtp.c

index 76937ab..d544846 100644 (file)
@@ -10,9 +10,9 @@
 
 #ifndef lint
 #ifdef SMTP
 
 #ifndef lint
 #ifdef SMTP
-static char sccsid[] = "@(#)srvrsmtp.c 8.3 (Berkeley) %G% (with SMTP)";
+static char sccsid[] = "@(#)srvrsmtp.c 8.4 (Berkeley) %G% (with SMTP)";
 #else
 #else
-static char sccsid[] = "@(#)srvrsmtp.c 8.3 (Berkeley) %G% (without SMTP)";
+static char sccsid[] = "@(#)srvrsmtp.c 8.4 (Berkeley) %G% (without SMTP)";
 #endif
 #endif /* not lint */
 
 #endif
 #endif /* not lint */
 
@@ -131,7 +131,7 @@ smtp(e)
                QuickAbort = FALSE;
                HoldErrs = FALSE;
                LogUsrErrs = FALSE;
                QuickAbort = FALSE;
                HoldErrs = FALSE;
                LogUsrErrs = FALSE;
-               e->e_flags &= ~EF_VRFYONLY;
+               e->e_flags &= ~(EF_VRFYONLY|EF_GLOBALERRS);
 
                /* setup for the read */
                e->e_to = NULL;
 
                /* setup for the read */
                e->e_to = NULL;
@@ -151,7 +151,7 @@ smtp(e)
                        message("421 %s Lost input channel from %s",
                                MyHostName, CurHostName);
 #ifdef LOG
                        message("421 %s Lost input channel from %s",
                                MyHostName, CurHostName);
 #ifdef LOG
-                       if (LogLevel > 1)
+                       if (LogLevel > (gotmail ? 1 : 19))
                                syslog(LOG_NOTICE, "lost input channel from %s",
                                        CurHostName);
 #endif
                                syslog(LOG_NOTICE, "lost input channel from %s",
                                        CurHostName);
 #endif
@@ -242,6 +242,8 @@ smtp(e)
                        if (gotmail)
                        {
                                message("503 Sender already specified");
                        if (gotmail)
                        {
                                message("503 Sender already specified");
+                               if (InChild)
+                                       finis();
                                break;
                        }
                        if (InChild)
                                break;
                        }
                        if (InChild)
@@ -464,8 +466,8 @@ smtp(e)
 
                        /* collect the text of the message */
                        SmtpPhase = "collect";
 
                        /* collect the text of the message */
                        SmtpPhase = "collect";
+                       SuprErrs = TRUE;
                        collect(TRUE, doublequeue, e);
                        collect(TRUE, doublequeue, e);
-                       e->e_flags &= ~EF_FATALERRS;
                        if (Errors != 0)
                                goto abortmessage;
 
                        if (Errors != 0)
                                goto abortmessage;
 
@@ -499,6 +501,7 @@ smtp(e)
                        /* send to all recipients */
                        sendall(e, Verbose ? SM_DELIVER : SM_QUEUE);
                        e->e_to = NULL;
                        /* send to all recipients */
                        sendall(e, Verbose ? SM_DELIVER : SM_QUEUE);
                        e->e_to = NULL;
+                       SuprErrs = FALSE;
 
                        /* save statistics */
                        markstats(e, (ADDRESS *) NULL);
 
                        /* save statistics */
                        markstats(e, (ADDRESS *) NULL);