if we have FATALERRS set but no errors in addresses, set errors
authorEric Allman <eric@ucbvax.Berkeley.EDU>
Fri, 2 Dec 1994 00:40:43 +0000 (16:40 -0800)
committerEric Allman <eric@ucbvax.Berkeley.EDU>
Fri, 2 Dec 1994 00:40:43 +0000 (16:40 -0800)
in all the addresses

SCCS-vsn: usr.sbin/sendmail/src/envelope.c 8.49

usr/src/usr.sbin/sendmail/src/envelope.c

index 95c3f7f..56c605a 100644 (file)
@@ -7,7 +7,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)envelope.c 8.48 (Berkeley) %G%";
+static char sccsid[] = "@(#)envelope.c 8.49 (Berkeley) %G%";
 #endif /* not lint */
 
 #include "sendmail.h"
 #endif /* not lint */
 
 #include "sendmail.h"
@@ -225,6 +225,21 @@ dropenvelope(e)
                printf("failure_return=%d success_return=%d queueit=%d\n",
                        failure_return, success_return, queueit);
 
                printf("failure_return=%d success_return=%d queueit=%d\n",
                        failure_return, success_return, queueit);
 
+       /*
+       **  If we had some fatal error, but no addresses are marked as
+       **  bad, mark them _all_ as bad.
+       */
+
+       if (bitset(EF_FATALERRS, e->e_flags) && !failure_return)
+       {
+               failure_return = TRUE;
+               for (q = e->e_sendqueue; q != NULL; q = q->q_next)
+               {
+                       if (!bitset(QDONTSEND, q->q_flags))
+                               q->q_flags |= QBADADDR;
+               }
+       }
+
        /*
        **  Send back return receipts as requested.
        */
        /*
        **  Send back return receipts as requested.
        */