mirror of
https://github.com/vdukhovni/postfix
synced 2025-08-29 21:27:57 +00:00
postfix-3.4-20181119
This commit is contained in:
parent
2cda534f4b
commit
48634afcef
@ -23815,3 +23815,8 @@ Apologies for any names omitted.
|
||||
current reality. Files: smtp_reuse.c, smtp_key.c, smtp_proto.c,
|
||||
smtp_tls_policy.c, smtp.h, smtp_connect.c.
|
||||
|
||||
20181119
|
||||
|
||||
Bitrot: makedefs will use "pkg-config" to locate ICU build
|
||||
information, falling back to "icu-config" if "pkg-config"
|
||||
is not found. File: makedefs.
|
||||
|
@ -1,5 +1,8 @@
|
||||
Wish list:
|
||||
|
||||
With DICT_FLAG_RHS_IS_FILE, RHS is list of files (insert
|
||||
newline for robustness).
|
||||
|
||||
With DICT_FLAG_RHS_IS_FILE, should dict_update() open a
|
||||
file? base64-encode the value?
|
||||
|
||||
@ -16,11 +19,6 @@ Wish list:
|
||||
the parameter value, which is probably why the warning
|
||||
exists.
|
||||
|
||||
Optionally save application attributes in scache(8) connection
|
||||
store requests, and optionally request such attributes upon
|
||||
connection retrieval. This would allow the SMTP client to
|
||||
log the TLS properties of a reused session.
|
||||
|
||||
Things to do before the stable release:
|
||||
|
||||
Spell-check, double-word check, HTML validator check,
|
||||
|
@ -60,8 +60,8 @@
|
||||
# are known to support it.
|
||||
# .IP \fB-DNO_EAI\fR
|
||||
# Do not build with EAI (SMTPUTF8) support. By default, EAI
|
||||
# support is compiled in when the "icu-config" command is
|
||||
# found.
|
||||
# support is compiled in when the "pkg-config" command is
|
||||
# found, or the deprecated "icu-config" command.
|
||||
# .IP \fB-DNO_INLINE\fR
|
||||
# Do not require support for C99 "inline" functions. Instead,
|
||||
# implement argument typechecks for non-(printf/scanf)-like
|
||||
@ -792,8 +792,10 @@ esac
|
||||
#
|
||||
case "$CCARGS" in
|
||||
*-DNO_EAI*) CCARGS="$CCARGS "'-DDEF_SMTPUTF8_ENABLE=\"no\"';;
|
||||
*) icu_cppflags=`(icu-config --cppflags) 2>/dev/null` && {
|
||||
icu_ldflags=`(icu-config --ldflags) 2>/dev/null` && {
|
||||
*) icu_cppflags=`((pkg-config --cflags icu-uc icu-i18n) ||
|
||||
(icu-config --cppflags)) 2>/dev/null` && {
|
||||
icu_ldflags=`((pkg-config --libs icu-uc icu-i18n) ||
|
||||
(icu-config --ldflags)) 2>/dev/null` && {
|
||||
trap 'rm -f makedefs.test makedefs.test.[co]' 1 2 3 15
|
||||
cat >makedefs.test.c <<'EOF'
|
||||
#include <unicode/uidna.h>
|
||||
|
@ -20,7 +20,7 @@
|
||||
* Patches change both the patchlevel and the release date. Snapshots have no
|
||||
* patchlevel; they change the release date only.
|
||||
*/
|
||||
#define MAIL_RELEASE_DATE "20181118"
|
||||
#define MAIL_RELEASE_DATE "20181119"
|
||||
#define MAIL_VERSION_NUMBER "3.4"
|
||||
|
||||
#ifdef SNAPSHOT
|
||||
|
@ -54,7 +54,7 @@
|
||||
*/
|
||||
typedef struct SMTP_ITERATOR {
|
||||
/* Public members. */
|
||||
VSTRING *request_nexthop; /* request nexhop or empty */
|
||||
VSTRING *request_nexthop; /* delivery request nexhop or empty */
|
||||
VSTRING *dest; /* current nexthop */
|
||||
VSTRING *host; /* hostname or empty */
|
||||
VSTRING *addr; /* printable address or empty */
|
||||
@ -76,12 +76,6 @@ typedef struct SMTP_ITERATOR {
|
||||
(iter)->parent = (state); \
|
||||
} while (0)
|
||||
|
||||
#define SMTP_ITER_CLOBBER(iter, _dest, _host, _addr) do { \
|
||||
vstring_strcpy((iter)->dest, (_dest)); \
|
||||
vstring_strcpy((iter)->host, (_host)); \
|
||||
vstring_strcpy((iter)->addr, (_addr)); \
|
||||
} while (0)
|
||||
|
||||
#define SMTP_ITER_SAVE_DEST(iter) do { \
|
||||
vstring_strcpy((iter)->saved_dest, STR((iter)->dest)); \
|
||||
} while (0)
|
||||
@ -195,11 +189,12 @@ typedef struct SMTP_STATE {
|
||||
* Primitives to enable/disable/test connection caching and reuse based on
|
||||
* the delivery request next-hop destination (i.e. not smtp_fallback_relay).
|
||||
*
|
||||
* Connection cache lookup by the request next-hop destination allows a reuse
|
||||
* request to skip over bad hosts, and may result in a connection to a
|
||||
* fall-back relay. Once we have found a 'good' host for a request next-hop,
|
||||
* clear the request next-hop destination, to avoid caching less-preferred
|
||||
* connections under that same request next-hop.
|
||||
* Connection cache lookup by the delivery request next-hop destination allows
|
||||
* a reuse request to skip over bad hosts, and may result in a connection to
|
||||
* a fall-back relay. Once we have found a 'good' host for a delivery
|
||||
* request next-hop, clear the delivery request next-hop destination, to
|
||||
* avoid caching less-preferred connections under that same delivery request
|
||||
* next-hop.
|
||||
*/
|
||||
#define SET_SCACHE_REQUEST_NEXTHOP(state, nexthop) do { \
|
||||
vstring_strcpy((state)->iterator->request_nexthop, nexthop); \
|
||||
@ -625,7 +620,7 @@ char *smtp_key_prefix(VSTRING *, const char *, SMTP_ITERATOR *, int);
|
||||
|
||||
#define SMTP_KEY_FLAG_SERVICE (1<<0) /* service name */
|
||||
#define SMTP_KEY_FLAG_SENDER (1<<1) /* sender address */
|
||||
#define SMTP_KEY_FLAG_REQ_NEXTHOP (1<<2) /* request nexthop */
|
||||
#define SMTP_KEY_FLAG_REQ_NEXTHOP (1<<2) /* delivery request nexthop */
|
||||
#define SMTP_KEY_FLAG_CUR_NEXTHOP (1<<3) /* current nexthop */
|
||||
#define SMTP_KEY_FLAG_HOSTNAME (1<<4) /* remote host name */
|
||||
#define SMTP_KEY_FLAG_ADDR (1<<5) /* remote address */
|
||||
|
@ -417,10 +417,10 @@ static void smtp_cleanup_session(SMTP_STATE *state)
|
||||
state->session = 0;
|
||||
|
||||
/*
|
||||
* If this session was good, reset the logical next-hop destination, so
|
||||
* If this session was good, reset the scache next-hop destination, so
|
||||
* that we won't cache connections to less-preferred servers under the
|
||||
* logical next-hop destination. Otherwise we could end up skipping over
|
||||
* the available and more-preferred servers.
|
||||
* same next-hop destination. Otherwise we could end up skipping over the
|
||||
* available and more-preferred servers.
|
||||
*/
|
||||
if (HAVE_SCACHE_REQUEST_NEXTHOP(state) && !throttled)
|
||||
CLEAR_SCACHE_REQUEST_NEXTHOP(state);
|
||||
@ -657,11 +657,13 @@ static int smtp_reuse_session(SMTP_STATE *state, DNS_RR **addr_list,
|
||||
DSN_BUF *why = state->why;
|
||||
|
||||
/*
|
||||
* First, search the cache by request nexthop. We truncate the server
|
||||
* address list when all the sessions for this destination are used up,
|
||||
* to reduce the number of variables that need to be checked later.
|
||||
* First, search the cache by delivery request nexthop. We truncate the
|
||||
* server address list when all the sessions for this destination are
|
||||
* used up, to reduce the number of variables that need to be checked
|
||||
* later.
|
||||
*
|
||||
* Note: lookup by logical destination restores the "best MX" bit.
|
||||
* Note: connection reuse by delivery request nexthop restores the "best MX"
|
||||
* bit.
|
||||
*
|
||||
* smtp_reuse_nexthop() clobbers the iterators's "dest" attribute. We save
|
||||
* and restore it here, so that subsequent connections will use the
|
||||
@ -880,10 +882,10 @@ static void smtp_connect_inet(SMTP_STATE *state, const char *nexthop,
|
||||
domain_best_pref = addr_list->pref;
|
||||
|
||||
/*
|
||||
* When session caching is enabled, store the first good session for
|
||||
* this delivery request under the next-hop destination name. All
|
||||
* good sessions will be stored under their specific server IP
|
||||
* address.
|
||||
* When connection caching is enabled, store the first good
|
||||
* connection for this delivery request under the delivery request
|
||||
* next-hop name. Good connections will also be stored under their
|
||||
* specific server IP address.
|
||||
*
|
||||
* XXX smtp_session_cache_destinations specifies domain names without
|
||||
* :port, because : is already used for maptype:mapname. Because of
|
||||
|
@ -51,13 +51,13 @@
|
||||
/* The envelope sender address. This is a proxy for sender-dependent
|
||||
/* context, such as per-sender SASL authentication.
|
||||
/* .IP SMTP_KEY_FLAG_REQ_NEXTHOP
|
||||
/* The request nexthop destination. This is a proxy for
|
||||
/* destination-dependent, but host-independent context.
|
||||
/* The delivery request nexthop destination. This is a proxy
|
||||
/* for destination-dependent, but host-independent context.
|
||||
/* .IP SMTP_KEY_FLAG_CUR_NEXTHOP
|
||||
/* The current iterator's nexthop destination (request nexthop
|
||||
/* or fallback nexthop, including optional [] and :port). This
|
||||
/* is the form that users specify in a SASL or TLS lookup
|
||||
/* tables.
|
||||
/* The current iterator's nexthop destination (delivery request
|
||||
/* nexthop or fallback nexthop, including optional [] and
|
||||
/* :port). This is the form that users specify in a SASL or
|
||||
/* TLS lookup tables.
|
||||
/* .IP SMTP_KEY_FLAG_HOSTNAME
|
||||
/* The current iterator's remote hostname.
|
||||
/* .IP SMTP_KEY_FLAG_ADDR
|
||||
|
@ -36,8 +36,9 @@
|
||||
/* case of a null stream and will assume it was given a different
|
||||
/* purpose.
|
||||
/*
|
||||
/* smtp_session_passivate() flattens an SMTP session so that
|
||||
/* it can be cached. The SMTP_SESSION structure is destroyed.
|
||||
/* smtp_session_passivate() flattens an SMTP session (including
|
||||
/* TLS context) so that it can be cached. The SMTP_SESSION
|
||||
/* structure is destroyed.
|
||||
/*
|
||||
/* smtp_session_activate() inflates a flattened SMTP session
|
||||
/* so that it can be used. The input property arguments are
|
||||
@ -242,10 +243,10 @@ int smtp_session_passivate(SMTP_SESSION *session, VSTRING *dest_prop,
|
||||
int fd;
|
||||
|
||||
/*
|
||||
* Encode the local-to-physical binding properties: whether or not this
|
||||
* server is best MX host for the next-hop or fall-back logical
|
||||
* destination (this information is needed for loop handling in
|
||||
* smtp_proto()).
|
||||
* Encode the delivery request next-hop to endpoint binding properties:
|
||||
* whether or not this server is best MX host for the delivery request
|
||||
* next-hop or fall-back logical destination (this information is needed
|
||||
* for loop handling in smtp_proto()).
|
||||
*
|
||||
* TODO: save SASL username and password information so that we can
|
||||
* correctly save a reused authenticated connection.
|
||||
@ -265,8 +266,8 @@ int smtp_session_passivate(SMTP_SESSION *session, VSTRING *dest_prop,
|
||||
|
||||
/*
|
||||
* Encode the physical endpoint properties: all the session properties
|
||||
* except for "session from cache", "best MX", or "RSET failure".
|
||||
* Plus the TLS level, reuse count, and connection expiration time.
|
||||
* except for "session from cache", "best MX", or "RSET failure". Plus
|
||||
* the TLS level, reuse count, and connection expiration time.
|
||||
*
|
||||
* XXX Should also record how many non-delivering mail transactions there
|
||||
* were during this session, and perhaps other statistics, so that we
|
||||
@ -372,9 +373,9 @@ SMTP_SESSION *smtp_session_activate(int fd, SMTP_ITERATOR *iter,
|
||||
/*
|
||||
* Clobber the iterator's current nexthop, host and address fields with
|
||||
* cached-connection information. This is done when a session is looked
|
||||
* up by request nexthop instead of address and port. It is the caller's
|
||||
* responsibility to save and restore the request nexthop with
|
||||
* SMTP_ITER_SAVE_DEST() and SMTP_ITER_RESTORE_DEST().
|
||||
* up by delivery request nexthop instead of address and port. It is the
|
||||
* caller's responsibility to save and restore the delivery request
|
||||
* nexthop with SMTP_ITER_SAVE_DEST() and SMTP_ITER_RESTORE_DEST().
|
||||
*
|
||||
* TODO: Eliminate the duplication between SMTP_ITERATOR and SMTP_SESSION.
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user