X-Git-Url: https://vcs.fsf.org/?p=exim.git;a=blobdiff_plain;f=src%2Fsrc%2Fglobals.c;h=894b599673fe954b4a836cba3b89031fd59c2acd;hp=20e578e2791478be5ede4c24fef86db0dac18123;hb=32dfdf8baa8ccf091a0d5d4d75e8627424898756;hpb=ac0cac6839368273e14e574ca5b9f817edcd6208 diff --git a/src/src/globals.c b/src/src/globals.c index 20e578e27..894b59967 100644 --- a/src/src/globals.c +++ b/src/src/globals.c @@ -2,7 +2,7 @@ * Exim - an Internet mail transport agent * *************************************************/ -/* Copyright (c) University of Cambridge 1995 - 2015 */ +/* Copyright (c) University of Cambridge 1995 - 2017 */ /* See the file NOTICE for conditions of use and distribution. */ /* All the global variables are defined together in this one module, so @@ -35,7 +35,7 @@ optionlist optionlist_auths[] = { (void *)(offsetof(auth_instance, set_id)) } }; -int optionlist_auths_size = sizeof(optionlist_auths)/sizeof(optionlist); +int optionlist_auths_size = nelem(optionlist_auths); /* An empty host aliases list. */ @@ -49,6 +49,7 @@ duplicate them here... */ uschar *opt_perl_startup = NULL; BOOL opt_perl_at_start = FALSE; BOOL opt_perl_started = FALSE; +BOOL opt_perl_taintmode = FALSE; #endif #ifdef EXPAND_DLFUNC @@ -83,7 +84,7 @@ uschar *oracle_servers = NULL; uschar *pgsql_servers = NULL; #endif -#ifdef EXPERIMENTAL_REDIS +#ifdef LOOKUP_REDIS uschar *redis_servers = NULL; #endif @@ -137,18 +138,14 @@ tls_support tls_out = { uschar *dsn_envid = NULL; int dsn_ret = 0; const pcre *regex_DSN = NULL; -BOOL smtp_use_dsn = FALSE; uschar *dsn_advertise_hosts = NULL; #ifdef SUPPORT_TLS BOOL gnutls_compat_mode = FALSE; BOOL gnutls_allow_auto_pkcs11 = FALSE; -uschar *gnutls_require_mac = NULL; -uschar *gnutls_require_kx = NULL; -uschar *gnutls_require_proto = NULL; uschar *openssl_options = NULL; const pcre *regex_STARTTLS = NULL; -uschar *tls_advertise_hosts = NULL; /* This is deliberate */ +uschar *tls_advertise_hosts = US"*"; uschar *tls_certificate = NULL; uschar *tls_crl = NULL; /* This default matches NSS DH_MAX_P_BITS value at current time (2012), because @@ -156,17 +153,18 @@ that's the interop problem which has been observed: GnuTLS suggesting a higher bit-count as "NORMAL" (2432) and Thunderbird dropping connection. */ int tls_dh_max_bits = 2236; uschar *tls_dhparam = NULL; -uschar *tls_eccurve = US"prime256v1"; -#ifndef DISABLE_OCSP +uschar *tls_eccurve = US"auto"; +# ifndef DISABLE_OCSP uschar *tls_ocsp_file = NULL; -#endif -BOOL tls_offered = FALSE; +# endif uschar *tls_privatekey = NULL; BOOL tls_remember_esmtp = FALSE; uschar *tls_require_ciphers = NULL; uschar *tls_try_verify_hosts = NULL; uschar *tls_verify_certificates= US"system"; uschar *tls_verify_hosts = NULL; +#else /*!SUPPORT_TLS*/ +uschar *tls_advertise_hosts = NULL; #endif #ifndef DISABLE_PRDR @@ -176,7 +174,7 @@ BOOL prdr_requested = FALSE; const pcre *regex_PRDR = NULL; #endif -#ifdef EXPERIMENTAL_INTERNATIONAL +#ifdef SUPPORT_I18N const pcre *regex_UTF8 = NULL; #endif @@ -184,8 +182,13 @@ const pcre *regex_UTF8 = NULL; incoming TCP/IP. The defaults use stdin. We never need these for any stand-alone tests. */ -#ifndef STAND_ALONE -int (*receive_getc)(void) = stdin_getc; +#if !defined(STAND_ALONE) && !defined(MACRO_PREDEF) +int (*lwr_receive_getc)(unsigned) = stdin_getc; +uschar * (*lwr_receive_getbuf)(unsigned *) = NULL; +int (*lwr_receive_ungetc)(int) = stdin_ungetc; +int (*receive_getc)(unsigned) = stdin_getc; +uschar * (*receive_getbuf)(unsigned *) = NULL; +void (*receive_get_cache)(void)= NULL; int (*receive_ungetc)(int) = stdin_ungetc; int (*receive_feof)(void) = stdin_feof; int (*receive_ferror)(void) = stdin_ferror; @@ -227,6 +230,8 @@ uschar *acl_arg[9] = {NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}; int acl_narg = 0; +int acl_level = 0; + uschar *acl_not_smtp = NULL; #ifdef WITH_CONTENT_SCAN uschar *acl_not_smtp_mime = NULL; @@ -318,8 +323,8 @@ uschar *acl_wherecodes[] = { US"550", /* RCPT */ BOOL active_local_from_check = FALSE; BOOL active_local_sender_retain = FALSE; -int body_8bitmime = 0; BOOL accept_8bitmime = TRUE; /* deliberately not RFC compliant */ +uschar *add_environment = NULL; address_item *addr_duplicate = NULL; address_item address_defaults = { @@ -378,6 +383,7 @@ address_item address_defaults = { { 0 }, /* localpart_cache - ditto */ -1, /* mode */ 0, /* more_errno */ + 0, /* delivery_usec */ ERRNO_UNKNOWNERROR, /* basic_errno */ 0, /* child_count */ -1, /* return_file */ @@ -393,7 +399,7 @@ address_item address_defaults = { #ifdef EXPERIMENTAL_SRS NULL, /* srs_sender */ #endif -#ifdef EXPERIMENTAL_INTERNATIONAL +#ifdef SUPPORT_I18N FALSE, /* utf8 */ #endif } @@ -467,16 +473,19 @@ int bmi_deliver = 1; int bmi_run = 0; uschar *bmi_verdicts = NULL; #endif +int bsmtp_transaction_linecount = 0; +int body_8bitmime = 0; int body_linecount = 0; int body_zerocount = 0; uschar *bounce_message_file = NULL; uschar *bounce_message_text = NULL; uschar *bounce_recipient = NULL; BOOL bounce_return_body = TRUE; +int bounce_return_linesize_limit = 998; BOOL bounce_return_message = TRUE; int bounce_return_size_limit = 100*1024; uschar *bounce_sender_authentication = NULL; -int bsmtp_transaction_linecount = 0; +uschar *builtin_macros_create_trigger = NULL; uschar *callout_address = NULL; int callout_cache_domain_positive_expire = 7*24*60*60; @@ -485,22 +494,33 @@ int callout_cache_positive_expire = 24*60*60; int callout_cache_negative_expire = 2*60*60; uschar *callout_random_local_part = US"$primary_hostname-$tod_epoch-testing"; uschar *check_dns_names_pattern= US"(?i)^(?>(?(1)\\.|())[^\\W](?>[a-z0-9/_-]*[^\\W])?)+(\\.?)$"; -int check_log_inodes = 0; -int check_log_space = 0; +int check_log_inodes = 100; +int check_log_space = 10*1024; /* 10K Kbyte == 10MB */ BOOL check_rfc2047_length = TRUE; -int check_spool_inodes = 0; -int check_spool_space = 0; -uschar *client_authenticator = NULL; -uschar *client_authenticated_id = NULL; -uschar *client_authenticated_sender = NULL; +int check_spool_inodes = 100; +int check_spool_space = 10*1024; /* 10K Kbyte == 10MB */ + +uschar *chunking_advertise_hosts = US"*"; +unsigned chunking_datasize = 0; +unsigned chunking_data_left = 0; +BOOL chunking_offered = FALSE; +chunking_state_t chunking_state= CHUNKING_NOT_OFFERED; +const pcre *regex_CHUNKING = NULL; + +uschar *client_authenticator = NULL; +uschar *client_authenticated_id = NULL; +uschar *client_authenticated_sender = NULL; int clmacro_count = 0; uschar *clmacros[MAX_CLMACROS]; +BOOL commandline_checks_require_admin = FALSE; BOOL config_changed = FALSE; FILE *config_file = NULL; -uschar *config_filename = NULL; +const uschar *config_filename = NULL; int config_lineno = 0; #ifdef CONFIGURE_GROUP gid_t config_gid = CONFIGURE_GROUP; +#else +gid_t config_gid = 0; #endif uschar *config_main_filelist = US CONFIGURE_FILE "\0<-----------Space to patch configure_filename->"; @@ -509,9 +529,12 @@ uschar *config_main_directory = NULL; #ifdef CONFIGURE_OWNER uid_t config_uid = CONFIGURE_OWNER; +#else +uid_t config_uid = 0; #endif int connection_max_messages= -1; +uschar *continue_proxy_cipher = NULL; uschar *continue_hostname = NULL; uschar *continue_host_address = NULL; BOOL continue_more = FALSE; @@ -520,7 +543,10 @@ uschar *continue_transport = NULL; uschar *csa_status = NULL; cut_t cutthrough = { + FALSE, /* verify-only: normal delivery */ FALSE, /* delivery: when to attempt */ + FALSE, /* on defer: spool locally */ + FALSE, /* not a TLS conn yet */ -1, /* fd: open connection */ 0, /* nrcpt: number of addresses */ }; @@ -581,6 +607,7 @@ bit_table debug_options[] = { /* must be in alphabetical order */ int debug_options_count = nelem(debug_options); unsigned int debug_selector = 0; +BOOL debug_store = FALSE; int delay_warning[DELAY_WARNING_SIZE] = { DELAY_WARNING_SIZE, 1, 24*60*60 }; uschar *delay_warning_condition= US"${if or {" @@ -621,11 +648,6 @@ uschar *deliver_selectstring = NULL; BOOL deliver_selectstring_regex = FALSE; uschar *deliver_selectstring_sender = NULL; BOOL deliver_selectstring_sender_regex = FALSE; -#ifdef WITH_OLD_DEMIME -int demime_errorlevel = 0; -int demime_ok = 0; -uschar *demime_reason = NULL; -#endif BOOL disable_callout_flush = FALSE; BOOL disable_delay_flush = FALSE; #ifdef ENABLE_DISABLE_FSYNC @@ -635,13 +657,14 @@ BOOL disable_ipv6 = FALSE; BOOL disable_logging = FALSE; #ifndef DISABLE_DKIM +BOOL dkim_collect_input = FALSE; uschar *dkim_cur_signer = NULL; +BOOL dkim_disable_verify = FALSE; +int dkim_key_length = 0; uschar *dkim_signers = NULL; uschar *dkim_signing_domain = NULL; uschar *dkim_signing_selector = NULL; uschar *dkim_verify_signers = US"$dkim_signers"; -BOOL dkim_collect_input = FALSE; -BOOL dkim_disable_verify = FALSE; #endif #ifdef EXPERIMENTAL_DMARC BOOL dmarc_has_been_checked = FALSE; @@ -687,9 +710,9 @@ uschar *errors_copy = NULL; int error_handling = ERRORS_SENDER; uschar *errors_reply_to = NULL; int errors_sender_rc = EXIT_FAILURE; -#ifdef EXPERIMENTAL_EVENT +#ifndef DISABLE_EVENT uschar *event_action = NULL; /* expansion for delivery events */ -uschar *event_data = NULL; /* auxilary data variable for event */ +uschar *event_data = NULL; /* auxiliary data variable for event */ int event_defer_errno = 0; const uschar *event_name = NULL; /* event name variable */ #endif @@ -701,6 +724,7 @@ uschar *exim_path = US BIN_DIRECTORY "/exim" "\0<---------------Space to patch exim_path->"; uid_t exim_uid = EXIM_UID; BOOL exim_uid_set = TRUE; /* This uid is always set */ +int expand_level = 0; /* Nesting depth, indent for debug */ int expand_forbid = 0; int expand_nlength[EXPAND_MAXN+1]; int expand_nmax = -1; @@ -723,9 +747,6 @@ uschar *filter_test_sfile = NULL; uschar *filter_test_ufile = NULL; uschar *filter_thisaddress = NULL; int finduser_retries = 0; -#ifdef WITH_OLD_DEMIME -uschar *found_extension = NULL; -#endif uid_t fixed_never_users[] = { FIXED_NEVER_USERS }; uschar *freeze_tell = NULL; uschar *freeze_tell_config = NULL; @@ -792,6 +813,7 @@ BOOL ignore_fromline_local = FALSE; uschar *ignore_fromline_hosts = NULL; BOOL inetd_wait_mode = FALSE; int inetd_wait_timeout = -1; +uschar *initial_cwd = NULL; uschar *interface_address = NULL; int interface_port = -1; BOOL is_inetd = FALSE; @@ -799,6 +821,8 @@ uschar *iterate_item = NULL; int journal_fd = -1; +uschar *keep_environment = NULL; + int keep_malformed = 4*24*60*60; /* 4 days */ uschar *eldap_dn = NULL; @@ -863,16 +887,18 @@ bit_table log_options[] = { /* must be in alphabetical order */ BIT_TABLE(L, deliver_time), BIT_TABLE(L, delivery_size), BIT_TABLE(L, dnslist_defer), + BIT_TABLE(L, dnssec), BIT_TABLE(L, etrn), BIT_TABLE(L, host_lookup_failed), BIT_TABLE(L, ident_timeout), BIT_TABLE(L, incoming_interface), BIT_TABLE(L, incoming_port), BIT_TABLE(L, lost_incoming_connection), + BIT_TABLE(L, millisec), BIT_TABLE(L, outgoing_interface), BIT_TABLE(L, outgoing_port), BIT_TABLE(L, pid), -#ifdef EXPERIMENTAL_PROXY +#if defined(SUPPORT_PROXY) || defined (SUPPORT_SOCKS) BIT_TABLE(L, proxy), #endif BIT_TABLE(L, queue_run), @@ -915,7 +941,6 @@ uschar *lookup_dnssec_authenticated = NULL; int lookup_open_max = 25; uschar *lookup_value = NULL; -macro_item *macros = NULL; uschar *mailstore_basename = NULL; #ifdef WITH_CONTENT_SCAN uschar *malware_name = NULL; /* Virus Name */ @@ -940,7 +965,7 @@ int message_linecount = 0; BOOL message_logs = TRUE; int message_size = 0; uschar *message_size_limit = US"50M"; -#ifdef EXPERIMENTAL_INTERNATIONAL +#ifdef SUPPORT_I18N BOOL message_smtputf8 = FALSE; int message_utf8_downconvert = 0; /* -1 ifneeded; 0 never; 1 always */ #endif @@ -975,6 +1000,9 @@ BOOL no_mbox_unspool = FALSE; #endif BOOL no_multiline_responses = FALSE; +const int on = 1; /* for setsockopt */ +const int off = 0; + uid_t original_euid; gid_t originator_gid; uschar *originator_login = NULL; @@ -998,14 +1026,14 @@ int process_info_len = 0; uschar *process_log_path = NULL; BOOL prod_requires_admin = TRUE; -#ifdef EXPERIMENTAL_PROXY -uschar *proxy_host_address = US""; -int proxy_host_port = 0; -uschar *proxy_required_hosts = US""; +#if defined(SUPPORT_PROXY) || defined(SUPPORT_SOCKS) +uschar *hosts_proxy = US""; +uschar *proxy_external_address = US""; +int proxy_external_port = 0; +uschar *proxy_local_address = US""; +int proxy_local_port = 0; BOOL proxy_session = FALSE; BOOL proxy_session_failed = FALSE; -uschar *proxy_target_address = US""; -int proxy_target_port = 0; #endif uschar *prvscheck_address = NULL; @@ -1019,6 +1047,7 @@ BOOL queue_2stage = FALSE; uschar *queue_domains = NULL; int queue_interval = -1; BOOL queue_list_requires_admin = TRUE; +uschar *queue_name = US""; BOOL queue_only = FALSE; uschar *queue_only_file = NULL; int queue_only_load = -1; @@ -1029,7 +1058,7 @@ BOOL queue_run_first_delivery = FALSE; BOOL queue_run_force = FALSE; BOOL queue_run_in_order = FALSE; BOOL queue_run_local = FALSE; -int queue_run_max = 5; +uschar *queue_run_max = US"5"; pid_t queue_run_pid = (pid_t)0; int queue_run_pipe = -1; BOOL queue_running = FALSE; @@ -1079,7 +1108,7 @@ uschar *received_header_text = US int received_headers_max = 30; uschar *received_protocol = NULL; -int received_time = 0; +struct timeval received_time = { 0, 0 }; uschar *recipient_data = NULL; uschar *recipient_unqualified_hosts = NULL; uschar *recipient_verify_failure = NULL; @@ -1311,9 +1340,9 @@ int smtp_rlr_base = 0; double smtp_rlr_factor = 0.0; int smtp_rlr_limit = 0; int smtp_rlr_threshold = INT_MAX; -BOOL smtp_use_pipelining = FALSE; -BOOL smtp_use_size = FALSE; -#ifdef EXPERIMENTAL_INTERNATIONAL +unsigned smtp_peer_options = 0; +unsigned smtp_peer_options_wrap= 0; +#ifdef SUPPORT_I18N uschar *smtputf8_advertise_hosts = US"*"; /* overridden under test-harness */ #endif @@ -1336,6 +1365,8 @@ uschar *spf_smtp_comment = NULL; BOOL split_spool_directory = FALSE; uschar *spool_directory = US SPOOL_DIRECTORY "\0<--------------Space to patch spool_directory->"; +BOOL spool_file_wireformat = FALSE; +BOOL spool_wireformat = FALSE; #ifdef EXPERIMENTAL_SRS uschar *srs_config = NULL; uschar *srs_db_address = NULL; @@ -1365,6 +1396,7 @@ BOOL suppress_local_fixups_default = FALSE; BOOL synchronous_delivery = FALSE; BOOL syslog_duplication = TRUE; int syslog_facility = LOG_MAIL; +BOOL syslog_pid = TRUE; uschar *syslog_processname = US"exim"; BOOL syslog_timestamp = TRUE; uschar *system_filter = NULL; @@ -1380,6 +1412,7 @@ uid_t system_filter_uid = (uid_t)-1; BOOL system_filter_uid_set = FALSE; BOOL system_filtering = FALSE; +BOOL tcp_fastopen_ok = FALSE; BOOL tcp_nodelay = TRUE; #ifdef USE_TCP_WRAPPERS uschar *tcp_wrappers_daemon_name = US TCP_WRAPPERS_DAEMON_NAME; @@ -1443,7 +1476,7 @@ transport_instance transport_defaults = { FALSE, /* log_defer_output */ TRUE_UNSET /* retry_use_local_part: BOOL, but set neither 1 nor 0 so can detect unset */ -#ifdef EXPERIMENTAL_EVENT +#ifndef DISABLE_EVENT ,NULL /* event_action */ #endif }; @@ -1498,8 +1531,8 @@ uschar *uucp_from_sender = US"$1"; uschar *verify_mode = NULL; uschar *version_copyright = - US"Copyright (c) University of Cambridge, 1995 - 2015\n" - "(c) The Exim Maintainers and contributors in ACKNOWLEDGMENTS file, 2007 - 2015"; + US"Copyright (c) University of Cambridge, 1995 - 2017\n" + "(c) The Exim Maintainers and contributors in ACKNOWLEDGMENTS file, 2007 - 2017"; uschar *version_date = US"?"; uschar *version_cnumber = US"????"; uschar *version_string = US"?";