77 #include "time_vars.h"
78 #include "bool_vars.h"
82 #include "nint_vars.h"
83 #include "nbool_vars.h"
84 #include "long_vars.h"
96 #include "time_table.h"
101 #include "bool_table.h"
106 #include "int_table.h"
111 #include "str_table.h"
117 #include "raw_table.h"
122 #include "nint_table.h"
127 #include "nbool_table.h"
132 #include "long_table.h"
140 {
"virtual_maps",
""},
141 {
"fallback_relay",
""},
142 {
"authorized_verp_clients",
""},
143 {
"smtpd_client_connection_limit_exceptions",
""},
144 {
"postscreen_dnsbl_ttl",
""},
156 static const char *pcf_check_myhostname(
void);
157 static const char *pcf_check_mydomainname(
void);
158 static const char *pcf_mynetworks(
void);
160 #include "str_fn_vars.h"
163 #include "str_fn_table.h"
179 #define STR(x) vstring_str(x)
183 static const char *pcf_check_myhostname(
void)
185 static const char *name;
200 if ((dot = strchr(name,
'.')) == 0) {
210 static void pcf_get_myhostname(
void)
215 name = pcf_check_myhostname();
221 static const char *pcf_check_mydomainname(
void)
223 static const char *domain;
236 pcf_get_myhostname();
239 return (domain =
mystrdup(dot + 1));
244 static const char *pcf_mynetworks(
void)
246 static const char *networks;
285 static const char *pcf_conv_bool_parameter(
void *ptr)
289 return (cbt->
defval ?
"yes" :
"no");
294 static const char *pcf_conv_time_parameter(
void *ptr)
303 static const char *pcf_conv_int_parameter(
void *ptr)
312 static const char *pcf_conv_str_parameter(
void *ptr)
321 static const char *pcf_conv_str_fn_parameter(
void *ptr)
330 static const char *pcf_conv_raw_parameter(
void *ptr)
339 static const char *pcf_conv_nint_parameter(
void *ptr)
348 static const char *pcf_conv_nbool_parameter(
void *ptr)
357 static const char *pcf_conv_long_parameter(
void *ptr)
368 const char *myname =
"pcf_register_builtin_parameters";
383 msg_panic(
"%s: global parameter table is already initialized", myname);
395 for (ctt = pcf_time_table; ctt->
name; ctt++)
398 pcf_conv_time_parameter);
399 for (cbt = pcf_bool_table; cbt->
name; cbt++)
402 pcf_conv_bool_parameter);
403 for (cit = pcf_int_table; cit->
name; cit++)
406 pcf_conv_int_parameter);
407 for (cst = pcf_str_table; cst->
name; cst++)
410 pcf_conv_str_parameter);
411 for (cft = pcf_str_fn_table; cft->
name; cft++)
414 pcf_conv_str_fn_parameter);
415 for (rst = pcf_raw_table; rst->
name; rst++)
418 (
void *) rst, pcf_conv_raw_parameter);
419 for (nst = pcf_nint_table; nst->
name; nst++)
422 pcf_conv_nint_parameter);
423 for (bst = pcf_nbool_table; bst->
name; bst++)
426 pcf_conv_nbool_parameter);
427 for (lst = pcf_long_table; lst->
name; lst++)
430 pcf_conv_long_parameter);
436 for (cst = pcf_legacy_str_table; cst->
name; cst++)
439 pcf_conv_str_parameter);
448 (
void *) &pcf_adhoc_procname, pcf_conv_str_parameter);
452 (
void *) &pcf_adhoc_servname, pcf_conv_str_parameter);
453 pcf_adhoc_pid.
defval = pid;
456 (
void *) &pcf_adhoc_pid, pcf_conv_int_parameter);
#define PCF_PARAM_FLAG_LEGACY
char * mystrdup(const char *str)
NORETURN msg_panic(const char *fmt,...)
INET_PROTO_INFO * inet_proto_init(const char *context, const char *protocols)
char * pcf_expand_parameter_value(VSTRING *, int, const char *, PCF_MASTER_ENT *)
#define DEF_INET_INTERFACES
#define VAR_INET_INTERFACES
const char * mynetworks(void)
#define PCF_PARAM_TABLE_ENTER(table, name, flags, data, func)
#define VAR_INET_PROTOCOLS
VSTRING * vstring_sprintf(VSTRING *vp, const char *format,...)
#define PCF_PARAM_TABLE_CREATE(size)
#define DEF_MYNETWORKS_STYLE
const char * mail_conf_lookup_eval(const char *name)
char * concatenate(const char *arg0,...)
#define PCF_PARAM_FLAG_READONLY
#define PCF_PARAM_FLAG_BUILTIN
VSTRING * pcf_param_string_buf
#define VAR_MYNETWORKS_STYLE
#define DEF_INET_PROTOCOLS
PCF_PARAM_TABLE * pcf_param_table
char * var_inet_protocols
const char * get_hostname(void)
#define PCF_PARAM_FLAG_RAW
char * var_inet_interfaces
const char *(* defval)(void)
void pcf_register_builtin_parameters(const char *procname, pid_t pid)
char * var_mynetworks_style