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.
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?
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,
# 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
#
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>
* 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
*/
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 */
(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)
* 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); \
#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 */
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);
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
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
/* 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
/* 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
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.
/*
* 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
/*
* 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.
*