check for "<<>>" etc as equivalent to "<>"
authorEric Allman <eric@ucbvax.Berkeley.EDU>
Mon, 21 Nov 1994 00:56:43 +0000 (16:56 -0800)
committerEric Allman <eric@ucbvax.Berkeley.EDU>
Mon, 21 Nov 1994 00:56:43 +0000 (16:56 -0800)
SCCS-vsn: usr.sbin/sendmail/src/envelope.c 8.43
SCCS-vsn: usr.sbin/sendmail/src/parseaddr.c 8.40
SCCS-vsn: usr.sbin/sendmail/src/savemail.c 8.39

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

index 2151c82..f8e09e7 100644 (file)
@@ -7,7 +7,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)envelope.c 8.42 (Berkeley) %G%";
+static char sccsid[] = "@(#)envelope.c 8.43 (Berkeley) %G%";
 #endif /* not lint */
 
 #include "sendmail.h"
 #endif /* not lint */
 
 #include "sendmail.h"
@@ -125,8 +125,7 @@ dropenvelope(e)
                    bitset(QPINGONFAILURE, q->q_flags))
                {
                        failure_return = TRUE;
                    bitset(QPINGONFAILURE, q->q_flags))
                {
                        failure_return = TRUE;
-                       if (q->q_owner == NULL &&
-                           strcmp(e->e_from.q_paddr, "<>") != 0)
+                       if (q->q_owner == NULL && !emptyaddr(&e->e_from))
                                (void) sendtolist(e->e_from.q_paddr, NULL,
                                                  &e->e_errorqueue, e);
                }
                                (void) sendtolist(e->e_from.q_paddr, NULL,
                                                  &e->e_errorqueue, e);
                }
index 36c5bf7..aa32d1a 100644 (file)
@@ -7,7 +7,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)parseaddr.c        8.39 (Berkeley) %G%";
+static char sccsid[] = "@(#)parseaddr.c        8.40 (Berkeley) %G%";
 #endif /* not lint */
 
 #include "sendmail.h"
 #endif /* not lint */
 
 #include "sendmail.h"
@@ -1942,7 +1942,24 @@ printaddr(a, follow)
        if (first)
                printf("[NULL]\n");
 }
        if (first)
                printf("[NULL]\n");
 }
+\f/*
+**  EMPTYADDR -- return TRUE if this address is empty (``<>'')
+**
+**     Parameters:
+**             a -- pointer to the address
+**
+**     Returns:
+**             TRUE -- if this address is "empty" (i.e., no one should
+**                     ever generate replies to it.
+**             FALSE -- if it is a "regular" (read: replyable) address.
+*/
 
 
+bool
+emptyaddr(a)
+       register ADDRESS *a;
+{
+       return strcmp(a->q_paddr, "<>") == 0 || strcmp(a->q_user, "<>") == 0;
+}
 \f/*
 **  REMOTENAME -- return the name relative to the current mailer
 **
 \f/*
 **  REMOTENAME -- return the name relative to the current mailer
 **
index 508ab45..c4b0a47 100644 (file)
@@ -7,7 +7,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)savemail.c 8.38 (Berkeley) %G%";
+static char sccsid[] = "@(#)savemail.c 8.39 (Berkeley) %G%";
 #endif /* not lint */
 
 # include "sendmail.h"
 #endif /* not lint */
 
 # include "sendmail.h"
@@ -231,7 +231,7 @@ savemail(e)
                                (void) sendtolist("postmaster",
                                          NULLADDR, &e->e_errorqueue, e);
                        }
                                (void) sendtolist("postmaster",
                                          NULLADDR, &e->e_errorqueue, e);
                        }
-                       if (strcmp(e->e_from.q_paddr, "<>") != 0)
+                       if (!emptyaddr(&e->e_from))
                        {
                                (void) sendtolist(e->e_from.q_paddr,
                                          NULLADDR, &e->e_errorqueue, e);
                        {
                                (void) sendtolist(e->e_from.q_paddr,
                                          NULLADDR, &e->e_errorqueue, e);