]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-3.2-20160925
authorWietse Venema <wietse@porcupine.org>
Sun, 25 Sep 2016 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <postfix-users@dukhovni.org>
Sat, 29 Oct 2016 22:59:23 +0000 (18:59 -0400)
postfix/HISTORY
postfix/README_FILES/MYSQL_README
postfix/RELEASE_NOTES
postfix/html/MYSQL_README.html
postfix/html/mysql_table.5.html
postfix/man/man5/mysql_table.5
postfix/proto/MYSQL_README.html
postfix/proto/mysql_table
postfix/src/global/dict_mysql.c
postfix/src/global/mail_version.h

index 7b62d2fc436b4556df6a21ba89adbeb504e0fe83..15e4052cfb4a09c81671a7c3f1329661414dfc1c 100644 (file)
@@ -22508,3 +22508,14 @@ Apologies for any names omitted.
        does not forward SASL login information to other Postfix
        subsystems, and it does not receive SASL login information
        in XFORWARD commands. File/smtpd/smtpd.c.
+
+20160925
+
+       Bugfix (introduced: Postfix 2.11): changed the default MySQL
+       option_group value to "client" to enable the reading of
+       "client" option group settings in the MySQL option file.
+       Specify an empty option_group value to get backwards-compatible
+       behavior.  This fixes a "not found" problem with Postfix
+       queries that contain UTF8-encoded non-ASCII text.  Based
+       on a fix by John Fawcett.  Files: global/dict_mysql.c,
+       proto/mysql_table.
index 169705178e610287046241e0fbc929986efe9ea2..ec94785b468a58fb6b93a2731ddc2eeaf9715f0a 100644 (file)
@@ -94,8 +94,19 @@ where_field = alias
 # Don't forget the leading "AND"!
 additional_conditions = AND status = 'paid'
 
+# For Postfix 2.11 .. 3.1. This is the default as of Postfix 3.2.
+option_group = client
+
 A\bAd\bdd\bdi\bit\bti\bio\bon\bna\bal\bl n\bno\bot\bte\bes\bs
 
+Postfix 3.2 and later read [\b[c\bcl\bli\bie\ben\bnt\bt]\b] option group settings by default. To
+disable this, specify no o\bop\bpt\bti\bio\bon\bn_\b_f\bfi\bil\ble\be and specify "o\bop\bpt\bti\bio\bon\bn_\b_g\bgr\bro\bou\bup\bp =\b=" (i.e. an
+empty value).
+
+Postfix 3.1 and earlier don't read [\b[c\bcl\bli\bie\ben\bnt\bt]\b] option group settings unless a non-
+empty o\bop\bpt\bti\bio\bon\bn_\b_f\bfi\bil\ble\be or o\bop\bpt\bti\bio\bon\bn_\b_g\bgr\bro\bou\bup\bp value are specified. To enable this, specify,
+for example "o\bop\bpt\bti\bio\bon\bn_\b_g\bgr\bro\bou\bup\bp =\b= c\bcl\bli\bie\ben\bnt\bt".
+
 The MySQL configuration interface setup allows for multiple mysql databases:
 you can use one for a virtual table, one for an access table, and one for an
 aliases table if you want.
index 1fe8d8331dc2f663d123fc347fe65c5ba992bfde..03bc062b7128a4575decac33e61059cf9ad97607 100644 (file)
@@ -16,6 +16,16 @@ specifies the release date of a stable release or snapshot release.
 If you upgrade from Postfix 3.0 or earlier, read RELEASE_NOTES-3.1
 before proceeding.
 
+Incompatible changes with snapshot 20160925
+===========================================
+
+In the Postfix MySQL database client, the default option_group value
+has changed to "client", to enable reading of "client" option group
+settings in the MySQL options file. This fixes a "not found" problem
+with Postfix queries that contain UTF8-encoded non-ASCII text.
+Specify an empty option_group value (option_group =) to get
+backwards-compatible behavior.
+
 Major changes with snapshot 20160625
 ====================================
 
index 5506f4820b9e773497d779a081ee0c1082719b73..a01b3fe7470fc39c5c3f6505ddacedd3206ae6a0 100644 (file)
@@ -130,10 +130,22 @@ table = mxaliases
 where_field = alias
 # Don't forget the leading "AND"!
 additional_conditions = AND status = 'paid'
+
+# For Postfix 2.11 .. 3.1. This is the default as of Postfix 3.2.
+option_group = client
 </pre>
 
 <h2>Additional notes</h2>
 
+<p> Postfix 3.2 and later read <b>[client]</b> option group settings
+by default. To disable this, specify no <b>option_file</b> and
+specify "<b>option_group =</b>" (i.e. an empty value).  </p>
+
+<p> Postfix 3.1 and earlier don't read <b>[client]</b> option group
+settings unless a non-empty <b>option_file</b> or <b>option_group</b>
+value are specified. To enable this, specify, for example
+"<b>option_group = client</b>".  </p>
+
 <p> The MySQL configuration interface setup allows for multiple
 mysql databases: you can use one for a virtual table, one for an
 access table, and one for an aliases table if you want. </p>
index 1d889d246951d1b429f063e953e658c33109bfae..802ead38f86cb642837f359aaef788edd4b0f52a 100644 (file)
@@ -225,12 +225,24 @@ MYSQL_TABLE(5)                                                  MYSQL_TABLE(5)
 
        <b>option_file</b>
               Read  options  from the given file instead of the default my.cnf
-              location.
+              location. This reads options from  the  <b>[client]</b>  option  group,
+              optionally  followed  by  options  from  the  group  given  with
+              <b>option_group</b>.
 
               This parameter is available with Postfix 2.11 and later.
 
-       <b>option_group</b>
-              Read options from the given group.
+       <b>option_group (Postfix</b> &gt;<b>=3.2: client; Postfix</b> &lt;<b>=3.1: empty)</b>
+              Read options from the given group of  the  mysql  options  file,
+              after reading options from the <b>[client]</b> group.
+
+              Postfix  3.2  and  later  read <b>[client]</b> option group settings by
+              default. To disable this  specify  no  <b>option_file</b>  and  specify
+              "<b>option_group =</b>" (i.e. an empty value).
+
+              Postfix  3.1  and  earlier don't read <b>[client]</b> option group set-
+              tings unless a non-empty <b>option_file</b> or <b>option_group</b>  value  are
+              specified. To enable this, specify, for example, "<b>option_group =</b>
+              <b>client</b>".
 
               This parameter is available with Postfix 2.11 and later.
 
index 4a646f649300d41591f24d26e58a0e729f117ae1..2227e268a90db27e834b41bdcd92512c84067556 100644 (file)
@@ -258,11 +258,23 @@ limit to 1 ensures that lookups do not return multiple
 values.
 .IP "\fBoption_file\fR"
 Read options from the given file instead of the default my.cnf
-location.
+location. This reads options from the \fB[client]\fR option
+group, optionally followed by options from the group given
+with \fBoption_group\fR.
 .sp
 This parameter is available with Postfix 2.11 and later.
-.IP "\fBoption_group\fR"
-Read options from the given group.
+.IP "\fBoption_group (Postfix >=3.2: client; Postfix <=3.1: empty)\fR"
+Read options from the given group of the mysql options file,
+after reading options from the \fB[client]\fR group.
+.sp
+Postfix 3.2 and later read \fB[client]\fR option group
+settings by default. To disable this specify no \fBoption_file\fR
+and specify "\fBoption_group =\fR" (i.e. an empty value).
+.sp
+Postfix 3.1 and earlier don't read \fB[client]\fR option
+group settings unless a non\-empty \fBoption_file\fR or
+\fBoption_group\fR value are specified. To enable this,
+specify, for example, "\fBoption_group = client\fR".
 .sp
 This parameter is available with Postfix 2.11 and later.
 .IP "\fBtls_cert_file\fR"
index b15ee6a6c2a9dd88a26f05f6f481076495b2d040..78290b24a3831ecdd8f7c557b44c601b1daad7a5 100644 (file)
@@ -130,10 +130,22 @@ table = mxaliases
 where_field = alias
 # Don't forget the leading "AND"!
 additional_conditions = AND status = 'paid'
+
+# For Postfix 2.11 .. 3.1. This is the default as of Postfix 3.2.
+option_group = client
 </pre>
 
 <h2>Additional notes</h2>
 
+<p> Postfix 3.2 and later read <b>[client]</b> option group settings
+by default. To disable this, specify no <b>option_file</b> and
+specify "<b>option_group =</b>" (i.e. an empty value).  </p>
+
+<p> Postfix 3.1 and earlier don't read <b>[client]</b> option group
+settings unless a non-empty <b>option_file</b> or <b>option_group</b>
+value are specified. To enable this, specify, for example
+"<b>option_group = client</b>".  </p>
+
 <p> The MySQL configuration interface setup allows for multiple
 mysql databases: you can use one for a virtual table, one for an
 access table, and one for an aliases table if you want. </p>
index 30294676b02f4d910b5d7a02973c67f0b6e9dc62..9e0e7e472e62c7cc02b0a2f53748237103a509f2 100644 (file)
 #      values.
 # .IP "\fBoption_file\fR"
 #      Read options from the given file instead of the default my.cnf
-#      location.
+#      location. This reads options from the \fB[client]\fR option
+#      group, optionally followed by options from the group given
+#      with \fBoption_group\fR.
 # .sp
 #      This parameter is available with Postfix 2.11 and later.
-# .IP "\fBoption_group\fR"
-#      Read options from the given group.
+# .IP "\fBoption_group (Postfix >=3.2: client; Postfix <=3.1: empty)\fR"
+#      Read options from the given group of the mysql options file,
+#      after reading options from the \fB[client]\fR group.
+# .sp
+#      Postfix 3.2 and later read \fB[client]\fR option group
+#      settings by default. To disable this specify no \fBoption_file\fR
+#      and specify "\fBoption_group =\fR" (i.e. an empty value).
+# .sp
+#      Postfix 3.1 and earlier don't read \fB[client]\fR option
+#      group settings unless a non-empty \fBoption_file\fR or
+#      \fBoption_group\fR value are specified. To enable this,
+#      specify, for example, "\fBoption_group = client\fR".
 # .sp
 #      This parameter is available with Postfix 2.11 and later.
 # .IP "\fBtls_cert_file\fR"
index 732b63c045dbe914cb1eaecaae1a8fb2517ec47d..3dd7c40d519cfb84d917c22ad93a1112eb2a3271 100644 (file)
@@ -565,7 +565,7 @@ static void plmysql_connect_single(DICT_MYSQL *dict_mysql, HOST *host)
        msg_fatal("dict_mysql: insufficient memory");
     if (dict_mysql->option_file)
        mysql_options(host->db, MYSQL_READ_DEFAULT_FILE, dict_mysql->option_file);
-    if (dict_mysql->option_group)
+    if (dict_mysql->option_group && dict_mysql->option_group[0])
        mysql_options(host->db, MYSQL_READ_DEFAULT_GROUP, dict_mysql->option_group);
 #if defined(MYSQL_VERSION_ID) && MYSQL_VERSION_ID >= 40000
     if (dict_mysql->tls_key_file || dict_mysql->tls_cert_file ||
@@ -634,7 +634,7 @@ static void mysql_parse_config(DICT_MYSQL *dict_mysql, const char *mysqlcf)
     dict_mysql->dbname = cfg_get_str(p, "dbname", "", 1, 0);
     dict_mysql->result_format = cfg_get_str(p, "result_format", "%s", 1, 0);
     dict_mysql->option_file = cfg_get_str(p, "option_file", NULL, 0, 0);
-    dict_mysql->option_group = cfg_get_str(p, "option_group", NULL, 0, 0);
+    dict_mysql->option_group = cfg_get_str(p, "option_group", "client", 0, 0);
 #if defined(MYSQL_VERSION_ID) && MYSQL_VERSION_ID >= 40000
     dict_mysql->tls_key_file = cfg_get_str(p, "tls_key_file", NULL, 0, 0);
     dict_mysql->tls_cert_file = cfg_get_str(p, "tls_cert_file", NULL, 0, 0);
index 35dd4c389ddb31e02231ad36cb62c982202c622e..7369da5fd737cc124d8d1c52a2c0119add7b3f2b 100644 (file)
   * snapshots are called a.b-yyyymmdd, where a=major release number, b=minor
   * release number, c=patchlevel, and yyyymmdd is the release date:
   * yyyy=year, mm=month, dd=day.
-  *
+  * 
   * Patches change both the patchlevel and the release date. Snapshots have no
   * patchlevel; they change the release date only.
   */
-#define MAIL_RELEASE_DATE      "20160924"
+#define MAIL_RELEASE_DATE      "20160925"
 #define MAIL_VERSION_NUMBER    "3.2"
 
 #ifdef SNAPSHOT