Prereq: "2.6.5"
diff -cr --new-file /var/tmp/postfix-2.6.5/src/global/mail_version.h ./src/global/mail_version.h
*** /var/tmp/postfix-2.6.5/src/global/mail_version.h Fri Aug 28 20:37:10 2009
--- ./src/global/mail_version.h Fri Mar 19 20:01:31 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.6.5"
#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 "20100319"
! #define MAIL_VERSION_NUMBER "2.6.6"
#ifdef SNAPSHOT
# define MAIL_VERSION_DATE "-" MAIL_RELEASE_DATE
diff -cr --new-file /var/tmp/postfix-2.6.5/HISTORY ./HISTORY
*** /var/tmp/postfix-2.6.5/HISTORY Fri Aug 28 20:30:38 2009
--- ./HISTORY Fri Mar 19 19:54:34 2010
***************
*** 15274,15276 ****
--- 15274,15340 ----
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
+ %
! The default poll count is 3. !
Specify 1 to implement a crude form of greylisting, that is, always --- 256,266 ---- of an address verification request in progress.
!By default, the Postfix SMTP server polls the verify(8) service ! up to three times under non-overload conditions, and only once when ! under overload. With Postfix version 2.5 and earlier, the SMTP ! server always polls the verify(8) service up to three times by ! default.
Specify 1 to implement a crude form of greylisting, that is, always diff -cr --new-file /var/tmp/postfix-2.6.5/makedefs ./makedefs *** /var/tmp/postfix-2.6.5/makedefs Mon May 11 17:26:46 2009 --- ./makedefs Sun Oct 18 20:30:12 2009 *************** *** 144,149 **** --- 144,151 ---- ;; FreeBSD.7*) SYSTYPE=FREEBSD7 ;; + FreeBSD.8*) SYSTYPE=FREEBSD8 + ;; OpenBSD.2*) SYSTYPE=OPENBSD2 ;; OpenBSD.3*) SYSTYPE=OPENBSD3 diff -cr --new-file /var/tmp/postfix-2.6.5/man/man5/access.5 ./man/man5/access.5 *** /var/tmp/postfix-2.6.5/man/man5/access.5 Sat Jan 10 15:25:57 2009 --- ./man/man5/access.5 Thu Jan 7 11:12:47 2010 *************** *** 185,193 **** Reject the address etc. that matches the pattern, and respond with the numerical three-digit code and text. \fB4\fINN\fR means "try again later", while \fB5\fINN\fR means "do not try again". .IP ! The reply code "421" causes Postfix to disconnect immediately ! (Postfix version 2.3 and later). .IP "\fBREJECT \fIoptional text...\fR Reject the address etc. that matches the pattern. Reply with "\fB$access_map_reject_code \fIoptional text...\fR" when the --- 185,206 ---- Reject the address etc. that matches the pattern, and respond with the numerical three-digit code and text. \fB4\fINN\fR means "try again later", while \fB5\fINN\fR means "do not try again". + + The following responses have special meaning for the Postfix + SMTP server: + .RS + .IP "\fB421 \fItext\fR (Postfix 2.3 and later)" + .IP "\fB521 \fItext\fR (Postfix 2.6 and later)" + After responding with the numerical three-digit code and + text, disconnect immediately from the SMTP client. This + frees up SMTP server resources so that they can be made + available to another SMTP client. .IP ! Note: The "521" response should be used only with botnets ! and other malware where interoperability is of no concern. ! The "send 521 and disconnect" behavior is NOT defined in ! the SMTP standard. ! .RE .IP "\fBREJECT \fIoptional text...\fR Reject the address etc. that matches the pattern. Reply with "\fB$access_map_reject_code \fIoptional text...\fR" when the diff -cr --new-file /var/tmp/postfix-2.6.5/man/man5/postconf.5 ./man/man5/postconf.5 *** /var/tmp/postfix-2.6.5/man/man5/postconf.5 Wed Jul 15 10:29:39 2009 --- ./man/man5/postconf.5 Fri Mar 19 20:00:19 2010 *************** *** 142,148 **** How many times to query the \fBverify\fR(8) service for the completion of an address verification request in progress. .PP ! The default poll count is 3. .PP Specify 1 to implement a crude form of greylisting, that is, always defer the first delivery request for a never seen before address. --- 142,152 ---- How many times to query the \fBverify\fR(8) service for the completion of an address verification request in progress. .PP ! By default, the Postfix SMTP server polls the \fBverify\fR(8) service ! up to three times under non-overload conditions, and only once when ! under overload. With Postfix version 2.5 and earlier, the SMTP ! server always polls the \fBverify\fR(8) service up to three times by ! default. .PP Specify 1 to implement a crude form of greylisting, that is, always defer the first delivery request for a never seen before address. diff -cr --new-file /var/tmp/postfix-2.6.5/proto/access ./proto/access *** /var/tmp/postfix-2.6.5/proto/access Fri Jan 9 21:08:12 2009 --- ./proto/access Thu Jan 7 10:47:41 2010 *************** *** 165,173 **** # Reject the address etc. that matches the pattern, and respond with # the numerical three-digit code and text. \fB4\fINN\fR means "try # again later", while \fB5\fINN\fR means "do not try again". # .IP ! # The reply code "421" causes Postfix to disconnect immediately ! # (Postfix version 2.3 and later). # .IP "\fBREJECT \fIoptional text...\fR # Reject the address etc. that matches the pattern. Reply with # "\fB$access_map_reject_code \fIoptional text...\fR" when the --- 165,186 ---- # Reject the address etc. that matches the pattern, and respond with # the numerical three-digit code and text. \fB4\fINN\fR means "try # again later", while \fB5\fINN\fR means "do not try again". + # + # The following responses have special meaning for the Postfix + # SMTP server: + # .RS + # .IP "\fB421 \fItext\fR (Postfix 2.3 and later)" + # .IP "\fB521 \fItext\fR (Postfix 2.6 and later)" + # After responding with the numerical three-digit code and + # text, disconnect immediately from the SMTP client. This + # frees up SMTP server resources so that they can be made + # available to another SMTP client. # .IP ! # Note: The "521" response should be used only with botnets ! # and other malware where interoperability is of no concern. ! # The "send 521 and disconnect" behavior is NOT defined in ! # the SMTP standard. ! # .RE # .IP "\fBREJECT \fIoptional text...\fR # Reject the address etc. that matches the pattern. Reply with # "\fB$access_map_reject_code \fIoptional text...\fR" when the diff -cr --new-file /var/tmp/postfix-2.6.5/proto/postconf.proto ./proto/postconf.proto *** /var/tmp/postfix-2.6.5/proto/postconf.proto Wed Jul 15 10:29:26 2009 --- ./proto/postconf.proto Fri Mar 19 18:53:21 2010 *************** *** 287,295 **** of an address verification request in progress.
!! The default poll count is 3. !
Specify 1 to implement a crude form of greylisting, that is, always --- 287,297 ---- of an address verification request in progress.
!By default, the Postfix SMTP server polls the verify(8) service ! up to three times under non-overload conditions, and only once when ! under overload. With Postfix version 2.5 and earlier, the SMTP ! server always polls the verify(8) service up to three times by ! default.
Specify 1 to implement a crude form of greylisting, that is, always diff -cr --new-file /var/tmp/postfix-2.6.5/src/global/cleanup_user.h ./src/global/cleanup_user.h *** /var/tmp/postfix-2.6.5/src/global/cleanup_user.h Thu Feb 7 13:50:11 2008 --- ./src/global/cleanup_user.h Fri Jan 15 16:53:11 2010 *************** *** 65,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) /* * These are set when we can't examine every record of a message. --- 65,72 ---- * 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.6.5/src/global/db_common.c ./src/global/db_common.c *** /var/tmp/postfix-2.6.5/src/global/db_common.c Sun Dec 16 18:52:11 2007 --- ./src/global/db_common.c Mon Oct 5 16:39:46 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.6.5/src/global/mail_params.c ./src/global/mail_params.c *** /var/tmp/postfix-2.6.5/src/global/mail_params.c Thu Jan 22 16:16:49 2009 --- ./src/global/mail_params.c Mon Oct 26 15:34:50 2009 *************** *** 510,516 **** VAR_SYSLOG_FACILITY, DEF_SYSLOG_FACILITY, &var_syslog_facility, 1, 0, VAR_INET_PROTOCOLS, DEF_INET_PROTOCOLS, &var_inet_protocols, 1, 0, VAR_MULTI_CONF_DIRS, DEF_MULTI_CONF_DIRS, &var_multi_conf_dirs, 0, 0, ! VAR_MULTI_WRAPPER, DEF_MULTI_WRAPPER, &var_multi_wrapper, 0, 0, VAR_MULTI_GROUP, DEF_MULTI_GROUP, &var_multi_group, 0, 0, VAR_MULTI_NAME, DEF_MULTI_NAME, &var_multi_name, 0, 0, 0, --- 510,516 ---- VAR_SYSLOG_FACILITY, DEF_SYSLOG_FACILITY, &var_syslog_facility, 1, 0, VAR_INET_PROTOCOLS, DEF_INET_PROTOCOLS, &var_inet_protocols, 1, 0, VAR_MULTI_CONF_DIRS, DEF_MULTI_CONF_DIRS, &var_multi_conf_dirs, 0, 0, ! /* multi_instance_wrapper may have dependencies but not dependents. */ VAR_MULTI_GROUP, DEF_MULTI_GROUP, &var_multi_group, 0, 0, VAR_MULTI_NAME, DEF_MULTI_NAME, &var_multi_name, 0, 0, 0, *************** *** 567,572 **** --- 567,574 ---- VAR_PROXYMAP_SERVICE, DEF_PROXYMAP_SERVICE, &var_proxymap_service, 1, 0, VAR_PROXYWRITE_SERVICE, DEF_PROXYWRITE_SERVICE, &var_proxywrite_service, 1, 0, VAR_INT_FILT_CLASSES, DEF_INT_FILT_CLASSES, &var_int_filt_classes, 0, 0, + /* multi_instance_wrapper may have dependencies but not dependents. */ + VAR_MULTI_WRAPPER, DEF_MULTI_WRAPPER, &var_multi_wrapper, 0, 0, 0, }; static const CONFIG_STR_FN_TABLE function_str_defaults_2[] = { diff -cr --new-file /var/tmp/postfix-2.6.5/src/global/mail_params.h ./src/global/mail_params.h *** /var/tmp/postfix-2.6.5/src/global/mail_params.h Mon May 11 10:48:42 2009 --- ./src/global/mail_params.h Fri Mar 19 17:08:47 2010 *************** *** 2552,2558 **** extern char *var_verify_sender; #define VAR_VERIFY_POLL_COUNT "address_verify_poll_count" ! #define DEF_VERIFY_POLL_COUNT 3 extern int var_verify_poll_count; #define VAR_VERIFY_POLL_DELAY "address_verify_poll_delay" --- 2552,2558 ---- extern char *var_verify_sender; #define VAR_VERIFY_POLL_COUNT "address_verify_poll_count" ! #define DEF_VERIFY_POLL_COUNT "${stress?1}${stress:3}" extern int var_verify_poll_count; #define VAR_VERIFY_POLL_DELAY "address_verify_poll_delay" diff -cr --new-file /var/tmp/postfix-2.6.5/src/milter/milter8.c ./src/milter/milter8.c *** /var/tmp/postfix-2.6.5/src/milter/milter8.c Sat Jul 11 20:27:15 2009 --- ./src/milter/milter8.c Mon Oct 5 16:44:40 2009 *************** *** 2584,2589 **** --- 2584,2596 ---- 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_MORE, 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.6.5/src/pickup/pickup.c ./src/pickup/pickup.c *** /var/tmp/postfix-2.6.5/src/pickup/pickup.c Fri Apr 17 16:03:58 2009 --- ./src/pickup/pickup.c Fri Mar 19 19:02:26 2010 *************** *** 191,200 **** /* * 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); } --- 191,204 ---- /* * 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.6.5/src/postmulti/postmulti.c ./src/postmulti/postmulti.c *** /var/tmp/postfix-2.6.5/src/postmulti/postmulti.c Thu Apr 9 16:56:51 2009 --- ./src/postmulti/postmulti.c Fri Mar 19 16:08:22 2010 *************** *** 1528,1533 **** --- 1528,1535 ---- */ FOREACH_ITERATOR_INSTANCE(iter_flags, entry) { ip = RING_TO_INSTANCE(entry); + if ((iter_flags & ITER_FLAG_SKIP_DISABLED) && !ip->enabled) + continue; if (!match_instance_selection(ip, selection)) continue; matched = 1; diff -cr --new-file /var/tmp/postfix-2.6.5/src/smtpd/smtpd.c ./src/smtpd/smtpd.c *** /var/tmp/postfix-2.6.5/src/smtpd/smtpd.c Tue Apr 28 13:49:23 2009 --- ./src/smtpd/smtpd.c Fri Mar 19 20:44:11 2010 *************** *** 3205,3213 **** 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); } --- 3205,3213 ---- 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); } *************** *** 4464,4470 **** && (err = milter_unknown_event(smtpd_milters, argv[0].strval)) != 0 && (err = check_milter_reply(state, err)) != 0) { ! smtpd_chat_reply(state, err); } else smtpd_chat_reply(state, "502 5.5.2 Error: command not recognized"); state->error_mask |= MAIL_ERROR_PROTOCOL; --- 4464,4470 ---- && (err = milter_unknown_event(smtpd_milters, argv[0].strval)) != 0 && (err = check_milter_reply(state, err)) != 0) { ! smtpd_chat_reply(state, "%s", err); } else smtpd_chat_reply(state, "502 5.5.2 Error: command not recognized"); state->error_mask |= MAIL_ERROR_PROTOCOL; *************** *** 4897,4902 **** --- 4897,4903 ---- VAR_SMTPD_SOFT_ERLIM, DEF_SMTPD_SOFT_ERLIM, &var_smtpd_soft_erlim, 1, 0, VAR_SMTPD_HARD_ERLIM, DEF_SMTPD_HARD_ERLIM, &var_smtpd_hard_erlim, 1, 0, VAR_SMTPD_JUNK_CMD, DEF_SMTPD_JUNK_CMD, &var_smtpd_junk_cmd_limit, 1, 0, + VAR_VERIFY_POLL_COUNT, DEF_VERIFY_POLL_COUNT, &var_verify_poll_count, 1, 0, 0, }; static const CONFIG_INT_TABLE int_table[] = { *************** *** 4925,4931 **** VAR_VIRT_MAILBOX_CODE, DEF_VIRT_MAILBOX_CODE, &var_virt_mailbox_code, 0, 0, VAR_RELAY_RCPT_CODE, DEF_RELAY_RCPT_CODE, &var_relay_rcpt_code, 0, 0, VAR_PLAINTEXT_CODE, DEF_PLAINTEXT_CODE, &var_plaintext_code, 0, 0, - VAR_VERIFY_POLL_COUNT, DEF_VERIFY_POLL_COUNT, &var_verify_poll_count, 1, 0, VAR_SMTPD_CRATE_LIMIT, DEF_SMTPD_CRATE_LIMIT, &var_smtpd_crate_limit, 0, 0, VAR_SMTPD_CCONN_LIMIT, DEF_SMTPD_CCONN_LIMIT, &var_smtpd_cconn_limit, 0, 0, VAR_SMTPD_CMAIL_LIMIT, DEF_SMTPD_CMAIL_LIMIT, &var_smtpd_cmail_limit, 0, 0, --- 4926,4931 ---- diff -cr --new-file /var/tmp/postfix-2.6.5/src/trivial-rewrite/resolve.c ./src/trivial-rewrite/resolve.c *** /var/tmp/postfix-2.6.5/src/trivial-rewrite/resolve.c Fri Oct 3 11:20:22 2008 --- ./src/trivial-rewrite/resolve.c Wed Dec 9 14:46:01 2009 *************** *** 153,158 **** --- 153,159 ---- char *oper; char *junk; const char *relay; + const char *sender_key; *flags = 0; vstring_strcpy(channel, "CHANNEL NOT UPDATED"); *************** *** 508,519 **** * override the recipient domain. */ if (rp->snd_relay_info ! && (relay = mail_addr_find(rp->snd_relay_info, *sender ? ! sender : var_null_relay_maps_key, ! (char **) 0)) != 0) vstring_strcpy(nexthop, strcasecmp(relay, "DUNNO") == 0 ? rcpt_domain : relay); ! else if (*RES_PARAM_VALUE(rp->relayhost)) vstring_strcpy(nexthop, RES_PARAM_VALUE(rp->relayhost)); else vstring_strcpy(nexthop, rcpt_domain); --- 509,530 ---- * override the recipient domain. */ if (rp->snd_relay_info ! && (relay = mail_addr_find(rp->snd_relay_info, ! sender_key = (*sender ? sender : ! var_null_relay_maps_key), ! (char **) 0)) != 0) { ! 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); ! } 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.6.5/src/util/sys_defs.h ./src/util/sys_defs.h *** /var/tmp/postfix-2.6.5/src/util/sys_defs.h Sun May 10 20:45:27 2009 --- ./src/util/sys_defs.h Fri Mar 19 20:24:15 2010 *************** *** 25,30 **** --- 25,31 ---- */ #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) \ *************** *** 110,115 **** --- 111,120 ---- #define HAS_DUPLEX_PIPE /* 4.1 breaks with kqueue(2) */ #endif + #if __FreeBSD_version >= 800098 /* commit: r194262 */ + #define HAS_CLOSEFROM + #endif + /* OpenBSD version is year+month */ #if OpenBSD >= 199805 /* XXX */ *************** *** 1471,1477 **** * 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) --- 1476,1482 ---- * 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) *************** *** 1479,1485 **** #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) --- 1484,1490 ---- #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.6.5/src/util/valid_hostname.c ./src/util/valid_hostname.c *** /var/tmp/postfix-2.6.5/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)