X-Git-Url: https://git.exim.org/exim.git/blobdiff_plain/1a47b633600e808a11d75551306a2bf8ebf87335..0cbf2b821bb13da0268556d0e30ea627d5592c60:/src/src/transports/smtp.c diff --git a/src/src/transports/smtp.c b/src/src/transports/smtp.c index 59afe42aa..135069d0f 100644 --- a/src/src/transports/smtp.c +++ b/src/src/transports/smtp.c @@ -159,7 +159,7 @@ optionlist smtp_transport_options[] = { (void *)offsetof(smtp_transport_options_block, serialize_hosts) }, { "size_addition", opt_int, (void *)offsetof(smtp_transport_options_block, size_addition) } -#ifdef EXPERIMENTAL_SOCKS +#ifdef SUPPORT_SOCKS ,{ "socks_proxy", opt_stringptr, (void *)offsetof(smtp_transport_options_block, socks_proxy) } #endif @@ -249,7 +249,7 @@ smtp_transport_options_block smtp_transport_option_defaults = { FALSE, /* lmtp_ignore_quota */ NULL, /* expand_retry_include_ip_address */ TRUE /* retry_include_ip_address */ -#ifdef EXPERIMENTAL_SOCKS +#ifdef SUPPORT_SOCKS ,NULL /* socks_proxy */ #endif #ifdef SUPPORT_TLS @@ -596,7 +596,7 @@ if (*errno_value == ERRNO_WRITEINCOMPLETE) return FALSE; } -#ifdef EXPERIMENTAL_INTERNATIONAL +#ifdef SUPPORT_I18N /* Handle lack of advertised SMTPUTF8, for international message */ if (*errno_value == ERRNO_UTF8_FWD) { @@ -683,7 +683,7 @@ msglog_line(host_item * host, uschar * message) -#ifdef EXPERIMENTAL_EVENT +#ifndef DISABLE_EVENT /************************************************* * Post-defer action * *************************************************/ @@ -919,12 +919,22 @@ while (count-- > 0) addr->basic_errno = ERRNO_RCPT4XX; addr->more_errno |= ((buffer[1] - '0')*10 + buffer[2] - '0') << 8; +#ifndef DISABLE_EVENT + event_defer_errno = addr->more_errno; + msg_event_raise(US"msg:rcpt:host:defer", addr); +#endif + /* Log temporary errors if there are more hosts to be tried. If not, log this last one in the == line. */ if (host->next) log_write(0, LOG_MAIN, "H=%s [%s]: %s", host->name, host->address, addr->message); +#ifndef DISABLE_EVENT + else + msg_event_raise(US"msg:rcpt:defer", addr); +#endif + /* Do not put this message on the list of those waiting for specific hosts, as otherwise it is likely to be tried too often. */ @@ -1393,7 +1403,7 @@ BOOL pass_message = FALSE; BOOL prdr_offered = FALSE; BOOL prdr_active; #endif -#ifdef EXPERIMENTAL_INTERNATIONAL +#ifdef SUPPORT_I18N BOOL utf8_needed = FALSE; BOOL utf8_offered = FALSE; #endif @@ -1525,7 +1535,7 @@ if (continue_hostname == NULL) delayed till here so that $sending_interface and $sending_port are set. */ helo_data = expand_string(ob->helo_data); -#ifdef EXPERIMENTAL_INTERNATIONAL +#ifdef SUPPORT_I18N if (helo_data) { uschar * errstr = NULL; @@ -1552,7 +1562,7 @@ if (continue_hostname == NULL) #endif if (!good_response) goto RESPONSE_FAILED; -#ifdef EXPERIMENTAL_EVENT +#ifndef DISABLE_EVENT { uschar * s; lookup_dnssec_authenticated = host->dnssec==DS_YES ? US"yes" @@ -1699,7 +1709,7 @@ goto SEND_QUIT; {DEBUG(D_transport) debug_printf("PRDR usable\n");} #endif -#ifdef EXPERIMENTAL_INTERNATIONAL +#ifdef SUPPORT_I18N if (addrlist->prop.utf8_msg) { utf8_needed = !addrlist->prop.utf8_downcvt @@ -1940,7 +1950,7 @@ if (continue_hostname == NULL {DEBUG(D_transport) debug_printf("PRDR usable\n");} #endif -#ifdef EXPERIMENTAL_INTERNATIONAL +#ifdef SUPPORT_I18N if (addrlist->prop.utf8_msg) utf8_offered = esmtp && pcre_exec(regex_UTF8, NULL, CS buffer, Ustrlen(buffer), 0, @@ -1973,7 +1983,7 @@ message-specific. */ setting_up = FALSE; -#ifdef EXPERIMENTAL_INTERNATIONAL +#ifdef SUPPORT_I18N /* If this is an international message we need the host to speak SMTPUTF8 */ if (utf8_needed && !utf8_offered) { @@ -2058,7 +2068,7 @@ if (prdr_offered) } #endif -#ifdef EXPERIMENTAL_INTERNATIONAL +#ifdef SUPPORT_I18N if (addrlist->prop.utf8_msg && !addrlist->prop.utf8_downcvt && utf8_offered) sprintf(CS p, " SMTPUTF8"), p += 9; #endif @@ -2118,7 +2128,7 @@ pending_MAIL = TRUE; /* The block starts with MAIL */ { uschar * s = return_path; -#ifdef EXPERIMENTAL_INTERNATIONAL +#ifdef SUPPORT_I18N uschar * errstr = NULL; /* If we must downconvert, do the from-address here. Remember we had to @@ -2229,7 +2239,7 @@ for (addr = first_addr; rcpt_addr = transport_rcpt_address(addr, tblock->rcpt_include_affixes); -#ifdef EXPERIMENTAL_INTERNATIONAL +#ifdef SUPPORT_I18N { uschar * dummy_errstr; if ( testflag(addrlist, af_utf8_downcvt) @@ -2448,7 +2458,7 @@ if (!ok) ok = TRUE; else /* Set up confirmation if needed - applies only to SMTP */ if ( -#ifndef EXPERIMENTAL_EVENT +#ifdef DISABLE_EVENT LOGGING(smtp_confirmation) && #endif !lmtp @@ -2669,7 +2679,7 @@ if (!ok) switch(save_errno) { -#ifdef EXPERIMENTAL_INTERNATIONAL +#ifdef SUPPORT_I18N case ERRNO_UTF8_FWD: code = '5'; /*FALLTHROUGH*/ @@ -2920,7 +2930,7 @@ case continue_more won't get set. */ (void)close(inblock.sock); -#ifdef EXPERIMENTAL_EVENT +#ifndef DISABLE_EVENT (void) event_raise(tblock->event_action, US"tcp:close", NULL); #endif @@ -3653,7 +3663,7 @@ for (cutoff_retry = 0; expired && first_addr->basic_errno != ERRNO_TLSFAILURE) write_logs(first_addr, host); -#ifdef EXPERIMENTAL_EVENT +#ifndef DISABLE_EVENT if (rc == DEFER) deferred_event_raise(first_addr, host); #endif @@ -3681,7 +3691,7 @@ for (cutoff_retry = 0; expired && &message_defer, TRUE); if (rc == DEFER && first_addr->basic_errno != ERRNO_AUTHFAIL) write_logs(first_addr, host); -# ifdef EXPERIMENTAL_EVENT +# ifndef DISABLE_EVENT if (rc == DEFER) deferred_event_raise(first_addr, host); # endif