set QDONTSEND together with QBADADDR
authorEric Allman <eric@ucbvax.Berkeley.EDU>
Wed, 3 Mar 1993 01:06:55 +0000 (17:06 -0800)
committerEric Allman <eric@ucbvax.Berkeley.EDU>
Wed, 3 Mar 1993 01:06:55 +0000 (17:06 -0800)
SCCS-vsn: usr.sbin/sendmail/src/recipient.c 6.23

usr/src/usr.sbin/sendmail/src/recipient.c

index 8bb311a..30269c1 100644 (file)
@@ -7,7 +7,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)recipient.c        6.22 (Berkeley) %G%";
+static char sccsid[] = "@(#)recipient.c        6.23 (Berkeley) %G%";
 #endif /* not lint */
 
 # include "sendmail.h"
 #endif /* not lint */
 
 # include "sendmail.h"
@@ -310,7 +310,7 @@ recipient(a, sendq, e)
                a->q_flags |= QDONTSEND;
                if (a->q_alias == NULL)
                {
                a->q_flags |= QDONTSEND;
                if (a->q_alias == NULL)
                {
-                       a->q_flags |= QBADADDR;
+                       a->q_flags |= QDONTSEND|QBADADDR;
                        usrerr("550 Cannot mail directly to :include:s");
                }
                else
                        usrerr("550 Cannot mail directly to :include:s");
                }
                else
@@ -338,7 +338,7 @@ recipient(a, sendq, e)
                else if ((stat(buf, &stb) >= 0) ? (!writable(&stb)) :
                    (*p = '\0', safefile(buf, getruid(), S_IWRITE|S_IEXEC) != 0))
                {
                else if ((stat(buf, &stb) >= 0) ? (!writable(&stb)) :
                    (*p = '\0', safefile(buf, getruid(), S_IWRITE|S_IEXEC) != 0))
                {
-                       a->q_flags |= QBADADDR;
+                       a->q_flags |= QDONTSEND|QBADADDR;
                        giveresponse(EX_CANTCREAT, m, NULL, e);
                }
        }
                        giveresponse(EX_CANTCREAT, m, NULL, e);
                }
        }
@@ -414,7 +414,7 @@ recipient(a, sendq, e)
                pw = finduser(buf, &fuzzy);
                if (pw == NULL)
                {
                pw = finduser(buf, &fuzzy);
                if (pw == NULL)
                {
-                       a->q_flags |= QBADADDR;
+                       a->q_flags |= QDONTSEND|QBADADDR;
                        giveresponse(EX_NOUSER, m, NULL, e);
                }
                else
                        giveresponse(EX_NOUSER, m, NULL, e);
                }
                else
@@ -427,6 +427,7 @@ recipient(a, sendq, e)
                                a->q_user = newstr(pw->pw_name);
                                if (findusercount++ > 3)
                                {
                                a->q_user = newstr(pw->pw_name);
                                if (findusercount++ > 3)
                                {
+                                       a->q_flags |= QDONTSEND|QBADADDR;
                                        usrerr("554 aliasing/forwarding loop for %s broken",
                                                pw->pw_name);
                                        return (a);
                                        usrerr("554 aliasing/forwarding loop for %s broken",
                                                pw->pw_name);
                                        return (a);