diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/src/acl.c | 39 | ||||
-rw-r--r-- | src/src/verify.c | 1 |
2 files changed, 25 insertions, 15 deletions
diff --git a/src/src/acl.c b/src/src/acl.c index f01f5cf3c..9efc85844 100644 --- a/src/src/acl.c +++ b/src/src/acl.c @@ -3287,6 +3287,8 @@ for (; cb != NULL; cb = cb->next) p = pp; } } + else + DEBUG(D_acl) debug_printf(" cutthrough request ignored for nonfirst rcpt\n"); break; } *log_msgptr = string_sprintf("\"control=%s\" on %s item", @@ -4417,22 +4419,29 @@ switch (where) else if ( rc == OK && cutthrough.delivery && rcpt_count > cutthrough.nrcpt - && (rc = open_cutthrough_connection(addr)) == DEFER ) - if (cutthrough.defer_pass) - { - uschar * s = addr->message; - /* Horrid kludge to recover target's SMTP message */ - while (*s) s++; - do --s; while (!isdigit(*s)); - if (*--s && isdigit(*s) && *--s && isdigit(*s)) *user_msgptr = s; - acl_temp_details = TRUE; - } - else - { - HDEBUG(D_acl) debug_printf_indent("cutthrough defer; will spool\n"); - rc = OK; - } + { + if ((rc = open_cutthrough_connection(addr)) == DEFER) + if (cutthrough.defer_pass) + { + uschar * s = addr->message; + /* Horrid kludge to recover target's SMTP message */ + while (*s) s++; + do --s; while (!isdigit(*s)); + if (*--s && isdigit(*s) && *--s && isdigit(*s)) *user_msgptr = s; + acl_temp_details = TRUE; + } + else + { + HDEBUG(D_acl) debug_printf_indent("cutthrough defer; will spool\n"); + rc = OK; + } + } + else HDEBUG(D_acl) if (cutthrough.delivery) + if (rcpt_count <= cutthrough.nrcpt) + debug_printf_indent("ignore cutthrough request; nonfirst message\n"); + else if (rc != OK) + debug_printf_indent("ignore cutthrough request; ACL did not accept\n"); break; case ACL_WHERE_PREDATA: diff --git a/src/src/verify.c b/src/src/verify.c index e40a7fc27..dd5451848 100644 --- a/src/src/verify.c +++ b/src/src/verify.c @@ -1380,6 +1380,7 @@ if(fd >= 0) _cutthrough_puts(US"QUIT\r\n", 6); /* avoid recursion */ _cutthrough_flush_send(); cutthrough.fd = -1; /* avoid recursion via read timeout */ + cutthrough.nrcpt = 0; /* permit re-cutthrough on subsequent message */ /* Wait a short time for response, and discard it */ cutthrough_response(fd, '2', NULL, 1); |