Prereq: "2.4.13" diff -cr --new-file /var/tmp/postfix-2.4.13/src/global/mail_version.h ./src/global/mail_version.h *** /var/tmp/postfix-2.4.13/src/global/mail_version.h Fri Aug 28 20:45:03 2009 --- ./src/global/mail_version.h Mon Mar 22 19:47:21 2010 *************** *** 20,27 **** * Patches change both the patchlevel and the release date. Snapshots have no * patchlevel; they change the release date only. */ ! #define MAIL_RELEASE_DATE "20090828" ! #define MAIL_VERSION_NUMBER "2.4.13" #ifdef SNAPSHOT # define MAIL_VERSION_DATE "-" MAIL_RELEASE_DATE --- 20,27 ---- * Patches change both the patchlevel and the release date. Snapshots have no * patchlevel; they change the release date only. */ ! #define MAIL_RELEASE_DATE "20090322" ! #define MAIL_VERSION_NUMBER "2.4.14" #ifdef SNAPSHOT # define MAIL_VERSION_DATE "-" MAIL_RELEASE_DATE diff -cr --new-file /var/tmp/postfix-2.4.13/HISTORY ./HISTORY *** /var/tmp/postfix-2.4.13/HISTORY Fri Aug 28 20:32:42 2009 --- ./HISTORY Mon Mar 22 17:38:10 2010 *************** *** 13689,13691 **** --- 13689,13733 ---- Bugfix: don't panic when an unexpected smtpd access map is specified. File: smtpd/smtpd_check.c. + + 20090918 + + Bugfix (introduced Postfix 2.3): with Milter RCPT TO replies + turned off, there was no automatic flush-before-read on the + smtpd-to-milter stream, because the read was done on the + cleanup-to-milter stream. Problem reported by Stephen Warren. + File: milter/milter8.c. + + 20091005 + + Bugfix: core dump while printing error message for malformed + % sequence in LDAP, MySQL or PostgreSQL configuration. + File: global/db_common.c. Fix by Victor Duchovni. + + 20091209 + + Bugfix: sender_dependent_relayhost_maps did not reject an + empty lookup result, and did not recognize lookup errors, + thus treating errors as "not found". Problem found during + code maintenance. File: trivial-rewrite/resolve.c. + + 20100107 + + Bugfix: the pickup daemon did not discard messages that + were requeued after all recipients were delivered (or + bounced), and the cleanup server tried to bounce such + messages. Files: pickup/pickup.c, global/cleanup_user.h. + + 20100115 + + Bugfix: the valid_hostname() fuction did not set the + "non-numeric" flag after encountering the '-' character. + Reported by Jan Schampera. File: util/valid_hostname.c. + + 20100116 + + Workaround: as of Postfix 2.3 the VRFY command did not allow + a mailbox address inside <>, which broke expectations. RFC + 2821 (and 5321) is vague about the VRFY request format, but + spends lots of text on the reply format. File: smtpd/smtpd.c. + diff -cr --new-file /var/tmp/postfix-2.4.13/makedefs ./makedefs *** /var/tmp/postfix-2.4.13/makedefs Sat Mar 24 09:30:18 2007 --- ./makedefs Mon Mar 22 20:05:45 2010 *************** *** 130,135 **** --- 130,139 ---- ;; FreeBSD.6*) SYSTYPE=FREEBSD6 ;; + FreeBSD.7*) SYSTYPE=FREEBSD7 + ;; + FreeBSD.8*) SYSTYPE=FREEBSD8 + ;; OpenBSD.2*) SYSTYPE=OPENBSD2 ;; OpenBSD.3*) SYSTYPE=OPENBSD3 diff -cr --new-file /var/tmp/postfix-2.4.13/src/global/cleanup_user.h ./src/global/cleanup_user.h *** /var/tmp/postfix-2.4.13/src/global/cleanup_user.h Tue Jun 13 17:39:09 2006 --- ./src/global/cleanup_user.h Mon Mar 22 17:34:41 2010 *************** *** 64,70 **** * These are set when we can't bounce even if we were asked to. */ #define CLEANUP_STAT_MASK_CANT_BOUNCE \ ! (CLEANUP_STAT_BAD | CLEANUP_STAT_WRITE | CLEANUP_STAT_DEFER) /* * These are set when we can't examine every record of a message. --- 64,71 ---- * These are set when we can't bounce even if we were asked to. */ #define CLEANUP_STAT_MASK_CANT_BOUNCE \ ! (CLEANUP_STAT_BAD | CLEANUP_STAT_WRITE | CLEANUP_STAT_DEFER \ ! | CLEANUP_STAT_RCPT) /* * These are set when we can't examine every record of a message. diff -cr --new-file /var/tmp/postfix-2.4.13/src/global/db_common.c ./src/global/db_common.c *** /var/tmp/postfix-2.4.13/src/global/db_common.c Thu Jun 15 14:07:15 2006 --- ./src/global/db_common.c Mon Oct 5 16:39:56 2009 *************** *** 228,234 **** break; default: msg_fatal("db_common_parse: %s: Invalid %s template: %s", ! dict->name, query ? "query" : "result", format); } return dynamic; } --- 228,234 ---- break; default: msg_fatal("db_common_parse: %s: Invalid %s template: %s", ! ctx->dict->name, query ? "query" : "result", format); } return dynamic; } diff -cr --new-file /var/tmp/postfix-2.4.13/src/milter/milter8.c ./src/milter/milter8.c *** /var/tmp/postfix-2.4.13/src/milter/milter8.c Sat Jul 11 20:29:05 2009 --- ./src/milter/milter8.c Mon Oct 5 16:46:28 2009 *************** *** 2420,2425 **** --- 2420,2432 ---- if (msg_verbose) msg_info("%s: milter %s", myname, milter->m.name); + /* + * The next read on this Milter socket happens in a different process. It + * will not automatically flush the output buffer in this process. + */ + if (milter->fp) + vstream_fflush(milter->fp); + if (attr_print(stream, ATTR_FLAG_NONE, ATTR_TYPE_STR, MAIL_ATTR_MILT_NAME, milter->m.name, ATTR_TYPE_INT, MAIL_ATTR_MILT_VERS, milter->version, diff -cr --new-file /var/tmp/postfix-2.4.13/src/pickup/pickup.c ./src/pickup/pickup.c *** /var/tmp/postfix-2.4.13/src/pickup/pickup.c Sat Mar 17 14:03:18 2007 --- ./src/pickup/pickup.c Mon Mar 22 17:31:53 2010 *************** *** 194,203 **** /* * XXX If the cleanup server gave a reason, then it was already logged. * Don't bother logging it another time. */ if (reason == 0) msg_warn("%s: %s", info->path, cleanup_strerror(status)); ! return ((status & CLEANUP_STAT_BAD) ? REMOVE_MESSAGE_FILE : KEEP_MESSAGE_FILE); } --- 194,207 ---- /* * XXX If the cleanup server gave a reason, then it was already logged. * Don't bother logging it another time. + * + * XXX Discard a message without recipient. This can happen with "postsuper + * -r" when a message is already delivered (or bounced). The Postfix + * sendmail command rejects submissions without recipients. */ if (reason == 0) msg_warn("%s: %s", info->path, cleanup_strerror(status)); ! return ((status & (CLEANUP_STAT_BAD | CLEANUP_STAT_RCPT)) ? REMOVE_MESSAGE_FILE : KEEP_MESSAGE_FILE); } diff -cr --new-file /var/tmp/postfix-2.4.13/src/smtpd/smtpd.c ./src/smtpd/smtpd.c *** /var/tmp/postfix-2.4.13/src/smtpd/smtpd.c Tue May 6 20:10:44 2008 --- ./src/smtpd/smtpd.c Mon Mar 22 17:38:56 2010 *************** *** 2945,2953 **** smtpd_chat_reply(state, "501 5.1.3 Bad recipient address syntax"); return (-1); } ! /* Not: state->addr_buf */ if (SMTPD_STAND_ALONE(state) == 0 ! && (err = smtpd_check_rcpt(state, argv[1].strval)) != 0) { smtpd_chat_reply(state, "%s", err); return (-1); } --- 2945,2953 ---- smtpd_chat_reply(state, "501 5.1.3 Bad recipient address syntax"); return (-1); } ! /* Use state->addr_buf, with the unquoted result from extract_addr() */ if (SMTPD_STAND_ALONE(state) == 0 ! && (err = smtpd_check_rcpt(state, STR(state->addr_buf))) != 0) { smtpd_chat_reply(state, "%s", err); return (-1); } diff -cr --new-file /var/tmp/postfix-2.4.13/src/trivial-rewrite/resolve.c ./src/trivial-rewrite/resolve.c *** /var/tmp/postfix-2.4.13/src/trivial-rewrite/resolve.c Sun Mar 25 18:34:05 2007 --- ./src/trivial-rewrite/resolve.c Mon Mar 22 17:27:16 2010 *************** *** 509,517 **** */ if (rp->snd_relay_info && *sender && (relay = mail_addr_find(rp->snd_relay_info, sender, ! (char **) 0)) != 0) vstring_strcpy(nexthop, relay); ! else if (*RES_PARAM_VALUE(rp->relayhost)) vstring_strcpy(nexthop, RES_PARAM_VALUE(rp->relayhost)); else vstring_strcpy(nexthop, rcpt_domain); --- 509,526 ---- */ if (rp->snd_relay_info && *sender && (relay = mail_addr_find(rp->snd_relay_info, sender, ! (char **) 0)) != 0) { ! if (*relay == 0) { ! msg_warn("%s: ignoring null lookup result for %s", ! rp->snd_relay_maps_name, sender); ! relay = rcpt_domain; ! } vstring_strcpy(nexthop, relay); ! } else if (dict_errno != 0) { ! msg_warn("%s lookup failure", rp->snd_relay_maps_name); ! *flags |= RESOLVE_FLAG_FAIL; ! FREE_MEMORY_AND_RETURN; ! } else if (*RES_PARAM_VALUE(rp->relayhost)) vstring_strcpy(nexthop, RES_PARAM_VALUE(rp->relayhost)); else vstring_strcpy(nexthop, rcpt_domain); diff -cr --new-file /var/tmp/postfix-2.4.13/src/util/sys_defs.h ./src/util/sys_defs.h *** /var/tmp/postfix-2.4.13/src/util/sys_defs.h Sat Mar 24 18:45:33 2007 --- ./src/util/sys_defs.h Mon Mar 22 20:04:08 2010 *************** *** 24,30 **** * 4.4BSD and close derivatives. */ #if defined(FREEBSD2) || defined(FREEBSD3) || defined(FREEBSD4) \ ! || defined(FREEBSD5) || defined(FREEBSD6) \ || defined(BSDI2) || defined(BSDI3) || defined(BSDI4) \ || defined(OPENBSD2) || defined(OPENBSD3) || defined(OPENBSD4) \ || defined(NETBSD1) || defined(NETBSD2) || defined(NETBSD3) \ --- 24,31 ---- * 4.4BSD and close derivatives. */ #if defined(FREEBSD2) || defined(FREEBSD3) || defined(FREEBSD4) \ ! || defined(FREEBSD5) || defined(FREEBSD6) || defined(FREEBSD7) \ ! || defined(FREEBSD8) \ || defined(BSDI2) || defined(BSDI3) || defined(BSDI4) \ || defined(OPENBSD2) || defined(OPENBSD3) || defined(OPENBSD4) \ || defined(NETBSD1) || defined(NETBSD2) || defined(NETBSD3) \ *************** *** 79,86 **** /* __FreeBSD_version version is major+minor */ ! #if __FreeBSD_version >= 200000 ! #define HAS_DUPLEX_PIPE #endif #if __FreeBSD_version >= 220000 --- 80,87 ---- /* __FreeBSD_version version is major+minor */ ! #if __FreeBSD_version >= 420000 ! #define HAS_DUPLEX_PIPE /* 4.1 breaks with kqueue(2) */ #endif #if __FreeBSD_version >= 220000 *************** *** 97,102 **** --- 98,107 ---- #define SOCKOPT_SIZE socklen_t #endif + #if __FreeBSD_version >= 800107 /* safe; don't believe the experts */ + #define HAS_CLOSEFROM + #endif + /* OpenBSD version is year+month */ #if OpenBSD >= 199805 /* XXX */ *************** *** 1429,1435 **** * sections above. */ #ifndef PRINTFLIKE ! #if (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) || __GNUC__ == 3 #define PRINTFLIKE(x,y) __attribute__ ((format (printf, (x), (y)))) #else #define PRINTFLIKE(x,y) --- 1434,1440 ---- * sections above. */ #ifndef PRINTFLIKE ! #if (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) || __GNUC__ >= 3 #define PRINTFLIKE(x,y) __attribute__ ((format (printf, (x), (y)))) #else #define PRINTFLIKE(x,y) *************** *** 1437,1443 **** #endif #ifndef SCANFLIKE ! #if (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) || __GNUC__ == 3 #define SCANFLIKE(x,y) __attribute__ ((format (scanf, (x), (y)))) #else #define SCANFLIKE(x,y) --- 1442,1448 ---- #endif #ifndef SCANFLIKE ! #if (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) || __GNUC__ >= 3 #define SCANFLIKE(x,y) __attribute__ ((format (scanf, (x), (y)))) #else #define SCANFLIKE(x,y) diff -cr --new-file /var/tmp/postfix-2.4.13/src/util/valid_hostname.c ./src/util/valid_hostname.c *** /var/tmp/postfix-2.4.13/src/util/valid_hostname.c Thu Jun 15 14:07:16 2006 --- ./src/util/valid_hostname.c Fri Jan 15 12:21:26 2010 *************** *** 116,121 **** --- 116,122 ---- } label_length = 0; } else if (ch == '-') { + non_numeric = 1; label_length++; if (label_length == 1 || cp[1] == 0 || cp[1] == '.') { if (gripe)