diff --git a/postfix/HISTORY b/postfix/HISTORY index cdfb5aa0b..7e5e9966f 100644 --- a/postfix/HISTORY +++ b/postfix/HISTORY @@ -20122,3 +20122,17 @@ Apologies for any names omitted. action when giving up. The defaults are backwards-compatible. Files: global/mail_params.h, mantools/postlink, proto/postconf.proto, smtpd/smtpd.c, smtpd/smtpd_check.c. + +20140708 + + Bugfix (introduced 20140701): did not restore jumpbuf + while evaluatingsmtpd_policy_service_default_action. + Viktor Dukhovni. File: smtpd/smtpd_check.c. + +20140709 + + Cleanup: bitrot in unused function. File: global/defer.c. + + Cleanup: add SYSLIBS minus static libraries while building + Postfix shared-library objects. Files: makedefs, util/Makefile.in, + global/Makefile.in, dns/Makefile.in, master/Makefile.in/. diff --git a/postfix/RELEASE_NOTES b/postfix/RELEASE_NOTES index 6c5db23ec..9aacafd3a 100644 --- a/postfix/RELEASE_NOTES +++ b/postfix/RELEASE_NOTES @@ -41,6 +41,26 @@ Maintainers may also benefit from the makedefs documentation (mantools/srctoman - makedefs | nroff -man | less) with information about build options that are not described in the INSTALL instructions. +Major changes with snapshot 20140703 +==================================== + +This release introduces three new configuration parameters that +control error recovery for failed SMTPD policy requests. + + * smtpd_policy_service_default_action (default: 451 4.3.5 Server + configuration problem): The default action when an SMTPD policy + service request fails. + + * smtpd_policy_service_try_limit (default: 2): The maximal number + of attempts to send an SMTPD policy service request before + giving up. This must be a number greater than zero. + + * smtpd_policy_service_retry_delay (default: 1s): The delay between + attempts to resend a failed SMTPD policy service request. This + must be a number greater than zero. + +See postconf(5) for details and limitations. + Incompatible changes with snapshot 20140701 =========================================== diff --git a/postfix/WISHLIST b/postfix/WISHLIST index cfa02d813..776877584 100644 --- a/postfix/WISHLIST +++ b/postfix/WISHLIST @@ -8,14 +8,18 @@ Wish list: Things to do after the stable release: + Document and test restriction_classes example for + smtpd_policy_service_default_action. + Don't accept AUTH or other features that are not announced in the EHLO response. Per-Milter error action. Suggested at Mailserver conference: Postscreen RDNS-based - reputation (but this introduces dependency on random DNS - servers). + reputation (but this makes postscreen performance highly + unpredicable because it introduces a dependency on random + DNS servers). Discourage the use of "after 220" tests in POSTSCREEN_README and the documentation of individual parameter settings. diff --git a/postfix/makedefs b/postfix/makedefs index 0b5a7aeed..de8139dfa 100644 --- a/postfix/makedefs +++ b/postfix/makedefs @@ -926,6 +926,7 @@ no|"") SHLIB_CFLAGS= SHLIB_SUFFIX= SHLIB_LD=: + SHLIB_SYSLIBS= SHLIB_RPATH= SHLIB_ENV= LIB_PREFIX= @@ -984,6 +985,21 @@ AUXLIBS_$name = \$AUXLIBS_$name\"" done;; esac +# Remove static libraries from SYSLIBS when building shared objects, +# Can't use the shell "case" patterns to detect names ending in *.a. + +case "$shared" in +yes) SHLIB_SYSLIBS=`${AWK} ' + BEGIN { wc = split("'"$SYSLIBS"'", words) + for (n = 1; n <= wc; n++) + if (words[n] !~ /\.a$/) + printf(" %s", words[n]) + } + '` +esac + +# Finally... + sed 's/ */ /g' <status[0] == '5') return (bounce_append_intern(flags, id, stats, rcpt, relay, dsn_res)); my_dsn = *dsn_res; @@ -312,13 +314,15 @@ int defer_flush(int flags, const char *queue, const char *id, * do not flush the log */ int defer_warn(int flags, const char *queue, const char *id, - const char *sender, const char *envid, int dsn_ret) + const char *encoding, const char *sender, + const char *envid, int dsn_ret) { if (mail_command_client(MAIL_CLASS_PRIVATE, var_defer_service, ATTR_TYPE_INT, MAIL_ATTR_NREQ, BOUNCE_CMD_WARN, ATTR_TYPE_INT, MAIL_ATTR_FLAGS, flags, ATTR_TYPE_STR, MAIL_ATTR_QUEUE, queue, ATTR_TYPE_STR, MAIL_ATTR_QUEUEID, id, + ATTR_TYPE_STR, MAIL_ATTR_ENCODING, encoding, ATTR_TYPE_STR, MAIL_ATTR_SENDER, sender, ATTR_TYPE_STR, MAIL_ATTR_DSN_ENVID, envid, ATTR_TYPE_INT, MAIL_ATTR_DSN_RET, dsn_ret, @@ -352,7 +356,7 @@ int defer_one(int flags, const char *queue, const char *id, * DSN filter (Postfix 2.12). */ if (delivery_status_filter != 0 - && (dsn_res = dsn_filter_lookup(delivery_status_filter, &my_dsn)) != 0) { + && (dsn_res = dsn_filter_lookup(delivery_status_filter, &my_dsn)) != 0) { if (dsn_res->status[0] == '5') return (bounce_one_intern(flags, queue, id, encoding, sender, dsn_envid, dsn_ret, stats, rcpt, diff --git a/postfix/src/global/defer.h b/postfix/src/global/defer.h index 0b6ea4d2f..90f94e20d 100644 --- a/postfix/src/global/defer.h +++ b/postfix/src/global/defer.h @@ -24,7 +24,7 @@ extern int defer_append(int, const char *, MSG_STATS *, RECIPIENT *, extern int defer_flush(int, const char *, const char *, const char *, const char *, const char *, int); extern int defer_warn(int, const char *, const char *, const char *, - const char *, int); + const char *, const char *, int); extern int defer_one(int, const char *, const char *, const char *, const char *, const char *, int, MSG_STATS *, RECIPIENT *, diff --git a/postfix/src/global/mail_version.h b/postfix/src/global/mail_version.h index 6a46a760c..48e87fe72 100644 --- a/postfix/src/global/mail_version.h +++ b/postfix/src/global/mail_version.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 "20140703" +#define MAIL_RELEASE_DATE "20140709" #define MAIL_VERSION_NUMBER "2.12" #ifdef SNAPSHOT diff --git a/postfix/src/master/Makefile.in b/postfix/src/master/Makefile.in index 466159d4c..5d3bacc0d 100644 --- a/postfix/src/master/Makefile.in +++ b/postfix/src/master/Makefile.in @@ -44,7 +44,7 @@ root_tests: $(LIB): $(LIB_OBJ) $(AR) $(ARFL) $(LIB) $? $(RANLIB) $(LIB) - $(SHLIB_LD) -o $(LIB) $(LIB_OBJ) + $(SHLIB_LD) -o $(LIB) $(LIB_OBJ) $(SHLIB_SYSLIBS) $(LIB_DIR)/$(LIB): $(LIB) cp $(LIB) $(LIB_DIR)/$(LIB) diff --git a/postfix/src/smtpd/smtpd_check.c b/postfix/src/smtpd/smtpd_check.c index 6c342ac90..8850cff70 100644 --- a/postfix/src/smtpd/smtpd_check.c +++ b/postfix/src/smtpd/smtpd_check.c @@ -3727,6 +3727,8 @@ static int check_policy_service(SMTPD_STATE *state, const char *server, "policy query", reply_name, reply_class, def_acl); nesting_level -= 1; + memcpy(ADDROF(smtpd_check_buf), ADDROF(savebuf), + sizeof(smtpd_check_buf)); } else { /* diff --git a/postfix/src/util/Makefile.in b/postfix/src/util/Makefile.in index c7ef0a5ec..5a03a52f4 100644 --- a/postfix/src/util/Makefile.in +++ b/postfix/src/util/Makefile.in @@ -143,7 +143,7 @@ test: $(TESTPROG) $(LIB): $(OBJS) $(AR) $(ARFL) $(LIB) $? $(RANLIB) $(LIB) - $(SHLIB_LD) -o $(LIB) $(OBJS) + $(SHLIB_LD) -o $(LIB) $(OBJS) $(SHLIB_SYSLIBS) $(LIB_DIR)/$(LIB): $(LIB) cp $(LIB) $(LIB_DIR)