summary |
tags |
clone url |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
bfd66a0)
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
-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"
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);
}
-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"
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
**
-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"
(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);