X-Git-Url: https://git.exim.org/exim.git/blobdiff_plain/57233af5f91cdca9a0232a71fab2d12a538cb1a6..451686a85b4706616f8233a6ac306318f7a56cf6:/src/src/readconf.c diff --git a/src/src/readconf.c b/src/src/readconf.c index 77836d157..d64721248 100644 --- a/src/src/readconf.c +++ b/src/src/readconf.c @@ -162,6 +162,7 @@ static optionlist optionlist_config[] = { { "acl_smtp_starttls", opt_stringptr, &acl_smtp_starttls }, #endif { "acl_smtp_vrfy", opt_stringptr, &acl_smtp_vrfy }, + { "add_environment", opt_stringptr, &add_environment }, { "admin_groups", opt_gidlist, &admin_groups }, { "allow_domain_literals", opt_bool, &allow_domain_literals }, { "allow_mx_to_ip", opt_bool, &allow_mx_to_ip }, @@ -211,15 +212,20 @@ static optionlist optionlist_config[] = { { "disable_ipv6", opt_bool, &disable_ipv6 }, #ifndef DISABLE_DKIM { "dkim_verify_signers", opt_stringptr, &dkim_verify_signers }, +#endif +#ifdef EXPERIMENTAL_DMARC + { "dmarc_forensic_sender", opt_stringptr, &dmarc_forensic_sender }, + { "dmarc_history_file", opt_stringptr, &dmarc_history_file }, + { "dmarc_tld_file", opt_stringptr, &dmarc_tld_file }, #endif { "dns_again_means_nonexist", opt_stringptr, &dns_again_means_nonexist }, { "dns_check_names_pattern", opt_stringptr, &check_dns_names_pattern }, { "dns_csa_search_limit", opt_int, &dns_csa_search_limit }, { "dns_csa_use_reverse", opt_bool, &dns_csa_use_reverse }, + { "dns_dnssec_ok", opt_int, &dns_dnssec_ok }, { "dns_ipv4_lookup", opt_stringptr, &dns_ipv4_lookup }, { "dns_retrans", opt_time, &dns_retrans }, { "dns_retry", opt_int, &dns_retry }, - { "dns_dnssec_ok", opt_int, &dns_dnssec_ok }, { "dns_use_edns0", opt_int, &dns_use_edns0 }, /* This option is now a no-op, retained for compability */ { "drop_cr", opt_bool, &drop_cr }, @@ -238,8 +244,8 @@ static optionlist optionlist_config[] = { { "gecos_name", opt_stringptr, &gecos_name }, { "gecos_pattern", opt_stringptr, &gecos_pattern }, #ifdef SUPPORT_TLS + { "gnutls_allow_auto_pkcs11", opt_bool, &gnutls_allow_auto_pkcs11 }, { "gnutls_compat_mode", opt_bool, &gnutls_compat_mode }, - { "gnutls_enable_pkcs11", opt_bool, &gnutls_enable_pkcs11 }, /* These three gnutls_require_* options stopped working in Exim 4.80 */ { "gnutls_require_kx", opt_stringptr, &gnutls_require_kx }, { "gnutls_require_mac", opt_stringptr, &gnutls_require_mac }, @@ -265,6 +271,7 @@ static optionlist optionlist_config[] = { { "ignore_bounce_errors_after", opt_time, &ignore_bounce_errors_after }, { "ignore_fromline_hosts", opt_stringptr, &ignore_fromline_hosts }, { "ignore_fromline_local", opt_bool, &ignore_fromline_local }, + { "keep_environment", opt_stringptr, &keep_environment }, { "keep_malformed", opt_time, &keep_malformed }, #ifdef LOOKUP_LDAP { "ldap_ca_cert_dir", opt_stringptr, &eldap_ca_cert_dir }, @@ -345,6 +352,9 @@ static optionlist optionlist_config[] = { { "recipient_unqualified_hosts", opt_stringptr, &recipient_unqualified_hosts }, { "recipients_max", opt_int, &recipients_max }, { "recipients_max_reject", opt_bool, &recipients_max_reject }, +#ifdef EXPERIMENTAL_REDIS + { "redis_servers", opt_stringptr, &redis_servers }, +#endif { "remote_max_parallel", opt_int, &remote_max_parallel }, { "remote_sort_domains", opt_stringptr, &remote_sort_domains }, { "retry_data_expire", opt_time, &retry_data_expire }, @@ -2465,6 +2475,7 @@ second argument is NULL. There are some special values: macro_list print a list of macro names +name print a named list item local_scan print the local_scan options + environment print the used execution environment If the second argument is not NULL, it must be one of "router", "transport", "authenticator" or "macro" in which case the first argument identifies the @@ -2606,6 +2617,25 @@ if (type == NULL) names_only = TRUE; } + else if (Ustrcmp(name, "environment") == 0) + { + if (environ) + { + uschar **p; + size_t n; + for (p = USS environ; *p; p++) ; + n = p - USS environ; + qsort(environ, p - USS environ, sizeof(*p), (__compar_fn_t) string_compare_by_pointer); + + for (p = USS environ; *p; p++) + { + if (no_labels) *(Ustrchr(*p, '=')) = '\0'; + puts(*p); + } + } + return; + } + else { print_ol(find_option(name, optionlist_config, optionlist_config_size), @@ -2919,6 +2949,15 @@ uschar *list = config_main_filelist; while((filename = string_nextinlist(&list, &sep, big_buffer, big_buffer_size)) != NULL) { + + /* To avoid confusion: Exim changes to / at the very beginning and + * and to $spool_directory later. */ + if (filename[0] != '/') + { + fprintf(stderr, "-C %s: only absolute names are allowed\n", filename); + exit(EXIT_FAILURE); + } + /* Cut out all the fancy processing unless specifically wanted */ #if defined(CONFIGURE_FILE_USE_NODE) || defined(CONFIGURE_FILE_USE_EUID) @@ -3354,6 +3393,11 @@ if (openssl_options != NULL) # endif } #endif + +if ((!add_environment || *add_environment == '\0') && !keep_environment) + log_write(0, LOG_MAIN, + "WARNING: purging the environment.\n" + " Suggested action: use keep_environment and add_environment.\n"); } @@ -3824,7 +3868,7 @@ while ((p = get_config_line()) != NULL) pp = p; while (mac_isgraph(*p)) p++; if (p - pp <= 0) log_write(0, LOG_PANIC_DIE|LOG_CONFIG_IN, - "missing error type"); + "missing error type in retry rule"); /* Test error names for things we understand. */ @@ -3967,27 +4011,15 @@ return acl_line; /* Now the main function: -Arguments: - skip TRUE when this Exim process is doing something that will - not need the ACL data - +Arguments: none Returns: nothing */ static void -readconf_acl(BOOL skip) +readconf_acl(void) { uschar *p; -/* Not receiving messages, don't need to parse the ACL data */ - -if (skip) - { - DEBUG(D_acl) debug_printf("skipping ACL configuration - not needed\n"); - while ((p = get_config_line()) != NULL); - return; - } - /* Read each ACL and add it into the tree. Macro (re)definitions are allowed between ACLs. */ @@ -4072,9 +4104,7 @@ Because it may confuse people as to whether the names are singular or plural, we add "s" if it's missing. There is always enough room in next_section for this. This function is basically just a switch. -Arguments: - skip_acl TRUE if ACL information is not needed - +Arguments: none Returns: nothing */ @@ -4088,7 +4118,7 @@ static uschar *section_list[] = { US"transports"}; void -readconf_rest(BOOL skip_acl) +readconf_rest(void) { int had = 0; @@ -4121,7 +4151,7 @@ while(next_section[0] != 0) switch(mid) { - case 0: readconf_acl(skip_acl); break; + case 0: readconf_acl(); break; case 1: auths_init(); break; case 2: local_scan_init(); break; case 3: readconf_retries(); break;