Implement %M datestamping in log filenames.
[exim.git] / src / exim_monitor / em_globals.c
CommitLineData
0a49a7a4 1/* $Cambridge: exim/src/exim_monitor/em_globals.c,v 1.17 2009/11/16 19:50:36 nm4 Exp $ */
059ec3d9
PH
2
3/*************************************************
4* Exim Monitor *
5*************************************************/
6
0a49a7a4 7/* Copyright (c) University of Cambridge 1995 - 2009 */
059ec3d9
PH
8/* See the file NOTICE for conditions of use and distribution. */
9
10
11#include "em_hdr.h"
12
13/* This source module contains all the global variables used in
14the exim monitor, including those that are used by the standard
15Exim modules that are included in Eximon. For comments on their
16usage, see em_hdr.h and globals.h. */
17
18
19/* The first set are unique to Eximon */
20
21Display *X_display;
22XtAppContext X_appcon;
23
24XtActionsRec actionTable[] = {
25 { "dialogAction", (XtActionProc)dialogAction}};
26
27int actionTableSize = sizeof(actionTable)/sizeof(XtActionsRec);
28
29XtTranslations queue_trans;
30XtTranslations text_trans;
31
32Widget dialog_ref_widget;
33Widget toplevel_widget;
34Widget log_widget = NULL;
35Widget queue_widget;
36Widget unhide_widget = NULL;
37
38
39FILE *LOG;
40
41int action_output = FALSE;
42int action_queue_update = TRUE;
43uschar actioned_message[24];
44uschar *action_required;
45uschar *alternate_config = NULL;
46
8523533c
TK
47#ifdef EXPERIMENTAL_BRIGHTMAIL
48int bmi_run = 0;
49uschar *bmi_verdicts = NULL;
50#endif
51
059ec3d9
PH
52int body_max = 20000;
53
54uschar *exim_path = US BIN_DIRECTORY "/exim"
4d9c610b 55 "\0<---------------Space to patch exim_path->";
059ec3d9
PH
56
57int eximon_initialized = FALSE;
58
59int log_buffer_size = 10240;
60BOOL log_datestamping = FALSE;
61int log_depth = 150;
62uschar *log_display_buffer;
63uschar *log_file = NULL;
64uschar log_file_open[256];
65uschar *log_font = NULL;
66ino_t log_inode;
67long int log_position;
68int log_width = 600;
69
70uschar *menu_event = US"Shift<Btn1Down>";
71int menu_is_up = FALSE;
72int min_height = 162;
73int min_width = 103;
74
75pipe_item *pipe_chain = NULL;
76
77uschar *qualify_domain = NULL;
78int queue_depth = 200;
79uschar *queue_font = NULL;
80int queue_max_addresses = 10;
81skip_item *queue_skip = NULL;
82uschar *queue_stripchart_name = NULL;
83int queue_update = 60;
84int queue_width = 600;
85
86pcre *yyyymmdd_regex;
87
88uschar *size_stripchart = NULL;
89uschar *size_stripchart_name = NULL;
90int spool_is_split = FALSE;
91int start_small = FALSE;
92int stripchart_height = 90;
93int stripchart_number = 1;
94pcre **stripchart_regex;
95uschar **stripchart_title;
96int *stripchart_total;
97int stripchart_update = 60;
98int stripchart_width = 80;
99int stripchart_varstart = 1;
100
101int text_depth = 200;
102int tick_queue_accumulator = 999999;
103
104uschar *window_title = US"exim monitor";
105
106
107/***********************************************************/
108/***********************************************************/
109
110
111/* These ones are used by Exim modules included in Eximon. Not all are
112actually relevant to the operation of Eximon. If SPOOL_DIRECTORY is not
113defined (Exim was compiled with it unset), just define it empty. The script
114that fires up the monitor fishes the value out by using -bP anyway. */
115
116#ifndef SPOOL_DIRECTORY
117#define SPOOL_DIRECTORY ""
118#endif
119
38a0a95f
PH
120tree_node *acl_var_c = NULL;
121tree_node *acl_var_m = NULL;
059ec3d9
PH
122uschar *active_hostname = NULL;
123BOOL allow_unqualified_recipient = FALSE;
124BOOL allow_unqualified_sender = FALSE;
125uschar *authenticated_id = NULL;
126uschar *authenticated_sender = NULL;
127
128uschar *big_buffer = NULL;
129int big_buffer_size = BIG_BUFFER_SIZE;
130int body_linecount = 0;
131int body_zerocount = 0;
132
133BOOL deliver_firsttime = FALSE;
134BOOL deliver_freeze = FALSE;
135int deliver_frozen_at = 0;
136BOOL deliver_manual_thaw = FALSE;
4d9c610b 137
015f07e6 138#ifndef DISABLE_DKIM
51cbd3e1
TK
139uschar *dkim_cur_signer = NULL;
140uschar *dkim_signers = NULL;
015f07e6
TK
141uschar *dkim_signing_domain = NULL;
142uschar *dkim_signing_selector = NULL;
51cbd3e1 143uschar *dkim_verify_signers = US"$dkim_signers";
015f07e6
TK
144BOOL dkim_collect_input = FALSE;
145BOOL dkim_disable_verify = FALSE;
1d805650
TK
146#endif
147
059ec3d9
PH
148BOOL dont_deliver = FALSE;
149
8523533c 150#ifdef WITH_CONTENT_SCAN
29aba418 151int fake_response = OK;
8523533c
TK
152#endif
153
059ec3d9
PH
154header_line *header_last = NULL;
155header_line *header_list = NULL;
156
b08b24c8 157BOOL host_lookup_deferred = FALSE;
059ec3d9
PH
158BOOL host_lookup_failed = FALSE;
159uschar *interface_address = NULL;
160int interface_port = 0;
161
162BOOL local_error_message = FALSE;
163uschar *local_scan_data = NULL;
164BOOL log_timezone = FALSE;
8523533c
TK
165
166#ifdef WITH_CONTENT_SCAN
83e11d00
MH
167uschar *spam_bar = NULL;
168uschar *spam_report = NULL;
169uschar *spam_score = NULL;
8523533c
TK
170uschar *spam_score_int = NULL;
171#endif
172
d677b2f2 173int max_received_linelength= 0;
059ec3d9
PH
174int message_age = 0;
175uschar *message_id;
176uschar *message_id_external;
177uschar message_id_option[MESSAGE_ID_LENGTH + 3];
178
179int message_linecount = 0;
180int message_size = 0;
181uschar message_subdir[2] = { 0, 0 };
182
183gid_t originator_gid;
184uschar *originator_login;
185uid_t originator_uid;
186
187uschar *primary_hostname = NULL;
188
189int received_count = 0;
190uschar *received_protocol = NULL;
191int received_time = 0;
192int recipients_count = 0;
193recipient_item *recipients_list = NULL;
194int recipients_list_max = 0;
195int running_in_test_harness=FALSE;
196
197uschar *sender_address = NULL;
198uschar *sender_fullhost = NULL;
199uschar *sender_helo_name = NULL;
200uschar *sender_host_address = NULL;
201uschar *sender_host_authenticated = NULL;
202uschar *sender_host_name = NULL;
203int sender_host_port = 0;
204uschar *sender_ident = NULL;
205BOOL sender_local = FALSE;
206BOOL sender_set_untrusted = FALSE;
1f5b4c3d 207uschar *smtp_active_hostname = NULL;
059ec3d9
PH
208
209BOOL split_spool_directory = FALSE;
210uschar *spool_directory = US SPOOL_DIRECTORY;
211int string_datestamp_offset=-1;
f1e5fef5
PP
212int string_datestamp_length= 0;
213int string_datestamp_type = -1;
059ec3d9
PH
214
215BOOL timestamps_utc = FALSE;
216BOOL tls_certificate_verified = FALSE;
217uschar *tls_cipher = NULL;
218uschar *tls_peerdn = NULL;
219
220tree_node *tree_duplicates = NULL;
221tree_node *tree_nonrecipients = NULL;
222tree_node *tree_unusable = NULL;
223
224uschar *version_date = US"?";
225uschar *version_string = US"?";
226
227int warning_count = 0;
228
229/* End of em_globals.c */