check for "<<>>" etc as equivalent to "<>"
[unix-history] / usr / src / usr.sbin / sendmail / src / parseaddr.c
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
 **