1 /*************************************************
3 *************************************************/
5 /* Copyright (c) University of Cambridge 1995 - 2018 */
6 /* Copyright (c) The Exim Maintainers 2021 */
7 /* See the file NOTICE for conditions of use and distribution. */
12 /* This source module contains all the global variables used in
13 the exim monitor, including those that are used by the standard
14 Exim modules that are included in Eximon. For comments on their
15 usage, see em_hdr.h and globals.h. */
18 /* The first set are unique to Eximon */
21 XtAppContext X_appcon;
23 XtActionsRec actionTable[] = {
24 { "dialogAction", (XtActionProc)dialogAction}};
26 int actionTableSize = sizeof(actionTable)/sizeof(XtActionsRec);
28 XtTranslations queue_trans;
29 XtTranslations text_trans;
31 Widget dialog_ref_widget;
32 Widget toplevel_widget;
33 Widget log_widget = NULL;
35 Widget unhide_widget = NULL;
40 int action_output = FALSE;
41 int action_queue_update = TRUE;
42 uschar actioned_message[24];
43 uschar *action_required;
44 uschar *alternate_config = NULL;
46 #ifdef EXPERIMENTAL_BRIGHTMAIL
48 uschar *bmi_verdicts = NULL;
53 uschar *exim_path = US BIN_DIRECTORY "/exim"
54 "\0<---------------Space to patch exim_path->";
56 int eximon_initialized = FALSE;
58 int log_buffer_size = 10240;
59 BOOL log_datestamping = FALSE;
61 uschar *log_display_buffer;
62 uschar *log_file = NULL;
63 uschar log_file_open[256];
64 uschar *log_font = NULL;
66 long int log_position;
69 uschar *menu_event = US"Shift<Btn1Down>";
70 int menu_is_up = FALSE;
74 pipe_item *pipe_chain = NULL;
76 uschar *qualify_domain = NULL;
77 int queue_depth = 200;
78 uschar *queue_font = NULL;
79 int queue_max_addresses = 10;
80 skip_item *queue_skip = NULL;
81 uschar *queue_stripchart_name = NULL;
82 int queue_update = 60;
83 int queue_width = 600;
85 pcre2_code *yyyymmdd_regex;
87 uschar *size_stripchart = NULL;
88 uschar *size_stripchart_name = NULL;
89 int spool_is_split = FALSE;
90 int start_small = FALSE;
91 int stripchart_height = 90;
92 int stripchart_number = 1;
93 pcre2_code **stripchart_regex;
94 uschar **stripchart_title;
95 int *stripchart_total;
96 int stripchart_update = 60;
97 int stripchart_width = 80;
98 int stripchart_varstart = 1;
100 int text_depth = 200;
101 int tick_queue_accumulator = 999999;
103 uschar *window_title = US"exim monitor";
106 /***********************************************************/
107 /***********************************************************/
110 /* These ones are used by Exim modules included in Eximon. Not all are
111 actually relevant to the operation of Eximon. If SPOOL_DIRECTORY is not
112 defined (Exim was compiled with it unset), just define it empty. The script
113 that fires up the monitor fishes the value out by using -bP anyway. */
115 #ifndef SPOOL_DIRECTORY
116 #define SPOOL_DIRECTORY ""
119 tree_node *acl_var_c = NULL;
120 tree_node *acl_var_m = NULL;
121 uschar *active_hostname = NULL;
122 BOOL allow_unqualified_recipient = FALSE;
123 BOOL allow_unqualified_sender = FALSE;
124 uschar *authenticated_id = NULL;
125 uschar *authenticated_sender = NULL;
127 uschar *big_buffer = NULL;
128 int big_buffer_size = BIG_BUFFER_SIZE;
129 int body_linecount = 0;
130 int body_zerocount = 0;
132 BOOL deliver_firsttime = FALSE;
133 BOOL deliver_freeze = FALSE;
134 time_t deliver_frozen_at = 0;
135 BOOL deliver_manual_thaw = FALSE;
138 uschar *dkim_cur_signer = NULL;
139 uschar *dkim_signers = NULL;
140 uschar *dkim_signing_domain = NULL;
141 uschar *dkim_signing_selector = NULL;
142 uschar *dkim_verify_signers = US"$dkim_signers";
143 unsigned dkim_collect_input = 0;
144 BOOL dkim_disable_verify = FALSE;
147 BOOL dont_deliver = FALSE;
150 uschar *dsn_envid = NULL;
152 struct global_flags f = {
153 .sender_local = FALSE,
156 #ifdef WITH_CONTENT_SCAN
157 int fake_response = OK;
160 header_line *header_last = NULL;
161 header_line *header_list = NULL;
163 BOOL host_lookup_deferred = FALSE;
164 BOOL host_lookup_failed = FALSE;
165 uschar *interface_address = NULL;
166 int interface_port = 0;
168 BOOL local_error_message = FALSE;
169 uschar *local_scan_data = NULL;
170 BOOL log_timezone = FALSE;
172 #ifdef WITH_CONTENT_SCAN
173 uschar *spam_bar = NULL;
174 uschar *spam_report = NULL;
175 uschar *spam_score = NULL;
176 uschar *spam_score_int = NULL;
179 int max_received_linelength= 0;
182 uschar *message_id_external;
183 uschar message_id_option[MESSAGE_ID_LENGTH + 3];
185 int message_linecount = 0;
186 int message_size = 0;
187 uschar message_subdir[2] = { 0, 0 };
189 gid_t originator_gid;
190 uschar *originator_login;
191 uid_t originator_uid;
193 uschar *primary_hostname = NULL;
195 uschar *queue_name = US"";
197 int received_count = 0;
198 uschar *received_protocol = NULL;
199 struct timeval received_time = { 0, 0 };
200 struct timeval received_time_complete = { 0, 0 };
201 int recipients_count = 0;
202 recipient_item *recipients_list = NULL;
203 int recipients_list_max = 0;
204 BOOL running_in_test_harness=FALSE;
206 uschar *sender_address = NULL;
207 uschar *sender_fullhost = NULL;
208 uschar *sender_helo_name = NULL;
209 uschar *sender_host_address = NULL;
210 uschar *sender_host_auth_pubname = NULL;
211 uschar *sender_host_authenticated = NULL;
212 uschar *sender_host_name = NULL;
213 int sender_host_port = 0;
214 uschar *sender_ident = NULL;
215 BOOL sender_set_untrusted = FALSE;
216 uschar *smtp_active_hostname = NULL;
218 BOOL split_spool_directory = FALSE;
219 uschar *spool_directory = US SPOOL_DIRECTORY;
220 int string_datestamp_offset=-1;
221 int string_datestamp_length= 0;
222 int string_datestamp_type = -1;
224 BOOL timestamps_utc = FALSE;
225 tls_support tls_in = {
226 .active = { .sock = -1 }
227 /* remainder zero/null/false */
230 tree_node *tree_duplicates = NULL;
231 tree_node *tree_nonrecipients = NULL;
232 tree_node *tree_unusable = NULL;
234 uschar *version_date = US"?";
235 uschar *version_string = US"?";
237 int warning_count = 0;
239 /* End of em_globals.c */