X-Git-Url: https://git.exim.org/exim.git/blobdiff_plain/bf3c2c6b76cf8cf582dc2c33bd3d50cd4db25e2c..39755c16ba29d951df230944f652c5da9a445c0f:/src/src/readconf.c diff --git a/src/src/readconf.c b/src/src/readconf.c index 10ebc5e17..8a237d38a 100644 --- a/src/src/readconf.c +++ b/src/src/readconf.c @@ -285,6 +285,9 @@ static optionlist optionlist_config[] = { { "host_lookup_order", opt_stringptr, &host_lookup_order }, { "host_reject_connection", opt_stringptr, &host_reject_connection }, { "hosts_connection_nolog", opt_stringptr, &hosts_connection_nolog }, +#ifdef SUPPORT_PROXY + { "hosts_proxy", opt_stringptr, &hosts_proxy }, +#endif { "hosts_treat_as_local", opt_stringptr, &hosts_treat_as_local }, #ifdef LOOKUP_IBASE { "ibase_servers", opt_stringptr, &ibase_servers }, @@ -354,9 +357,6 @@ static optionlist optionlist_config[] = { { "print_topbitchars", opt_bool, &print_topbitchars }, { "process_log_path", opt_stringptr, &process_log_path }, { "prod_requires_admin", opt_bool, &prod_requires_admin }, -#ifdef EXPERIMENTAL_PROXY - { "proxy_required_hosts", opt_stringptr, &proxy_required_hosts }, -#endif { "qualify_domain", opt_stringptr, &qualify_domain_sender }, { "qualify_recipient", opt_stringptr, &qualify_domain_recipient }, { "queue_domains", opt_stringptr, &queue_domains }, @@ -413,7 +413,7 @@ static optionlist optionlist_config[] = { { "smtp_receive_timeout", opt_func, &fn_smtp_receive_timeout }, { "smtp_reserve_hosts", opt_stringptr, &smtp_reserve_hosts }, { "smtp_return_error_details",opt_bool, &smtp_return_error_details }, -#ifdef EXPERIMENTAL_INTERNATIONAL +#ifdef SUPPORT_I18N { "smtputf8_advertise_hosts", opt_stringptr, &smtputf8_advertise_hosts }, #endif #ifdef WITH_CONTENT_SCAN @@ -2534,7 +2534,9 @@ causes the value of any main configuration variable to be output if the second argument is NULL. There are some special values: all print all main configuration options - configure_file print the name of the configuration file + config_file print the name of the configuration file + (configure_file will still work, for backward + compatibility) routers print the routers' configurations transports print the transports' configuration authenticators print the authenticators' configuration @@ -2602,7 +2604,8 @@ if (type == NULL) return; } - if (Ustrcmp(name, "configure_file") == 0) + if ( Ustrcmp(name, "configure_file") == 0 + ||Ustrcmp(name, "config_file") == 0) { printf("%s\n", CS config_main_filename); return; @@ -4243,7 +4246,8 @@ save_config_position(const uschar *file, int line) /* Append a pre-parsed logical line to the config lines store, this operates on a global (static) list that holds all the pre-parsed -config lines */ +config lines, we do no further processing here, output formatting and +honouring of or macros will be done during output */ static void save_config_line(const uschar* line) { @@ -4285,41 +4289,42 @@ for (i = config_lines; i; i = i->next) /* # lines */ if (current[0] == '#') - { - puts(current); - continue; - } + puts(CCS current); /* begin lines are left aligned */ - if (strncmp(current, "begin", 5) == 0 && isspace(current[5])) + else if (Ustrncmp(current, "begin", 5) == 0 && isspace(current[5])) { - puts(current); + puts(CCS current); indent = TS; - continue; } /* router/acl/transport block names */ - if (current[strlen(current)-1] == ':' && !strchr(current, '=')) + else if (current[strlen(current)-1] == ':' && !Ustrchr(current, '=')) { printf("%*s%s\n", TS, "", current); indent = 2 * TS; - continue; } - /* as admin we don't care, as we do for "public" lines */ - if (admin || (!isupper(*current) && (strcmp(current, "hide") != 0))) + /* hidden lines (MACROS or prefixed with hide) */ + else if ( !admin + && ( isupper(*current) + || Ustrncmp(current, "hide", 4) == 0 && isspace(current[4]) + ) + ) { - printf("%*s%s\n", indent, "", current); - continue; + if (p = Ustrchr(current, '=')) + { + *p = '\0'; + printf("%*s%s = %s\n", indent, "", current, hidden); + } + /* e.g.: hide split_spool_directory */ + else + printf("%*s\n", indent, hidden); } - /* hidden lines */ - if (p = strchr(current, '=')) - { - *p = '\0'; - printf("%*s%s = %s\n", indent, "", current, hidden); - continue; - } + else + /* rest is public */ + printf("%*s%s\n", indent, "", current); } }