mirror of
https://github.com/vdukhovni/postfix
synced 2025-09-01 06:35:27 +00:00
snapshot-20001213
This commit is contained in:
committed by
Viktor Dukhovni
parent
bc417d155f
commit
29d4fb45d0
@@ -4625,3 +4625,10 @@ Apologies for any names omitted.
|
|||||||
compatibility with queued mail, so the pickup server is
|
compatibility with queued mail, so the pickup server is
|
||||||
changed to discard type L records only from the message
|
changed to discard type L records only from the message
|
||||||
envelope, not from the content. File: pickup/pickup.c.
|
envelope, not from the content. File: pickup/pickup.c.
|
||||||
|
|
||||||
|
20001213
|
||||||
|
|
||||||
|
Bugfix: dict_ldap did not properly initialize a handle
|
||||||
|
after connection timeout. Problem reported by Alain Thivillon.
|
||||||
|
did not take his patch because I have no means to verify
|
||||||
|
the code. File: util/dict_ldap.c.
|
||||||
|
@@ -280,8 +280,11 @@ int main(int argc, char **argv)
|
|||||||
{
|
{
|
||||||
static CONFIG_INT_TABLE int_table[] = {
|
static CONFIG_INT_TABLE int_table[] = {
|
||||||
VAR_BOUNCE_LIMIT, DEF_BOUNCE_LIMIT, &var_bounce_limit, 1, 0,
|
VAR_BOUNCE_LIMIT, DEF_BOUNCE_LIMIT, &var_bounce_limit, 1, 0,
|
||||||
VAR_MAX_QUEUE_TIME, DEF_MAX_QUEUE_TIME, &var_max_queue_time, 1, 1000,
|
0,
|
||||||
VAR_DELAY_WARN_TIME, DEF_DELAY_WARN_TIME, &var_delay_warn_time, 0, 0,
|
};
|
||||||
|
static CONFIG_TIME_TABLE time_table[] = {
|
||||||
|
VAR_MAX_QUEUE_TIME, DEF_MAX_QUEUE_TIME, &var_max_queue_time, 'd', 1, 1000,
|
||||||
|
VAR_DELAY_WARN_TIME, DEF_DELAY_WARN_TIME, &var_delay_warn_time, 'h', 0, 0,
|
||||||
0,
|
0,
|
||||||
};
|
};
|
||||||
static CONFIG_STR_TABLE str_table[] = {
|
static CONFIG_STR_TABLE str_table[] = {
|
||||||
@@ -298,6 +301,7 @@ int main(int argc, char **argv)
|
|||||||
single_server_main(argc, argv, bounce_service,
|
single_server_main(argc, argv, bounce_service,
|
||||||
MAIL_SERVER_INT_TABLE, int_table,
|
MAIL_SERVER_INT_TABLE, int_table,
|
||||||
MAIL_SERVER_STR_TABLE, str_table,
|
MAIL_SERVER_STR_TABLE, str_table,
|
||||||
|
MAIL_SERVER_TIME_TABLE, time_table,
|
||||||
MAIL_SERVER_POST_INIT, post_jail_init,
|
MAIL_SERVER_POST_INIT, post_jail_init,
|
||||||
0);
|
0);
|
||||||
}
|
}
|
||||||
|
@@ -267,6 +267,7 @@ int main(int argc, char **argv)
|
|||||||
single_server_main(argc, argv, cleanup_service,
|
single_server_main(argc, argv, cleanup_service,
|
||||||
MAIL_SERVER_INT_TABLE, cleanup_int_table,
|
MAIL_SERVER_INT_TABLE, cleanup_int_table,
|
||||||
MAIL_SERVER_STR_TABLE, cleanup_str_table,
|
MAIL_SERVER_STR_TABLE, cleanup_str_table,
|
||||||
|
MAIL_SERVER_TIME_TABLE, cleanup_time_table,
|
||||||
MAIL_SERVER_PRE_INIT, cleanup_pre_jail,
|
MAIL_SERVER_PRE_INIT, cleanup_pre_jail,
|
||||||
MAIL_SERVER_POST_INIT, cleanup_post_jail,
|
MAIL_SERVER_POST_INIT, cleanup_post_jail,
|
||||||
MAIL_SERVER_PRE_ACCEPT, pre_accept,
|
MAIL_SERVER_PRE_ACCEPT, pre_accept,
|
||||||
|
@@ -100,6 +100,7 @@ extern void cleanup_pre_jail(char *, char **);
|
|||||||
extern void cleanup_post_jail(char *, char **);
|
extern void cleanup_post_jail(char *, char **);
|
||||||
extern CONFIG_INT_TABLE cleanup_int_table[];
|
extern CONFIG_INT_TABLE cleanup_int_table[];
|
||||||
extern CONFIG_STR_TABLE cleanup_str_table[];
|
extern CONFIG_STR_TABLE cleanup_str_table[];
|
||||||
|
extern CONFIG_TIME_TABLE cleanup_time_table[];
|
||||||
|
|
||||||
#define CLEANUP_RECORD(s, t, b, l) ((s)->action((s), (t), (b), (l)))
|
#define CLEANUP_RECORD(s, t, b, l) ((s)->action((s), (t), (b), (l)))
|
||||||
|
|
||||||
|
@@ -110,7 +110,7 @@ static void cleanup_envelope_process(CLEANUP_STATE *state, int type, char *buf,
|
|||||||
state->errs |= CLEANUP_STAT_BAD;
|
state->errs |= CLEANUP_STAT_BAD;
|
||||||
} else {
|
} else {
|
||||||
if (state->warn_time == 0 && var_delay_warn_time > 0)
|
if (state->warn_time == 0 && var_delay_warn_time > 0)
|
||||||
state->warn_time = state->time + var_delay_warn_time * 3600L;
|
state->warn_time = state->time + var_delay_warn_time;
|
||||||
if (state->warn_time)
|
if (state->warn_time)
|
||||||
cleanup_out_format(state, REC_TYPE_WARN, REC_TYPE_WARN_FORMAT,
|
cleanup_out_format(state, REC_TYPE_WARN, REC_TYPE_WARN_FORMAT,
|
||||||
state->warn_time);
|
state->warn_time);
|
||||||
|
@@ -10,6 +10,8 @@
|
|||||||
/*
|
/*
|
||||||
/* CONFIG_STR_TABLE cleanup_str_table[];
|
/* CONFIG_STR_TABLE cleanup_str_table[];
|
||||||
/*
|
/*
|
||||||
|
/* CONFIG_TIME_TABLE cleanup_time_table[];
|
||||||
|
/*
|
||||||
/* void cleanup_pre_jail(service_name, argv)
|
/* void cleanup_pre_jail(service_name, argv)
|
||||||
/* char *service_name;
|
/* char *service_name;
|
||||||
/* char **argv;
|
/* char **argv;
|
||||||
@@ -26,7 +28,7 @@
|
|||||||
/* for one-time initializations that must be done before any message
|
/* for one-time initializations that must be done before any message
|
||||||
/* processing can take place.
|
/* processing can take place.
|
||||||
/*
|
/*
|
||||||
/* cleanup_int_table[] and cleanup_str_table[] specify configuration
|
/* cleanup_{int,str,time}_table[] specify configuration
|
||||||
/* parameters that must be initialized before calling any functions
|
/* parameters that must be initialized before calling any functions
|
||||||
/* in this module. These tables satisfy the interface as specified in
|
/* in this module. These tables satisfy the interface as specified in
|
||||||
/* single_service(3).
|
/* single_service(3).
|
||||||
@@ -109,11 +111,15 @@ CONFIG_INT_TABLE cleanup_int_table[] = {
|
|||||||
VAR_HOPCOUNT_LIMIT, DEF_HOPCOUNT_LIMIT, &var_hopcount_limit, 1, 0,
|
VAR_HOPCOUNT_LIMIT, DEF_HOPCOUNT_LIMIT, &var_hopcount_limit, 1, 0,
|
||||||
VAR_HEADER_LIMIT, DEF_HEADER_LIMIT, &var_header_limit, 1, 0,
|
VAR_HEADER_LIMIT, DEF_HEADER_LIMIT, &var_header_limit, 1, 0,
|
||||||
VAR_DUP_FILTER_LIMIT, DEF_DUP_FILTER_LIMIT, &var_dup_filter_limit, 0, 0,
|
VAR_DUP_FILTER_LIMIT, DEF_DUP_FILTER_LIMIT, &var_dup_filter_limit, 0, 0,
|
||||||
VAR_DELAY_WARN_TIME, DEF_DELAY_WARN_TIME, &var_delay_warn_time, 0, 0,
|
|
||||||
VAR_EXTRA_RCPT_LIMIT, DEF_EXTRA_RCPT_LIMIT, &var_extra_rcpt_limit, 0, 0,
|
VAR_EXTRA_RCPT_LIMIT, DEF_EXTRA_RCPT_LIMIT, &var_extra_rcpt_limit, 0, 0,
|
||||||
0,
|
0,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
CONFIG_TIME_TABLE cleanup_time_table[] = {
|
||||||
|
VAR_DELAY_WARN_TIME, DEF_DELAY_WARN_TIME, &var_delay_warn_time, 'h', 0, 0,
|
||||||
|
0,
|
||||||
|
};
|
||||||
|
|
||||||
CONFIG_STR_TABLE cleanup_str_table[] = {
|
CONFIG_STR_TABLE cleanup_str_table[] = {
|
||||||
VAR_CANONICAL_MAPS, DEF_CANONICAL_MAPS, &var_canonical_maps, 0, 0,
|
VAR_CANONICAL_MAPS, DEF_CANONICAL_MAPS, &var_canonical_maps, 0, 0,
|
||||||
VAR_SEND_CANON_MAPS, DEF_SEND_CANON_MAPS, &var_send_canon_maps, 0, 0,
|
VAR_SEND_CANON_MAPS, DEF_SEND_CANON_MAPS, &var_send_canon_maps, 0, 0,
|
||||||
|
@@ -298,20 +298,23 @@ void mail_params_init()
|
|||||||
};
|
};
|
||||||
static CONFIG_INT_TABLE other_int_defaults[] = {
|
static CONFIG_INT_TABLE other_int_defaults[] = {
|
||||||
VAR_MAX_USE, DEF_MAX_USE, &var_use_limit, 1, 0,
|
VAR_MAX_USE, DEF_MAX_USE, &var_use_limit, 1, 0,
|
||||||
VAR_MAX_IDLE, DEF_MAX_IDLE, &var_idle_limit, 1, 0,
|
|
||||||
VAR_IPC_TIMEOUT, DEF_IPC_TIMEOUT, &var_ipc_timeout, 1, 0,
|
|
||||||
VAR_DONT_REMOVE, DEF_DONT_REMOVE, &var_dont_remove, 0, 0,
|
VAR_DONT_REMOVE, DEF_DONT_REMOVE, &var_dont_remove, 0, 0,
|
||||||
VAR_LINE_LIMIT, DEF_LINE_LIMIT, &var_line_limit, 512, 0,
|
VAR_LINE_LIMIT, DEF_LINE_LIMIT, &var_line_limit, 512, 0,
|
||||||
VAR_MESSAGE_LIMIT, DEF_MESSAGE_LIMIT, &var_message_limit, 0, 0,
|
VAR_MESSAGE_LIMIT, DEF_MESSAGE_LIMIT, &var_message_limit, 0, 0,
|
||||||
VAR_IPC_IDLE, DEF_IPC_IDLE, &var_ipc_idle_limit, 1, 0,
|
|
||||||
VAR_HASH_QUEUE_DEPTH, DEF_HASH_QUEUE_DEPTH, &var_hash_queue_depth, 1, 0,
|
VAR_HASH_QUEUE_DEPTH, DEF_HASH_QUEUE_DEPTH, &var_hash_queue_depth, 1, 0,
|
||||||
VAR_TRIGGER_TIMEOUT, DEF_TRIGGER_TIMEOUT, &var_trigger_timeout, 1, 0,
|
|
||||||
VAR_FORK_TRIES, DEF_FORK_TRIES, &var_fork_tries, 1, 0,
|
VAR_FORK_TRIES, DEF_FORK_TRIES, &var_fork_tries, 1, 0,
|
||||||
VAR_FORK_DELAY, DEF_FORK_DELAY, &var_fork_delay, 1, 0,
|
|
||||||
VAR_FLOCK_TRIES, DEF_FLOCK_TRIES, &var_flock_tries, 1, 0,
|
VAR_FLOCK_TRIES, DEF_FLOCK_TRIES, &var_flock_tries, 1, 0,
|
||||||
VAR_FLOCK_DELAY, DEF_FLOCK_DELAY, &var_flock_delay, 1, 0,
|
0,
|
||||||
VAR_FLOCK_STALE, DEF_FLOCK_STALE, &var_flock_stale, 1, 0,
|
};
|
||||||
VAR_DAEMON_TIMEOUT, DEF_DAEMON_TIMEOUT, &var_daemon_timeout, 1, 0,
|
static CONFIG_TIME_TABLE time_defaults[] = {
|
||||||
|
VAR_MAX_IDLE, DEF_MAX_IDLE, &var_idle_limit, 's', 1, 0,
|
||||||
|
VAR_IPC_IDLE, DEF_IPC_IDLE, &var_ipc_idle_limit, 's', 1, 0,
|
||||||
|
VAR_IPC_TIMEOUT, DEF_IPC_TIMEOUT, &var_ipc_timeout, 's', 1, 0,
|
||||||
|
VAR_TRIGGER_TIMEOUT, DEF_TRIGGER_TIMEOUT, &var_trigger_timeout, 's', 1, 0,
|
||||||
|
VAR_FLOCK_DELAY, DEF_FLOCK_DELAY, &var_flock_delay, 's', 1, 0,
|
||||||
|
VAR_FLOCK_STALE, DEF_FLOCK_STALE, &var_flock_stale, 's', 1, 0,
|
||||||
|
VAR_FORK_DELAY, DEF_FORK_DELAY, &var_fork_delay, 's', 1, 0,
|
||||||
|
VAR_DAEMON_TIMEOUT, DEF_DAEMON_TIMEOUT, &var_daemon_timeout, 's', 1, 0,
|
||||||
0,
|
0,
|
||||||
};
|
};
|
||||||
static CONFIG_BOOL_TABLE bool_defaults[] = {
|
static CONFIG_BOOL_TABLE bool_defaults[] = {
|
||||||
@@ -346,6 +349,7 @@ void mail_params_init()
|
|||||||
get_mail_conf_str_table(other_str_defaults);
|
get_mail_conf_str_table(other_str_defaults);
|
||||||
get_mail_conf_int_table(other_int_defaults);
|
get_mail_conf_int_table(other_int_defaults);
|
||||||
get_mail_conf_bool_table(bool_defaults);
|
get_mail_conf_bool_table(bool_defaults);
|
||||||
|
get_mail_conf_time_table(time_defaults);
|
||||||
check_default_privs();
|
check_default_privs();
|
||||||
check_mail_owner();
|
check_mail_owner();
|
||||||
|
|
||||||
|
@@ -316,7 +316,7 @@ extern bool var_biff;
|
|||||||
extern char *var_allow_commands;
|
extern char *var_allow_commands;
|
||||||
|
|
||||||
#define VAR_COMMAND_MAXTIME "command_time_limit"
|
#define VAR_COMMAND_MAXTIME "command_time_limit"
|
||||||
#define DEF_COMMAND_MAXTIME 1000
|
#define DEF_COMMAND_MAXTIME "1000s"
|
||||||
extern int var_command_maxtime;
|
extern int var_command_maxtime;
|
||||||
|
|
||||||
#define VAR_ALLOW_FILES "allow_mail_to_files"
|
#define VAR_ALLOW_FILES "allow_mail_to_files"
|
||||||
@@ -428,22 +428,22 @@ extern char *var_relocated_maps;
|
|||||||
* queue before it is sent back.
|
* queue before it is sent back.
|
||||||
*/
|
*/
|
||||||
#define VAR_QUEUE_RUN_DELAY "queue_run_delay"
|
#define VAR_QUEUE_RUN_DELAY "queue_run_delay"
|
||||||
#define DEF_QUEUE_RUN_DELAY 1000
|
#define DEF_QUEUE_RUN_DELAY "1000s"
|
||||||
|
|
||||||
#define VAR_MIN_BACKOFF_TIME "minimal_backoff_time"
|
#define VAR_MIN_BACKOFF_TIME "minimal_backoff_time"
|
||||||
#define DEF_MIN_BACKOFF_TIME 1000
|
#define DEF_MIN_BACKOFF_TIME "1000s"
|
||||||
extern int var_min_backoff_time;
|
extern int var_min_backoff_time;
|
||||||
|
|
||||||
#define VAR_MAX_BACKOFF_TIME "maximal_backoff_time"
|
#define VAR_MAX_BACKOFF_TIME "maximal_backoff_time"
|
||||||
#define DEF_MAX_BACKOFF_TIME 4000
|
#define DEF_MAX_BACKOFF_TIME "4000s"
|
||||||
extern int var_max_backoff_time;
|
extern int var_max_backoff_time;
|
||||||
|
|
||||||
#define VAR_MAX_QUEUE_TIME "maximal_queue_lifetime"
|
#define VAR_MAX_QUEUE_TIME "maximal_queue_lifetime"
|
||||||
#define DEF_MAX_QUEUE_TIME 5
|
#define DEF_MAX_QUEUE_TIME "5d"
|
||||||
extern int var_max_queue_time;
|
extern int var_max_queue_time;
|
||||||
|
|
||||||
#define VAR_DELAY_WARN_TIME "delay_warning_time"
|
#define VAR_DELAY_WARN_TIME "delay_warning_time"
|
||||||
#define DEF_DELAY_WARN_TIME 0
|
#define DEF_DELAY_WARN_TIME "0h"
|
||||||
extern int var_delay_warn_time;
|
extern int var_delay_warn_time;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -529,7 +529,7 @@ extern int var_dest_rcpt_limit;
|
|||||||
* Queue manager: default delay before retrying a dead transport.
|
* Queue manager: default delay before retrying a dead transport.
|
||||||
*/
|
*/
|
||||||
#define VAR_XPORT_RETRY_TIME "transport_retry_time"
|
#define VAR_XPORT_RETRY_TIME "transport_retry_time"
|
||||||
#define DEF_XPORT_RETRY_TIME 60
|
#define DEF_XPORT_RETRY_TIME "60s"
|
||||||
extern int var_transport_retry_time;
|
extern int var_transport_retry_time;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -550,7 +550,7 @@ extern int var_proc_limit;
|
|||||||
* Master: default time to wait after service is throttled.
|
* Master: default time to wait after service is throttled.
|
||||||
*/
|
*/
|
||||||
#define VAR_THROTTLE_TIME "service_throttle_time"
|
#define VAR_THROTTLE_TIME "service_throttle_time"
|
||||||
#define DEF_THROTTLE_TIME 60
|
#define DEF_THROTTLE_TIME "60s"
|
||||||
extern int var_throttle_time;
|
extern int var_throttle_time;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -566,7 +566,7 @@ extern int var_use_limit;
|
|||||||
* connection (except queue manager).
|
* connection (except queue manager).
|
||||||
*/
|
*/
|
||||||
#define VAR_MAX_IDLE "max_idle"
|
#define VAR_MAX_IDLE "max_idle"
|
||||||
#define DEF_MAX_IDLE 100
|
#define DEF_MAX_IDLE "100s"
|
||||||
extern int var_idle_limit;
|
extern int var_idle_limit;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -574,7 +574,7 @@ extern int var_idle_limit;
|
|||||||
* IPC connection before closing it.
|
* IPC connection before closing it.
|
||||||
*/
|
*/
|
||||||
#define VAR_IPC_IDLE "ipc_idle"
|
#define VAR_IPC_IDLE "ipc_idle"
|
||||||
#define DEF_IPC_IDLE 100
|
#define DEF_IPC_IDLE "100s"
|
||||||
extern int var_ipc_idle_limit;
|
extern int var_ipc_idle_limit;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -619,35 +619,35 @@ extern int var_hash_queue_depth;
|
|||||||
extern char *var_bestmx_transp;
|
extern char *var_bestmx_transp;
|
||||||
|
|
||||||
#define VAR_SMTP_CONN_TMOUT "smtp_connect_timeout"
|
#define VAR_SMTP_CONN_TMOUT "smtp_connect_timeout"
|
||||||
#define DEF_SMTP_CONN_TMOUT 0
|
#define DEF_SMTP_CONN_TMOUT "0s"
|
||||||
extern int var_smtp_conn_tmout;
|
extern int var_smtp_conn_tmout;
|
||||||
|
|
||||||
#define VAR_SMTP_HELO_TMOUT "smtp_helo_timeout"
|
#define VAR_SMTP_HELO_TMOUT "smtp_helo_timeout"
|
||||||
#define DEF_SMTP_HELO_TMOUT 300
|
#define DEF_SMTP_HELO_TMOUT "300s"
|
||||||
extern int var_smtp_helo_tmout;
|
extern int var_smtp_helo_tmout;
|
||||||
|
|
||||||
#define VAR_SMTP_MAIL_TMOUT "smtp_mail_timeout"
|
#define VAR_SMTP_MAIL_TMOUT "smtp_mail_timeout"
|
||||||
#define DEF_SMTP_MAIL_TMOUT 300
|
#define DEF_SMTP_MAIL_TMOUT "300s"
|
||||||
extern int var_smtp_mail_tmout;
|
extern int var_smtp_mail_tmout;
|
||||||
|
|
||||||
#define VAR_SMTP_RCPT_TMOUT "smtp_rcpt_timeout"
|
#define VAR_SMTP_RCPT_TMOUT "smtp_rcpt_timeout"
|
||||||
#define DEF_SMTP_RCPT_TMOUT 300
|
#define DEF_SMTP_RCPT_TMOUT "300s"
|
||||||
extern int var_smtp_rcpt_tmout;
|
extern int var_smtp_rcpt_tmout;
|
||||||
|
|
||||||
#define VAR_SMTP_DATA0_TMOUT "smtp_data_init_timeout"
|
#define VAR_SMTP_DATA0_TMOUT "smtp_data_init_timeout"
|
||||||
#define DEF_SMTP_DATA0_TMOUT 120
|
#define DEF_SMTP_DATA0_TMOUT "120s"
|
||||||
extern int var_smtp_data0_tmout;
|
extern int var_smtp_data0_tmout;
|
||||||
|
|
||||||
#define VAR_SMTP_DATA1_TMOUT "smtp_data_xfer_timeout"
|
#define VAR_SMTP_DATA1_TMOUT "smtp_data_xfer_timeout"
|
||||||
#define DEF_SMTP_DATA1_TMOUT 180
|
#define DEF_SMTP_DATA1_TMOUT "180s"
|
||||||
extern int var_smtp_data1_tmout;
|
extern int var_smtp_data1_tmout;
|
||||||
|
|
||||||
#define VAR_SMTP_DATA2_TMOUT "smtp_data_done_timeout"
|
#define VAR_SMTP_DATA2_TMOUT "smtp_data_done_timeout"
|
||||||
#define DEF_SMTP_DATA2_TMOUT 600
|
#define DEF_SMTP_DATA2_TMOUT "600s"
|
||||||
extern int var_smtp_data2_tmout;
|
extern int var_smtp_data2_tmout;
|
||||||
|
|
||||||
#define VAR_SMTP_QUIT_TMOUT "smtp_quit_timeout"
|
#define VAR_SMTP_QUIT_TMOUT "smtp_quit_timeout"
|
||||||
#define DEF_SMTP_QUIT_TMOUT 300
|
#define DEF_SMTP_QUIT_TMOUT "300s"
|
||||||
extern int var_smtp_quit_tmout;
|
extern int var_smtp_quit_tmout;
|
||||||
|
|
||||||
#define VAR_SMTP_SKIP_4XX "smtp_skip_4xx_greeting"
|
#define VAR_SMTP_SKIP_4XX "smtp_skip_4xx_greeting"
|
||||||
@@ -688,7 +688,7 @@ extern char *var_smtp_bind_addr;
|
|||||||
extern char *var_smtpd_banner;
|
extern char *var_smtpd_banner;
|
||||||
|
|
||||||
#define VAR_SMTPD_TMOUT "smtpd_timeout"
|
#define VAR_SMTPD_TMOUT "smtpd_timeout"
|
||||||
#define DEF_SMTPD_TMOUT 300
|
#define DEF_SMTPD_TMOUT "300s"
|
||||||
extern int var_smtpd_tmout;
|
extern int var_smtpd_tmout;
|
||||||
|
|
||||||
#define VAR_SMTPD_RCPT_LIMIT "smtpd_recipient_limit"
|
#define VAR_SMTPD_RCPT_LIMIT "smtpd_recipient_limit"
|
||||||
@@ -704,7 +704,7 @@ extern int var_smtpd_soft_erlim;
|
|||||||
extern int var_smtpd_hard_erlim;
|
extern int var_smtpd_hard_erlim;
|
||||||
|
|
||||||
#define VAR_SMTPD_ERR_SLEEP "smtpd_error_sleep_time"
|
#define VAR_SMTPD_ERR_SLEEP "smtpd_error_sleep_time"
|
||||||
#define DEF_SMTPD_ERR_SLEEP 5
|
#define DEF_SMTPD_ERR_SLEEP "5s"
|
||||||
extern int var_smtpd_err_sleep;
|
extern int var_smtpd_err_sleep;
|
||||||
|
|
||||||
#define VAR_SMTPD_JUNK_CMD "smtpd_junk_command_limit"
|
#define VAR_SMTPD_JUNK_CMD "smtpd_junk_command_limit"
|
||||||
@@ -762,39 +762,39 @@ extern bool var_lmtp_cache_conn;
|
|||||||
extern bool var_lmtp_skip_quit_resp;
|
extern bool var_lmtp_skip_quit_resp;
|
||||||
|
|
||||||
#define VAR_LMTP_CONN_TMOUT "lmtp_connect_timeout"
|
#define VAR_LMTP_CONN_TMOUT "lmtp_connect_timeout"
|
||||||
#define DEF_LMTP_CONN_TMOUT 0
|
#define DEF_LMTP_CONN_TMOUT "0s"
|
||||||
extern int var_lmtp_conn_tmout;
|
extern int var_lmtp_conn_tmout;
|
||||||
|
|
||||||
#define VAR_LMTP_RSET_TMOUT "lmtp_rset_timeout"
|
#define VAR_LMTP_RSET_TMOUT "lmtp_rset_timeout"
|
||||||
#define DEF_LMTP_RSET_TMOUT 300
|
#define DEF_LMTP_RSET_TMOUT "300s"
|
||||||
extern int var_lmtp_rset_tmout;
|
extern int var_lmtp_rset_tmout;
|
||||||
|
|
||||||
#define VAR_LMTP_LHLO_TMOUT "lmtp_lhlo_timeout"
|
#define VAR_LMTP_LHLO_TMOUT "lmtp_lhlo_timeout"
|
||||||
#define DEF_LMTP_LHLO_TMOUT 300
|
#define DEF_LMTP_LHLO_TMOUT "300s"
|
||||||
extern int var_lmtp_lhlo_tmout;
|
extern int var_lmtp_lhlo_tmout;
|
||||||
|
|
||||||
#define VAR_LMTP_MAIL_TMOUT "lmtp_mail_timeout"
|
#define VAR_LMTP_MAIL_TMOUT "lmtp_mail_timeout"
|
||||||
#define DEF_LMTP_MAIL_TMOUT 300
|
#define DEF_LMTP_MAIL_TMOUT "300s"
|
||||||
extern int var_lmtp_mail_tmout;
|
extern int var_lmtp_mail_tmout;
|
||||||
|
|
||||||
#define VAR_LMTP_RCPT_TMOUT "lmtp_rcpt_timeout"
|
#define VAR_LMTP_RCPT_TMOUT "lmtp_rcpt_timeout"
|
||||||
#define DEF_LMTP_RCPT_TMOUT 300
|
#define DEF_LMTP_RCPT_TMOUT "300s"
|
||||||
extern int var_lmtp_rcpt_tmout;
|
extern int var_lmtp_rcpt_tmout;
|
||||||
|
|
||||||
#define VAR_LMTP_DATA0_TMOUT "lmtp_data_init_timeout"
|
#define VAR_LMTP_DATA0_TMOUT "lmtp_data_init_timeout"
|
||||||
#define DEF_LMTP_DATA0_TMOUT 120
|
#define DEF_LMTP_DATA0_TMOUT "120s"
|
||||||
extern int var_lmtp_data0_tmout;
|
extern int var_lmtp_data0_tmout;
|
||||||
|
|
||||||
#define VAR_LMTP_DATA1_TMOUT "lmtp_data_xfer_timeout"
|
#define VAR_LMTP_DATA1_TMOUT "lmtp_data_xfer_timeout"
|
||||||
#define DEF_LMTP_DATA1_TMOUT 180
|
#define DEF_LMTP_DATA1_TMOUT "180s"
|
||||||
extern int var_lmtp_data1_tmout;
|
extern int var_lmtp_data1_tmout;
|
||||||
|
|
||||||
#define VAR_LMTP_DATA2_TMOUT "lmtp_data_done_timeout"
|
#define VAR_LMTP_DATA2_TMOUT "lmtp_data_done_timeout"
|
||||||
#define DEF_LMTP_DATA2_TMOUT 600
|
#define DEF_LMTP_DATA2_TMOUT "600s"
|
||||||
extern int var_lmtp_data2_tmout;
|
extern int var_lmtp_data2_tmout;
|
||||||
|
|
||||||
#define VAR_LMTP_QUIT_TMOUT "lmtp_quit_timeout"
|
#define VAR_LMTP_QUIT_TMOUT "lmtp_quit_timeout"
|
||||||
#define DEF_LMTP_QUIT_TMOUT 300
|
#define DEF_LMTP_QUIT_TMOUT "300s"
|
||||||
extern int var_lmtp_quit_tmout;
|
extern int var_lmtp_quit_tmout;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -855,7 +855,7 @@ extern char *var_double_bounce_sender;
|
|||||||
extern int var_fork_tries;
|
extern int var_fork_tries;
|
||||||
|
|
||||||
#define VAR_FORK_DELAY "fork_delay"
|
#define VAR_FORK_DELAY "fork_delay"
|
||||||
#define DEF_FORK_DELAY 1
|
#define DEF_FORK_DELAY "1s"
|
||||||
extern int var_fork_delay;
|
extern int var_fork_delay;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -866,11 +866,11 @@ extern int var_fork_delay;
|
|||||||
extern int var_flock_tries;
|
extern int var_flock_tries;
|
||||||
|
|
||||||
#define VAR_FLOCK_DELAY "deliver_lock_delay"
|
#define VAR_FLOCK_DELAY "deliver_lock_delay"
|
||||||
#define DEF_FLOCK_DELAY 1
|
#define DEF_FLOCK_DELAY "1s"
|
||||||
extern int var_flock_delay;
|
extern int var_flock_delay;
|
||||||
|
|
||||||
#define VAR_FLOCK_STALE "stale_lock_time"
|
#define VAR_FLOCK_STALE "stale_lock_time"
|
||||||
#define DEF_FLOCK_STALE 500
|
#define DEF_FLOCK_STALE "500s"
|
||||||
extern int var_flock_stale;
|
extern int var_flock_stale;
|
||||||
|
|
||||||
#define VAR_MAILTOOL_COMPAT "sun_mailtool_compatibility"
|
#define VAR_MAILTOOL_COMPAT "sun_mailtool_compatibility"
|
||||||
@@ -882,7 +882,7 @@ extern int var_mailtool_compat;
|
|||||||
* before we assume it is wegded (should never happen).
|
* before we assume it is wegded (should never happen).
|
||||||
*/
|
*/
|
||||||
#define VAR_DAEMON_TIMEOUT "daemon_timeout"
|
#define VAR_DAEMON_TIMEOUT "daemon_timeout"
|
||||||
#define DEF_DAEMON_TIMEOUT 18000
|
#define DEF_DAEMON_TIMEOUT "18000s"
|
||||||
extern int var_daemon_timeout;
|
extern int var_daemon_timeout;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -890,14 +890,14 @@ extern int var_daemon_timeout;
|
|||||||
* is in deadlock (should never happen).
|
* is in deadlock (should never happen).
|
||||||
*/
|
*/
|
||||||
#define VAR_IPC_TIMEOUT "ipc_timeout"
|
#define VAR_IPC_TIMEOUT "ipc_timeout"
|
||||||
#define DEF_IPC_TIMEOUT 3600
|
#define DEF_IPC_TIMEOUT "3600s"
|
||||||
extern int var_ipc_timeout;
|
extern int var_ipc_timeout;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Time limit on intra-mail triggers.
|
* Time limit on intra-mail triggers.
|
||||||
*/
|
*/
|
||||||
#define VAR_TRIGGER_TIMEOUT "trigger_timeout"
|
#define VAR_TRIGGER_TIMEOUT "trigger_timeout"
|
||||||
#define DEF_TRIGGER_TIMEOUT 10
|
#define DEF_TRIGGER_TIMEOUT "10s"
|
||||||
extern int var_trigger_timeout;
|
extern int var_trigger_timeout;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@@ -15,7 +15,7 @@
|
|||||||
* Version of this program.
|
* Version of this program.
|
||||||
*/
|
*/
|
||||||
#define VAR_MAIL_VERSION "mail_version"
|
#define VAR_MAIL_VERSION "mail_version"
|
||||||
#define DEF_MAIL_VERSION "Snapshot-20001212"
|
#define DEF_MAIL_VERSION "Snapshot-20001213"
|
||||||
extern char *var_mail_version;
|
extern char *var_mail_version;
|
||||||
|
|
||||||
/* LICENSE
|
/* LICENSE
|
||||||
|
@@ -467,18 +467,21 @@ int main(int argc, char **argv)
|
|||||||
};
|
};
|
||||||
static CONFIG_INT_TABLE int_table[] = {
|
static CONFIG_INT_TABLE int_table[] = {
|
||||||
VAR_LMTP_TCP_PORT, DEF_LMTP_TCP_PORT, &var_lmtp_tcp_port, 0, 0,
|
VAR_LMTP_TCP_PORT, DEF_LMTP_TCP_PORT, &var_lmtp_tcp_port, 0, 0,
|
||||||
VAR_LMTP_CONN_TMOUT, DEF_LMTP_CONN_TMOUT, &var_lmtp_conn_tmout, 0, 0,
|
|
||||||
VAR_LMTP_RSET_TMOUT, DEF_LMTP_RSET_TMOUT, &var_lmtp_rset_tmout, 1, 0,
|
|
||||||
VAR_LMTP_LHLO_TMOUT, DEF_LMTP_LHLO_TMOUT, &var_lmtp_lhlo_tmout, 1, 0,
|
|
||||||
VAR_LMTP_MAIL_TMOUT, DEF_LMTP_MAIL_TMOUT, &var_lmtp_mail_tmout, 1, 0,
|
|
||||||
VAR_LMTP_RCPT_TMOUT, DEF_LMTP_RCPT_TMOUT, &var_lmtp_rcpt_tmout, 1, 0,
|
|
||||||
VAR_LMTP_DATA0_TMOUT, DEF_LMTP_DATA0_TMOUT, &var_lmtp_data0_tmout, 1, 0,
|
|
||||||
VAR_LMTP_DATA1_TMOUT, DEF_LMTP_DATA1_TMOUT, &var_lmtp_data1_tmout, 1, 0,
|
|
||||||
VAR_LMTP_DATA2_TMOUT, DEF_LMTP_DATA2_TMOUT, &var_lmtp_data2_tmout, 1, 0,
|
|
||||||
VAR_LMTP_QUIT_TMOUT, DEF_LMTP_QUIT_TMOUT, &var_lmtp_quit_tmout, 1, 0,
|
|
||||||
VAR_DEBUG_PEER_LEVEL, DEF_DEBUG_PEER_LEVEL, &var_debug_peer_level, 1, 0,
|
VAR_DEBUG_PEER_LEVEL, DEF_DEBUG_PEER_LEVEL, &var_debug_peer_level, 1, 0,
|
||||||
0,
|
0,
|
||||||
};
|
};
|
||||||
|
static CONFIG_TIME_TABLE time_table[] = {
|
||||||
|
VAR_LMTP_CONN_TMOUT, DEF_LMTP_CONN_TMOUT, &var_lmtp_conn_tmout, 's', 0, 0,
|
||||||
|
VAR_LMTP_RSET_TMOUT, DEF_LMTP_RSET_TMOUT, &var_lmtp_rset_tmout, 's', 1, 0,
|
||||||
|
VAR_LMTP_LHLO_TMOUT, DEF_LMTP_LHLO_TMOUT, &var_lmtp_lhlo_tmout, 's', 1, 0,
|
||||||
|
VAR_LMTP_MAIL_TMOUT, DEF_LMTP_MAIL_TMOUT, &var_lmtp_mail_tmout, 's', 1, 0,
|
||||||
|
VAR_LMTP_RCPT_TMOUT, DEF_LMTP_RCPT_TMOUT, &var_lmtp_rcpt_tmout, 's', 1, 0,
|
||||||
|
VAR_LMTP_DATA0_TMOUT, DEF_LMTP_DATA0_TMOUT, &var_lmtp_data0_tmout, 's', 1, 0,
|
||||||
|
VAR_LMTP_DATA1_TMOUT, DEF_LMTP_DATA1_TMOUT, &var_lmtp_data1_tmout, 's', 1, 0,
|
||||||
|
VAR_LMTP_DATA2_TMOUT, DEF_LMTP_DATA2_TMOUT, &var_lmtp_data2_tmout, 's', 1, 0,
|
||||||
|
VAR_LMTP_QUIT_TMOUT, DEF_LMTP_QUIT_TMOUT, &var_lmtp_quit_tmout, 's', 1, 0,
|
||||||
|
0,
|
||||||
|
};
|
||||||
static CONFIG_BOOL_TABLE bool_table[] = {
|
static CONFIG_BOOL_TABLE bool_table[] = {
|
||||||
VAR_LMTP_CACHE_CONN, DEF_LMTP_CACHE_CONN, &var_lmtp_cache_conn,
|
VAR_LMTP_CACHE_CONN, DEF_LMTP_CACHE_CONN, &var_lmtp_cache_conn,
|
||||||
VAR_LMTP_SKIP_QUIT_RESP, DEF_LMTP_SKIP_QUIT_RESP, &var_lmtp_skip_quit_resp,
|
VAR_LMTP_SKIP_QUIT_RESP, DEF_LMTP_SKIP_QUIT_RESP, &var_lmtp_skip_quit_resp,
|
||||||
|
@@ -625,8 +625,11 @@ static void post_init(char *unused_name, char **unused_argv)
|
|||||||
|
|
||||||
int main(int argc, char **argv)
|
int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
|
static CONFIG_TIME_TABLE time_table[] = {
|
||||||
|
VAR_COMMAND_MAXTIME, DEF_COMMAND_MAXTIME, &var_command_maxtime, 's', 1, 0,
|
||||||
|
0,
|
||||||
|
};
|
||||||
static CONFIG_INT_TABLE int_table[] = {
|
static CONFIG_INT_TABLE int_table[] = {
|
||||||
VAR_COMMAND_MAXTIME, DEF_COMMAND_MAXTIME, &var_command_maxtime, 1, 0,
|
|
||||||
VAR_DUP_FILTER_LIMIT, DEF_DUP_FILTER_LIMIT, &var_dup_filter_limit, 0, 0,
|
VAR_DUP_FILTER_LIMIT, DEF_DUP_FILTER_LIMIT, &var_dup_filter_limit, 0, 0,
|
||||||
0,
|
0,
|
||||||
};
|
};
|
||||||
@@ -667,6 +670,7 @@ int main(int argc, char **argv)
|
|||||||
MAIL_SERVER_STR_TABLE, str_table,
|
MAIL_SERVER_STR_TABLE, str_table,
|
||||||
MAIL_SERVER_RAW_TABLE, raw_table,
|
MAIL_SERVER_RAW_TABLE, raw_table,
|
||||||
MAIL_SERVER_BOOL_TABLE, bool_table,
|
MAIL_SERVER_BOOL_TABLE, bool_table,
|
||||||
|
MAIL_SERVER_TIME_TABLE, time_table,
|
||||||
MAIL_SERVER_POST_INIT, post_init,
|
MAIL_SERVER_POST_INIT, post_init,
|
||||||
MAIL_SERVER_PRE_ACCEPT, pre_accept,
|
MAIL_SERVER_PRE_ACCEPT, pre_accept,
|
||||||
0);
|
0);
|
||||||
|
@@ -55,12 +55,16 @@ void master_vars_init(void)
|
|||||||
char *path;
|
char *path;
|
||||||
static CONFIG_INT_TABLE int_table[] = {
|
static CONFIG_INT_TABLE int_table[] = {
|
||||||
VAR_PROC_LIMIT, DEF_PROC_LIMIT, &var_proc_limit, 1, 0,
|
VAR_PROC_LIMIT, DEF_PROC_LIMIT, &var_proc_limit, 1, 0,
|
||||||
VAR_THROTTLE_TIME, DEF_THROTTLE_TIME, &var_throttle_time, 1, 0,
|
0,
|
||||||
|
};
|
||||||
|
static CONFIG_TIME_TABLE time_table[] = {
|
||||||
|
VAR_THROTTLE_TIME, DEF_THROTTLE_TIME, &var_throttle_time, 's', 1, 0,
|
||||||
0,
|
0,
|
||||||
};
|
};
|
||||||
|
|
||||||
mail_conf_read();
|
mail_conf_read();
|
||||||
get_mail_conf_int_table(int_table);
|
get_mail_conf_int_table(int_table);
|
||||||
|
get_mail_conf_time_table(time_table);
|
||||||
path = concatenate(var_config_dir, "/master.cf", (char *) 0);
|
path = concatenate(var_config_dir, "/master.cf", (char *) 0);
|
||||||
fset_master_ent(path);
|
fset_master_ent(path);
|
||||||
myfree(path);
|
myfree(path);
|
||||||
|
@@ -509,11 +509,15 @@ int main(int argc, char **argv)
|
|||||||
VAR_DEFER_XPORTS, DEF_DEFER_XPORTS, &var_defer_xports, 0, 0,
|
VAR_DEFER_XPORTS, DEF_DEFER_XPORTS, &var_defer_xports, 0, 0,
|
||||||
0,
|
0,
|
||||||
};
|
};
|
||||||
|
static CONFIG_TIME_TABLE time_table[] = {
|
||||||
|
VAR_QUEUE_RUN_DELAY, DEF_QUEUE_RUN_DELAY, &var_queue_run_delay, 's', 1, 0,
|
||||||
|
VAR_MIN_BACKOFF_TIME, DEF_MIN_BACKOFF_TIME, &var_min_backoff_time, 's', 1, 0,
|
||||||
|
VAR_MAX_BACKOFF_TIME, DEF_MAX_BACKOFF_TIME, &var_max_backoff_time, 's', 1, 0,
|
||||||
|
VAR_MAX_QUEUE_TIME, DEF_MAX_QUEUE_TIME, &var_max_queue_time, 'd', 1, 1000,
|
||||||
|
VAR_XPORT_RETRY_TIME, DEF_XPORT_RETRY_TIME, &var_transport_retry_time, 's', 1, 0,
|
||||||
|
0,
|
||||||
|
};
|
||||||
static CONFIG_INT_TABLE int_table[] = {
|
static CONFIG_INT_TABLE int_table[] = {
|
||||||
VAR_QUEUE_RUN_DELAY, DEF_QUEUE_RUN_DELAY, &var_queue_run_delay, 1, 0,
|
|
||||||
VAR_MIN_BACKOFF_TIME, DEF_MIN_BACKOFF_TIME, &var_min_backoff_time, 1, 0,
|
|
||||||
VAR_MAX_BACKOFF_TIME, DEF_MAX_BACKOFF_TIME, &var_max_backoff_time, 1, 0,
|
|
||||||
VAR_MAX_QUEUE_TIME, DEF_MAX_QUEUE_TIME, &var_max_queue_time, 1, 1000,
|
|
||||||
VAR_QMGR_ACT_LIMIT, DEF_QMGR_ACT_LIMIT, &var_qmgr_active_limit, 1, 0,
|
VAR_QMGR_ACT_LIMIT, DEF_QMGR_ACT_LIMIT, &var_qmgr_active_limit, 1, 0,
|
||||||
VAR_QMGR_RCPT_LIMIT, DEF_QMGR_RCPT_LIMIT, &var_qmgr_rcpt_limit, 1, 0,
|
VAR_QMGR_RCPT_LIMIT, DEF_QMGR_RCPT_LIMIT, &var_qmgr_rcpt_limit, 1, 0,
|
||||||
VAR_QMGR_MSG_RCPT_LIMIT, DEF_QMGR_MSG_RCPT_LIMIT, &var_qmgr_msg_rcpt_limit, 1, 0,
|
VAR_QMGR_MSG_RCPT_LIMIT, DEF_QMGR_MSG_RCPT_LIMIT, &var_qmgr_msg_rcpt_limit, 1, 0,
|
||||||
@@ -524,7 +528,6 @@ int main(int argc, char **argv)
|
|||||||
VAR_DELIVERY_SLOT_DISCOUNT, DEF_DELIVERY_SLOT_DISCOUNT, &var_delivery_slot_discount, 0, 100,
|
VAR_DELIVERY_SLOT_DISCOUNT, DEF_DELIVERY_SLOT_DISCOUNT, &var_delivery_slot_discount, 0, 100,
|
||||||
VAR_MIN_DELIVERY_SLOTS, DEF_MIN_DELIVERY_SLOTS, &var_min_delivery_slots, 0, 0,
|
VAR_MIN_DELIVERY_SLOTS, DEF_MIN_DELIVERY_SLOTS, &var_min_delivery_slots, 0, 0,
|
||||||
VAR_INIT_DEST_CON, DEF_INIT_DEST_CON, &var_init_dest_concurrency, 1, 0,
|
VAR_INIT_DEST_CON, DEF_INIT_DEST_CON, &var_init_dest_concurrency, 1, 0,
|
||||||
VAR_XPORT_RETRY_TIME, DEF_XPORT_RETRY_TIME, &var_transport_retry_time, 1, 0,
|
|
||||||
VAR_DEST_CON_LIMIT, DEF_DEST_CON_LIMIT, &var_dest_con_limit, 0, 0,
|
VAR_DEST_CON_LIMIT, DEF_DEST_CON_LIMIT, &var_dest_con_limit, 0, 0,
|
||||||
VAR_DEST_RCPT_LIMIT, DEF_DEST_RCPT_LIMIT, &var_dest_rcpt_limit, 0, 0,
|
VAR_DEST_RCPT_LIMIT, DEF_DEST_RCPT_LIMIT, &var_dest_rcpt_limit, 0, 0,
|
||||||
0,
|
0,
|
||||||
@@ -543,6 +546,7 @@ int main(int argc, char **argv)
|
|||||||
MAIL_SERVER_INT_TABLE, int_table,
|
MAIL_SERVER_INT_TABLE, int_table,
|
||||||
MAIL_SERVER_STR_TABLE, str_table,
|
MAIL_SERVER_STR_TABLE, str_table,
|
||||||
MAIL_SERVER_BOOL_TABLE, bool_table,
|
MAIL_SERVER_BOOL_TABLE, bool_table,
|
||||||
|
MAIL_SERVER_TIME_TABLE, time_table,
|
||||||
MAIL_SERVER_PRE_INIT, qmgr_pre_init,
|
MAIL_SERVER_PRE_INIT, qmgr_pre_init,
|
||||||
MAIL_SERVER_POST_INIT, qmgr_post_init,
|
MAIL_SERVER_POST_INIT, qmgr_post_init,
|
||||||
MAIL_SERVER_LOOP, qmgr_loop,
|
MAIL_SERVER_LOOP, qmgr_loop,
|
||||||
|
@@ -349,11 +349,8 @@ static void qmgr_active_done_2_generic(QMGR_MESSAGE *message)
|
|||||||
* Bounces are sent asynchronously to avoid stalling while the cleanup
|
* Bounces are sent asynchronously to avoid stalling while the cleanup
|
||||||
* daemon waits for the qmgr to accept the "new mail" trigger.
|
* daemon waits for the qmgr to accept the "new mail" trigger.
|
||||||
*/
|
*/
|
||||||
#define HOUR 3600
|
|
||||||
#define DAY 86400
|
|
||||||
|
|
||||||
if (message->flags) {
|
if (message->flags) {
|
||||||
if (event_time() > message->arrival_time + var_max_queue_time * DAY) {
|
if (event_time() > message->arrival_time + var_max_queue_time) {
|
||||||
if (msg_verbose)
|
if (msg_verbose)
|
||||||
msg_info("%s: too old, bouncing %s", myname, message->queue_id);
|
msg_info("%s: too old, bouncing %s", myname, message->queue_id);
|
||||||
adefer_flush(BOUNCE_FLAG_KEEP,
|
adefer_flush(BOUNCE_FLAG_KEEP,
|
||||||
|
@@ -766,13 +766,13 @@ static void drop_privileges(char *unused_name, char **unused_argv)
|
|||||||
|
|
||||||
int main(int argc, char **argv)
|
int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
static CONFIG_INT_TABLE int_table[] = {
|
static CONFIG_TIME_TABLE time_table[] = {
|
||||||
VAR_COMMAND_MAXTIME, DEF_COMMAND_MAXTIME, &var_command_maxtime, 1, 0,
|
VAR_COMMAND_MAXTIME, DEF_COMMAND_MAXTIME, &var_command_maxtime, 's', 1, 0,
|
||||||
0,
|
0,
|
||||||
};
|
};
|
||||||
|
|
||||||
single_server_main(argc, argv, pipe_service,
|
single_server_main(argc, argv, pipe_service,
|
||||||
MAIL_SERVER_INT_TABLE, int_table,
|
MAIL_SERVER_TIME_TABLE, time_table,
|
||||||
MAIL_SERVER_POST_INIT, drop_privileges,
|
MAIL_SERVER_POST_INIT, drop_privileges,
|
||||||
MAIL_SERVER_PRE_ACCEPT, pre_accept,
|
MAIL_SERVER_PRE_ACCEPT, pre_accept,
|
||||||
0);
|
0);
|
||||||
|
@@ -476,6 +476,18 @@ static void print_bool(int mode, CONFIG_BOOL_TABLE *cbt)
|
|||||||
static void print_time(int mode, CONFIG_TIME_TABLE *ctt)
|
static void print_time(int mode, CONFIG_TIME_TABLE *ctt)
|
||||||
{
|
{
|
||||||
const char *value;
|
const char *value;
|
||||||
|
const char *ptr;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Make sure the default unit matches the default value unit.
|
||||||
|
*/
|
||||||
|
for (ptr = ctt->defval; ptr[1] != 0; ptr += 1)
|
||||||
|
/* void */ ;
|
||||||
|
if (*ptr == 0)
|
||||||
|
msg_fatal("parameter %s has void default value", ctt->name);
|
||||||
|
if (ctt->def_unit != *ptr)
|
||||||
|
msg_fatal("parameter %s has default value %s but default unit %c",
|
||||||
|
ctt->name, ctt->defval, ctt->def_unit);
|
||||||
|
|
||||||
if (mode & SHOW_DEFS) {
|
if (mode & SHOW_DEFS) {
|
||||||
show_strval(mode, ctt->name, ctt->defval);
|
show_strval(mode, ctt->name, ctt->defval);
|
||||||
|
@@ -472,15 +472,18 @@ int main(int argc, char **argv)
|
|||||||
VAR_DEFER_XPORTS, DEF_DEFER_XPORTS, &var_defer_xports, 0, 0,
|
VAR_DEFER_XPORTS, DEF_DEFER_XPORTS, &var_defer_xports, 0, 0,
|
||||||
0,
|
0,
|
||||||
};
|
};
|
||||||
|
static CONFIG_TIME_TABLE time_table[] = {
|
||||||
|
VAR_QUEUE_RUN_DELAY, DEF_QUEUE_RUN_DELAY, &var_queue_run_delay, 's', 1, 0,
|
||||||
|
VAR_MIN_BACKOFF_TIME, DEF_MIN_BACKOFF_TIME, &var_min_backoff_time, 's', 1, 0,
|
||||||
|
VAR_MAX_BACKOFF_TIME, DEF_MAX_BACKOFF_TIME, &var_max_backoff_time, 's', 1, 0,
|
||||||
|
VAR_MAX_QUEUE_TIME, DEF_MAX_QUEUE_TIME, &var_max_queue_time, 'd', 1, 1000,
|
||||||
|
VAR_XPORT_RETRY_TIME, DEF_XPORT_RETRY_TIME, &var_transport_retry_time, 's', 1, 0,
|
||||||
|
0,
|
||||||
|
};
|
||||||
static CONFIG_INT_TABLE int_table[] = {
|
static CONFIG_INT_TABLE int_table[] = {
|
||||||
VAR_QUEUE_RUN_DELAY, DEF_QUEUE_RUN_DELAY, &var_queue_run_delay, 1, 0,
|
|
||||||
VAR_MIN_BACKOFF_TIME, DEF_MIN_BACKOFF_TIME, &var_min_backoff_time, 1, 0,
|
|
||||||
VAR_MAX_BACKOFF_TIME, DEF_MAX_BACKOFF_TIME, &var_max_backoff_time, 1, 0,
|
|
||||||
VAR_MAX_QUEUE_TIME, DEF_MAX_QUEUE_TIME, &var_max_queue_time, 1, 1000,
|
|
||||||
VAR_QMGR_ACT_LIMIT, DEF_QMGR_ACT_LIMIT, &var_qmgr_active_limit, 1, 0,
|
VAR_QMGR_ACT_LIMIT, DEF_QMGR_ACT_LIMIT, &var_qmgr_active_limit, 1, 0,
|
||||||
VAR_QMGR_RCPT_LIMIT, DEF_QMGR_RCPT_LIMIT, &var_qmgr_rcpt_limit, 1, 0,
|
VAR_QMGR_RCPT_LIMIT, DEF_QMGR_RCPT_LIMIT, &var_qmgr_rcpt_limit, 1, 0,
|
||||||
VAR_INIT_DEST_CON, DEF_INIT_DEST_CON, &var_init_dest_concurrency, 1, 0,
|
VAR_INIT_DEST_CON, DEF_INIT_DEST_CON, &var_init_dest_concurrency, 1, 0,
|
||||||
VAR_XPORT_RETRY_TIME, DEF_XPORT_RETRY_TIME, &var_transport_retry_time, 1, 0,
|
|
||||||
VAR_DEST_CON_LIMIT, DEF_DEST_CON_LIMIT, &var_dest_con_limit, 0, 0,
|
VAR_DEST_CON_LIMIT, DEF_DEST_CON_LIMIT, &var_dest_con_limit, 0, 0,
|
||||||
VAR_DEST_RCPT_LIMIT, DEF_DEST_RCPT_LIMIT, &var_dest_rcpt_limit, 0, 0,
|
VAR_DEST_RCPT_LIMIT, DEF_DEST_RCPT_LIMIT, &var_dest_rcpt_limit, 0, 0,
|
||||||
VAR_QMGR_FUDGE, DEF_QMGR_FUDGE, &var_qmgr_fudge, 10, 100,
|
VAR_QMGR_FUDGE, DEF_QMGR_FUDGE, &var_qmgr_fudge, 10, 100,
|
||||||
@@ -502,6 +505,7 @@ int main(int argc, char **argv)
|
|||||||
MAIL_SERVER_INT_TABLE, int_table,
|
MAIL_SERVER_INT_TABLE, int_table,
|
||||||
MAIL_SERVER_STR_TABLE, str_table,
|
MAIL_SERVER_STR_TABLE, str_table,
|
||||||
MAIL_SERVER_BOOL_TABLE, bool_table,
|
MAIL_SERVER_BOOL_TABLE, bool_table,
|
||||||
|
MAIL_SERVER_TIME_TABLE, time_table,
|
||||||
MAIL_SERVER_PRE_INIT, qmgr_pre_init,
|
MAIL_SERVER_PRE_INIT, qmgr_pre_init,
|
||||||
MAIL_SERVER_POST_INIT, qmgr_post_init,
|
MAIL_SERVER_POST_INIT, qmgr_post_init,
|
||||||
MAIL_SERVER_LOOP, qmgr_loop,
|
MAIL_SERVER_LOOP, qmgr_loop,
|
||||||
|
@@ -349,11 +349,8 @@ static void qmgr_active_done_2_generic(QMGR_MESSAGE *message)
|
|||||||
* Bounces are sent asynchronously to avoid stalling while the cleanup
|
* Bounces are sent asynchronously to avoid stalling while the cleanup
|
||||||
* daemon waits for the qmgr to accept the "new mail" trigger.
|
* daemon waits for the qmgr to accept the "new mail" trigger.
|
||||||
*/
|
*/
|
||||||
#define HOUR 3600
|
|
||||||
#define DAY 86400
|
|
||||||
|
|
||||||
if (message->flags) {
|
if (message->flags) {
|
||||||
if (event_time() > message->arrival_time + var_max_queue_time * DAY) {
|
if (event_time() > message->arrival_time + var_max_queue_time) {
|
||||||
if (msg_verbose)
|
if (msg_verbose)
|
||||||
msg_info("%s: too old, bouncing %s", myname, message->queue_id);
|
msg_info("%s: too old, bouncing %s", myname, message->queue_id);
|
||||||
adefer_flush(BOUNCE_FLAG_KEEP,
|
adefer_flush(BOUNCE_FLAG_KEEP,
|
||||||
|
@@ -137,36 +137,40 @@
|
|||||||
/* .SH "Timeout controls"
|
/* .SH "Timeout controls"
|
||||||
/* .ad
|
/* .ad
|
||||||
/* .fi
|
/* .fi
|
||||||
|
/* .PP
|
||||||
|
/* The default time unit is seconds; an explicit time unit can
|
||||||
|
/* be specified by appending a one-letter suffix: s (seconds),
|
||||||
|
/* m (minutes), h (hours), d (days) or w (weeks).
|
||||||
/* .IP \fBsmtp_connect_timeout\fR
|
/* .IP \fBsmtp_connect_timeout\fR
|
||||||
/* Timeout in seconds for completing a TCP connection. When no
|
/* Timeout (default: seconds) for completing a TCP connection. When no
|
||||||
/* connection can be made within the deadline, the SMTP client
|
/* connection can be made within the deadline, the SMTP client
|
||||||
/* tries the next address on the mail exchanger list.
|
/* tries the next address on the mail exchanger list.
|
||||||
/* .IP \fBsmtp_helo_timeout\fR
|
/* .IP \fBsmtp_helo_timeout\fR
|
||||||
/* Timeout in seconds for receiving the SMTP greeting banner.
|
/* Timeout (default: seconds) for receiving the SMTP greeting banner.
|
||||||
/* When the server drops the connection without sending a
|
/* When the server drops the connection without sending a
|
||||||
/* greeting banner, or when it sends no greeting banner within the
|
/* greeting banner, or when it sends no greeting banner within the
|
||||||
/* deadline, the SMTP client tries the next address on the mail
|
/* deadline, the SMTP client tries the next address on the mail
|
||||||
/* exchanger list.
|
/* exchanger list.
|
||||||
/* .IP \fBsmtp_helo_timeout\fR
|
/* .IP \fBsmtp_helo_timeout\fR
|
||||||
/* Timeout in seconds for sending the \fBHELO\fR command, and for
|
/* Timeout (default: seconds) for sending the \fBHELO\fR command, and for
|
||||||
/* receiving the server response.
|
/* receiving the server response.
|
||||||
/* .IP \fBsmtp_mail_timeout\fR
|
/* .IP \fBsmtp_mail_timeout\fR
|
||||||
/* Timeout in seconds for sending the \fBMAIL FROM\fR command, and for
|
/* Timeout (default: seconds) for sending the \fBMAIL FROM\fR command, and for
|
||||||
/* receiving the server response.
|
/* receiving the server response.
|
||||||
/* .IP \fBsmtp_rcpt_timeout\fR
|
/* .IP \fBsmtp_rcpt_timeout\fR
|
||||||
/* Timeout in seconds for sending the \fBRCPT TO\fR command, and for
|
/* Timeout (default: seconds) for sending the \fBRCPT TO\fR command, and for
|
||||||
/* receiving the server response.
|
/* receiving the server response.
|
||||||
/* .IP \fBsmtp_data_init_timeout\fR
|
/* .IP \fBsmtp_data_init_timeout\fR
|
||||||
/* Timeout in seconds for sending the \fBDATA\fR command, and for
|
/* Timeout (default: seconds) for sending the \fBDATA\fR command, and for
|
||||||
/* receiving the server response.
|
/* receiving the server response.
|
||||||
/* .IP \fBsmtp_data_xfer_timeout\fR
|
/* .IP \fBsmtp_data_xfer_timeout\fR
|
||||||
/* Timeout in seconds for sending the message content.
|
/* Timeout (default: seconds) for sending the message content.
|
||||||
/* .IP \fBsmtp_data_done_timeout\fR
|
/* .IP \fBsmtp_data_done_timeout\fR
|
||||||
/* Timeout in seconds for sending the "\fB.\fR" command, and for
|
/* Timeout (default: seconds) for sending the "\fB.\fR" command, and for
|
||||||
/* receiving the server response. When no response is received, a
|
/* receiving the server response. When no response is received, a
|
||||||
/* warning is logged that the mail may be delivered multiple times.
|
/* warning is logged that the mail may be delivered multiple times.
|
||||||
/* .IP \fBsmtp_quit_timeout\fR
|
/* .IP \fBsmtp_quit_timeout\fR
|
||||||
/* Timeout in seconds for sending the \fBQUIT\fR command, and for
|
/* Timeout (default: seconds) for sending the \fBQUIT\fR command, and for
|
||||||
/* receiving the server response.
|
/* receiving the server response.
|
||||||
/* SEE ALSO
|
/* SEE ALSO
|
||||||
/* bounce(8) non-delivery status reports
|
/* bounce(8) non-delivery status reports
|
||||||
@@ -397,15 +401,18 @@ int main(int argc, char **argv)
|
|||||||
VAR_SMTP_BIND_ADDR, DEF_SMTP_BIND_ADDR, &var_smtp_bind_addr, 0, 0,
|
VAR_SMTP_BIND_ADDR, DEF_SMTP_BIND_ADDR, &var_smtp_bind_addr, 0, 0,
|
||||||
0,
|
0,
|
||||||
};
|
};
|
||||||
|
static CONFIG_TIME_TABLE time_table[] = {
|
||||||
|
VAR_SMTP_CONN_TMOUT, DEF_SMTP_CONN_TMOUT, &var_smtp_conn_tmout, 's', 0, 0,
|
||||||
|
VAR_SMTP_HELO_TMOUT, DEF_SMTP_HELO_TMOUT, &var_smtp_helo_tmout, 's', 1, 0,
|
||||||
|
VAR_SMTP_MAIL_TMOUT, DEF_SMTP_MAIL_TMOUT, &var_smtp_mail_tmout, 's', 1, 0,
|
||||||
|
VAR_SMTP_RCPT_TMOUT, DEF_SMTP_RCPT_TMOUT, &var_smtp_rcpt_tmout, 's', 1, 0,
|
||||||
|
VAR_SMTP_DATA0_TMOUT, DEF_SMTP_DATA0_TMOUT, &var_smtp_data0_tmout, 's', 1, 0,
|
||||||
|
VAR_SMTP_DATA1_TMOUT, DEF_SMTP_DATA1_TMOUT, &var_smtp_data1_tmout, 's', 1, 0,
|
||||||
|
VAR_SMTP_DATA2_TMOUT, DEF_SMTP_DATA2_TMOUT, &var_smtp_data2_tmout, 's', 1, 0,
|
||||||
|
VAR_SMTP_QUIT_TMOUT, DEF_SMTP_QUIT_TMOUT, &var_smtp_quit_tmout, 's', 1, 0,
|
||||||
|
0,
|
||||||
|
};
|
||||||
static CONFIG_INT_TABLE int_table[] = {
|
static CONFIG_INT_TABLE int_table[] = {
|
||||||
VAR_SMTP_CONN_TMOUT, DEF_SMTP_CONN_TMOUT, &var_smtp_conn_tmout, 0, 0,
|
|
||||||
VAR_SMTP_HELO_TMOUT, DEF_SMTP_HELO_TMOUT, &var_smtp_helo_tmout, 1, 0,
|
|
||||||
VAR_SMTP_MAIL_TMOUT, DEF_SMTP_MAIL_TMOUT, &var_smtp_mail_tmout, 1, 0,
|
|
||||||
VAR_SMTP_RCPT_TMOUT, DEF_SMTP_RCPT_TMOUT, &var_smtp_rcpt_tmout, 1, 0,
|
|
||||||
VAR_SMTP_DATA0_TMOUT, DEF_SMTP_DATA0_TMOUT, &var_smtp_data0_tmout, 1, 0,
|
|
||||||
VAR_SMTP_DATA1_TMOUT, DEF_SMTP_DATA1_TMOUT, &var_smtp_data1_tmout, 1, 0,
|
|
||||||
VAR_SMTP_DATA2_TMOUT, DEF_SMTP_DATA2_TMOUT, &var_smtp_data2_tmout, 1, 0,
|
|
||||||
VAR_SMTP_QUIT_TMOUT, DEF_SMTP_QUIT_TMOUT, &var_smtp_quit_tmout, 1, 0,
|
|
||||||
VAR_DEBUG_PEER_LEVEL, DEF_DEBUG_PEER_LEVEL, &var_debug_peer_level, 1, 0,
|
VAR_DEBUG_PEER_LEVEL, DEF_DEBUG_PEER_LEVEL, &var_debug_peer_level, 1, 0,
|
||||||
0,
|
0,
|
||||||
};
|
};
|
||||||
@@ -421,6 +428,7 @@ int main(int argc, char **argv)
|
|||||||
};
|
};
|
||||||
|
|
||||||
single_server_main(argc, argv, smtp_service,
|
single_server_main(argc, argv, smtp_service,
|
||||||
|
MAIL_SERVER_TIME_TABLE, time_table,
|
||||||
MAIL_SERVER_INT_TABLE, int_table,
|
MAIL_SERVER_INT_TABLE, int_table,
|
||||||
MAIL_SERVER_STR_TABLE, str_table,
|
MAIL_SERVER_STR_TABLE, str_table,
|
||||||
MAIL_SERVER_BOOL_TABLE, bool_table,
|
MAIL_SERVER_BOOL_TABLE, bool_table,
|
||||||
|
@@ -1419,7 +1419,6 @@ int main(int argc, char **argv)
|
|||||||
{
|
{
|
||||||
static CONFIG_INT_TABLE int_table[] = {
|
static CONFIG_INT_TABLE int_table[] = {
|
||||||
VAR_SMTPD_RCPT_LIMIT, DEF_SMTPD_RCPT_LIMIT, &var_smtpd_rcpt_limit, 1, 0,
|
VAR_SMTPD_RCPT_LIMIT, DEF_SMTPD_RCPT_LIMIT, &var_smtpd_rcpt_limit, 1, 0,
|
||||||
VAR_SMTPD_TMOUT, DEF_SMTPD_TMOUT, &var_smtpd_tmout, 1, 0,
|
|
||||||
VAR_SMTPD_SOFT_ERLIM, DEF_SMTPD_SOFT_ERLIM, &var_smtpd_soft_erlim, 1, 0,
|
VAR_SMTPD_SOFT_ERLIM, DEF_SMTPD_SOFT_ERLIM, &var_smtpd_soft_erlim, 1, 0,
|
||||||
VAR_SMTPD_HARD_ERLIM, DEF_SMTPD_HARD_ERLIM, &var_smtpd_hard_erlim, 1, 0,
|
VAR_SMTPD_HARD_ERLIM, DEF_SMTPD_HARD_ERLIM, &var_smtpd_hard_erlim, 1, 0,
|
||||||
VAR_QUEUE_MINFREE, DEF_QUEUE_MINFREE, &var_queue_minfree, 0, 0,
|
VAR_QUEUE_MINFREE, DEF_QUEUE_MINFREE, &var_queue_minfree, 0, 0,
|
||||||
@@ -1432,11 +1431,15 @@ int main(int argc, char **argv)
|
|||||||
VAR_MAPS_RBL_CODE, DEF_MAPS_RBL_CODE, &var_maps_rbl_code, 0, 0,
|
VAR_MAPS_RBL_CODE, DEF_MAPS_RBL_CODE, &var_maps_rbl_code, 0, 0,
|
||||||
VAR_ACCESS_MAP_CODE, DEF_ACCESS_MAP_CODE, &var_access_map_code, 0, 0,
|
VAR_ACCESS_MAP_CODE, DEF_ACCESS_MAP_CODE, &var_access_map_code, 0, 0,
|
||||||
VAR_REJECT_CODE, DEF_REJECT_CODE, &var_reject_code, 0, 0,
|
VAR_REJECT_CODE, DEF_REJECT_CODE, &var_reject_code, 0, 0,
|
||||||
VAR_SMTPD_ERR_SLEEP, DEF_SMTPD_ERR_SLEEP, &var_smtpd_err_sleep, 0, 0,
|
|
||||||
VAR_NON_FQDN_CODE, DEF_NON_FQDN_CODE, &var_non_fqdn_code, 0, 0,
|
VAR_NON_FQDN_CODE, DEF_NON_FQDN_CODE, &var_non_fqdn_code, 0, 0,
|
||||||
VAR_SMTPD_JUNK_CMD, DEF_SMTPD_JUNK_CMD, &var_smtpd_junk_cmd_limit, 1, 0,
|
VAR_SMTPD_JUNK_CMD, DEF_SMTPD_JUNK_CMD, &var_smtpd_junk_cmd_limit, 1, 0,
|
||||||
0,
|
0,
|
||||||
};
|
};
|
||||||
|
static CONFIG_TIME_TABLE time_table[] = {
|
||||||
|
VAR_SMTPD_TMOUT, DEF_SMTPD_TMOUT, &var_smtpd_tmout, 's', 1, 0,
|
||||||
|
VAR_SMTPD_ERR_SLEEP, DEF_SMTPD_ERR_SLEEP, &var_smtpd_err_sleep, 's', 0, 0,
|
||||||
|
0,
|
||||||
|
};
|
||||||
static CONFIG_BOOL_TABLE bool_table[] = {
|
static CONFIG_BOOL_TABLE bool_table[] = {
|
||||||
VAR_HELO_REQUIRED, DEF_HELO_REQUIRED, &var_helo_required,
|
VAR_HELO_REQUIRED, DEF_HELO_REQUIRED, &var_helo_required,
|
||||||
VAR_SMTPD_DELAY_REJECT, DEF_SMTPD_DELAY_REJECT, &var_smtpd_delay_reject,
|
VAR_SMTPD_DELAY_REJECT, DEF_SMTPD_DELAY_REJECT, &var_smtpd_delay_reject,
|
||||||
@@ -1478,6 +1481,7 @@ int main(int argc, char **argv)
|
|||||||
MAIL_SERVER_INT_TABLE, int_table,
|
MAIL_SERVER_INT_TABLE, int_table,
|
||||||
MAIL_SERVER_STR_TABLE, str_table,
|
MAIL_SERVER_STR_TABLE, str_table,
|
||||||
MAIL_SERVER_BOOL_TABLE, bool_table,
|
MAIL_SERVER_BOOL_TABLE, bool_table,
|
||||||
|
MAIL_SERVER_TIME_TABLE, time_table,
|
||||||
MAIL_SERVER_PRE_INIT, pre_jail_init,
|
MAIL_SERVER_PRE_INIT, pre_jail_init,
|
||||||
MAIL_SERVER_POST_INIT, post_jail_init,
|
MAIL_SERVER_POST_INIT, post_jail_init,
|
||||||
MAIL_SERVER_PRE_ACCEPT, pre_accept,
|
MAIL_SERVER_PRE_ACCEPT, pre_accept,
|
||||||
|
@@ -298,13 +298,13 @@ static void drop_privileges(char *unused_name, char **unused_argv)
|
|||||||
|
|
||||||
int main(int argc, char **argv)
|
int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
static CONFIG_INT_TABLE int_table[] = {
|
static CONFIG_TIME_TABLE time_table[] = {
|
||||||
VAR_COMMAND_MAXTIME, DEF_COMMAND_MAXTIME, &var_command_maxtime, 1, 0,
|
VAR_COMMAND_MAXTIME, DEF_COMMAND_MAXTIME, &var_command_maxtime, 's', 1, 0,
|
||||||
0,
|
0,
|
||||||
};
|
};
|
||||||
|
|
||||||
single_server_main(argc, argv, spawn_service,
|
single_server_main(argc, argv, spawn_service,
|
||||||
MAIL_SERVER_INT_TABLE, int_table,
|
MAIL_SERVER_TIME_TABLE, time_table,
|
||||||
MAIL_SERVER_POST_INIT, drop_privileges,
|
MAIL_SERVER_POST_INIT, drop_privileges,
|
||||||
MAIL_SERVER_PRE_ACCEPT, pre_accept,
|
MAIL_SERVER_PRE_ACCEPT, pre_accept,
|
||||||
0);
|
0);
|
||||||
|
@@ -162,6 +162,8 @@ static int dict_ldap_connect(DICT_LDAP *dict_ldap)
|
|||||||
if (setjmp(env) == 0)
|
if (setjmp(env) == 0)
|
||||||
dict_ldap->ld = ldap_open(dict_ldap->server_host,
|
dict_ldap->ld = ldap_open(dict_ldap->server_host,
|
||||||
(int) dict_ldap->server_port);
|
(int) dict_ldap->server_port);
|
||||||
|
else
|
||||||
|
dict_ldap->ld = 0;
|
||||||
alarm(0);
|
alarm(0);
|
||||||
|
|
||||||
if (signal(SIGALRM, saved_alarm) == SIG_ERR) {
|
if (signal(SIGALRM, saved_alarm) == SIG_ERR) {
|
||||||
|
Reference in New Issue
Block a user