that exist inside the master daemon. Files: master/master.h,
master/master_avail.c, master/master_conf.c,
master/master_service.c, master/master_spawn.c.
+
+20110911
+
+ Debugging: report the request size when memory allocation
+ fails. File util/mymalloc.c.
+
+20110914
+
+ Incompatibility: the default inet_protocols value is now
+ "all" instead of "ipv4", meaning use both IPv4 and IPv6.
+ As a compatibility workaround for sites without global IPv6
+ connectivity, the commands "make upgrade" and "postfix
+ upgrade-configuration" append "inet_protocols = ipv4" to
+ main.cf when no explicit setting is present. This compatibility
+ workaround will be phased out in a future release. Files:
+ global/mail_params.h, conf/post-install, proto/postconf.proto.
+
+ Incompatibility: the default smtp_address_preference value
+ is now "any" instead of "ipv6", meaning choose randomly
+ between IPv6 and IPv4. With this the Postfix SMTP client
+ will have more success delivering mail to sites that have
+ problematic IPv6 configurations. Files: global/mail_params.h,
+ proto/postconf.proto.
+
+20110918
+
+ Workaround for multiple ancient FreeBSD getsockopt() bugs
+ after non-blocking connect fails with 'host unreachable'
+ that resulted in a unreasonable memory allocation request.
+ File: util/vstream_tweak.c.
If you upgrade from Postfix 2.7 or earlier, read RELEASE_NOTES-2.8
before proceeding.
+Incompatible changes with snapshot 20110918
+===========================================
+
+The following changes were made in default settings, in preparation
+for general availability of IPv6:
+
+- The default inet_protocols value is now "all" instead of "ipv4",
+ meaning use both IPv4 and IPv6. As a compatibility workaround
+ for sites without global IPv6 connectivity, the commands "make
+ upgrade" and "postfix upgrade-configuration" append "inet_protocols
+ = ipv4" to main.cf when no explicit inet_protocols setting is
+ present. This workaround will be removed in a future release.
+
+- The default smtp_address_preference value is now "any" instead
+ of "ipv6", meaning choose randomly between IPv6 and IPv4. With
+ this the Postfix SMTP client will have more success delivering
+ mail to sites that have problematic IPv6 configurations.
+
Incompatible changes with snapshot 20110321
===========================================
EOF
}
+ # Postfix 2.9.
+ # Safety net for incompatible changes in IPv6 defaults. This
+ # requires that the default is "inet_protocols = ipv4" when
+ # IPv6 support is not compiled in. See util/sys_defs.h.
+
+ test "`$POSTCONF -dh inet_protocols`" = "ipv4" ||
+ test -n "`$POSTCONF -c $config_directory -nh inet_protocols`" || {
+ echo COMPATIBILITY: editing main.cf, setting inet_protocols=ipv4.
+ echo Specify inet_protocols explicitly if you want to enable IPv6.
+ echo In a future release IPv6 will be enabled by default.
+ $POSTCONF -c $config_directory inet_protocols=ipv4 || exit 1
+ }
}
# A reminder if this is the first time Postfix is being installed.
</DD>
<DT><b><a name="inet_protocols">inet_protocols</a>
-(default: ipv4)</b></DT><DD>
+(default: all)</b></DT><DD>
<p> The Internet protocols Postfix will attempt to use when making
or accepting connections. Specify one or more of "ipv4"
"all" is equivalent to "ipv4, ipv6" or "ipv4", depending
on whether the operating system implements IPv6. </p>
+<p> With Postfix 2.8 and earlier the default is "ipv4". For backwards
+compatibility with these releases, the Postfix 2.9 and later upgrade
+procedure appends an explicit "<a href="postconf.5.html#inet_protocols">inet_protocols</a> = ipv4" setting to
+<a href="postconf.5.html">main.cf</a> when no explicit setting is present. This compatibility
+workaround will be phased out as IPv6 deployment becomes more common.
+</p>
+
<p> This feature is available in Postfix 2.2 and later. </p>
<p> Note: you MUST stop and start Postfix after changing this
corresponding protocol. </p>
<p> When IPv4 support is enabled via the <a href="postconf.5.html#inet_protocols">inet_protocols</a> parameter,
-Postfix will to DNS type A record lookups, and will convert
+Postfix will do DNS type A record lookups, and will convert
IPv4-in-IPv6 client IP addresses (::ffff:1.2.3.4) to their original
IPv4 form (1.2.3.4). The latter is needed on hosts that pre-date
IPV6_V6ONLY support (<a href="http://tools.ietf.org/html/rfc3493">RFC 3493</a>). </p>
</p>
<pre>
-<a href="postconf.5.html#inet_protocols">inet_protocols</a> = ipv4 (DEFAULT)
-<a href="postconf.5.html#inet_protocols">inet_protocols</a> = all
+<a href="postconf.5.html#inet_protocols">inet_protocols</a> = ipv4
+<a href="postconf.5.html#inet_protocols">inet_protocols</a> = all (DEFAULT)
<a href="postconf.5.html#inet_protocols">inet_protocols</a> = ipv6
<a href="postconf.5.html#inet_protocols">inet_protocols</a> = ipv4, ipv6
</pre>
</DD>
<DT><b><a name="smtp_address_preference">smtp_address_preference</a>
-(default: ipv6)</b></DT><DD>
+(default: any)</b></DT><DD>
<p> The address type ("ipv6", "ipv4" or "any") that the Postfix
SMTP client will try first, when a destination has IPv6 and IPv4
addresses with equal MX preference. This feature has no effect
-unless the <a href="postconf.5.html#inet_protocols">inet_protocols</a> setting enables both IPv4 and IPv6. </p>
+unless the <a href="postconf.5.html#inet_protocols">inet_protocols</a> setting enables both IPv4 and IPv6.
+With Postfix 2.8 the default is "ipv6". </p>
<p> This feature is available in Postfix 2.8 and later. </p>
.fi
.ad
.ft R
-.SH inet_protocols (default: ipv4)
+.SH inet_protocols (default: all)
The Internet protocols Postfix will attempt to use when making
or accepting connections. Specify one or more of "ipv4"
or "ipv6", separated by whitespace or commas. The form
"all" is equivalent to "ipv4, ipv6" or "ipv4", depending
on whether the operating system implements IPv6.
.PP
+With Postfix 2.8 and earlier the default is "ipv4". For backwards
+compatibility with these releases, the Postfix 2.9 and later upgrade
+procedure appends an explicit "inet_protocols = ipv4" setting to
+main.cf when no explicit setting is present. This compatibility
+workaround will be phased out as IPv6 deployment becomes more common.
+.PP
This feature is available in Postfix 2.2 and later.
.PP
Note: you MUST stop and start Postfix after changing this
corresponding protocol.
.PP
When IPv4 support is enabled via the inet_protocols parameter,
-Postfix will to DNS type A record lookups, and will convert
+Postfix will do DNS type A record lookups, and will convert
IPv4-in-IPv6 client IP addresses (::ffff:1.2.3.4) to their original
IPv4 form (1.2.3.4). The latter is needed on hosts that pre-date
IPV6_V6ONLY support (RFC 3493).
.nf
.na
.ft C
-inet_protocols = ipv4 (DEFAULT)
-inet_protocols = all
+inet_protocols = ipv4
+inet_protocols = all (DEFAULT)
inet_protocols = ipv6
inet_protocols = ipv4, ipv6
.fi
status reports.
.PP
This feature is available in Postfix 2.0 and later.
-.SH smtp_address_preference (default: ipv6)
+.SH smtp_address_preference (default: any)
The address type ("ipv6", "ipv4" or "any") that the Postfix
SMTP client will try first, when a destination has IPv6 and IPv4
addresses with equal MX preference. This feature has no effect
unless the inet_protocols setting enables both IPv4 and IPv6.
+With Postfix 2.8 the default is "ipv6".
.PP
This feature is available in Postfix 2.8 and later.
.SH smtp_always_send_ehlo (default: yes)
inet_interfaces = 192.168.1.2, 127.0.0.1
</pre>
-%PARAM inet_protocols ipv4
+%PARAM inet_protocols all
<p> The Internet protocols Postfix will attempt to use when making
or accepting connections. Specify one or more of "ipv4"
"all" is equivalent to "ipv4, ipv6" or "ipv4", depending
on whether the operating system implements IPv6. </p>
+<p> With Postfix 2.8 and earlier the default is "ipv4". For backwards
+compatibility with these releases, the Postfix 2.9 and later upgrade
+procedure appends an explicit "inet_protocols = ipv4" setting to
+main.cf when no explicit setting is present. This compatibility
+workaround will be phased out as IPv6 deployment becomes more common.
+</p>
+
<p> This feature is available in Postfix 2.2 and later. </p>
<p> Note: you MUST stop and start Postfix after changing this
corresponding protocol. </p>
<p> When IPv4 support is enabled via the inet_protocols parameter,
-Postfix will to DNS type A record lookups, and will convert
+Postfix will do DNS type A record lookups, and will convert
IPv4-in-IPv6 client IP addresses (::ffff:1.2.3.4) to their original
IPv4 form (1.2.3.4). The latter is needed on hosts that pre-date
IPV6_V6ONLY support (RFC 3493). </p>
</p>
<pre>
-inet_protocols = ipv4 (DEFAULT)
-inet_protocols = all
+inet_protocols = ipv4
+inet_protocols = all (DEFAULT)
inet_protocols = ipv6
inet_protocols = ipv4, ipv6
</pre>
<p> This feature is available in Postfix 2.7 and later. </p>
-%PARAM smtp_address_preference ipv6
+%PARAM smtp_address_preference any
<p> The address type ("ipv6", "ipv4" or "any") that the Postfix
SMTP client will try first, when a destination has IPv6 and IPv4
addresses with equal MX preference. This feature has no effect
-unless the inet_protocols setting enables both IPv4 and IPv6. </p>
+unless the inet_protocols setting enables both IPv4 and IPv6.
+With Postfix 2.8 the default is "ipv6". </p>
<p> This feature is available in Postfix 2.8 and later. </p>
/*
* Strip unwanted characters. Don't overwrite the input.
*
+ * XXX Possible space+time optimization: use a bitset.
+ *
* XXX Possible optimization: simplify the loop when the "strip" set
* contains only one character.
*
#define VAR_SMTP_ADDR_PREF "smtp_address_preference"
#ifdef HAS_IPV6
-#define DEF_SMTP_ADDR_PREF INET_PROTO_NAME_IPV6
+#define DEF_SMTP_ADDR_PREF INET_PROTO_NAME_ANY
#else
#define DEF_SMTP_ADDR_PREF INET_PROTO_NAME_IPV4
#endif
* Patches change both the patchlevel and the release date. Snapshots have no
* patchlevel; they change the release date only.
*/
-#define MAIL_RELEASE_DATE "20110907"
+#define MAIL_RELEASE_DATE "20110918"
#define MAIL_VERSION_NUMBER "2.9"
#ifdef SNAPSHOT
len += MYMALLOC_FUZZ;
#endif
if ((real_ptr = (MBLOCK *) malloc(SPACE_FOR(len))) == 0)
- msg_fatal("mymalloc: insufficient memory: %m");
+ msg_fatal("mymalloc: insufficient memory for %ld bytes: %m",
+ (long) len);
CHECK_OUT_PTR(ptr, real_ptr, len);
memset(ptr, FILLER, len);
return (ptr);
#endif
CHECK_IN_PTR(ptr, real_ptr, old_len, "myrealloc");
if ((real_ptr = (MBLOCK *) realloc((char *) real_ptr, SPACE_FOR(len))) == 0)
- msg_fatal("myrealloc: insufficient memory: %m");
+ msg_fatal("myrealloc: insufficient memory for %ld bytes: %m",
+ (long) len);
CHECK_OUT_PTR(ptr, real_ptr, len);
if (len > old_len)
memset(ptr + old_len, FILLER, len - old_len);
#endif
/*
- * Defaults for all systems.
+ * The Postfix 2.9 post-install workaround assumes that the inet_protocols
+ * default value is "ipv4" when Postfix is compiled without IPv6 support.
*/
#ifndef DEF_INET_PROTOCOLS
-#define DEF_INET_PROTOCOLS "ipv4"
+#ifdef HAS_IPV6
+#define DEF_INET_PROTOCOLS INET_PROTO_NAME_ALL
+#else
+#define DEF_INET_PROTOCOLS INET_PROTO_NAME_IPV4
+#endif
#endif
/*
int vstream_tweak_tcp(VSTREAM *fp)
{
const char *myname = "vstream_tweak_tcp";
- int mss;
+ int mss = 0;
SOCKOPT_SIZE mss_len = sizeof(mss);
int err;
* Instead we ask the kernel what the current MSS is, and take appropriate
* action. Linux <= 2.2 getsockopt(TCP_MAXSEG) always returns zero (or
* whatever value was stored last with setsockopt()).
+ *
+ * Some ancient FreeBSD kernels don't report 'host unreachable' errors with
+ * getsockopt(SO_ERROR), and then treat getsockopt(TCP_MAXSEG) as a NOOP,
+ * leaving the mss parameter value unchanged. To work around these two
+ * getsockopt() bugs we set mss = 0, which is a harmless value.
*/
if ((err = getsockopt(vstream_fileno(fp), IPPROTO_TCP, TCP_MAXSEG,
(char *) &mss, &mss_len)) < 0