]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-3.4-20181119
authorWietse Venema <wietse@porcupine.org>
Mon, 19 Nov 2018 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <postfix-users@dukhovni.org>
Sun, 25 Nov 2018 18:42:06 +0000 (13:42 -0500)
postfix/HISTORY
postfix/WISHLIST
postfix/makedefs
postfix/src/global/mail_version.h
postfix/src/smtp/smtp.h
postfix/src/smtp/smtp_connect.c
postfix/src/smtp/smtp_key.c
postfix/src/smtp/smtp_session.c

index ac502c1a56ff4229a16a32d98c869b6d3e2b92bc..488629f9862fb0d3c3ad202e408ad55812cc509f 100644 (file)
@@ -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.
index 6b78d3f2f5089831fe9ab64ddc6732e2c17f3939..dfc4353dbbe447874db38a2cf6c7c94ef307bac4 100644 (file)
@@ -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,
index c3efa42c6f28af47bf943401ed9d09904dd6b38e..5b16e1fb308ef978fc67b4d1a4e672aaea678d47 100644 (file)
@@ -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>
index ba90a1ddf2a04304d678aee95372decd1a39d6af..1e927a5a1a208106adaff2f8e281e21952da9723 100644 (file)
@@ -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
index effc658a1327d1d94fffda3c99215d9f461f3a79..051723423a288d1f5a77465b087842dadcf8e1c4 100644 (file)
@@ -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 */
index d5693c7c896a05fe7fb3e53b5d450afdf0603ba2..dc142ff70f2cec3bdedd758a1a08675432353b84 100644 (file)
@@ -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
index 8b5db76a21872b3c4c62c603fe11552e9b2b029d..b11189be4d3eb0015e9507c2d2d08731b39fb2d8 100644 (file)
 /*     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
index 7ae9afd0c2474d6ce4cb135efe0024d3195e5584..3b73e88660873ed8f1f6dafac78754c42020215f 100644 (file)
@@ -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.
      *