Prereq: "2.10.6" diff -ur --new-file /var/tmp/postfix-2.10.6/src/global/mail_version.h ./src/global/mail_version.h --- /var/tmp/postfix-2.10.6/src/global/mail_version.h 2015-02-08 18:18:33.000000000 -0500 +++ ./src/global/mail_version.h 2015-04-12 17:34:37.000000000 -0400 @@ -20,8 +20,8 @@ * Patches change both the patchlevel and the release date. Snapshots have no * patchlevel; they change the release date only. */ -#define MAIL_RELEASE_DATE "20150208" -#define MAIL_VERSION_NUMBER "2.10.6" +#define MAIL_RELEASE_DATE "20150412" +#define MAIL_VERSION_NUMBER "2.10.7" #ifdef SNAPSHOT # define MAIL_VERSION_DATE "-" MAIL_RELEASE_DATE diff -ur --new-file /var/tmp/postfix-2.10.6/HISTORY ./HISTORY --- /var/tmp/postfix-2.10.6/HISTORY 2015-02-08 18:08:54.000000000 -0500 +++ ./HISTORY 2015-04-12 18:40:37.000000000 -0400 @@ -17922,7 +17922,7 @@ 20120824 - Feature: support for "sendmail -R hdrs|full". Jan Kundrát. + Feature: support for "sendmail -R hdrs|full". Jan Kundr?t. File: sendmail/sendmail.c. 20120902 @@ -18402,3 +18402,21 @@ Safety: stop aliasing loops that exponentially increase the address length with each iteration. Back-ported from Postfix 3.0. File: cleanup/cleanup_map1n.c. + +20150324 + + Bugfix (introduced: Postfix 2.6): sender_dependent_relayhost_maps + ignored the relayhost setting in the case of a DUNNO lookup + result. It would use the recipient domain instead. Viktor + Dukhovni. Wietse took the pieces of code that enforce the + precedence of a sender-dependent relayhost, the global + relayhost, and the recipient domain, and put that code + together in once place so that it is easier to maintain. + File: trivial-rewrite/resolve.c. + +20150408 + + Portability: FreeBSD10 support. Files: makedefs, util/sys_defs.h. + + Incompatibility: specifying "make makefiles" with "CC=command" + will no longer override the default WARN setting. diff -ur --new-file /var/tmp/postfix-2.10.6/makedefs ./makedefs --- /var/tmp/postfix-2.10.6/makedefs 2014-01-16 17:07:52.000000000 -0500 +++ ./makedefs 2015-04-09 08:30:07.000000000 -0400 @@ -155,6 +155,9 @@ ;; FreeBSD.9*) SYSTYPE=FREEBSD9 ;; + FreeBSD.10*) SYSTYPE=FREEBSD10 + : ${CC=cc} + ;; OpenBSD.2*) SYSTYPE=OPENBSD2 ;; OpenBSD.3*) SYSTYPE=OPENBSD3 @@ -454,7 +457,6 @@ Darwin.*) SYSTYPE=MACOSX # Use the native compiler by default : ${CC=cc} - CCARGS="$CCARGS \$(WARN)" # Darwin > 1.3 uses awk and flat_namespace case $RELEASE in 1.[0-3]) AWK=gawk;; @@ -656,7 +658,7 @@ # een burned once by a compiler that lies about what warnings it # produces, not taking that chance again. -: ${CC='gcc $(WARN)'} ${OPT='-O'} ${DEBUG='-g'} ${AWK=awk} \ +: ${CC=gcc} ${OPT='-O'} ${DEBUG='-g'} ${AWK=awk} \ ${WARN='-Wall -Wno-comment -Wformat -Wimplicit -Wmissing-prototypes \ -Wparentheses -Wstrict-prototypes -Wswitch -Wuninitialized \ -Wunused -Wno-missing-braces'} @@ -679,7 +681,7 @@ ARFL = $ARFL RANLIB = $RANLIB SYSLIBS = $AUXLIBS $SYSLIBS -CC = $CC $CCARGS +CC = $CC $CCARGS \$(WARN) OPT = $OPT DEBUG = $DEBUG AWK = $AWK diff -ur --new-file /var/tmp/postfix-2.10.6/src/trivial-rewrite/resolve.c ./src/trivial-rewrite/resolve.c --- /var/tmp/postfix-2.10.6/src/trivial-rewrite/resolve.c 2013-05-07 14:41:03.000000000 -0400 +++ ./src/trivial-rewrite/resolve.c 2015-04-09 08:41:21.000000000 -0400 @@ -549,15 +549,20 @@ if (*relay == 0) { msg_warn("%s: ignoring null lookup result for %s", rp->snd_relay_maps_name, sender_key); - relay = "DUNNO"; - } - vstring_strcpy(nexthop, strcasecmp(relay, "DUNNO") == 0 ? - rcpt_domain : relay); + relay = 0; + } else if (strcasecmp(relay, "DUNNO") == 0) + relay = 0; } else if (rp->snd_relay_info && rp->snd_relay_info->error != 0) { msg_warn("%s lookup failure", rp->snd_relay_maps_name); *flags |= RESOLVE_FLAG_FAIL; FREE_MEMORY_AND_RETURN; + } else { + relay = 0; + } + /* Enforce all the relayhost precedences in one place. */ + if (relay != 0) { + vstring_strcpy(nexthop, relay); } else if (*RES_PARAM_VALUE(rp->relayhost)) vstring_strcpy(nexthop, RES_PARAM_VALUE(rp->relayhost)); else diff -ur --new-file /var/tmp/postfix-2.10.6/src/util/sys_defs.h ./src/util/sys_defs.h --- /var/tmp/postfix-2.10.6/src/util/sys_defs.h 2012-09-24 19:53:56.000000000 -0400 +++ ./src/util/sys_defs.h 2015-04-09 08:26:35.000000000 -0400 @@ -25,7 +25,7 @@ */ #if defined(FREEBSD2) || defined(FREEBSD3) || defined(FREEBSD4) \ || defined(FREEBSD5) || defined(FREEBSD6) || defined(FREEBSD7) \ - || defined(FREEBSD8) || defined(FREEBSD9) \ + || defined(FREEBSD8) || defined(FREEBSD9) || defined(FREEBSD10) \ || defined(BSDI2) || defined(BSDI3) || defined(BSDI4) \ || defined(OPENBSD2) || defined(OPENBSD3) || defined(OPENBSD4) \ || defined(OPENBSD5) \