From 613e6221a486a26fcad324154db8dd68688c4e47 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Tue, 1 Apr 1997 07:08:02 +0000 Subject: Second round of XMIT_REJECT changes. svn path=/trunk/; revision=939 --- driver.c | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/driver.c b/driver.c index 8598445e..a21c8a62 100644 --- a/driver.c +++ b/driver.c @@ -662,14 +662,16 @@ char *realname; /* real name of host */ * long lists of users and (re)implement %s. */ for (idp = xmit_names; idp; idp = idp->next) - length += (strlen(idp->id) + 1); + if (idp->val.num == XMIT_ACCEPT) + length += (strlen(idp->id) + 1); names = (char *)alloca(length); names[0] = '\0'; for (idp = xmit_names; idp; idp = idp->next) - { - strcat(names, idp->id); - strcat(names, " "); - } + if (idp->val.num == XMIT_ACCEPT) + { + strcat(names, idp->id); + strcat(names, " "); + } cmd = (char *)alloca(strlen(ctl->mda) + length); sprintf(cmd, ctl->mda, names); if (outlevel == O_VERBOSE) @@ -834,15 +836,16 @@ char *realname; /* real name of host */ * problem. */ for (idp = xmit_names; idp; idp = idp->next) - if (SMTP_rcpt(sinkfp, idp->id) == SM_OK) - good_addresses++; - else - { - bad_addresses++; - idp->val.num = XMIT_ANTISPAM; - error(0, 0, - "SMTP listener doesn't like recipient address `%s'", idp->id); - } + if (idp->val.num == XMIT_ACCEPT) + if (SMTP_rcpt(sinkfp, idp->id) == SM_OK) + good_addresses++; + else + { + bad_addresses++; + idp->val.num = XMIT_ANTISPAM; + error(0, 0, + "SMTP listener doesn't like recipient address `%s'", idp->id); + } if (!good_addresses && SMTP_rcpt(sinkfp, user) != SM_OK) { error(0, 0, -- cgit v1.2.3