X-Git-Url: https://git.exim.org/exim.git/blobdiff_plain/ab1604ea9202d3dbc0fd7fd230dc693d83d3092c..7adc9ca07a9a870f92a14d16740abfecde0bdfa4:/src/src/exim.c diff --git a/src/src/exim.c b/src/src/exim.c index cd42a88ad..ab2d673dd 100644 --- a/src/src/exim.c +++ b/src/src/exim.c @@ -3,6 +3,7 @@ *************************************************/ /* Copyright (c) University of Cambridge 1995 - 2018 */ +/* Copyright (c) The Exim Maintainers 2020 */ /* See the file NOTICE for conditions of use and distribution. */ @@ -945,6 +946,9 @@ g = string_cat(NULL, US"Support for:"); #ifndef DISABLE_DKIM g = string_cat(g, US" DKIM"); #endif +#ifdef SUPPORT_DMARC + g = string_cat(g, US" DMARC"); +#endif #ifndef DISABLE_DNSSEC g = string_cat(g, US" DNSSEC"); #endif @@ -966,14 +970,17 @@ g = string_cat(NULL, US"Support for:"); #ifdef SUPPORT_PROXY g = string_cat(g, US" PROXY"); #endif +#ifndef DISABLE_QUEUE_RAMP + g = string_cat(g, US" Experimental_Queue_Ramp"); +#endif #ifdef SUPPORT_SOCKS g = string_cat(g, US" SOCKS"); #endif #ifdef SUPPORT_SPF g = string_cat(g, US" SPF"); #endif -#ifdef SUPPORT_DMARC - g = string_cat(g, US" DMARC"); +#if defined(SUPPORT_SRS) + g = string_cat(g, US" SRS"); #endif #ifdef TCP_FASTOPEN tcp_init(); @@ -994,13 +1001,10 @@ g = string_cat(NULL, US"Support for:"); #ifdef EXPERIMENTAL_LMDB g = string_cat(g, US" Experimental_LMDB"); #endif -#ifdef EXPERIMENTAL_QUEUE_RAMP - g = string_cat(g, US" Experimental_Queue_Ramp"); -#endif #ifdef EXPERIMENTAL_QUEUEFILE g = string_cat(g, US" Experimental_QUEUEFILE"); #endif -#if defined(EXPERIMENTAL_SRS) || defined(EXPERIMENTAL_SRS_NATIVE) +#if defined(EXPERIMENTAL_SRS_ALT) g = string_cat(g, US" Experimental_SRS"); #endif #ifdef EXPERIMENTAL_TLS_RESUME @@ -5114,6 +5118,8 @@ if (host_checking) deliver_localpart_orig = NULL; deliver_domain_orig = NULL; callout_address = sending_ip_address = NULL; + deliver_localpart_data = deliver_domain_data = + recipient_data = sender_data = NULL; sender_rate = sender_rate_limit = sender_rate_period = NULL; } smtp_log_no_mail(); @@ -5569,17 +5575,15 @@ while (more) if (filter_test != FTEST_NONE) { - deliver_domain = (ftest_domain != NULL)? - ftest_domain : qualify_domain_recipient; + deliver_domain = ftest_domain ? ftest_domain : qualify_domain_recipient; deliver_domain_orig = deliver_domain; - deliver_localpart = (ftest_localpart != NULL)? - ftest_localpart : originator_login; + deliver_localpart = ftest_localpart ? ftest_localpart : originator_login; deliver_localpart_orig = deliver_localpart; deliver_localpart_prefix = ftest_prefix; deliver_localpart_suffix = ftest_suffix; deliver_home = originator_home; - if (return_path == NULL) + if (!return_path) { printf("Return-path copied from sender\n"); return_path = string_copy(sender_address); @@ -5590,14 +5594,14 @@ while (more) receive_add_recipient( string_sprintf("%s%s%s@%s", - (ftest_prefix == NULL)? US"" : ftest_prefix, + ftest_prefix ? ftest_prefix : US"", deliver_localpart, - (ftest_suffix == NULL)? US"" : ftest_suffix, + ftest_suffix ? ftest_suffix : US"", deliver_domain), -1); printf("Recipient = %s\n", recipients_list[0].address); - if (ftest_prefix != NULL) printf("Prefix = %s\n", ftest_prefix); - if (ftest_suffix != NULL) printf("Suffix = %s\n", ftest_suffix); + if (ftest_prefix) printf("Prefix = %s\n", ftest_prefix); + if (ftest_suffix) printf("Suffix = %s\n", ftest_suffix); if (chdir("/")) /* Get away from wherever the user is running this from */ { @@ -5610,13 +5614,13 @@ while (more) available to the user filter. We need to copy the filter variables explicitly. */ - if ((filter_test & FTEST_SYSTEM) != 0) + if (filter_test & FTEST_SYSTEM) if (!filter_runtest(filter_sfd, filter_test_sfile, TRUE, more)) exim_exit(EXIT_FAILURE); memcpy(filter_sn, filter_n, sizeof(filter_sn)); - if ((filter_test & FTEST_USER) != 0) + if (filter_test & FTEST_USER) if (!filter_runtest(filter_ufd, filter_test_ufile, FALSE, more)) exim_exit(EXIT_FAILURE); @@ -5628,9 +5632,9 @@ while (more) will be TRUE. If it is not, check on the number of messages received in this connection. */ - if (!session_local_queue_only && - smtp_accept_queue_per_connection > 0 && - receive_messagecount > smtp_accept_queue_per_connection) + if ( !session_local_queue_only + && smtp_accept_queue_per_connection > 0 + && receive_messagecount > smtp_accept_queue_per_connection) { session_local_queue_only = TRUE; queue_only_reason = 2; @@ -5646,16 +5650,12 @@ while (more) ones. However, there are odd cases where this is not wanted, so this can be changed by setting queue_only_load_latch false. */ - local_queue_only = session_local_queue_only; - if (!local_queue_only && queue_only_load >= 0) - { - local_queue_only = (load_average = OS_GETLOADAVG()) > queue_only_load; - if (local_queue_only) + if (!(local_queue_only = session_local_queue_only) && queue_only_load >= 0) + if ((local_queue_only = (load_average = OS_GETLOADAVG()) > queue_only_load)) { queue_only_reason = 3; if (queue_only_load_latch) session_local_queue_only = TRUE; } - } /* If running as an MUA wrapper, all queueing options and freezing options are ignored. */ @@ -5772,6 +5772,8 @@ moreloop: #endif callout_address = NULL; sending_ip_address = NULL; + deliver_localpart_data = deliver_domain_data = + recipient_data = sender_data = NULL; acl_var_m = NULL; for(int i = 0; i < REGEX_VARS; i++) regex_vars[i] = NULL;