X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fsrc%2Fexim.c;h=ebc71dd371929028edd35f69d11745f1a5dd83dd;hb=468c0c7e3066886ff5028bb423b96712a155fe05;hp=26f415398b945e871ea779cf89e82fa77c1d5568;hpb=92e6a3d97120ddd68e26d4f5dbdd2ea127a5ff4f;p=user%2Fhenk%2Fcode%2Fexim.git diff --git a/src/src/exim.c b/src/src/exim.c index 26f415398..ebc71dd37 100644 --- a/src/src/exim.c +++ b/src/src/exim.c @@ -814,21 +814,33 @@ fprintf(f, "Support for:"); #ifdef WITH_CONTENT_SCAN fprintf(f, " Content_Scanning"); #endif -#ifndef DISABLE_DKIM - fprintf(f, " DKIM"); -#endif #ifdef WITH_OLD_DEMIME fprintf(f, " Old_Demime"); #endif +#ifndef DISABLE_DKIM + fprintf(f, " DKIM"); +#endif #ifndef DISABLE_DNSSEC fprintf(f, " DNSSEC"); #endif -#ifndef DISABLE_PRDR - fprintf(f, " PRDR"); +#ifndef DISABLE_EVENT + fprintf(f, " Event"); +#endif +#ifdef SUPPORT_I18N + fprintf(f, " I18N"); #endif #ifndef DISABLE_OCSP fprintf(f, " OCSP"); #endif +#ifndef DISABLE_PRDR + fprintf(f, " PRDR"); +#endif +#ifdef SUPPORT_PROXY + fprintf(f, " PROXY"); +#endif +#ifdef SUPPORT_SOCKS + fprintf(f, " SOCKS"); +#endif #ifdef EXPERIMENTAL_SPF fprintf(f, " Experimental_SPF"); #endif @@ -850,21 +862,6 @@ fprintf(f, "Support for:"); #ifdef EXPERIMENTAL_DSN_INFO fprintf(f, " Experimental_DSN_info"); #endif -#ifdef EXPERIMENTAL_INTERNATIONAL - fprintf(f, " Experimental_International"); -#endif -#ifdef EXPERIMENTAL_PROXY - fprintf(f, " Experimental_Proxy"); -#endif -#ifdef EXPERIMENTAL_EVENT - fprintf(f, " Experimental_Event"); -#endif -#ifdef EXPERIMENTAL_REDIS - fprintf(f, " Experimental_Redis"); -#endif -#ifdef EXPERIMENTAL_SOCKS - fprintf(f, " Experimental_SOCKS"); -#endif fprintf(f, "\n"); fprintf(f, "Lookups (built-in):"); @@ -907,6 +904,9 @@ fprintf(f, "Lookups (built-in):"); #if defined(LOOKUP_PGSQL) && LOOKUP_PGSQL!=2 fprintf(f, " pgsql"); #endif +#if defined(LOOKUP_REDIS) && LOOKUP_REDIS!=2 + fprintf(f, " redis"); +#endif #if defined(LOOKUP_SQLITE) && LOOKUP_SQLITE!=2 fprintf(f, " sqlite"); #endif @@ -1031,7 +1031,7 @@ DEBUG(D_any) do { #ifdef SUPPORT_TLS tls_version_report(f); #endif -#ifdef EXPERIMENTAL_INTERNATIONAL +#ifdef SUPPORT_I18N utf8_version_report(f); #endif @@ -1492,6 +1492,7 @@ BOOL f_end_dot = FALSE; BOOL deliver_give_up = FALSE; BOOL list_queue = FALSE; BOOL list_options = FALSE; +BOOL list_config = FALSE; BOOL local_queue_only; BOOL more = TRUE; BOOL one_msg_action = FALSE; @@ -1759,7 +1760,6 @@ regex_whitelisted_macro = for (i = 0; i < REGEX_VARS; i++) regex_vars[i] = NULL; - /* If the program is called as "mailq" treat it as equivalent to "exim -bp"; this seems to be a generally accepted convention, since one finds symbolic links called "mailq" in standard OS configurations. */ @@ -2156,9 +2156,19 @@ for (i = 1; i < argc; i++) else if (Ustrcmp(argrest, "P") == 0) { - list_options = TRUE; - debug_selector |= D_v; - debug_file = stderr; + /* -bP config: we need to setup here, because later, + * when list_options is checked, the config is read already */ + if (argv[i+1] && Ustrcmp(argv[i+1], "config") == 0) + { + list_config = TRUE; + readconf_save_config(version_string); + } + else + { + list_options = TRUE; + debug_selector |= D_v; + debug_file = stderr; + } } /* -brt: Test retry configuration lookup */ @@ -2550,12 +2560,12 @@ for (i = 1; i < argc; i++) if (temp >= argrest && *temp == '.') f_end_dot = TRUE; allow_domain_literals = TRUE; strip_trailing_dot = TRUE; -#ifdef EXPERIMENTAL_INTERNATIONAL +#ifdef SUPPORT_I18N allow_utf8_domains = TRUE; #endif sender_address = parse_extract_address(argrest, &errmess, &dummy_start, &dummy_end, &sender_address_domain, TRUE); -#ifdef EXPERIMENTAL_INTERNATIONAL +#ifdef SUPPORT_I18N message_smtputf8 = string_is_utf8(sender_address); allow_utf8_domains = FALSE; #endif @@ -3725,7 +3735,7 @@ is equivalent to the ability to modify a setuid binary! This needs to happen before we read the main configuration. */ init_lookup_list(); -#ifdef EXPERIMENTAL_INTERNATIONAL +#ifdef SUPPORT_I18N if (running_in_test_harness) smtputf8_advertise_hosts = NULL; #endif @@ -4537,6 +4547,19 @@ if (list_options) exim_exit(EXIT_SUCCESS); } +if (list_config) + { + set_process_info("listing config"); + readconf_print(US"config", NULL, FALSE); + exim_exit(EXIT_SUCCESS); + } + + +/* Initialise subsystems as required */ +#ifndef DISABLE_DKIM +dkim_exim_init(); +#endif + /* Handle a request to deliver one or more messages that are already on the queue. Values of msg_action other than MSG_DELIVER and MSG_LOAD are dealt with @@ -5033,6 +5056,7 @@ if (host_checking) "**** This is not for real!\n\n", sender_host_address); + memset(sender_host_cache, 0, sizeof(sender_host_cache)); if (verify_check_host(&hosts_connection_nolog) == OK) BIT_CLEAR(log_selector, log_selector_size, Li_smtp_connection); log_write(L_smtp_connection, LOG_MAIN, "%s", smtp_get_connection_info()); @@ -5103,7 +5127,7 @@ if (mua_wrapper) deliver_drop_privilege = TRUE; queue_smtp = FALSE; queue_smtp_domains = NULL; -#ifdef EXPERIMENTAL_INTERNATIONAL +#ifdef SUPPORT_I18N message_utf8_downconvert = -1; /* convert-if-needed */ #endif } @@ -5207,6 +5231,7 @@ if (smtp_input) { smtp_in = stdin; smtp_out = stdout; + memset(sender_host_cache, 0, sizeof(sender_host_cache)); if (verify_check_host(&hosts_connection_nolog) == OK) BIT_CLEAR(log_selector, log_selector_size, Li_smtp_connection); log_write(L_smtp_connection, LOG_MAIN, "%s", smtp_get_connection_info()); @@ -5396,7 +5421,7 @@ while (more) errors_sender_rc : EXIT_FAILURE; } -#ifdef EXPERIMENTAL_INTERNATIONAL +#ifdef SUPPORT_I18N { BOOL b = allow_utf8_domains; allow_utf8_domains = TRUE; @@ -5404,7 +5429,7 @@ while (more) recipient = parse_extract_address(s, &errmess, &start, &end, &domain, FALSE); -#ifdef EXPERIMENTAL_INTERNATIONAL +#ifdef SUPPORT_I18N if (string_is_utf8(recipient)) message_smtputf8 = TRUE; else