mirror of
https://github.com/vdukhovni/postfix
synced 2025-08-22 09:57:34 +00:00
postfix-2.9-20110219
This commit is contained in:
parent
87689ec01f
commit
80978d3ac5
@ -16004,7 +16004,7 @@ Apologies for any names omitted.
|
|||||||
|
|
||||||
Workaround: better handling of pregreeting spambots. The
|
Workaround: better handling of pregreeting spambots. The
|
||||||
postscreen built-in SMTP engine no longer sends a 220 banner
|
postscreen built-in SMTP engine no longer sends a 220 banner
|
||||||
to a client that falls into the pregeet trap. This eliminates
|
to a client that falls into the pregreet trap. This eliminates
|
||||||
many "NON-SMTP COMMAND" records in postscreen logging, as
|
many "NON-SMTP COMMAND" records in postscreen logging, as
|
||||||
the SMTP client and server no longer get out of sync. It
|
the SMTP client and server no longer get out of sync. It
|
||||||
also results in better logging of sender/recipient information.
|
also results in better logging of sender/recipient information.
|
||||||
@ -16594,10 +16594,34 @@ Apologies for any names omitted.
|
|||||||
|
|
||||||
20110213
|
20110213
|
||||||
|
|
||||||
Workaround (problem introduced with Postfix TLS patch): the
|
Workaround: the TLS library passes the same information via
|
||||||
TLS library passes the same information via different
|
different function arguments, and this same information is
|
||||||
function arguments, and this same information is maintained
|
maintained by different functions, so things get out of
|
||||||
by different functions, so things get out of step when code
|
step when code is updated. As of 20110212, tls_client_start()
|
||||||
is updated. As of 20110212, tls_client_start() needs to set
|
needs to set the VSTREAM property of the TLS session object.
|
||||||
the VSTREAM property of the TLS session object. File:
|
File: tls/tls_client.c.
|
||||||
tls/tls_client.c.
|
|
||||||
|
20110215
|
||||||
|
|
||||||
|
Human factors: the FCRDNS (forward-confirmed reverse DNS)
|
||||||
|
checking code now logs "hostname X does not resolve to
|
||||||
|
address Y", when a "reverse hostname" lookup result does
|
||||||
|
not resolve to the client IP address. Files: smtpd/smtpd_peer.c,
|
||||||
|
qmqpr/qmqpd_peer.c.
|
||||||
|
|
||||||
|
20110216
|
||||||
|
|
||||||
|
Cleanup: don't log a "connection reset by peer" error when
|
||||||
|
postscreen(8) tries to send a server response. File:
|
||||||
|
postscreen/postscreen_send.c.
|
||||||
|
|
||||||
|
20110218
|
||||||
|
|
||||||
|
Cleanup: Postfix now uses long integers for message_size_limit,
|
||||||
|
mailbox_size_limit and virtual_mailbox_limit. On LP64 (64-bit
|
||||||
|
long and pointer, but 32-bit integer) systems, these message
|
||||||
|
and mailbox limits can now exceed 2GB. Files: global/mail_params.c
|
||||||
|
global/mail_params.h local/local.c master/event_server.c
|
||||||
|
master/mail_server.h master/multi_server.c master/single_server.c
|
||||||
|
master/trigger_server.c virtual/virtual.c postconf/extract.awk
|
||||||
|
postconf/postconf.c.
|
||||||
|
@ -14,7 +14,23 @@ specifies the release date of a stable release or snapshot release.
|
|||||||
If you upgrade from Postfix 2.7 or earlier, read RELEASE_NOTES-2.8
|
If you upgrade from Postfix 2.7 or earlier, read RELEASE_NOTES-2.8
|
||||||
before proceeding.
|
before proceeding.
|
||||||
|
|
||||||
Major changes with snapshot 20110130
|
Incompatible changes with snapshot 20110219
|
||||||
|
===========================================
|
||||||
|
|
||||||
|
The Postfix SMTP and QMQP servers now log "hostname X does not
|
||||||
|
resolve to address Y", when a "reverse hostname" lookup result does
|
||||||
|
not resolve to the client IP address. Until now these servers logged
|
||||||
|
"Y: hostname X verification failed" or "Y: address not listed for
|
||||||
|
hostname X" depending on the details of the error.
|
||||||
|
|
||||||
|
Major changes with snapshot 20110219
|
||||||
|
====================================
|
||||||
|
|
||||||
|
Postfix now uses long integers for message_size_limit, mailbox_size_limit
|
||||||
|
and virtual_mailbox_limit. On LP64 systems (64-bit long and pointer,
|
||||||
|
but 32-bit integer), these limits can now exceed 2GB.
|
||||||
|
|
||||||
|
Major changes with snapshot 20110212
|
||||||
====================================
|
====================================
|
||||||
|
|
||||||
Support for per-record deadlines. These change the behavior of
|
Support for per-record deadlines. These change the behavior of
|
||||||
|
@ -6,11 +6,11 @@ Wish list:
|
|||||||
|
|
||||||
Things to do after the stable release:
|
Things to do after the stable release:
|
||||||
|
|
||||||
|
Make the rules for how to use close-on-exec more explicit.
|
||||||
|
|
||||||
Don't forget Apple's code donation for fetching mail from
|
Don't forget Apple's code donation for fetching mail from
|
||||||
IMAP server.
|
IMAP server.
|
||||||
|
|
||||||
Update MILTER_README with pointer to OpenDKIM.
|
|
||||||
|
|
||||||
postconf command-line option to show the compile-time
|
postconf command-line option to show the compile-time
|
||||||
settings (CCARGS, AUXLIBS) in case binary packages
|
settings (CCARGS, AUXLIBS) in case binary packages
|
||||||
don't install the makedefs.out file.
|
don't install the makedefs.out file.
|
||||||
@ -19,6 +19,8 @@ Wish list:
|
|||||||
etc. databases, i.e. set the owner property at open time;
|
etc. databases, i.e. set the owner property at open time;
|
||||||
it can't be looked up at run-time with fstat(dict->stat_fd)
|
it can't be looked up at run-time with fstat(dict->stat_fd)
|
||||||
because there is no open file. What about *SQL, LDAP, etc.?
|
because there is no open file. What about *SQL, LDAP, etc.?
|
||||||
|
Maybe use the source of the configuration file? We can reuse
|
||||||
|
that to enforce root ownership of main/master.cf files.
|
||||||
|
|
||||||
events.c: cache the side effects of file descriptor event
|
events.c: cache the side effects of file descriptor event
|
||||||
enable/disable operations in user space, and do bulk kernel
|
enable/disable operations in user space, and do bulk kernel
|
||||||
|
@ -82,7 +82,7 @@ MYSQL_TABLE(5) MYSQL_TABLE(5)
|
|||||||
<b>hosts</b> The hosts that Postfix will try to connect to and
|
<b>hosts</b> The hosts that Postfix will try to connect to and
|
||||||
query from. Specify <i>unix:</i> for UNIX domain sockets,
|
query from. Specify <i>unix:</i> for UNIX domain sockets,
|
||||||
<i>inet:</i> for TCP connections (default). Example:
|
<i>inet:</i> for TCP connections (default). Example:
|
||||||
hosts = host1.some.domain host2.some.domain
|
hosts = host1.some.domain host2.some.domain:port
|
||||||
hosts = unix:/file/name
|
hosts = unix:/file/name
|
||||||
|
|
||||||
The hosts are tried in random order, with all con-
|
The hosts are tried in random order, with all con-
|
||||||
|
@ -95,7 +95,7 @@ The hosts that Postfix will try to connect to and query from.
|
|||||||
Specify \fIunix:\fR for UNIX domain sockets, \fIinet:\fR for TCP
|
Specify \fIunix:\fR for UNIX domain sockets, \fIinet:\fR for TCP
|
||||||
connections (default). Example:
|
connections (default). Example:
|
||||||
.nf
|
.nf
|
||||||
hosts = host1.some.domain host2.some.domain
|
hosts = host1.some.domain host2.some.domain:port
|
||||||
hosts = unix:/file/name
|
hosts = unix:/file/name
|
||||||
.fi
|
.fi
|
||||||
|
|
||||||
|
@ -83,7 +83,7 @@
|
|||||||
# Specify \fIunix:\fR for UNIX domain sockets, \fIinet:\fR for TCP
|
# Specify \fIunix:\fR for UNIX domain sockets, \fIinet:\fR for TCP
|
||||||
# connections (default). Example:
|
# connections (default). Example:
|
||||||
# .nf
|
# .nf
|
||||||
# hosts = host1.some.domain host2.some.domain
|
# hosts = host1.some.domain host2.some.domain:port
|
||||||
# hosts = unix:/file/name
|
# hosts = unix:/file/name
|
||||||
# .fi
|
# .fi
|
||||||
#
|
#
|
||||||
|
@ -45,7 +45,7 @@
|
|||||||
/* char *var_double_bounce_sender;
|
/* char *var_double_bounce_sender;
|
||||||
/* int var_line_limit;
|
/* int var_line_limit;
|
||||||
/* char *var_alias_db_map;
|
/* char *var_alias_db_map;
|
||||||
/* int var_message_limit;
|
/* long var_message_limit;
|
||||||
/* char *var_mail_release;
|
/* char *var_mail_release;
|
||||||
/* char *var_mail_version;
|
/* char *var_mail_version;
|
||||||
/* int var_ipc_idle_limit;
|
/* int var_ipc_idle_limit;
|
||||||
@ -230,7 +230,7 @@ char *var_mynetworks;
|
|||||||
char *var_double_bounce_sender;
|
char *var_double_bounce_sender;
|
||||||
int var_line_limit;
|
int var_line_limit;
|
||||||
char *var_alias_db_map;
|
char *var_alias_db_map;
|
||||||
int var_message_limit;
|
long var_message_limit;
|
||||||
char *var_mail_release;
|
char *var_mail_release;
|
||||||
char *var_mail_version;
|
char *var_mail_version;
|
||||||
int var_ipc_idle_limit;
|
int var_ipc_idle_limit;
|
||||||
@ -579,7 +579,6 @@ void mail_params_init()
|
|||||||
VAR_MAX_USE, DEF_MAX_USE, &var_use_limit, 1, 0,
|
VAR_MAX_USE, DEF_MAX_USE, &var_use_limit, 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_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_FORK_TRIES, DEF_FORK_TRIES, &var_fork_tries, 1, 0,
|
VAR_FORK_TRIES, DEF_FORK_TRIES, &var_fork_tries, 1, 0,
|
||||||
VAR_FLOCK_TRIES, DEF_FLOCK_TRIES, &var_flock_tries, 1, 0,
|
VAR_FLOCK_TRIES, DEF_FLOCK_TRIES, &var_flock_tries, 1, 0,
|
||||||
@ -595,6 +594,10 @@ void mail_params_init()
|
|||||||
VAR_INET_WINDOW, DEF_INET_WINDOW, &var_inet_windowsize, 0, 0,
|
VAR_INET_WINDOW, DEF_INET_WINDOW, &var_inet_windowsize, 0, 0,
|
||||||
0,
|
0,
|
||||||
};
|
};
|
||||||
|
static const CONFIG_LONG_TABLE long_defaults[] = {
|
||||||
|
VAR_MESSAGE_LIMIT, DEF_MESSAGE_LIMIT, &var_message_limit, 0, 0,
|
||||||
|
0,
|
||||||
|
};
|
||||||
static const CONFIG_TIME_TABLE time_defaults[] = {
|
static const CONFIG_TIME_TABLE time_defaults[] = {
|
||||||
VAR_EVENT_DRAIN, DEF_EVENT_DRAIN, &var_event_drain, 1, 0,
|
VAR_EVENT_DRAIN, DEF_EVENT_DRAIN, &var_event_drain, 1, 0,
|
||||||
VAR_MAX_IDLE, DEF_MAX_IDLE, &var_idle_limit, 1, 0,
|
VAR_MAX_IDLE, DEF_MAX_IDLE, &var_idle_limit, 1, 0,
|
||||||
@ -681,6 +684,7 @@ void mail_params_init()
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
get_mail_conf_int_table(other_int_defaults);
|
get_mail_conf_int_table(other_int_defaults);
|
||||||
|
get_mail_conf_long_table(long_defaults);
|
||||||
get_mail_conf_bool_table(bool_defaults);
|
get_mail_conf_bool_table(bool_defaults);
|
||||||
get_mail_conf_time_table(time_defaults);
|
get_mail_conf_time_table(time_defaults);
|
||||||
check_default_privs();
|
check_default_privs();
|
||||||
|
@ -577,7 +577,7 @@ extern char *var_mailbox_lock;
|
|||||||
*/
|
*/
|
||||||
#define VAR_MAILBOX_LIMIT "mailbox_size_limit"
|
#define VAR_MAILBOX_LIMIT "mailbox_size_limit"
|
||||||
#define DEF_MAILBOX_LIMIT (DEF_MESSAGE_LIMIT * 5)
|
#define DEF_MAILBOX_LIMIT (DEF_MESSAGE_LIMIT * 5)
|
||||||
extern int var_mailbox_limit;
|
extern long var_mailbox_limit;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Miscellaneous.
|
* Miscellaneous.
|
||||||
@ -1787,7 +1787,7 @@ extern int var_virt_expan_limit;
|
|||||||
*/
|
*/
|
||||||
#define VAR_MESSAGE_LIMIT "message_size_limit"
|
#define VAR_MESSAGE_LIMIT "message_size_limit"
|
||||||
#define DEF_MESSAGE_LIMIT 10240000
|
#define DEF_MESSAGE_LIMIT 10240000
|
||||||
extern int var_message_limit;
|
extern long var_message_limit;
|
||||||
|
|
||||||
#define VAR_QUEUE_MINFREE "queue_minfree"
|
#define VAR_QUEUE_MINFREE "queue_minfree"
|
||||||
#define DEF_QUEUE_MINFREE 0
|
#define DEF_QUEUE_MINFREE 0
|
||||||
@ -2343,7 +2343,7 @@ extern char *var_virt_mailbox_base;
|
|||||||
|
|
||||||
#define VAR_VIRT_MAILBOX_LIMIT "virtual_mailbox_limit"
|
#define VAR_VIRT_MAILBOX_LIMIT "virtual_mailbox_limit"
|
||||||
#define DEF_VIRT_MAILBOX_LIMIT (5 * DEF_MESSAGE_LIMIT)
|
#define DEF_VIRT_MAILBOX_LIMIT (5 * DEF_MESSAGE_LIMIT)
|
||||||
extern int var_virt_mailbox_limit;
|
extern long var_virt_mailbox_limit;
|
||||||
|
|
||||||
#define VAR_VIRT_MAILBOX_LOCK "virtual_mailbox_lock"
|
#define VAR_VIRT_MAILBOX_LOCK "virtual_mailbox_lock"
|
||||||
#define DEF_VIRT_MAILBOX_LOCK "fcntl, dotlock"
|
#define DEF_VIRT_MAILBOX_LOCK "fcntl, dotlock"
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
* Patches change both the patchlevel and the release date. Snapshots have no
|
* Patches change both the patchlevel and the release date. Snapshots have no
|
||||||
* patchlevel; they change the release date only.
|
* patchlevel; they change the release date only.
|
||||||
*/
|
*/
|
||||||
#define MAIL_RELEASE_DATE "20110213"
|
#define MAIL_RELEASE_DATE "20110219"
|
||||||
#define MAIL_VERSION_NUMBER "2.9"
|
#define MAIL_VERSION_NUMBER "2.9"
|
||||||
|
|
||||||
#ifdef SNAPSHOT
|
#ifdef SNAPSHOT
|
||||||
|
@ -650,7 +650,7 @@ char *var_deliver_hdr;
|
|||||||
int var_stat_home_dir;
|
int var_stat_home_dir;
|
||||||
int var_mailtool_compat;
|
int var_mailtool_compat;
|
||||||
char *var_mailbox_lock;
|
char *var_mailbox_lock;
|
||||||
int var_mailbox_limit;
|
long var_mailbox_limit;
|
||||||
bool var_frozen_delivered;
|
bool var_frozen_delivered;
|
||||||
bool var_reset_owner_attr;
|
bool var_reset_owner_attr;
|
||||||
bool var_strict_mbox_owner;
|
bool var_strict_mbox_owner;
|
||||||
@ -872,6 +872,9 @@ int main(int argc, char **argv)
|
|||||||
};
|
};
|
||||||
static const CONFIG_INT_TABLE int_table[] = {
|
static const CONFIG_INT_TABLE int_table[] = {
|
||||||
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,
|
||||||
|
};
|
||||||
|
static const CONFIG_LONG_TABLE long_table[] = {
|
||||||
VAR_MAILBOX_LIMIT, DEF_MAILBOX_LIMIT, &var_mailbox_limit, 0, 0,
|
VAR_MAILBOX_LIMIT, DEF_MAILBOX_LIMIT, &var_mailbox_limit, 0, 0,
|
||||||
0,
|
0,
|
||||||
};
|
};
|
||||||
@ -922,6 +925,7 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
single_server_main(argc, argv, local_service,
|
single_server_main(argc, argv, local_service,
|
||||||
MAIL_SERVER_INT_TABLE, int_table,
|
MAIL_SERVER_INT_TABLE, int_table,
|
||||||
|
MAIL_SERVER_LONG_TABLE, long_table,
|
||||||
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,
|
||||||
|
@ -50,6 +50,11 @@
|
|||||||
/* global Postfix configuration file. Tables are loaded in the
|
/* global Postfix configuration file. Tables are loaded in the
|
||||||
/* order as specified, and multiple instances of the same type
|
/* order as specified, and multiple instances of the same type
|
||||||
/* are allowed.
|
/* are allowed.
|
||||||
|
/* .IP "MAIL_SERVER_LONG_TABLE (CONFIG_LONG_TABLE *)"
|
||||||
|
/* A table with configurable parameters, to be loaded from the
|
||||||
|
/* global Postfix configuration file. Tables are loaded in the
|
||||||
|
/* order as specified, and multiple instances of the same type
|
||||||
|
/* are allowed.
|
||||||
/* .IP "MAIL_SERVER_STR_TABLE (CONFIG_STR_TABLE *)"
|
/* .IP "MAIL_SERVER_STR_TABLE (CONFIG_STR_TABLE *)"
|
||||||
/* A table with configurable parameters, to be loaded from the
|
/* A table with configurable parameters, to be loaded from the
|
||||||
/* global Postfix configuration file. Tables are loaded in the
|
/* global Postfix configuration file. Tables are loaded in the
|
||||||
@ -673,6 +678,9 @@ NORETURN event_server_main(int argc, char **argv, MULTI_SERVER_FN service,...)
|
|||||||
case MAIL_SERVER_INT_TABLE:
|
case MAIL_SERVER_INT_TABLE:
|
||||||
get_mail_conf_int_table(va_arg(ap, CONFIG_INT_TABLE *));
|
get_mail_conf_int_table(va_arg(ap, CONFIG_INT_TABLE *));
|
||||||
break;
|
break;
|
||||||
|
case MAIL_SERVER_LONG_TABLE:
|
||||||
|
get_mail_conf_long_table(va_arg(ap, CONFIG_LONG_TABLE *));
|
||||||
|
break;
|
||||||
case MAIL_SERVER_STR_TABLE:
|
case MAIL_SERVER_STR_TABLE:
|
||||||
get_mail_conf_str_table(va_arg(ap, CONFIG_STR_TABLE *));
|
get_mail_conf_str_table(va_arg(ap, CONFIG_STR_TABLE *));
|
||||||
break;
|
break;
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
#define MAIL_SERVER_RAW_TABLE 5
|
#define MAIL_SERVER_RAW_TABLE 5
|
||||||
#define MAIL_SERVER_NINT_TABLE 6
|
#define MAIL_SERVER_NINT_TABLE 6
|
||||||
#define MAIL_SERVER_NBOOL_TABLE 7
|
#define MAIL_SERVER_NBOOL_TABLE 7
|
||||||
|
#define MAIL_SERVER_LONG_TABLE 8
|
||||||
|
|
||||||
#define MAIL_SERVER_PRE_INIT 10
|
#define MAIL_SERVER_PRE_INIT 10
|
||||||
#define MAIL_SERVER_POST_INIT 11
|
#define MAIL_SERVER_POST_INIT 11
|
||||||
|
@ -47,6 +47,11 @@
|
|||||||
/* global Postfix configuration file. Tables are loaded in the
|
/* global Postfix configuration file. Tables are loaded in the
|
||||||
/* order as specified, and multiple instances of the same type
|
/* order as specified, and multiple instances of the same type
|
||||||
/* are allowed.
|
/* are allowed.
|
||||||
|
/* .IP "MAIL_SERVER_LONG_TABLE (CONFIG_LONG_TABLE *)"
|
||||||
|
/* A table with configurable parameters, to be loaded from the
|
||||||
|
/* global Postfix configuration file. Tables are loaded in the
|
||||||
|
/* order as specified, and multiple instances of the same type
|
||||||
|
/* are allowed.
|
||||||
/* .IP "MAIL_SERVER_STR_TABLE (CONFIG_STR_TABLE *)"
|
/* .IP "MAIL_SERVER_STR_TABLE (CONFIG_STR_TABLE *)"
|
||||||
/* A table with configurable parameters, to be loaded from the
|
/* A table with configurable parameters, to be loaded from the
|
||||||
/* global Postfix configuration file. Tables are loaded in the
|
/* global Postfix configuration file. Tables are loaded in the
|
||||||
@ -669,6 +674,9 @@ NORETURN multi_server_main(int argc, char **argv, MULTI_SERVER_FN service,...)
|
|||||||
case MAIL_SERVER_INT_TABLE:
|
case MAIL_SERVER_INT_TABLE:
|
||||||
get_mail_conf_int_table(va_arg(ap, CONFIG_INT_TABLE *));
|
get_mail_conf_int_table(va_arg(ap, CONFIG_INT_TABLE *));
|
||||||
break;
|
break;
|
||||||
|
case MAIL_SERVER_LONG_TABLE:
|
||||||
|
get_mail_conf_long_table(va_arg(ap, CONFIG_LONG_TABLE *));
|
||||||
|
break;
|
||||||
case MAIL_SERVER_STR_TABLE:
|
case MAIL_SERVER_STR_TABLE:
|
||||||
get_mail_conf_str_table(va_arg(ap, CONFIG_STR_TABLE *));
|
get_mail_conf_str_table(va_arg(ap, CONFIG_STR_TABLE *));
|
||||||
break;
|
break;
|
||||||
|
@ -41,6 +41,11 @@
|
|||||||
/* global Postfix configuration file. Tables are loaded in the
|
/* global Postfix configuration file. Tables are loaded in the
|
||||||
/* order as specified, and multiple instances of the same type
|
/* order as specified, and multiple instances of the same type
|
||||||
/* are allowed.
|
/* are allowed.
|
||||||
|
/* .IP "MAIL_SERVER_LONG_TABLE (CONFIG_LONG_TABLE *)"
|
||||||
|
/* A table with configurable parameters, to be loaded from the
|
||||||
|
/* global Postfix configuration file. Tables are loaded in the
|
||||||
|
/* order as specified, and multiple instances of the same type
|
||||||
|
/* are allowed.
|
||||||
/* .IP "MAIL_SERVER_STR_TABLE (CONFIG_STR_TABLE *)"
|
/* .IP "MAIL_SERVER_STR_TABLE (CONFIG_STR_TABLE *)"
|
||||||
/* A table with configurable parameters, to be loaded from the
|
/* A table with configurable parameters, to be loaded from the
|
||||||
/* global Postfix configuration file. Tables are loaded in the
|
/* global Postfix configuration file. Tables are loaded in the
|
||||||
@ -552,6 +557,9 @@ NORETURN single_server_main(int argc, char **argv, SINGLE_SERVER_FN service,...)
|
|||||||
case MAIL_SERVER_INT_TABLE:
|
case MAIL_SERVER_INT_TABLE:
|
||||||
get_mail_conf_int_table(va_arg(ap, CONFIG_INT_TABLE *));
|
get_mail_conf_int_table(va_arg(ap, CONFIG_INT_TABLE *));
|
||||||
break;
|
break;
|
||||||
|
case MAIL_SERVER_LONG_TABLE:
|
||||||
|
get_mail_conf_long_table(va_arg(ap, CONFIG_LONG_TABLE *));
|
||||||
|
break;
|
||||||
case MAIL_SERVER_STR_TABLE:
|
case MAIL_SERVER_STR_TABLE:
|
||||||
get_mail_conf_str_table(va_arg(ap, CONFIG_STR_TABLE *));
|
get_mail_conf_str_table(va_arg(ap, CONFIG_STR_TABLE *));
|
||||||
break;
|
break;
|
||||||
|
@ -48,6 +48,11 @@
|
|||||||
/* global Postfix configuration file. Tables are loaded in the
|
/* global Postfix configuration file. Tables are loaded in the
|
||||||
/* order as specified, and multiple instances of the same type
|
/* order as specified, and multiple instances of the same type
|
||||||
/* are allowed.
|
/* are allowed.
|
||||||
|
/* .IP "MAIL_SERVER_LONG_TABLE (CONFIG_LONG_TABLE *)"
|
||||||
|
/* A table with configurable parameters, to be loaded from the
|
||||||
|
/* global Postfix configuration file. Tables are loaded in the
|
||||||
|
/* order as specified, and multiple instances of the same type
|
||||||
|
/* are allowed.
|
||||||
/* .IP "MAIL_SERVER_STR_TABLE (CONFIG_STR_TABLE *)"
|
/* .IP "MAIL_SERVER_STR_TABLE (CONFIG_STR_TABLE *)"
|
||||||
/* A table with configurable parameters, to be loaded from the
|
/* A table with configurable parameters, to be loaded from the
|
||||||
/* global Postfix configuration file. Tables are loaded in the
|
/* global Postfix configuration file. Tables are loaded in the
|
||||||
@ -563,6 +568,9 @@ NORETURN trigger_server_main(int argc, char **argv, TRIGGER_SERVER_FN service,..
|
|||||||
case MAIL_SERVER_INT_TABLE:
|
case MAIL_SERVER_INT_TABLE:
|
||||||
get_mail_conf_int_table(va_arg(ap, CONFIG_INT_TABLE *));
|
get_mail_conf_int_table(va_arg(ap, CONFIG_INT_TABLE *));
|
||||||
break;
|
break;
|
||||||
|
case MAIL_SERVER_LONG_TABLE:
|
||||||
|
get_mail_conf_long_table(va_arg(ap, CONFIG_LONG_TABLE *));
|
||||||
|
break;
|
||||||
case MAIL_SERVER_STR_TABLE:
|
case MAIL_SERVER_STR_TABLE:
|
||||||
get_mail_conf_str_table(va_arg(ap, CONFIG_STR_TABLE *));
|
get_mail_conf_str_table(va_arg(ap, CONFIG_STR_TABLE *));
|
||||||
break;
|
break;
|
||||||
|
@ -8,7 +8,8 @@ CFLAGS = $(DEBUG) $(OPT) $(DEFS)
|
|||||||
TESTPROG=
|
TESTPROG=
|
||||||
MAKES = bool_table.h bool_vars.h int_table.h int_vars.h str_table.h \
|
MAKES = bool_table.h bool_vars.h int_table.h int_vars.h str_table.h \
|
||||||
str_vars.h time_table.h time_vars.h raw_table.h raw_vars.h \
|
str_vars.h time_table.h time_vars.h raw_table.h raw_vars.h \
|
||||||
nint_table.h nint_vars.h nbool_table.h nbool_vars.h
|
nint_table.h nint_vars.h nbool_table.h nbool_vars.h long_table.h \
|
||||||
|
long_vars.h
|
||||||
AUTOS = auto_table.h auto_vars.h
|
AUTOS = auto_table.h auto_vars.h
|
||||||
DUMMIES = makes_dummy autos_dummy # for "make -j"
|
DUMMIES = makes_dummy autos_dummy # for "make -j"
|
||||||
PROG = postconf
|
PROG = postconf
|
||||||
@ -121,6 +122,8 @@ postconf.o: install_table.h
|
|||||||
postconf.o: install_vars.h
|
postconf.o: install_vars.h
|
||||||
postconf.o: int_table.h
|
postconf.o: int_table.h
|
||||||
postconf.o: int_vars.h
|
postconf.o: int_vars.h
|
||||||
|
postconf.o: long_table.h
|
||||||
|
postconf.o: long_vars.h
|
||||||
postconf.o: nbool_table.h
|
postconf.o: nbool_table.h
|
||||||
postconf.o: nbool_vars.h
|
postconf.o: nbool_vars.h
|
||||||
postconf.o: nint_table.h
|
postconf.o: nint_table.h
|
||||||
|
@ -74,6 +74,14 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/^(static| )*(const +)?CONFIG_LONG_TABLE .*\{/,/\};/ {
|
||||||
|
if ($1 ~ /VAR/) {
|
||||||
|
long_vars["long " substr($3,2,length($3)-2) ";"] = 1
|
||||||
|
if (++itab[$1 $2 $4 $5 $6 $7 $8 $9] == 1) {
|
||||||
|
long_table[$0] = 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
END {
|
END {
|
||||||
# Print parameter declarations without busting old AWK's file limit.
|
# Print parameter declarations without busting old AWK's file limit.
|
||||||
@ -112,6 +120,11 @@ END {
|
|||||||
print key
|
print key
|
||||||
print "EOF"
|
print "EOF"
|
||||||
|
|
||||||
|
print "cat >long_vars.h <<'EOF'"
|
||||||
|
for (key in long_vars)
|
||||||
|
print key
|
||||||
|
print "EOF"
|
||||||
|
|
||||||
# Print parameter initializations without busting old AWK's file limit.
|
# Print parameter initializations without busting old AWK's file limit.
|
||||||
print "sed 's/[ ][ ]*/ /g' >int_table.h <<'EOF'"
|
print "sed 's/[ ][ ]*/ /g' >int_table.h <<'EOF'"
|
||||||
for (key in int_table)
|
for (key in int_table)
|
||||||
@ -148,6 +161,11 @@ END {
|
|||||||
print key
|
print key
|
||||||
print "EOF"
|
print "EOF"
|
||||||
|
|
||||||
|
print "sed 's/[ ][ ]*/ /g' >long_table.h <<'EOF'"
|
||||||
|
for (key in long_table)
|
||||||
|
print key
|
||||||
|
print "EOF"
|
||||||
|
|
||||||
# Flush output nicely.
|
# Flush output nicely.
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
@ -330,6 +330,7 @@ DICT *text_table;
|
|||||||
#include "raw_vars.h"
|
#include "raw_vars.h"
|
||||||
#include "nint_vars.h"
|
#include "nint_vars.h"
|
||||||
#include "nbool_vars.h"
|
#include "nbool_vars.h"
|
||||||
|
#include "long_vars.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Manually extracted.
|
* Manually extracted.
|
||||||
@ -377,6 +378,11 @@ static const CONFIG_NBOOL_TABLE nbool_table[] = {
|
|||||||
0,
|
0,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static const CONFIG_LONG_TABLE long_table[] = {
|
||||||
|
#include "long_table.h"
|
||||||
|
0,
|
||||||
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Parameters with default values obtained via function calls.
|
* Parameters with default values obtained via function calls.
|
||||||
*/
|
*/
|
||||||
@ -698,6 +704,7 @@ static void hash_parameters(void)
|
|||||||
const CONFIG_RAW_TABLE *rst;
|
const CONFIG_RAW_TABLE *rst;
|
||||||
const CONFIG_NINT_TABLE *nst;
|
const CONFIG_NINT_TABLE *nst;
|
||||||
const CONFIG_NBOOL_TABLE *bst;
|
const CONFIG_NBOOL_TABLE *bst;
|
||||||
|
const CONFIG_LONG_TABLE *lst;
|
||||||
|
|
||||||
param_table = htable_create(100);
|
param_table = htable_create(100);
|
||||||
|
|
||||||
@ -719,6 +726,8 @@ static void hash_parameters(void)
|
|||||||
htable_enter(param_table, nst->name, (char *) nst);
|
htable_enter(param_table, nst->name, (char *) nst);
|
||||||
for (bst = nbool_table; bst->name; bst++)
|
for (bst = nbool_table; bst->name; bst++)
|
||||||
htable_enter(param_table, bst->name, (char *) bst);
|
htable_enter(param_table, bst->name, (char *) bst);
|
||||||
|
for (lst = long_table; lst->name; lst++)
|
||||||
|
htable_enter(param_table, lst->name, (char *) lst);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* show_strval - show string-valued parameter */
|
/* show_strval - show string-valued parameter */
|
||||||
@ -746,6 +755,17 @@ static void show_intval(int mode, const char *name, int value)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* show_longval - show long-valued parameter */
|
||||||
|
|
||||||
|
static void show_longval(int mode, const char *name, long value)
|
||||||
|
{
|
||||||
|
if (mode & SHOW_NAME) {
|
||||||
|
vstream_printf("%s = %ld\n", name, value);
|
||||||
|
} else {
|
||||||
|
vstream_printf("%ld\n", value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* print_bool - print boolean parameter */
|
/* print_bool - print boolean parameter */
|
||||||
|
|
||||||
static void print_bool(int mode, CONFIG_BOOL_TABLE *cbt)
|
static void print_bool(int mode, CONFIG_BOOL_TABLE *cbt)
|
||||||
@ -965,6 +985,29 @@ static void print_nbool(int mode, CONFIG_NBOOL_TABLE * bst)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* print_long - print long parameter */
|
||||||
|
|
||||||
|
static void print_long(int mode, CONFIG_LONG_TABLE *clt)
|
||||||
|
{
|
||||||
|
const char *value;
|
||||||
|
|
||||||
|
if (mode & SHOW_DEFS) {
|
||||||
|
show_longval(mode, clt->name, clt->defval);
|
||||||
|
} else {
|
||||||
|
value = dict_lookup(CONFIG_DICT, clt->name);
|
||||||
|
if ((mode & SHOW_NONDEF) == 0) {
|
||||||
|
if (value == 0) {
|
||||||
|
show_longval(mode, clt->name, clt->defval);
|
||||||
|
} else {
|
||||||
|
show_strval(mode, clt->name, value);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (value != 0)
|
||||||
|
show_strval(mode, clt->name, value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* print_parameter - show specific parameter */
|
/* print_parameter - show specific parameter */
|
||||||
|
|
||||||
static void print_parameter(int mode, char *ptr)
|
static void print_parameter(int mode, char *ptr)
|
||||||
@ -993,6 +1036,8 @@ static void print_parameter(int mode, char *ptr)
|
|||||||
print_nint(mode, (CONFIG_NINT_TABLE *) ptr);
|
print_nint(mode, (CONFIG_NINT_TABLE *) ptr);
|
||||||
if (INSIDE(ptr, nbool_table))
|
if (INSIDE(ptr, nbool_table))
|
||||||
print_nbool(mode, (CONFIG_NBOOL_TABLE *) ptr);
|
print_nbool(mode, (CONFIG_NBOOL_TABLE *) ptr);
|
||||||
|
if (INSIDE(ptr, long_table))
|
||||||
|
print_long(mode, (CONFIG_LONG_TABLE *) ptr);
|
||||||
if (msg_verbose)
|
if (msg_verbose)
|
||||||
vstream_fflush(VSTREAM_OUT);
|
vstream_fflush(VSTREAM_OUT);
|
||||||
}
|
}
|
||||||
|
@ -121,7 +121,7 @@ int psc_send_reply(PSC_STATE *state, const char *text)
|
|||||||
STR(state->send_buf), LEN(state->send_buf));
|
STR(state->send_buf), LEN(state->send_buf));
|
||||||
if (ret > 0)
|
if (ret > 0)
|
||||||
vstring_truncate(state->send_buf, ret - LEN(state->send_buf));
|
vstring_truncate(state->send_buf, ret - LEN(state->send_buf));
|
||||||
if (ret < 0 && errno != EAGAIN && errno != EPIPE)
|
if (ret < 0 && errno != EAGAIN && errno != EPIPE && errno != ECONNRESET)
|
||||||
msg_warn("write [%s]:%s: %m", state->smtp_client_addr,
|
msg_warn("write [%s]:%s: %m", state->smtp_client_addr,
|
||||||
state->smtp_client_port);
|
state->smtp_client_port);
|
||||||
return (ret < 0 && errno != EAGAIN);
|
return (ret < 0 && errno != EAGAIN);
|
||||||
|
@ -246,13 +246,13 @@ void qmqpd_peer_init(QMQPD_STATE *state)
|
|||||||
aierr = hostname_to_sockaddr_pf(state->name, state->addr_family,
|
aierr = hostname_to_sockaddr_pf(state->name, state->addr_family,
|
||||||
(char *) 0, 0, &res0);
|
(char *) 0, 0, &res0);
|
||||||
if (aierr) {
|
if (aierr) {
|
||||||
msg_warn("%s: hostname %s verification failed: %s",
|
msg_warn("hostname %s does not resolve to address %s: %s",
|
||||||
state->addr, state->name, MAI_STRERROR(aierr));
|
state->name, state->addr, MAI_STRERROR(aierr));
|
||||||
REJECT_PEER_NAME(state);
|
REJECT_PEER_NAME(state);
|
||||||
} else {
|
} else {
|
||||||
for (res = res0; /* void */ ; res = res->ai_next) {
|
for (res = res0; /* void */ ; res = res->ai_next) {
|
||||||
if (res == 0) {
|
if (res == 0) {
|
||||||
msg_warn("%s: address not listed for hostname %s",
|
msg_warn("hostname %s does not resolve to address %s",
|
||||||
state->addr, state->name);
|
state->addr, state->name);
|
||||||
REJECT_PEER_NAME(state);
|
REJECT_PEER_NAME(state);
|
||||||
break;
|
break;
|
||||||
|
@ -340,15 +340,15 @@ void smtpd_peer_init(SMTPD_STATE *state)
|
|||||||
aierr = hostname_to_sockaddr_pf(state->name, state->addr_family,
|
aierr = hostname_to_sockaddr_pf(state->name, state->addr_family,
|
||||||
(char *) 0, 0, &res0);
|
(char *) 0, 0, &res0);
|
||||||
if (aierr) {
|
if (aierr) {
|
||||||
msg_warn("%s: hostname %s verification failed: %s",
|
msg_warn("hostname %s does not resolve to address %s: %s",
|
||||||
state->addr, state->name, MAI_STRERROR(aierr));
|
state->name, state->addr, MAI_STRERROR(aierr));
|
||||||
REJECT_PEER_NAME(state, (TEMP_AI_ERROR(aierr) ?
|
REJECT_PEER_NAME(state, (TEMP_AI_ERROR(aierr) ?
|
||||||
SMTPD_PEER_CODE_TEMP : SMTPD_PEER_CODE_FORGED));
|
SMTPD_PEER_CODE_TEMP : SMTPD_PEER_CODE_FORGED));
|
||||||
} else {
|
} else {
|
||||||
for (res = res0; /* void */ ; res = res->ai_next) {
|
for (res = res0; /* void */ ; res = res->ai_next) {
|
||||||
if (res == 0) {
|
if (res == 0) {
|
||||||
msg_warn("%s: address not listed for hostname %s",
|
msg_warn("hostname %s does not resolve to address %s",
|
||||||
state->addr, state->name);
|
state->name, state->addr);
|
||||||
REJECT_PEER_NAME(state, SMTPD_PEER_CODE_FORGED);
|
REJECT_PEER_NAME(state, SMTPD_PEER_CODE_FORGED);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -331,7 +331,7 @@ char *var_virt_gid_maps;
|
|||||||
int var_virt_minimum_uid;
|
int var_virt_minimum_uid;
|
||||||
char *var_virt_mailbox_base;
|
char *var_virt_mailbox_base;
|
||||||
char *var_virt_mailbox_lock;
|
char *var_virt_mailbox_lock;
|
||||||
int var_virt_mailbox_limit;
|
long var_virt_mailbox_limit;
|
||||||
char *var_mail_spool_dir; /* XXX dependency fix */
|
char *var_mail_spool_dir; /* XXX dependency fix */
|
||||||
bool var_strict_mbox_owner;
|
bool var_strict_mbox_owner;
|
||||||
|
|
||||||
@ -497,6 +497,9 @@ int main(int argc, char **argv)
|
|||||||
{
|
{
|
||||||
static const CONFIG_INT_TABLE int_table[] = {
|
static const CONFIG_INT_TABLE int_table[] = {
|
||||||
VAR_VIRT_MINUID, DEF_VIRT_MINUID, &var_virt_minimum_uid, 1, 0,
|
VAR_VIRT_MINUID, DEF_VIRT_MINUID, &var_virt_minimum_uid, 1, 0,
|
||||||
|
0,
|
||||||
|
};
|
||||||
|
static const CONFIG_LONG_TABLE long_table[] = {
|
||||||
VAR_VIRT_MAILBOX_LIMIT, DEF_VIRT_MAILBOX_LIMIT, &var_virt_mailbox_limit, 0, 0,
|
VAR_VIRT_MAILBOX_LIMIT, DEF_VIRT_MAILBOX_LIMIT, &var_virt_mailbox_limit, 0, 0,
|
||||||
0,
|
0,
|
||||||
};
|
};
|
||||||
@ -521,6 +524,7 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
single_server_main(argc, argv, local_service,
|
single_server_main(argc, argv, local_service,
|
||||||
MAIL_SERVER_INT_TABLE, int_table,
|
MAIL_SERVER_INT_TABLE, int_table,
|
||||||
|
MAIL_SERVER_LONG_TABLE, long_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_PRE_INIT, pre_init,
|
MAIL_SERVER_PRE_INIT, pre_init,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user