7 /* Postfix master - global configuration file access
11 /* void master_vars_init()
13 /* master_vars_init() reads values from the global Postfix configuration
14 /* file and assigns them to tunable program parameters. Where no value
15 /* is specified, a compiled-in default value is used.
19 /* The Secure Mailer license must be distributed with this software.
22 /* IBM T.J. Watson Research
24 /* Yorktown Heights, NY 10598, USA
33 /* Utility library. */
36 #include <stringops.h>
41 #include <mail_conf.h>
42 #include <mail_params.h>
44 /* Application-specific. */
51 char *var_inet_protocols
;
53 int var_throttle_time
;
54 char *var_master_disable
;
56 /* master_vars_init - initialize from global Postfix configuration file */
58 void master_vars_init(void)
61 static const CONFIG_STR_TABLE str_table
[] = {
62 VAR_INET_PROTOCOLS
, DEF_INET_PROTOCOLS
, &var_inet_protocols
, 1, 0,
63 VAR_MASTER_DISABLE
, DEF_MASTER_DISABLE
, &var_master_disable
, 0, 0,
66 static const CONFIG_INT_TABLE int_table
[] = {
67 VAR_PROC_LIMIT
, DEF_PROC_LIMIT
, &var_proc_limit
, 1, 0,
70 static const CONFIG_TIME_TABLE time_table
[] = {
71 VAR_THROTTLE_TIME
, DEF_THROTTLE_TIME
, &var_throttle_time
, 1, 0,
74 static char *saved_inet_protocols
;
75 static char *saved_queue_dir
;
76 static char *saved_config_dir
;
77 static const MASTER_STR_WATCH str_watch_table
[] = {
78 VAR_CONFIG_DIR
, &var_config_dir
, &saved_config_dir
, 0, 0,
79 VAR_QUEUE_DIR
, &var_queue_dir
, &saved_queue_dir
, 0, 0,
80 VAR_INET_PROTOCOLS
, &var_inet_protocols
, &saved_inet_protocols
, 0, 0,
81 /* XXX Add inet_interfaces here after this code is burned in. */
86 * Flush existing main.cf settings, so that we handle deleted main.cf
90 set_mail_conf_str(VAR_PROCNAME
, var_procname
);
92 get_mail_conf_str_table(str_table
);
93 get_mail_conf_int_table(int_table
);
94 get_mail_conf_time_table(time_table
);
95 path
= concatenate(var_config_dir
, "/", MASTER_CONF_FILE
, (char *) 0);
96 fset_master_ent(path
);
100 * Look for parameter changes that require special attention.
102 master_str_watch(str_watch_table
);