Move notifier socket to general availability
[exim.git] / src / src / globals.c
CommitLineData
059ec3d9
PH
1/*************************************************
2* Exim - an Internet mail transport agent *
3*************************************************/
4
f9ba5e22 5/* Copyright (c) University of Cambridge 1995 - 2018 */
059ec3d9
PH
6/* See the file NOTICE for conditions of use and distribution. */
7
8/* All the global variables are defined together in this one module, so
9that they are easy to find. */
10
11#include "exim.h"
12
13
059ec3d9
PH
14/* Generic options for auths, all of which live inside auth_instance
15data blocks and hence have the opt_public flag set. */
16
17optionlist optionlist_auths[] = {
6c512171 18 { "client_condition", opt_stringptr | opt_public,
13a4b4c1 19 OPT_OFF(auth_instance, client_condition) },
6f123593 20 { "client_set_id", opt_stringptr | opt_public,
13a4b4c1 21 OPT_OFF(auth_instance, set_client_id) },
059ec3d9 22 { "driver", opt_stringptr | opt_public,
13a4b4c1 23 OPT_OFF(auth_instance, driver_name) },
059ec3d9 24 { "public_name", opt_stringptr | opt_public,
13a4b4c1 25 OPT_OFF(auth_instance, public_name) },
059ec3d9 26 { "server_advertise_condition", opt_stringptr | opt_public,
13a4b4c1 27 OPT_OFF(auth_instance, advertise_condition)},
16ff981e 28 { "server_condition", opt_stringptr | opt_public,
13a4b4c1 29 OPT_OFF(auth_instance, server_condition) },
059ec3d9 30 { "server_debug_print", opt_stringptr | opt_public,
13a4b4c1 31 OPT_OFF(auth_instance, server_debug_string) },
059ec3d9 32 { "server_mail_auth_condition", opt_stringptr | opt_public,
13a4b4c1 33 OPT_OFF(auth_instance, mail_auth_condition) },
059ec3d9 34 { "server_set_id", opt_stringptr | opt_public,
13a4b4c1 35 OPT_OFF(auth_instance, set_id) }
059ec3d9
PH
36};
37
c0b9d3e8 38int optionlist_auths_size = nelem(optionlist_auths);
059ec3d9
PH
39
40/* An empty host aliases list. */
41
42uschar *no_aliases = NULL;
43
44
45/* For comments on these variables, see globals.h. I'm too idle to
46duplicate them here... */
47
48#ifdef EXIM_PERL
49uschar *opt_perl_startup = NULL;
50BOOL opt_perl_at_start = FALSE;
51BOOL opt_perl_started = FALSE;
2f680c0c 52BOOL opt_perl_taintmode = FALSE;
059ec3d9
PH
53#endif
54
1a46a8c5
PH
55#ifdef EXPAND_DLFUNC
56tree_node *dlobj_anchor = NULL;
57#endif
58
059ec3d9
PH
59#ifdef LOOKUP_IBASE
60uschar *ibase_servers = NULL;
61#endif
62
63#ifdef LOOKUP_LDAP
bc19a55b
PP
64uschar *eldap_ca_cert_dir = NULL;
65uschar *eldap_ca_cert_file = NULL;
66uschar *eldap_cert_file = NULL;
67uschar *eldap_cert_key = NULL;
68uschar *eldap_cipher_suite = NULL;
059ec3d9 69uschar *eldap_default_servers = NULL;
bc19a55b 70uschar *eldap_require_cert = NULL;
059ec3d9 71int eldap_version = -1;
bc19a55b 72BOOL eldap_start_tls = FALSE;
059ec3d9
PH
73#endif
74
75#ifdef LOOKUP_MYSQL
76uschar *mysql_servers = NULL;
77#endif
78
79#ifdef LOOKUP_ORACLE
80uschar *oracle_servers = NULL;
81#endif
82
83#ifdef LOOKUP_PGSQL
84uschar *pgsql_servers = NULL;
85#endif
86
de78e2d5 87#ifdef LOOKUP_REDIS
9bdd29ad
TL
88uschar *redis_servers = NULL;
89#endif
90
31480e42
PH
91#ifdef LOOKUP_SQLITE
92int sqlite_lock_timeout = 5;
93#endif
94
059ec3d9
PH
95#ifdef SUPPORT_MOVE_FROZEN_MESSAGES
96BOOL move_frozen_messages = FALSE;
97#endif
98
99/* These variables are outside the #ifdef because it keeps the code less
100cluttered in several places (e.g. during logging) if we can always refer to
74f1a423
JH
101them. Also, the tls_ variables are now always visible. Note that these are
102only used for smtp connections, not for service-daemon access. */
059ec3d9 103
817d9f57 104tls_support tls_in = {
b10c87b3
JH
105 .active = {.sock = -1}
106 /* all other elements zero */
817d9f57
JH
107};
108tls_support tls_out = {
74f1a423 109 .active = {.sock = -1},
b10c87b3 110 /* all other elements zero */
817d9f57
JH
111};
112
6c1c3d1d
WB
113uschar *dsn_envid = NULL;
114int dsn_ret = 0;
115const pcre *regex_DSN = NULL;
6c1c3d1d 116uschar *dsn_advertise_hosts = NULL;
059ec3d9 117
01603eec 118#ifndef DISABLE_TLS
e6060e2c 119BOOL gnutls_compat_mode = FALSE;
2519e60d 120BOOL gnutls_allow_auto_pkcs11 = FALSE;
77bb000f 121uschar *openssl_options = NULL;
059ec3d9 122const pcre *regex_STARTTLS = NULL;
23f3dc67 123uschar *tls_advertise_hosts = US"*";
059ec3d9
PH
124uschar *tls_certificate = NULL;
125uschar *tls_crl = NULL;
3375e053
PP
126/* This default matches NSS DH_MAX_P_BITS value at current time (2012), because
127that's the interop problem which has been observed: GnuTLS suggesting a higher
128bit-count as "NORMAL" (2432) and Thunderbird dropping connection. */
129int tls_dh_max_bits = 2236;
059ec3d9 130uschar *tls_dhparam = NULL;
8e53a4fc 131uschar *tls_eccurve = US"auto";
23f3dc67 132# ifndef DISABLE_OCSP
3f7eeb86 133uschar *tls_ocsp_file = NULL;
23f3dc67 134# endif
059ec3d9
PH
135uschar *tls_privatekey = NULL;
136BOOL tls_remember_esmtp = FALSE;
137uschar *tls_require_ciphers = NULL;
b10c87b3
JH
138# ifdef EXPERIMENTAL_TLS_RESUME
139uschar *tls_resumption_hosts = NULL;
140# endif
059ec3d9 141uschar *tls_try_verify_hosts = NULL;
0e0f3f56 142uschar *tls_verify_certificates= US"system";
059ec3d9 143uschar *tls_verify_hosts = NULL;
01603eec 144#else /*DISABLE_TLS*/
23f3dc67 145uschar *tls_advertise_hosts = NULL;
059ec3d9
PH
146#endif
147
8ccd00b1 148#ifndef DISABLE_PRDR
fd98a5c6
JH
149/* Per Recipient Data Response variables */
150BOOL prdr_enable = FALSE;
151BOOL prdr_requested = FALSE;
152const pcre *regex_PRDR = NULL;
153#endif
059ec3d9 154
8c5d388a 155#ifdef SUPPORT_I18N
7ade712c
JH
156const pcre *regex_UTF8 = NULL;
157#endif
158
059ec3d9
PH
159/* Input-reading functions for messages, so we can use special ones for
160incoming TCP/IP. The defaults use stdin. We never need these for any
161stand-alone tests. */
162
d185889f 163#if !defined(STAND_ALONE) && !defined(MACRO_PREDEF)
bd8fbe36 164int (*lwr_receive_getc)(unsigned) = stdin_getc;
0d81dabc 165uschar * (*lwr_receive_getbuf)(unsigned *) = NULL;
7e3ce68e 166int (*lwr_receive_ungetc)(int) = stdin_ungetc;
bd8fbe36 167int (*receive_getc)(unsigned) = stdin_getc;
0d81dabc 168uschar * (*receive_getbuf)(unsigned *) = NULL;
584e96c6 169void (*receive_get_cache)(void)= NULL;
059ec3d9
PH
170int (*receive_ungetc)(int) = stdin_ungetc;
171int (*receive_feof)(void) = stdin_feof;
172int (*receive_ferror)(void) = stdin_ferror;
58eb016e 173BOOL (*receive_smtp_buffered)(void) = NULL; /* Only used for SMTP */
059ec3d9
PH
174#endif
175
176
177/* List of per-address expansion variables for clearing and saving/restoring
178when verifying one address while routing/verifying another. We have to have
179the size explicit, because it is referenced from more than one module. */
180
55414b25
JH
181const uschar **address_expansions[ADDRESS_EXPANSIONS_COUNT] = {
182 CUSS &deliver_address_data,
183 CUSS &deliver_domain,
184 CUSS &deliver_domain_data,
185 CUSS &deliver_domain_orig,
186 CUSS &deliver_domain_parent,
187 CUSS &deliver_localpart,
188 CUSS &deliver_localpart_data,
189 CUSS &deliver_localpart_orig,
190 CUSS &deliver_localpart_parent,
191 CUSS &deliver_localpart_prefix,
192 CUSS &deliver_localpart_suffix,
193 CUSS (uschar **)(&deliver_recipients),
194 CUSS &deliver_host,
195 CUSS &deliver_home,
196 CUSS &address_file,
197 CUSS &address_pipe,
198 CUSS &self_hostname,
059ec3d9
PH
199 NULL };
200
201int address_expansions_count = sizeof(address_expansions)/sizeof(uschar **);
202
8768d548
JH
203/******************************************************************************/
204/* General global variables. Boolean flags are done as a group
205so that only one bit each is needed, packed, for all those we never
206need to take a pointer - and only a char for the rest.
207This means a struct, unfortunately since it clutters the sourcecode. */
208
209struct global_flags f =
210{
211 .acl_temp_details = FALSE,
212 .active_local_from_check = FALSE,
213 .active_local_sender_retain = FALSE,
214 .address_test_mode = FALSE,
215 .admin_user = FALSE,
216 .allow_auth_unadvertised= FALSE,
217 .allow_unqualified_recipient = TRUE, /* For local messages */
218 .allow_unqualified_sender = TRUE, /* Reset for SMTP */
219 .authentication_local = FALSE,
220
221 .background_daemon = TRUE,
222
223 .chunking_offered = FALSE,
224 .config_changed = FALSE,
225 .continue_more = FALSE,
226
227 .daemon_listen = FALSE,
228 .debug_daemon = FALSE,
229 .deliver_firsttime = FALSE,
230 .deliver_force = FALSE,
231 .deliver_freeze = FALSE,
232 .deliver_force_thaw = FALSE,
233 .deliver_manual_thaw = FALSE,
234 .deliver_selectstring_regex = FALSE,
235 .deliver_selectstring_sender_regex = FALSE,
236 .disable_callout_flush = FALSE,
237 .disable_delay_flush = FALSE,
238 .disable_logging = FALSE,
239#ifndef DISABLE_DKIM
240 .dkim_disable_verify = FALSE,
d85cdeb5 241 .dkim_init_done = FALSE,
8768d548 242#endif
1a2e76e1 243#ifdef SUPPORT_DMARC
8768d548
JH
244 .dmarc_has_been_checked = FALSE,
245 .dmarc_disable_verify = FALSE,
246 .dmarc_enable_forensic = FALSE,
247#endif
248 .dont_deliver = FALSE,
249 .dot_ends = TRUE,
250
251 .enable_dollar_recipients = FALSE,
252 .expand_string_forcedfail = FALSE,
253
254 .filter_running = FALSE,
255
256 .header_rewritten = FALSE,
257 .helo_verified = FALSE,
258 .helo_verify_failed = FALSE,
259 .host_checking_callout = FALSE,
260 .host_find_failed_syntax= FALSE,
261
262 .inetd_wait_mode = FALSE,
263 .is_inetd = FALSE,
264
265 .local_error_message = FALSE,
266 .log_testing_mode = FALSE,
267
268#ifdef WITH_CONTENT_SCAN
269 .no_mbox_unspool = FALSE,
270#endif
271 .no_multiline_responses = FALSE,
272
273 .parse_allow_group = FALSE,
274 .parse_found_group = FALSE,
275 .pipelining_enable = TRUE,
276#if defined(SUPPORT_PROXY) || defined(SUPPORT_SOCKS)
277 .proxy_session_failed = FALSE,
278#endif
279
280 .queue_2stage = FALSE,
281 .queue_only_policy = FALSE,
282 .queue_run_first_delivery = FALSE,
283 .queue_run_force = FALSE,
284 .queue_run_local = FALSE,
285 .queue_running = FALSE,
286 .queue_smtp = FALSE,
287
288 .really_exim = TRUE,
289 .receive_call_bombout = FALSE,
290 .recipients_discarded = FALSE,
8768d548
JH
291 .running_in_test_harness = FALSE,
292
293 .search_find_defer = FALSE,
294 .sender_address_forced = FALSE,
295 .sender_host_notsocket = FALSE,
296 .sender_host_unknown = FALSE,
297 .sender_local = FALSE,
298 .sender_name_forced = FALSE,
299 .sender_set_untrusted = FALSE,
8768d548 300 .smtp_authenticated = FALSE,
81344b40 301#ifndef DISABLE_PIPE_CONNECT
ee8b8090
JH
302 .smtp_in_early_pipe_advertised = FALSE,
303 .smtp_in_early_pipe_no_auth = FALSE,
304 .smtp_in_early_pipe_used = FALSE,
305#endif
8768d548
JH
306 .smtp_in_pipelining_advertised = FALSE,
307 .smtp_in_pipelining_used = FALSE,
308 .spool_file_wireformat = FALSE,
309 .submission_mode = FALSE,
310 .suppress_local_fixups = FALSE,
311 .suppress_local_fixups_default = FALSE,
312 .synchronous_delivery = FALSE,
313 .system_filtering = FALSE,
314
36eb5d3d 315 .taint_check_slow = FALSE,
ff966302 316 .testsuite_delays = TRUE,
8768d548
JH
317 .tcp_fastopen_ok = FALSE,
318 .tcp_in_fastopen = FALSE,
ee8b8090 319 .tcp_in_fastopen_data = FALSE,
8768d548
JH
320 .tcp_in_fastopen_logged = FALSE,
321 .tcp_out_fastopen_logged= FALSE,
322 .timestamps_utc = FALSE,
323 .transport_filter_timed_out = FALSE,
324 .trusted_caller = FALSE,
325 .trusted_config = TRUE,
326};
327
328/******************************************************************************/
329/* These are the flags which are either variables or mainsection options,
330so an address is needed for access, or are exported to local_scan. */
331
332BOOL accept_8bitmime = TRUE; /* deliberately not RFC compliant */
333BOOL allow_domain_literals = FALSE;
334BOOL allow_mx_to_ip = FALSE;
335BOOL allow_utf8_domains = FALSE;
336BOOL authentication_failed = FALSE;
337
338BOOL bounce_return_body = TRUE;
339BOOL bounce_return_message = TRUE;
340BOOL check_rfc2047_length = TRUE;
341BOOL commandline_checks_require_admin = FALSE;
342
343#ifdef EXPERIMENTAL_DCC
344BOOL dcc_direct_add_header = FALSE;
345#endif
346BOOL debug_store = FALSE;
347BOOL delivery_date_remove = TRUE;
348BOOL deliver_drop_privilege = FALSE;
349#ifdef ENABLE_DISABLE_FSYNC
350BOOL disable_fsync = FALSE;
351#endif
352BOOL disable_ipv6 = FALSE;
353BOOL dns_csa_use_reverse = TRUE;
354BOOL drop_cr = FALSE; /* No longer used */
355
356BOOL envelope_to_remove = TRUE;
357BOOL exim_gid_set = TRUE; /* This gid is always set */
358BOOL exim_uid_set = TRUE; /* This uid is always set */
359BOOL extract_addresses_remove_arguments = TRUE;
360
361BOOL host_checking = FALSE;
362BOOL host_lookup_deferred = FALSE;
363BOOL host_lookup_failed = FALSE;
364BOOL ignore_fromline_local = FALSE;
365
366BOOL local_from_check = TRUE;
367BOOL local_sender_retain = FALSE;
368BOOL log_timezone = FALSE;
369BOOL message_body_newlines = FALSE;
370BOOL message_logs = TRUE;
371#ifdef SUPPORT_I18N
372BOOL message_smtputf8 = FALSE;
373#endif
374BOOL mua_wrapper = FALSE;
375
376BOOL preserve_message_logs = FALSE;
377BOOL print_topbitchars = FALSE;
378BOOL prod_requires_admin = TRUE;
379#if defined(SUPPORT_PROXY) || defined(SUPPORT_SOCKS)
380BOOL proxy_session = FALSE;
381#endif
382
ff966302
JH
383#ifdef EXPERIMENTAL_QUEUE_RAMP
384BOOL queue_fast_ramp = FALSE;
385#endif
8768d548
JH
386BOOL queue_list_requires_admin = TRUE;
387BOOL queue_only = FALSE;
388BOOL queue_only_load_latch = TRUE;
389BOOL queue_only_override = TRUE;
390BOOL queue_run_in_order = FALSE;
391BOOL recipients_max_reject = FALSE;
392BOOL return_path_remove = TRUE;
393
394BOOL smtp_batched_input = FALSE;
395BOOL sender_helo_dnssec = FALSE;
396BOOL sender_host_dnssec = FALSE;
397BOOL smtp_accept_keepalive = TRUE;
398BOOL smtp_check_spool_space = TRUE;
399BOOL smtp_enforce_sync = TRUE;
400BOOL smtp_etrn_serialize = TRUE;
401BOOL smtp_input = FALSE;
402BOOL smtp_return_error_details = FALSE;
403#ifdef SUPPORT_SPF
404BOOL spf_result_guessed = FALSE;
405#endif
406BOOL split_spool_directory = FALSE;
407BOOL spool_wireformat = FALSE;
408#ifdef EXPERIMENTAL_SRS
409BOOL srs_usehash = TRUE;
410BOOL srs_usetimestamp = TRUE;
411#endif
412BOOL strict_acl_vars = FALSE;
413BOOL strip_excess_angle_brackets = FALSE;
414BOOL strip_trailing_dot = FALSE;
415BOOL syslog_duplication = TRUE;
416BOOL syslog_pid = TRUE;
417BOOL syslog_timestamp = TRUE;
418BOOL system_filter_gid_set = FALSE;
419BOOL system_filter_uid_set = FALSE;
420
421BOOL tcp_nodelay = TRUE;
422BOOL write_rejectlog = TRUE;
423
424/******************************************************************************/
059ec3d9 425
71fafd95 426header_line *acl_added_headers = NULL;
059ec3d9 427tree_node *acl_anchor = NULL;
525239c1
JH
428uschar *acl_arg[9] = {NULL, NULL, NULL, NULL, NULL,
429 NULL, NULL, NULL, NULL};
430int acl_narg = 0;
8f128379 431
e1d04f48
JH
432int acl_level = 0;
433
059ec3d9 434uschar *acl_not_smtp = NULL;
54cdb463
PH
435#ifdef WITH_CONTENT_SCAN
436uschar *acl_not_smtp_mime = NULL;
437#endif
45b91596 438uschar *acl_not_smtp_start = NULL;
e7568d51 439uschar *acl_removed_headers = NULL;
059ec3d9
PH
440uschar *acl_smtp_auth = NULL;
441uschar *acl_smtp_connect = NULL;
442uschar *acl_smtp_data = NULL;
8ccd00b1 443#ifndef DISABLE_PRDR
ad07e9ad 444uschar *acl_smtp_data_prdr = US"accept";
fd98a5c6 445#endif
80a47a2c
TK
446#ifndef DISABLE_DKIM
447uschar *acl_smtp_dkim = NULL;
448#endif
059ec3d9
PH
449uschar *acl_smtp_etrn = NULL;
450uschar *acl_smtp_expn = NULL;
451uschar *acl_smtp_helo = NULL;
452uschar *acl_smtp_mail = NULL;
453uschar *acl_smtp_mailauth = NULL;
8523533c
TK
454#ifdef WITH_CONTENT_SCAN
455uschar *acl_smtp_mime = NULL;
456#endif
8f128379 457uschar *acl_smtp_notquit = NULL;
059ec3d9
PH
458uschar *acl_smtp_predata = NULL;
459uschar *acl_smtp_quit = NULL;
460uschar *acl_smtp_rcpt = NULL;
461uschar *acl_smtp_starttls = NULL;
462uschar *acl_smtp_vrfy = NULL;
8f128379 463
38a0a95f
PH
464tree_node *acl_var_c = NULL;
465tree_node *acl_var_m = NULL;
059ec3d9 466uschar *acl_verify_message = NULL;
059ec3d9
PH
467string_item *acl_warn_logged = NULL;
468
469/* Names of SMTP places for use in ACL error messages, and corresponding SMTP
470error codes - keep in step with definitions of ACL_WHERE_xxxx in macros.h. */
471
472uschar *acl_wherenames[] = { US"RCPT",
473 US"MAIL",
474 US"PREDATA",
8523533c 475 US"MIME",
80a47a2c 476 US"DKIM",
059ec3d9 477 US"DATA",
8ccd00b1 478#ifndef DISABLE_PRDR
fd98a5c6
JH
479 US"PRDR",
480#endif
059ec3d9
PH
481 US"non-SMTP",
482 US"AUTH",
483 US"connection",
484 US"ETRN",
485 US"EXPN",
486 US"EHLO or HELO",
487 US"MAILAUTH",
45b91596 488 US"non-SMTP-start",
8f128379 489 US"NOTQUIT",
059ec3d9
PH
490 US"QUIT",
491 US"STARTTLS",
723c72e6 492 US"VRFY",
faa05a93
JH
493 US"delivery",
494 US"unknown"
059ec3d9
PH
495 };
496
a5bd321b
PH
497uschar *acl_wherecodes[] = { US"550", /* RCPT */
498 US"550", /* MAIL */
499 US"550", /* PREDATA */
500 US"550", /* MIME */
80a47a2c 501 US"550", /* DKIM */
a5bd321b 502 US"550", /* DATA */
8ccd00b1 503#ifndef DISABLE_PRDR
fd98a5c6
JH
504 US"550", /* RCPT PRDR */
505#endif
a5bd321b
PH
506 US"0", /* not SMTP; not relevant */
507 US"503", /* AUTH */
508 US"550", /* connect */
509 US"458", /* ETRN */
510 US"550", /* EXPN */
511 US"550", /* HELO/EHLO */
512 US"0", /* MAILAUTH; not relevant */
513 US"0", /* not SMTP; not relevant */
8f128379 514 US"0", /* NOTQUIT; not relevant */
a5bd321b
PH
515 US"0", /* QUIT; not relevant */
516 US"550", /* STARTTLS */
723c72e6 517 US"252", /* VRFY */
faa05a93 518 US"0", /* delivery; not relevant */
723c72e6 519 US"0" /* unknown; not relevant */
059ec3d9 520 };
8e669ac1 521
bc3c7bb7 522uschar *add_environment = NULL;
059ec3d9
PH
523address_item *addr_duplicate = NULL;
524
525address_item address_defaults = {
f2ed27cf
JH
526 .next = NULL,
527 .parent = NULL,
528 .first = NULL,
529 .dupof = NULL,
530 .start_router = NULL,
531 .router = NULL,
532 .transport = NULL,
533 .host_list = NULL,
534 .host_used = NULL,
535 .fallback_hosts = NULL,
536 .reply = NULL,
537 .retries = NULL,
538 .address = NULL,
539 .unique = NULL,
540 .cc_local_part = NULL,
541 .lc_local_part = NULL,
542 .local_part = NULL,
543 .prefix = NULL,
544 .suffix = NULL,
545 .domain = NULL,
546 .address_retry_key = NULL,
547 .domain_retry_key = NULL,
548 .current_dir = NULL,
549 .home_dir = NULL,
550 .message = NULL,
551 .user_message = NULL,
552 .onetime_parent = NULL,
553 .pipe_expandn = NULL,
554 .return_filename = NULL,
555 .self_hostname = NULL,
556 .shadow_message = NULL,
01603eec 557#ifndef DISABLE_TLS
f2ed27cf
JH
558 .cipher = NULL,
559 .ourcert = NULL,
560 .peercert = NULL,
561 .peerdn = NULL,
562 .ocsp = OCSP_NOT_REQ,
895fbaf2
JH
563#endif
564#ifdef EXPERIMENTAL_DSN_INFO
f2ed27cf
JH
565 .smtp_greeting = NULL,
566 .helo_response = NULL,
895fbaf2 567#endif
f2ed27cf
JH
568 .authenticator = NULL,
569 .auth_id = NULL,
570 .auth_sndr = NULL,
571 .dsn_orcpt = NULL,
572 .dsn_flags = 0,
573 .dsn_aware = 0,
574 .uid = (uid_t)(-1),
575 .gid = (gid_t)(-1),
7eb0e5d2 576 .flags = { 0 },
f2ed27cf
JH
577 .domain_cache = { 0 }, /* domain_cache - any larger array should be zeroed */
578 .localpart_cache = { 0 }, /* localpart_cache - ditto */
579 .mode = -1,
580 .more_errno = 0,
a55697ac 581 .delivery_time = {.tv_sec = 0, .tv_usec = 0},
f2ed27cf
JH
582 .basic_errno = ERRNO_UNKNOWNERROR,
583 .child_count = 0,
584 .return_file = -1,
585 .special_action = SPECIAL_NONE,
586 .transport_return = DEFER,
587 .prop = { /* fields that are propagated to children */
588 .address_data = NULL,
589 .domain_data = NULL,
590 .localpart_data = NULL,
591 .errors_address = NULL,
592 .extra_headers = NULL,
593 .remove_headers = NULL,
b4f579d1 594 .variables = NULL,
384152a6 595#ifdef EXPERIMENTAL_SRS
f2ed27cf 596 .srs_sender = NULL,
7ade712c 597#endif
a5853d7c 598 .ignore_error = FALSE,
8c5d388a 599#ifdef SUPPORT_I18N
f2ed27cf
JH
600 .utf8_msg = FALSE,
601 .utf8_downcvt = FALSE,
602 .utf8_downcvt_maybe = FALSE
384152a6 603#endif
059ec3d9
PH
604 }
605};
606
607uschar *address_file = NULL;
608uschar *address_pipe = NULL;
059ec3d9
PH
609tree_node *addresslist_anchor = NULL;
610int addresslist_count = 0;
611gid_t *admin_groups = NULL;
617d3932
JH
612
613#ifdef EXPERIMENTAL_ARC
614struct arc_set *arc_received = NULL;
615int arc_received_instance = 0;
616int arc_oldest_pass = 0;
617const uschar *arc_state = NULL;
93c931f8 618const uschar *arc_state_reason = NULL;
617d3932
JH
619#endif
620
2d07a215 621uschar *authenticated_fail_id = NULL;
059ec3d9
PH
622uschar *authenticated_id = NULL;
623uschar *authenticated_sender = NULL;
059ec3d9
PH
624auth_instance *auths = NULL;
625uschar *auth_advertise_hosts = US"*";
626auth_instance auth_defaults = {
f2ed27cf
JH
627 .next = NULL,
628 .name = NULL,
629 .info = NULL,
630 .options_block = NULL,
631 .driver_name = NULL,
632 .advertise_condition = NULL,
633 .client_condition = NULL,
634 .public_name = NULL,
635 .set_id = NULL,
636 .set_client_id = NULL,
637 .mail_auth_condition = NULL,
638 .server_debug_string = NULL,
639 .server_condition = NULL,
640 .client = FALSE,
641 .server = FALSE,
642 .advertised = FALSE
059ec3d9
PH
643};
644
645uschar *auth_defer_msg = US"reason not recorded";
646uschar *auth_defer_user_msg = US"";
f78eb7c6 647uschar *auth_vars[AUTH_VARS];
059ec3d9 648int auto_thaw = 0;
8523533c 649#ifdef WITH_CONTENT_SCAN
8768d548 650int av_failed = FALSE; /* boolean but accessed as vtype_int*/
8523533c
TK
651uschar *av_scanner = US"sophie:/var/run/sophie"; /* AV scanner */
652#endif
059ec3d9 653
9a799bc0 654#if BASE_62 == 62
059ec3d9
PH
655uschar *base62_chars=
656 US"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
9a799bc0
PH
657#else
658uschar *base62_chars= US"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
659#endif
660
059ec3d9
PH
661uschar *bi_command = NULL;
662uschar *big_buffer = NULL;
663int big_buffer_size = BIG_BUFFER_SIZE;
8523533c
TK
664#ifdef EXPERIMENTAL_BRIGHTMAIL
665uschar *bmi_alt_location = NULL;
666uschar *bmi_base64_tracker_verdict = NULL;
667uschar *bmi_base64_verdict = NULL;
668uschar *bmi_config_file = US"/opt/brightmail/etc/brightmail.cfg";
669int bmi_deliver = 1;
670int bmi_run = 0;
671uschar *bmi_verdicts = NULL;
672#endif
32b8ce41 673int bsmtp_transaction_linecount = 0;
939c3e34 674int body_8bitmime = 0;
059ec3d9
PH
675int body_linecount = 0;
676int body_zerocount = 0;
677uschar *bounce_message_file = NULL;
678uschar *bounce_message_text = NULL;
679uschar *bounce_recipient = NULL;
62b7cd08 680int bounce_return_linesize_limit = 998;
059ec3d9
PH
681int bounce_return_size_limit = 100*1024;
682uschar *bounce_sender_authentication = NULL;
059ec3d9 683
055e2cb4 684uschar *callout_address = NULL;
059ec3d9
PH
685int callout_cache_domain_positive_expire = 7*24*60*60;
686int callout_cache_domain_negative_expire = 3*60*60;
687int callout_cache_positive_expire = 24*60*60;
688int callout_cache_negative_expire = 2*60*60;
689uschar *callout_random_local_part = US"$primary_hostname-$tod_epoch-testing";
80a47a2c 690uschar *check_dns_names_pattern= US"(?i)^(?>(?(1)\\.|())[^\\W](?>[a-z0-9/_-]*[^\\W])?)+(\\.?)$";
ddf1b11a 691int check_log_inodes = 100;
a45431fa 692int_eximarith_t check_log_space = 10*1024; /* 10K Kbyte == 10MB */
ddf1b11a 693int check_spool_inodes = 100;
a45431fa 694int_eximarith_t check_spool_space = 10*1024; /* 10K Kbyte == 10MB */
18481de3 695
aa368db3 696uschar *chunking_advertise_hosts = US"*";
18481de3 697unsigned chunking_datasize = 0;
7e3ce68e 698unsigned chunking_data_left = 0;
18481de3 699chunking_state_t chunking_state= CHUNKING_NOT_OFFERED;
f98442df 700const pcre *regex_CHUNKING = NULL;
18481de3 701
aa368db3
JH
702uschar *client_authenticator = NULL;
703uschar *client_authenticated_id = NULL;
704uschar *client_authenticated_sender = NULL;
059ec3d9
PH
705int clmacro_count = 0;
706uschar *clmacros[MAX_CLMACROS];
059ec3d9 707FILE *config_file = NULL;
18d6b513 708const uschar *config_filename = NULL;
059ec3d9 709int config_lineno = 0;
35edf2ff
PH
710#ifdef CONFIGURE_GROUP
711gid_t config_gid = CONFIGURE_GROUP;
19bfe9e7
HSHR
712#else
713gid_t config_gid = 0;
35edf2ff 714#endif
059ec3d9
PH
715uschar *config_main_filelist = US CONFIGURE_FILE
716 "\0<-----------Space to patch configure_filename->";
717uschar *config_main_filename = NULL;
98b8312f 718uschar *config_main_directory = NULL;
059ec3d9
PH
719
720#ifdef CONFIGURE_OWNER
721uid_t config_uid = CONFIGURE_OWNER;
19bfe9e7
HSHR
722#else
723uid_t config_uid = 0;
059ec3d9
PH
724#endif
725
726int connection_max_messages= -1;
5013d912 727uschar *continue_proxy_cipher = NULL;
059ec3d9
PH
728uschar *continue_hostname = NULL;
729uschar *continue_host_address = NULL;
059ec3d9
PH
730int continue_sequence = 1;
731uschar *continue_transport = NULL;
732
e5a9dba6 733uschar *csa_status = NULL;
5032d1cf 734cut_t cutthrough = {
f2ed27cf
JH
735 .callout_hold_only = FALSE, /* verify-only: normal delivery */
736 .delivery = FALSE, /* when to attempt */
737 .defer_pass = FALSE, /* on defer: spool locally */
738 .is_tls = FALSE, /* not a TLS conn yet */
74f1a423 739 .cctx = {.sock = -1}, /* open connection */
f2ed27cf 740 .nrcpt = 0, /* number of addresses */
5032d1cf 741};
e5a9dba6 742
ff966302 743int daemon_notifier_fd = -1;
059ec3d9 744uschar *daemon_smtp_port = US"smtp";
4aee0225
PH
745int daemon_startup_retries = 9;
746int daemon_startup_sleep = 30;
6a8f9482
TK
747
748#ifdef EXPERIMENTAL_DCC
6a8f9482
TK
749uschar *dcc_header = NULL;
750uschar *dcc_result = NULL;
751uschar *dccifd_address = US"/usr/local/dcc/var/dccifd";
752uschar *dccifd_options = US"header";
753#endif
754
059ec3d9
PH
755int debug_fd = -1;
756FILE *debug_file = NULL;
6c6d6e48
TF
757int debug_notall[] = {
758 Di_memory,
ae8f9024 759 Di_noutf8,
6c6d6e48 760 -1
059ec3d9 761};
ae8f9024
JH
762bit_table debug_options[] = { /* must be in alphabetical order and use
763 only the enum values from macro.h */
6c6d6e48
TF
764 BIT_TABLE(D, acl),
765 BIT_TABLE(D, all),
766 BIT_TABLE(D, auth),
767 BIT_TABLE(D, deliver),
768 BIT_TABLE(D, dns),
769 BIT_TABLE(D, dnsbl),
770 BIT_TABLE(D, exec),
771 BIT_TABLE(D, expand),
772 BIT_TABLE(D, filter),
773 BIT_TABLE(D, hints_lookup),
774 BIT_TABLE(D, host_lookup),
775 BIT_TABLE(D, ident),
776 BIT_TABLE(D, interface),
777 BIT_TABLE(D, lists),
778 BIT_TABLE(D, load),
779 BIT_TABLE(D, local_scan),
780 BIT_TABLE(D, lookup),
781 BIT_TABLE(D, memory),
ae8f9024 782 BIT_TABLE(D, noutf8),
6c6d6e48
TF
783 BIT_TABLE(D, pid),
784 BIT_TABLE(D, process_info),
785 BIT_TABLE(D, queue_run),
786 BIT_TABLE(D, receive),
787 BIT_TABLE(D, resolver),
788 BIT_TABLE(D, retry),
789 BIT_TABLE(D, rewrite),
790 BIT_TABLE(D, route),
791 BIT_TABLE(D, timestamp),
792 BIT_TABLE(D, tls),
793 BIT_TABLE(D, transport),
794 BIT_TABLE(D, uid),
795 BIT_TABLE(D, verify),
796};
797int debug_options_count = nelem(debug_options);
798
059ec3d9
PH
799unsigned int debug_selector = 0;
800int delay_warning[DELAY_WARNING_SIZE] = { DELAY_WARNING_SIZE, 1, 24*60*60 };
5dff5817
PH
801uschar *delay_warning_condition=
802 US"${if or {"
e85a7ad5 803 "{ !eq{$h_list-id:$h_list-post:$h_list-subscribe:}{} }"
5dff5817
PH
804 "{ match{$h_precedence:}{(?i)bulk|list|junk} }"
805 "{ match{$h_auto-submitted:}{(?i)auto-generated|auto-replied} }"
806 "} {no}{yes}}";
059ec3d9
PH
807uschar *deliver_address_data = NULL;
808int deliver_datafile = -1;
55414b25 809const uschar *deliver_domain = NULL;
059ec3d9 810uschar *deliver_domain_data = NULL;
55414b25
JH
811const uschar *deliver_domain_orig = NULL;
812const uschar *deliver_domain_parent = NULL;
19050083 813time_t deliver_frozen_at = 0;
059ec3d9 814uschar *deliver_home = NULL;
55414b25
JH
815const uschar *deliver_host = NULL;
816const uschar *deliver_host_address = NULL;
a7538db1 817int deliver_host_port = 0;
059ec3d9
PH
818uschar *deliver_in_buffer = NULL;
819ino_t deliver_inode = 0;
820uschar *deliver_localpart = NULL;
821uschar *deliver_localpart_data = NULL;
822uschar *deliver_localpart_orig = NULL;
823uschar *deliver_localpart_parent = NULL;
824uschar *deliver_localpart_prefix = NULL;
825uschar *deliver_localpart_suffix = NULL;
163144aa 826uschar *deliver_localpart_verified = NULL;
059ec3d9
PH
827uschar *deliver_out_buffer = NULL;
828int deliver_queue_load_max = -1;
829address_item *deliver_recipients = NULL;
830uschar *deliver_selectstring = NULL;
059ec3d9 831uschar *deliver_selectstring_sender = NULL;
059ec3d9 832
80a47a2c 833#ifndef DISABLE_DKIM
64b67b65 834unsigned dkim_collect_input = 0;
2df588c9 835uschar *dkim_cur_signer = NULL;
abe1010c 836int dkim_key_length = 0;
b4757e36 837void *dkim_signatures = NULL;
9e5d6b55 838uschar *dkim_signers = NULL;
f7572e5a
TK
839uschar *dkim_signing_domain = NULL;
840uschar *dkim_signing_selector = NULL;
6ce1ece9 841uschar *dkim_verify_hashes = US"sha256:sha512";
042e558f
JH
842uschar *dkim_verify_keytypes = US"ed25519:rsa";
843BOOL dkim_verify_minimal = FALSE;
2c47372f 844uschar *dkim_verify_overall = NULL;
9e5d6b55 845uschar *dkim_verify_signers = US"$dkim_signers";
a79d8834
JH
846uschar *dkim_verify_status = NULL;
847uschar *dkim_verify_reason = NULL;
f7572e5a 848#endif
1a2e76e1 849#ifdef SUPPORT_DMARC
8c8b8274 850uschar *dmarc_domain_policy = NULL;
4840604e
TL
851uschar *dmarc_forensic_sender = NULL;
852uschar *dmarc_history_file = NULL;
853uschar *dmarc_status = NULL;
854uschar *dmarc_status_text = NULL;
39fdec3c 855uschar *dmarc_tld_file = NULL;
4840604e 856uschar *dmarc_used_domain = NULL;
4840604e 857#endif
f7572e5a 858
059ec3d9 859uschar *dns_again_means_nonexist = NULL;
e5a9dba6 860int dns_csa_search_limit = 5;
d8d9f930 861int dns_cname_loops = 1;
c0635b6d 862#ifdef SUPPORT_DANE
e682570f
TL
863int dns_dane_ok = -1;
864#endif
059ec3d9
PH
865uschar *dns_ipv4_lookup = NULL;
866int dns_retrans = 0;
867int dns_retry = 0;
0fbd9bff 868int dns_dnssec_ok = -1; /* <0 = not coerced */
9820a77f 869uschar *dns_trust_aa = NULL;
e97d1f08 870int dns_use_edns0 = -1; /* <0 = not coerced */
059ec3d9 871uschar *dnslist_domain = NULL;
93655c46 872uschar *dnslist_matched = NULL;
059ec3d9
PH
873uschar *dnslist_text = NULL;
874uschar *dnslist_value = NULL;
875tree_node *domainlist_anchor = NULL;
876int domainlist_count = 0;
0e22dfd1 877uschar *dsn_from = US DEFAULT_DSN_FROM;
059ec3d9 878
059ec3d9
PH
879int errno_quota = ERRNO_QUOTA;
880uschar *errors_copy = NULL;
881int error_handling = ERRORS_SENDER;
882uschar *errors_reply_to = NULL;
883int errors_sender_rc = EXIT_FAILURE;
0cbf2b82 884#ifndef DISABLE_EVENT
723fe533 885uschar *event_action = NULL; /* expansion for delivery events */
4c04137d 886uschar *event_data = NULL; /* auxiliary data variable for event */
723fe533 887int event_defer_errno = 0;
55414b25 888const uschar *event_name = NULL; /* event name variable */
723fe533
JH
889#endif
890
059ec3d9
PH
891
892gid_t exim_gid = EXIM_GID;
059ec3d9
PH
893uschar *exim_path = US BIN_DIRECTORY "/exim"
894 "\0<---------------Space to patch exim_path->";
895uid_t exim_uid = EXIM_UID;
e1d04f48 896int expand_level = 0; /* Nesting depth, indent for debug */
059ec3d9
PH
897int expand_forbid = 0;
898int expand_nlength[EXPAND_MAXN+1];
899int expand_nmax = -1;
900uschar *expand_nstring[EXPAND_MAXN+1];
059ec3d9 901uschar *expand_string_message;
059ec3d9
PH
902uschar *extra_local_interfaces = NULL;
903
29aba418 904int fake_response = OK;
0e22dfd1
PH
905uschar *fake_response_text = US"Your message has been rejected but is "
906 "being kept for evaluation.\nIf it was a "
907 "legitimate message, it may still be "
908 "delivered to the target recipient(s).";
059ec3d9 909int filter_n[FILTER_VARIABLE_COUNT];
059ec3d9 910int filter_sn[FILTER_VARIABLE_COUNT];
f05da2e8
PH
911int filter_test = FTEST_NONE;
912uschar *filter_test_sfile = NULL;
913uschar *filter_test_ufile = NULL;
059ec3d9
PH
914uschar *filter_thisaddress = NULL;
915int finduser_retries = 0;
916uid_t fixed_never_users[] = { FIXED_NEVER_USERS };
917uschar *freeze_tell = NULL;
6a3f1455 918uschar *freeze_tell_config = NULL;
059ec3d9
PH
919uschar *fudged_queue_times = US"";
920
921uschar *gecos_name = NULL;
922uschar *gecos_pattern = NULL;
923rewrite_rule *global_rewrite_rules = NULL;
924
9723f966
JH
925volatile sig_atomic_t had_command_timeout = 0;
926volatile sig_atomic_t had_command_sigterm = 0;
927volatile sig_atomic_t had_data_timeout = 0;
928volatile sig_atomic_t had_data_sigint = 0;
059ec3d9
PH
929uschar *headers_charset = US HEADERS_CHARSET;
930int header_insert_maxlen = 64 * 1024;
931header_line *header_last = NULL;
932header_line *header_list = NULL;
933int header_maxsize = HEADER_MAXSIZE;
934int header_line_maxsize = 0;
935
936header_name header_names[] = {
f2ed27cf
JH
937 /* name len allow_resent htype */
938 { US"bcc", 3, TRUE, htype_bcc },
939 { US"cc", 2, TRUE, htype_cc },
940 { US"date", 4, TRUE, htype_date },
941 { US"delivery-date", 13, FALSE, htype_delivery_date },
942 { US"envelope-to", 11, FALSE, htype_envelope_to },
943 { US"from", 4, TRUE, htype_from },
944 { US"message-id", 10, TRUE, htype_id },
945 { US"received", 8, FALSE, htype_received },
946 { US"reply-to", 8, FALSE, htype_reply_to },
947 { US"return-path", 11, FALSE, htype_return_path },
948 { US"sender", 6, TRUE, htype_sender },
949 { US"subject", 7, FALSE, htype_subject },
950 { US"to", 2, TRUE, htype_to }
059ec3d9
PH
951};
952
617d3932 953int header_names_size = nelem(header_names);
059ec3d9 954
059ec3d9
PH
955uschar *helo_accept_junk_hosts = NULL;
956uschar *helo_allow_chars = US"";
957uschar *helo_lookup_domains = US"@ : @[]";
958uschar *helo_try_verify_hosts = NULL;
059ec3d9 959uschar *helo_verify_hosts = NULL;
1ba28e2b 960const uschar *hex_digits = CUS"0123456789abcdef";
059ec3d9 961uschar *hold_domains = NULL;
059ec3d9 962uschar *host_data = NULL;
059ec3d9 963uschar *host_lookup = NULL;
059ec3d9
PH
964uschar *host_lookup_order = US"bydns:byaddr";
965uschar *host_lookup_msg = US"";
966int host_number = 0;
967uschar *host_number_string = NULL;
968uschar *host_reject_connection = NULL;
969tree_node *hostlist_anchor = NULL;
970int hostlist_count = 0;
971uschar *hosts_treat_as_local = NULL;
972uschar *hosts_connection_nolog = NULL;
973
974int ignore_bounce_errors_after = 10*7*24*60*60; /* 10 weeks */
059ec3d9 975uschar *ignore_fromline_hosts = NULL;
9ee44efb 976int inetd_wait_timeout = -1;
3615fa9a 977uschar *initial_cwd = NULL;
059ec3d9
PH
978uschar *interface_address = NULL;
979int interface_port = -1;
0ce9abe6 980uschar *iterate_item = NULL;
059ec3d9
PH
981
982int journal_fd = -1;
983
bc3c7bb7
HSHR
984uschar *keep_environment = NULL;
985
059ec3d9
PH
986int keep_malformed = 4*24*60*60; /* 4 days */
987
988uschar *eldap_dn = NULL;
989int load_average = -2;
059ec3d9
PH
990uschar *local_from_prefix = NULL;
991uschar *local_from_suffix = NULL;
992
993#if HAVE_IPV6
994uschar *local_interfaces = US"<; ::0 ; 0.0.0.0";
995#else
996uschar *local_interfaces = US"0.0.0.0";
997#endif
998
9723f966 999#ifdef HAVE_LOCAL_SCAN
059ec3d9
PH
1000uschar *local_scan_data = NULL;
1001int local_scan_timeout = 5*60;
9723f966 1002#endif
059ec3d9
PH
1003gid_t local_user_gid = (gid_t)(-1);
1004uid_t local_user_uid = (uid_t)(-1);
1005
1006tree_node *localpartlist_anchor= NULL;
1007int localpartlist_count = 0;
1008uschar *log_buffer = NULL;
6c6d6e48
TF
1009
1010int log_default[] = { /* for initializing log_selector */
1011 Li_acl_warn_skipped,
1012 Li_connection_reject,
1013 Li_delay_delivery,
2c47372f 1014 Li_dkim,
6c6d6e48
TF
1015 Li_dnslist_defer,
1016 Li_etrn,
1017 Li_host_lookup_failed,
1018 Li_lost_incoming_connection,
ac881e27 1019 Li_outgoing_interface, /* see d_log_interface in deliver.c */
049782c0 1020 Li_msg_id,
6c6d6e48
TF
1021 Li_queue_run,
1022 Li_rejected_header,
1023 Li_retry_defer,
1024 Li_sender_verify_fail,
1025 Li_size_reject,
1026 Li_skip_delivery,
1027 Li_smtp_confirmation,
1028 Li_tls_certificate_verified,
1029 Li_tls_cipher,
1030 -1
1031};
1032
059ec3d9
PH
1033uschar *log_file_path = US LOG_FILE_PATH
1034 "\0<--------------Space to patch log_file_path->";
1035
6c6d6e48
TF
1036int log_notall[] = {
1037 -1
1038};
b10c87b3
JH
1039bit_table log_options[] = { /* must be in alphabetical order,
1040 with definitions from enum logbit. */
6c6d6e48
TF
1041 BIT_TABLE(L, 8bitmime),
1042 BIT_TABLE(L, acl_warn_skipped),
1043 BIT_TABLE(L, address_rewrite),
1044 BIT_TABLE(L, all),
1045 BIT_TABLE(L, all_parents),
1046 BIT_TABLE(L, arguments),
1047 BIT_TABLE(L, connection_reject),
1048 BIT_TABLE(L, delay_delivery),
1049 BIT_TABLE(L, deliver_time),
1050 BIT_TABLE(L, delivery_size),
2c47372f
JH
1051#ifndef DISABLE_DKIM
1052 BIT_TABLE(L, dkim),
1053 BIT_TABLE(L, dkim_verbose),
1054#endif
6c6d6e48 1055 BIT_TABLE(L, dnslist_defer),
fc16abb4 1056 BIT_TABLE(L, dnssec),
6c6d6e48
TF
1057 BIT_TABLE(L, etrn),
1058 BIT_TABLE(L, host_lookup_failed),
1059 BIT_TABLE(L, ident_timeout),
1060 BIT_TABLE(L, incoming_interface),
1061 BIT_TABLE(L, incoming_port),
1062 BIT_TABLE(L, lost_incoming_connection),
571b2715 1063 BIT_TABLE(L, millisec),
049782c0
JH
1064 BIT_TABLE(L, msg_id),
1065 BIT_TABLE(L, msg_id_created),
ac881e27 1066 BIT_TABLE(L, outgoing_interface),
6c6d6e48
TF
1067 BIT_TABLE(L, outgoing_port),
1068 BIT_TABLE(L, pid),
7c576fca 1069 BIT_TABLE(L, pipelining),
2c47372f 1070#if defined(SUPPORT_PROXY) || defined(SUPPORT_SOCKS)
6c6d6e48
TF
1071 BIT_TABLE(L, proxy),
1072#endif
1073 BIT_TABLE(L, queue_run),
1074 BIT_TABLE(L, queue_time),
1075 BIT_TABLE(L, queue_time_overall),
306c6c77 1076 BIT_TABLE(L, receive_time),
6c6d6e48
TF
1077 BIT_TABLE(L, received_recipients),
1078 BIT_TABLE(L, received_sender),
1079 BIT_TABLE(L, rejected_header),
1080 { US"rejected_headers", Li_rejected_header },
1081 BIT_TABLE(L, retry_defer),
1082 BIT_TABLE(L, return_path_on_delivery),
1083 BIT_TABLE(L, sender_on_delivery),
1084 BIT_TABLE(L, sender_verify_fail),
1085 BIT_TABLE(L, size_reject),
1086 BIT_TABLE(L, skip_delivery),
1087 BIT_TABLE(L, smtp_confirmation),
1088 BIT_TABLE(L, smtp_connection),
1089 BIT_TABLE(L, smtp_incomplete_transaction),
1090 BIT_TABLE(L, smtp_mailauth),
1091 BIT_TABLE(L, smtp_no_mail),
1092 BIT_TABLE(L, smtp_protocol_error),
1093 BIT_TABLE(L, smtp_syntax_error),
1094 BIT_TABLE(L, subject),
1095 BIT_TABLE(L, tls_certificate_verified),
1096 BIT_TABLE(L, tls_cipher),
1097 BIT_TABLE(L, tls_peerdn),
b10c87b3 1098 BIT_TABLE(L, tls_resumption),
6c6d6e48
TF
1099 BIT_TABLE(L, tls_sni),
1100 BIT_TABLE(L, unknown_in_list),
059ec3d9 1101};
6c6d6e48 1102int log_options_count = nelem(log_options);
059ec3d9 1103
6ea85e9a 1104int log_reject_target = 0;
6c6d6e48 1105unsigned int log_selector[log_selector_size]; /* initialized in main() */
059ec3d9
PH
1106uschar *log_selector_string = NULL;
1107FILE *log_stderr = NULL;
059ec3d9 1108uschar *login_sender_address = NULL;
4e0983dc 1109uschar *lookup_dnssec_authenticated = NULL;
059ec3d9
PH
1110int lookup_open_max = 25;
1111uschar *lookup_value = NULL;
1112
85e03244 1113macro_item *macros_user = NULL;
059ec3d9 1114uschar *mailstore_basename = NULL;
8523533c
TK
1115#ifdef WITH_CONTENT_SCAN
1116uschar *malware_name = NULL; /* Virus Name */
1117#endif
d677b2f2 1118int max_received_linelength= 0;
059ec3d9
PH
1119int max_username_length = 0;
1120int message_age = 0;
1121uschar *message_body = NULL;
1122uschar *message_body_end = NULL;
1123int message_body_size = 0;
1124int message_body_visible = 500;
1125int message_ended = END_NOTSTARTED;
1126uschar *message_headers = NULL;
1127uschar *message_id;
1128uschar *message_id_domain = NULL;
1129uschar *message_id_text = NULL;
1130struct timeval message_id_tv = { 0, 0 };
1131uschar message_id_option[MESSAGE_ID_LENGTH + 3];
1132uschar *message_id_external;
1133int message_linecount = 0;
059ec3d9
PH
1134int message_size = 0;
1135uschar *message_size_limit = US"50M";
8c5d388a 1136#ifdef SUPPORT_I18N
3c8b3577 1137int message_utf8_downconvert = 0; /* -1 ifneeded; 0 never; 1 always */
eb02f5df 1138#endif
059ec3d9
PH
1139uschar message_subdir[2] = { 0, 0 };
1140uschar *message_reference = NULL;
8523533c
TK
1141
1142/* MIME ACL expandables */
1143#ifdef WITH_CONTENT_SCAN
f7b63901 1144int mime_anomaly_level = 0;
1ba28e2b 1145const uschar *mime_anomaly_text = NULL;
8523533c
TK
1146uschar *mime_boundary = NULL;
1147uschar *mime_charset = NULL;
1148uschar *mime_content_description = NULL;
1149uschar *mime_content_disposition = NULL;
1150uschar *mime_content_id = NULL;
1151unsigned int mime_content_size = 0;
1152uschar *mime_content_transfer_encoding = NULL;
1153uschar *mime_content_type = NULL;
1154uschar *mime_decoded_filename = NULL;
1155uschar *mime_filename = NULL;
1156int mime_is_multipart = 0;
1157int mime_is_coverletter = 0;
1158int mime_is_rfc822 = 0;
1159int mime_part_count = -1;
1160#endif
1161
059ec3d9 1162uid_t *never_users = NULL;
059ec3d9 1163
fb05276a
JH
1164const int on = 1; /* for setsockopt */
1165const int off = 0;
1166
059ec3d9
PH
1167uid_t original_euid;
1168gid_t originator_gid;
1169uschar *originator_login = NULL;
1170uschar *originator_name = NULL;
1171uid_t originator_uid;
1172uschar *override_local_interfaces = NULL;
1173uschar *override_pid_file_path = NULL;
1174
059ec3d9
PH
1175uschar *percent_hack_domains = NULL;
1176uschar *pid_file_path = US PID_FILE_PATH
1177 "\0<--------------Space to patch pid_file_path->";
81344b40 1178#ifndef DISABLE_PIPE_CONNECT
ee8b8090
JH
1179uschar *pipe_connect_advertise_hosts = US"*";
1180#endif
059ec3d9 1181uschar *pipelining_advertise_hosts = US"*";
059ec3d9 1182uschar *primary_hostname = NULL;
f3ebb786 1183uschar *process_info;
921b12ca 1184int process_info_len = 0;
059ec3d9 1185uschar *process_log_path = NULL;
a3c86431 1186
e6d2a989 1187#if defined(SUPPORT_PROXY) || defined(SUPPORT_SOCKS)
eb58ddf5
JH
1188uschar *hosts_proxy = NULL;
1189uschar *proxy_external_address = NULL;
e6d2a989 1190int proxy_external_port = 0;
eb58ddf5 1191uschar *proxy_local_address = NULL;
e6d2a989 1192int proxy_local_port = 0;
a3c86431
TL
1193#endif
1194
fffda43a
TK
1195uschar *prvscheck_address = NULL;
1196uschar *prvscheck_keynum = NULL;
1197uschar *prvscheck_result = NULL;
1198
059ec3d9 1199
55414b25 1200const uschar *qualify_domain_recipient = NULL;
059ec3d9 1201uschar *qualify_domain_sender = NULL;
059ec3d9
PH
1202uschar *queue_domains = NULL;
1203int queue_interval = -1;
a2da3176 1204uschar *queue_name = US"";
fc7bae7f 1205uschar *queue_name_dest = NULL;
059ec3d9
PH
1206uschar *queue_only_file = NULL;
1207int queue_only_load = -1;
0cd5fd23 1208uschar *queue_run_max = US"5";
059ec3d9
PH
1209pid_t queue_run_pid = (pid_t)0;
1210int queue_run_pipe = -1;
059ec3d9
PH
1211uschar *queue_smtp_domains = NULL;
1212
3ea7e280 1213uint32_t random_seed = 0;
fe0dab11 1214tree_node *ratelimiters_cmd = NULL;
870f6ba8
TF
1215tree_node *ratelimiters_conn = NULL;
1216tree_node *ratelimiters_mail = NULL;
059ec3d9
PH
1217uschar *raw_active_hostname = NULL;
1218uschar *raw_sender = NULL;
1219uschar **raw_recipients = NULL;
1220int raw_recipients_count = 0;
1221
1222int rcpt_count = 0;
1223int rcpt_fail_count = 0;
1224int rcpt_defer_count = 0;
1225gid_t real_gid;
1226uid_t real_uid;
059ec3d9
PH
1227int receive_linecount = 0;
1228int receive_messagecount = 0;
1229int receive_timeout = 0;
1230int received_count = 0;
1231uschar *received_for = NULL;
1232
1233/* This is the default text for Received headers generated by Exim. The
1234date will be automatically added on the end. */
1235
1236uschar *received_header_text = US
1237 "Received: "
1238 "${if def:sender_rcvhost {from $sender_rcvhost\n\t}"
f1be21cf
JH
1239 "{${if def:sender_ident {from ${quote_local_part:$sender_ident} }}"
1240 "${if def:sender_helo_name {(helo=$sender_helo_name)\n\t}}}}"
059ec3d9 1241 "by $primary_hostname "
f1be21cf 1242 "${if def:received_protocol {with $received_protocol }}"
01603eec 1243#ifndef DISABLE_TLS
da40b1ec 1244 "${if def:tls_in_ver { ($tls_in_ver)}}"
f1be21cf
JH
1245 "${if def:tls_in_cipher_std { tls $tls_in_cipher_std\n\t}}"
1246#endif
059ec3d9 1247 "(Exim $version_number)\n\t"
3e46c1aa 1248 "${if def:sender_address {(envelope-from <$sender_address>)\n\t}}"
1ab52c69 1249 "id $message_exim_id"
059ec3d9
PH
1250 "${if def:received_for {\n\tfor $received_for}}"
1251 "\0<---------------Space to patch received_header_text->";
1252
1253int received_headers_max = 30;
1254uschar *received_protocol = NULL;
32dfdf8b 1255struct timeval received_time = { 0, 0 };
306c6c77 1256struct timeval received_time_taken = { 0, 0 };
059ec3d9
PH
1257uschar *recipient_data = NULL;
1258uschar *recipient_unqualified_hosts = NULL;
2c7db3f5 1259uschar *recipient_verify_failure = NULL;
059ec3d9 1260int recipients_count = 0;
059ec3d9
PH
1261recipient_item *recipients_list = NULL;
1262int recipients_list_max = 0;
1263int recipients_max = 0;
059ec3d9
PH
1264const pcre *regex_AUTH = NULL;
1265const pcre *regex_check_dns_names = NULL;
1266const pcre *regex_From = NULL;
f1513293 1267const pcre *regex_IGNOREQUOTA = NULL;
059ec3d9
PH
1268const pcre *regex_PIPELINING = NULL;
1269const pcre *regex_SIZE = NULL;
81344b40 1270#ifndef DISABLE_PIPE_CONNECT
ee8b8090
JH
1271const pcre *regex_EARLY_PIPE = NULL;
1272#endif
059ec3d9 1273const pcre *regex_ismsgid = NULL;
f38917cc
JH
1274const pcre *regex_smtp_code = NULL;
1275uschar *regex_vars[REGEX_VARS];
a7cbbf50
PP
1276#ifdef WHITELIST_D_MACROS
1277const pcre *regex_whitelisted_macro = NULL;
1278#endif
8523533c
TK
1279#ifdef WITH_CONTENT_SCAN
1280uschar *regex_match_string = NULL;
1281#endif
059ec3d9
PH
1282int remote_delivery_count = 0;
1283int remote_max_parallel = 2;
1284uschar *remote_sort_domains = NULL;
1285int retry_data_expire = 7*24*60*60;
1286int retry_interval_max = 24*60*60;
1287int retry_maximum_timeout = 0; /* set from retry config */
1288retry_config *retries = NULL;
1289uschar *return_path = NULL;
059ec3d9 1290int rewrite_existflags = 0;
f926e272
JH
1291uschar *rfc1413_hosts = US"@[]";
1292int rfc1413_query_timeout = 0;
c1d94452 1293uid_t root_gid = ROOT_GID;
059ec3d9
PH
1294uid_t root_uid = ROOT_UID;
1295
1296router_instance *routers = NULL;
1297router_instance router_defaults = {
f2ed27cf
JH
1298 .next = NULL,
1299 .name = NULL,
1300 .info = NULL,
1301 .options_block = NULL,
1302 .driver_name = NULL,
059ec3d9 1303
f2ed27cf 1304 .address_data = NULL,
8523533c 1305#ifdef EXPERIMENTAL_BRIGHTMAIL
f2ed27cf 1306 .bmi_rule = NULL,
8e669ac1 1307#endif
f2ed27cf
JH
1308 .cannot_route_message = NULL,
1309 .condition = NULL,
1310 .current_directory = NULL,
1311 .debug_string = NULL,
1312 .domains = NULL,
1313 .errors_to = NULL,
1314 .expand_gid = NULL,
1315 .expand_uid = NULL,
1316 .expand_more = NULL,
1317 .expand_unseen = NULL,
1318 .extra_headers = NULL,
1319 .fallback_hosts = NULL,
1320 .home_directory = NULL,
1321 .ignore_target_hosts = NULL,
1322 .local_parts = NULL,
1323 .pass_router_name = NULL,
1324 .prefix = NULL,
1325 .redirect_router_name = NULL,
1326 .remove_headers = NULL,
1327 .require_files = NULL,
1328 .router_home_directory = NULL,
1329 .self = US"freeze",
1330 .senders = NULL,
1331 .suffix = NULL,
1332 .translate_ip_address = NULL,
1333 .transport_name = NULL,
1334
1335 .address_test = TRUE,
8523533c 1336#ifdef EXPERIMENTAL_BRIGHTMAIL
f2ed27cf
JH
1337 .bmi_deliver_alternate = FALSE,
1338 .bmi_deliver_default = FALSE,
1339 .bmi_dont_deliver = FALSE,
8523533c 1340#endif
f2ed27cf
JH
1341 .expn = TRUE,
1342 .caseful_local_part = FALSE,
1343 .check_local_user = FALSE,
1344 .disable_logging = FALSE,
1345 .fail_verify_recipient = FALSE,
1346 .fail_verify_sender = FALSE,
1347 .gid_set = FALSE,
1348 .initgroups = FALSE,
1349 .log_as_local = TRUE_UNSET,
1350 .more = TRUE,
1351 .pass_on_timeout = FALSE,
1352 .prefix_optional = FALSE,
1353 .repeat_use = TRUE,
1354 .retry_use_local_part = TRUE_UNSET,
1355 .same_domain_copy_routing = FALSE,
1356 .self_rewrite = FALSE,
fa7b17bd 1357 .set = NULL,
f2ed27cf
JH
1358 .suffix_optional = FALSE,
1359 .verify_only = FALSE,
1360 .verify_recipient = TRUE,
1361 .verify_sender = TRUE,
1362 .uid_set = FALSE,
1363 .unseen = FALSE,
1364 .dsn_lasthop = FALSE,
1365
1366 .self_code = self_freeze,
1367 .uid = (uid_t)(-1),
1368 .gid = (gid_t)(-1),
1369
1370 .fallback_hostlist = NULL,
1371 .transport = NULL,
1372 .pass_router = NULL,
1373 .redirect_router = NULL,
1374
ab0e957b 1375 .dnssec = { .request= US"*", .require=NULL },
059ec3d9
PH
1376};
1377
181d9bf8 1378uschar *router_name = NULL;
fa7b17bd 1379tree_node *router_var = NULL;
181d9bf8 1380
059ec3d9 1381ip_address_item *running_interfaces = NULL;
059ec3d9
PH
1382
1383/* This is a weird one. The following string gets patched in the binary by the
1384script that sets up a copy of Exim for running in the test harness. It seems
1385that compilers are now clever, and share constant strings if they can.
1386Elsewhere in Exim the string "<" is used. The compiler optimization seems to
1387make use of the end of this string in order to save space. So the patching then
8669f003 1388wrecks this. We defeat this optimization by adding some additional characters
059ec3d9
PH
1389onto the end of the string. */
1390
1391uschar *running_status = US">>>running<<<" "\0EXTRA";
1392
1393int runrc = 0;
1394
1395uschar *search_error_message = NULL;
059ec3d9
PH
1396uschar *self_hostname = NULL;
1397uschar *sender_address = NULL;
1398unsigned int sender_address_cache[(MAX_NAMED_LIST * 2)/32];
2a3eea10 1399uschar *sender_address_data = NULL;
059ec3d9
PH
1400uschar *sender_address_unrewritten = NULL;
1401uschar *sender_data = NULL;
1402unsigned int sender_domain_cache[(MAX_NAMED_LIST * 2)/32];
1403uschar *sender_fullhost = NULL;
1404uschar *sender_helo_name = NULL;
1405uschar **sender_host_aliases = &no_aliases;
1406uschar *sender_host_address = NULL;
1407uschar *sender_host_authenticated = NULL;
c44ff8be 1408uschar *sender_host_auth_pubname = NULL;
059ec3d9
PH
1409unsigned int sender_host_cache[(MAX_NAMED_LIST * 2)/32];
1410uschar *sender_host_name = NULL;
1411int sender_host_port = 0;
059ec3d9 1412uschar *sender_ident = NULL;
870f6ba8
TF
1413uschar *sender_rate = NULL;
1414uschar *sender_rate_limit = NULL;
1415uschar *sender_rate_period = NULL;
059ec3d9 1416uschar *sender_rcvhost = NULL;
059ec3d9 1417uschar *sender_unqualified_hosts = NULL;
2c7db3f5 1418uschar *sender_verify_failure = NULL;
059ec3d9
PH
1419address_item *sender_verified_list = NULL;
1420address_item *sender_verified_failed = NULL;
1421int sender_verified_rc = -1;
41c7c167
PH
1422uschar *sending_ip_address = NULL;
1423int sending_port = -1;
cd59ab18 1424SIGNAL_BOOL sigalrm_seen = FALSE;
c2a1bba0 1425const uschar *sigalarm_setter = NULL;
059ec3d9 1426uschar **sighup_argv = NULL;
846430d9 1427int slow_lookup_log = 0; /* millisecs, zero disables */
059ec3d9 1428int smtp_accept_count = 0;
059ec3d9
PH
1429int smtp_accept_max = 20;
1430int smtp_accept_max_nonmail= 10;
1431uschar *smtp_accept_max_nonmail_hosts = US"*";
1432int smtp_accept_max_per_connection = 1000;
1433uschar *smtp_accept_max_per_host = NULL;
1434int smtp_accept_queue = 0;
1435int smtp_accept_queue_per_connection = 10;
1436int smtp_accept_reserve = 0;
1437uschar *smtp_active_hostname = NULL;
1f5b4c3d 1438uschar *smtp_banner = US"$smtp_active_hostname ESMTP "
059ec3d9
PH
1439 "Exim $version_number $tod_full"
1440 "\0<---------------Space to patch smtp_banner->";
b4ed4da0 1441int smtp_ch_index = 0;
3ee512ff
PH
1442uschar *smtp_cmd_argument = NULL;
1443uschar *smtp_cmd_buffer = NULL;
0f1a8658 1444struct timeval smtp_connection_start = {0,0};
b4ed4da0 1445uschar smtp_connection_had[SMTP_HBUFF_SIZE];
059ec3d9
PH
1446int smtp_connect_backlog = 20;
1447double smtp_delay_mail = 0.0;
1448double smtp_delay_rcpt = 0.0;
059ec3d9 1449FILE *smtp_in = NULL;
059ec3d9
PH
1450int smtp_load_reserve = -1;
1451int smtp_mailcmd_count = 0;
1452FILE *smtp_out = NULL;
1453uschar *smtp_etrn_command = NULL;
059ec3d9
PH
1454int smtp_max_synprot_errors= 3;
1455int smtp_max_unknown_commands = 3;
8f128379 1456uschar *smtp_notquit_reason = NULL;
059ec3d9
PH
1457uschar *smtp_ratelimit_hosts = NULL;
1458uschar *smtp_ratelimit_mail = NULL;
1459uschar *smtp_ratelimit_rcpt = NULL;
1460uschar *smtp_read_error = US"";
1461int smtp_receive_timeout = 5*60;
1ad6489e 1462uschar *smtp_receive_timeout_s = NULL;
059ec3d9 1463uschar *smtp_reserve_hosts = NULL;
059ec3d9
PH
1464int smtp_rlm_base = 0;
1465double smtp_rlm_factor = 0.0;
1466int smtp_rlm_limit = 0;
1467int smtp_rlm_threshold = INT_MAX;
1468int smtp_rlr_base = 0;
1469double smtp_rlr_factor = 0.0;
1470int smtp_rlr_limit = 0;
1471int smtp_rlr_threshold = INT_MAX;
2d14f397
JH
1472unsigned smtp_peer_options = 0;
1473unsigned smtp_peer_options_wrap= 0;
8c5d388a 1474#ifdef SUPPORT_I18N
9d4319df 1475uschar *smtputf8_advertise_hosts = US"*"; /* overridden under test-harness */
3d1451ea 1476#endif
8523533c
TK
1477
1478#ifdef WITH_CONTENT_SCAN
1479uschar *spamd_address = US"127.0.0.1 783";
1480uschar *spam_bar = NULL;
1481uschar *spam_report = NULL;
c5f280e2 1482uschar *spam_action = NULL;
8523533c
TK
1483uschar *spam_score = NULL;
1484uschar *spam_score_int = NULL;
1485#endif
7952eef9 1486#ifdef SUPPORT_SPF
65a7d8c3 1487uschar *spf_guess = US"v=spf1 a/24 mx/24 ptr ?all";
8523533c
TK
1488uschar *spf_header_comment = NULL;
1489uschar *spf_received = NULL;
1490uschar *spf_result = NULL;
1491uschar *spf_smtp_comment = NULL;
1492#endif
1493
1bd642c2 1494FILE *spool_data_file = NULL;
059ec3d9
PH
1495uschar *spool_directory = US SPOOL_DIRECTORY
1496 "\0<--------------Space to patch spool_directory->";
8523533c
TK
1497#ifdef EXPERIMENTAL_SRS
1498uschar *srs_config = NULL;
1499uschar *srs_db_address = NULL;
1500uschar *srs_db_key = NULL;
384152a6
TK
1501int srs_hashlength = 6;
1502int srs_hashmin = -1;
1503int srs_maxage = 31;
8523533c
TK
1504uschar *srs_orig_recipient = NULL;
1505uschar *srs_orig_sender = NULL;
1506uschar *srs_recipient = NULL;
384152a6 1507uschar *srs_secrets = NULL;
8523533c 1508uschar *srs_status = NULL;
8e669ac1 1509#endif
7ef88aa0
JH
1510#ifdef EXPERIMENTAL_SRS_NATIVE
1511uschar *srs_recipient = NULL;
1512#endif
059ec3d9 1513int string_datestamp_offset= -1;
f1e5fef5
PP
1514int string_datestamp_length= 0;
1515int string_datestamp_type = -1;
059ec3d9 1516uschar *submission_domain = NULL;
2fe1a124 1517uschar *submission_name = NULL;
059ec3d9
PH
1518int syslog_facility = LOG_MAIL;
1519uschar *syslog_processname = US"exim";
059ec3d9
PH
1520uschar *system_filter = NULL;
1521
1522uschar *system_filter_directory_transport = NULL;
1523uschar *system_filter_file_transport = NULL;
1524uschar *system_filter_pipe_transport = NULL;
1525uschar *system_filter_reply_transport = NULL;
1526
1527gid_t system_filter_gid = 0;
79d4bc3d 1528uid_t system_filter_uid = (uid_t)-1;
059ec3d9 1529
0ab63f3d 1530blob tcp_fastopen_nodata = { .data = NULL, .len = 0 };
06e272a3 1531tfo_state_t tcp_out_fastopen = TFO_NOT_USED;
5dc43717
JJ
1532#ifdef USE_TCP_WRAPPERS
1533uschar *tcp_wrappers_daemon_name = US TCP_WRAPPERS_DAEMON_NAME;
1534#endif
8669f003 1535int test_harness_load_avg = 0;
059ec3d9
PH
1536int thismessage_size_limit = 0;
1537int timeout_frozen_after = 0;
9f01e50d
JH
1538#ifdef MEASURE_TIMING
1539struct timeval timestamp_startup;
1540#endif
059ec3d9
PH
1541
1542transport_instance *transports = NULL;
1543
1544transport_instance transport_defaults = {
f2ed27cf
JH
1545 .next = NULL,
1546 .name = NULL,
1547 .info = NULL,
1548 .options_block = NULL,
1549 .driver_name = NULL,
1550 .setup = NULL,
1551 .batch_max = 1,
1552 .batch_id = NULL,
1553 .home_dir = NULL,
1554 .current_dir = NULL,
1555 .expand_multi_domain = NULL,
1556 .multi_domain = TRUE,
1557 .overrides_hosts = FALSE,
1558 .max_addresses = 100,
1559 .connection_max_messages = 500,
1560 .deliver_as_creator = FALSE,
1561 .disable_logging = FALSE,
1562 .initgroups = FALSE,
1563 .uid_set = FALSE,
1564 .gid_set = FALSE,
1565 .uid = (uid_t)(-1),
1566 .gid = (gid_t)(-1),
1567 .expand_uid = NULL,
1568 .expand_gid = NULL,
1569 .warn_message = NULL,
1570 .shadow = NULL,
1571 .shadow_condition = NULL,
1572 .filter_command = NULL,
1573 .add_headers = NULL,
1574 .remove_headers = NULL,
1575 .return_path = NULL,
1576 .debug_string = NULL,
1577 .max_parallel = NULL,
1578 .message_size_limit = NULL,
1579 .headers_rewrite = NULL,
1580 .rewrite_rules = NULL,
1581 .rewrite_existflags = 0,
1582 .filter_timeout = 300,
1583 .body_only = FALSE,
1584 .delivery_date_add = FALSE,
1585 .envelope_to_add = FALSE,
1586 .headers_only = FALSE,
1587 .rcpt_include_affixes = FALSE,
1588 .return_path_add = FALSE,
1589 .return_output = FALSE,
1590 .return_fail_output = FALSE,
1591 .log_output = FALSE,
1592 .log_fail_output = FALSE,
1593 .log_defer_output = FALSE,
1594 .retry_use_local_part = TRUE_UNSET, /* retry_use_local_part: BOOL, but set neither
1595 1 nor 0 so can detect unset */
0cbf2b82 1596#ifndef DISABLE_EVENT
f2ed27cf 1597 .event_action = NULL
533aaf91 1598#endif
059ec3d9
PH
1599};
1600
1601int transport_count;
181d9bf8 1602uschar *transport_name = NULL;
332f5cf3 1603int transport_newlines;
55414b25 1604const uschar **transport_filter_argv = NULL;
059ec3d9
PH
1605int transport_filter_timeout;
1606int transport_write_timeout= 0;
1607
1608tree_node *tree_dns_fails = NULL;
1609tree_node *tree_duplicates = NULL;
1610tree_node *tree_nonrecipients = NULL;
1611tree_node *tree_unusable = NULL;
1612
059ec3d9
PH
1613gid_t *trusted_groups = NULL;
1614uid_t *trusted_users = NULL;
1615uschar *timezone_string = US TIMEZONE_DEFAULT;
1616
1617uschar *unknown_login = NULL;
1618uschar *unknown_username = NULL;
1619uschar *untrusted_set_sender = NULL;
1620
1621/* A regex for matching a "From_" line in an incoming message, in the form
1622
1623 From ph10 Fri Jan 5 12:35 GMT 1996
1624
1625which the "mail" commands send to the MTA (undocumented, of course), or in
1626the form
1627
1628 From ph10 Fri, 7 Jan 97 14:00:00 GMT
1629
1630which is apparently used by some UUCPs, despite it not being in RFC 976.
1631Because of variations in time formats, just match up to the minutes. That
1632should be sufficient. Examples have been seen of time fields like 12:1:03,
1633so just require one digit for hours and minutes. The weekday is also absent
1634in some forms. */
1635
1636uschar *uucp_from_pattern = US
1637 "^From\\s+(\\S+)\\s+(?:[a-zA-Z]{3},?\\s+)?" /* Common start */
1638 "(?:" /* Non-extracting bracket */
1639 "[a-zA-Z]{3}\\s+\\d?\\d|" /* First form */
1640 "\\d?\\d\\s+[a-zA-Z]{3}\\s+\\d\\d(?:\\d\\d)?" /* Second form */
1641 ")" /* End alternation */
1642 "\\s+\\d\\d?:\\d\\d?"; /* Start of time */
1643
1644uschar *uucp_from_sender = US"$1";
1645
aec45841 1646uschar *verify_mode = NULL;
f45100a3 1647uschar *version_copyright =
f9ba5e22 1648 US"Copyright (c) University of Cambridge, 1995 - 2018\n"
c45e9ca1 1649 "(c) The Exim Maintainers and contributors in ACKNOWLEDGMENTS file, 2007 - 2018";
059ec3d9
PH
1650uschar *version_date = US"?";
1651uschar *version_cnumber = US"????";
1652uschar *version_string = US"?";
1653
aec45841 1654uschar *warn_message_file = NULL;
059ec3d9 1655int warning_count = 0;
aec45841
JH
1656uschar *warnmsg_delay = NULL;
1657uschar *warnmsg_recipients = NULL;
aec45841 1658
059ec3d9
PH
1659
1660/* End of globals.c */