]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-2.9-20110918
authorWietse Venema <wietse@porcupine.org>
Sun, 18 Sep 2011 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <viktor@dukhovni.org>
Tue, 5 Feb 2013 06:37:27 +0000 (06:37 +0000)
12 files changed:
postfix/HISTORY
postfix/RELEASE_NOTES
postfix/conf/post-install
postfix/html/postconf.5.html
postfix/man/man5/postconf.5
postfix/proto/postconf.proto
postfix/src/cleanup/cleanup_message.c
postfix/src/global/mail_params.h
postfix/src/global/mail_version.h
postfix/src/util/mymalloc.c
postfix/src/util/sys_defs.h
postfix/src/util/vstream_tweak.c

index b64c691447a717f076526ce44ad66b6273dc6bbb..5fdedc08399aba631a05bcfddd95a02f8b61ea94 100644 (file)
@@ -16943,3 +16943,33 @@ Apologies for any names omitted.
        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.
index 3388e2885742e2682550425fab0f5bbd5e10eaee..8079b37525c4fdaf91c8a72925a296ac9f12af47 100644 (file)
@@ -14,6 +14,24 @@ specifies the release date of a stable release or snapshot release.
 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
 ===========================================
 
index 743c69db3fd12221927caa55a0227c366e87ca92..15a674d73d7be4588d6374b2bd9994dc28c40743 100644 (file)
@@ -790,6 +790,18 @@ EOF
 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.
index 18f375a2f85f80aaa56ad5c737fc93dfac75fa11..9f1d76065c7578989286f45b16d4a0a184a504f9 100644 (file)
@@ -3473,7 +3473,7 @@ Examples:
 </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"
@@ -3481,6 +3481,13 @@ 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. </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
@@ -3494,7 +3501,7 @@ IPv6 and IPv4, and each will accept only connections for the
 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>
@@ -3511,8 +3518,8 @@ Examples:
 </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>
@@ -8979,12 +8986,13 @@ This feature is available in Postfix 2.0 and later.
 </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>
 
index b1b33649fed169188bde2a20ef5b8b0ae9c79167..7ab27437caf870c99f0a20d1bd946b03020fcf15 100644 (file)
@@ -1964,13 +1964,19 @@ inet_interfaces = 192.168.1.2, 127.0.0.1
 .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
@@ -1984,7 +1990,7 @@ IPv6 and IPv4, and each will accept only connections for the
 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).
@@ -2001,8 +2007,8 @@ Examples:
 .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
@@ -5213,11 +5219,12 @@ The name of the \fBshowq\fR(8) service. This service produces mail queue
 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)
index 56b36223ab33d247d163f0b0b2de899a8c2d6358..f5f405d9ff9c9f3552237c2aa67557f06cd19624 100644 (file)
@@ -1900,7 +1900,7 @@ inet_interfaces = 127.0.0.1, [::1] (Postfix version 2.2 and later)
 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"
@@ -1908,6 +1908,13 @@ 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. </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
@@ -1921,7 +1928,7 @@ IPv6 and IPv4, and each will accept only connections for the
 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>
@@ -1938,8 +1945,8 @@ Examples:
 </p>
 
 <pre>
-inet_protocols = ipv4 (DEFAULT)
-inet_protocols = all
+inet_protocols = ipv4
+inet_protocols = all (DEFAULT)
 inet_protocols = ipv6
 inet_protocols = ipv4, ipv6
 </pre>
@@ -13138,12 +13145,13 @@ destination with each content_filter value or FILTER action. </p>
 
 <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>
 
index 08f694ad2cd4fe551e4c2b357d0c41d9559b67d4..6e2b85a04738ab0c65c8a79c709d58cf0c70fc01 100644 (file)
@@ -821,6 +821,8 @@ static void cleanup_message_headerbody(CLEANUP_STATE *state, int type,
     /*
      * 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.
      * 
index ebd3c2c7b86301d436e7d4f4e86848f71c9fa564..f181a65d9dee68936ff3c9c765b6e34540d3bdb8 100644 (file)
@@ -3148,7 +3148,7 @@ extern char *var_smtp_body_chks;
 
 #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
index f737cc081091b81a254de1d750325e8026f6f84e..0bedcb73393853741731fc5e13b7a9f2099cd6a9 100644 (file)
@@ -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      "20110907"
+#define MAIL_RELEASE_DATE      "20110918"
 #define MAIL_VERSION_NUMBER    "2.9"
 
 #ifdef SNAPSHOT
index 16df5cc547102a44e988408824f114264b6391fa..be55d0e13d3e9ce98c70e6c302527d21d61c98d9 100644 (file)
@@ -158,7 +158,8 @@ char   *mymalloc(ssize_t len)
     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);
@@ -188,7 +189,8 @@ char   *myrealloc(char *ptr, ssize_t len)
 #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);
index 757e56c69ea1f2e374eb1720c2b6cb001f48b67a..764f3c10bda44200115e980d159d461bc8e31555 100644 (file)
@@ -1337,10 +1337,15 @@ extern int inet_pton(int, const char *, void *);
 #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
 
  /*
index 83340d2377e55718b69c1bd438c471369517b5f4..166ffc0c8e3b34a6cd1ab520e25095be3d425708 100644 (file)
@@ -86,7 +86,7 @@ int     vstream_tweak_sock(VSTREAM *fp)
 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;
 
@@ -99,6 +99,11 @@ int     vstream_tweak_tcp(VSTREAM *fp)
      * 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