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