send errors with return path = <>; don't respond to such messages
authorEric Allman <eric@ucbvax.Berkeley.EDU>
Mon, 22 Feb 1993 01:55:22 +0000 (17:55 -0800)
committerEric Allman <eric@ucbvax.Berkeley.EDU>
Mon, 22 Feb 1993 01:55:22 +0000 (17:55 -0800)
SCCS-vsn: usr.sbin/sendmail/src/savemail.c 6.8

usr/src/usr.sbin/sendmail/src/savemail.c

index 17916c0..d5c1c61 100644 (file)
@@ -7,7 +7,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)savemail.c 6.7 (Berkeley) %G%";
+static char sccsid[] = "@(#)savemail.c 6.8 (Berkeley) %G%";
 #endif /* not lint */
 
 # include <sys/types.h>
 #endif /* not lint */
 
 # include <sys/types.h>
@@ -199,7 +199,8 @@ savemail(e)
 
                        if (state == ESM_MAIL)
                        {
 
                        if (state == ESM_MAIL)
                        {
-                               if (e->e_errorqueue == NULL)
+                               if (e->e_errorqueue == NULL &&
+                                   strcmp(e->e_from.q_paddr, "<>") != 0)
                                        (void) sendtolist(e->e_from.q_paddr,
                                                          (ADDRESS *) NULL,
                                                          &e->e_errorqueue, e);
                                        (void) sendtolist(e->e_from.q_paddr,
                                                          (ADDRESS *) NULL,
                                                          &e->e_errorqueue, e);
@@ -210,6 +211,12 @@ savemail(e)
                                                          (ADDRESS *) NULL,
                                                          &e->e_errorqueue, e);
                                q = e->e_errorqueue;
                                                          (ADDRESS *) NULL,
                                                          &e->e_errorqueue, e);
                                q = e->e_errorqueue;
+                               if (q == NULL)
+                               {
+                                       /* this is an error-error */
+                                       state = ESM_USRTMP;
+                                       break;
+                               }
                        }
                        else
                        {
                        }
                        else
                        {
@@ -405,7 +412,8 @@ returntosender(msg, returnq, sendbody, e)
 
        /* fake up an address header for the from person */
        expand("\201n", buf, &buf[sizeof buf - 1], e);
 
        /* fake up an address header for the from person */
        expand("\201n", buf, &buf[sizeof buf - 1], e);
-       ee->e_sender = ee->e_returnpath = newstr(buf);
+       ee->e_returnpath = "<>";
+       ee->e_sender = newstr(buf);
        if (parseaddr(buf, &ee->e_from, -1, '\0', e) == NULL)
        {
                syserr("Can't parse myself!");
        if (parseaddr(buf, &ee->e_from, -1, '\0', e) == NULL)
        {
                syserr("Can't parse myself!");