From: Wietse Venema Date: Sun, 25 Sep 2016 05:00:00 +0000 (-0500) Subject: postfix-3.2-20160925 X-Git-Tag: v3.2.0-RC1~16 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=39826a67e9ef5bd7cfe6cb97a08713bb185f9fd3;p=thirdparty%2Fpostfix.git postfix-3.2-20160925 --- diff --git a/postfix/HISTORY b/postfix/HISTORY index 7b62d2fc4..15e4052cf 100644 --- a/postfix/HISTORY +++ b/postfix/HISTORY @@ -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. diff --git a/postfix/README_FILES/MYSQL_README b/postfix/README_FILES/MYSQL_README index 169705178..ec94785b4 100644 --- a/postfix/README_FILES/MYSQL_README +++ b/postfix/README_FILES/MYSQL_README @@ -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 + AAddddiittiioonnaall nnootteess +Postfix 3.2 and later read [[cclliieenntt]] option group settings by default. To +disable this, specify no ooppttiioonn__ffiillee and specify "ooppttiioonn__ggrroouupp ==" (i.e. an +empty value). + +Postfix 3.1 and earlier don't read [[cclliieenntt]] option group settings unless a non- +empty ooppttiioonn__ffiillee or ooppttiioonn__ggrroouupp value are specified. To enable this, specify, +for example "ooppttiioonn__ggrroouupp == cclliieenntt". + 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. diff --git a/postfix/RELEASE_NOTES b/postfix/RELEASE_NOTES index 1fe8d8331..03bc062b7 100644 --- a/postfix/RELEASE_NOTES +++ b/postfix/RELEASE_NOTES @@ -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 ==================================== diff --git a/postfix/html/MYSQL_README.html b/postfix/html/MYSQL_README.html index 5506f4820..a01b3fe74 100644 --- a/postfix/html/MYSQL_README.html +++ b/postfix/html/MYSQL_README.html @@ -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

Additional notes

+

Postfix 3.2 and later read [client] option group settings +by default. To disable this, specify no option_file and +specify "option_group =" (i.e. an empty value).

+ +

Postfix 3.1 and earlier don't read [client] option group +settings unless a non-empty option_file or option_group +value are specified. To enable this, specify, for example +"option_group = client".

+

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.

diff --git a/postfix/html/mysql_table.5.html b/postfix/html/mysql_table.5.html index 1d889d246..802ead38f 100644 --- a/postfix/html/mysql_table.5.html +++ b/postfix/html/mysql_table.5.html @@ -225,12 +225,24 @@ MYSQL_TABLE(5) MYSQL_TABLE(5) option_file Read options from the given file instead of the default my.cnf - location. + location. This reads options from the [client] option group, + optionally followed by options from the group given with + option_group. This parameter is available with Postfix 2.11 and later. - option_group - Read options from the given group. + option_group (Postfix >=3.2: client; Postfix <=3.1: empty) + Read options from the given group of the mysql options file, + after reading options from the [client] group. + + Postfix 3.2 and later read [client] option group settings by + default. To disable this specify no option_file and specify + "option_group =" (i.e. an empty value). + + Postfix 3.1 and earlier don't read [client] option group set- + tings unless a non-empty option_file or option_group value are + specified. To enable this, specify, for example, "option_group = + client". This parameter is available with Postfix 2.11 and later. diff --git a/postfix/man/man5/mysql_table.5 b/postfix/man/man5/mysql_table.5 index 4a646f649..2227e268a 100644 --- a/postfix/man/man5/mysql_table.5 +++ b/postfix/man/man5/mysql_table.5 @@ -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" diff --git a/postfix/proto/MYSQL_README.html b/postfix/proto/MYSQL_README.html index b15ee6a6c..78290b24a 100644 --- a/postfix/proto/MYSQL_README.html +++ b/postfix/proto/MYSQL_README.html @@ -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

Additional notes

+

Postfix 3.2 and later read [client] option group settings +by default. To disable this, specify no option_file and +specify "option_group =" (i.e. an empty value).

+ +

Postfix 3.1 and earlier don't read [client] option group +settings unless a non-empty option_file or option_group +value are specified. To enable this, specify, for example +"option_group = client".

+

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.

diff --git a/postfix/proto/mysql_table b/postfix/proto/mysql_table index 30294676b..9e0e7e472 100644 --- a/postfix/proto/mysql_table +++ b/postfix/proto/mysql_table @@ -246,11 +246,23 @@ # 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" diff --git a/postfix/src/global/dict_mysql.c b/postfix/src/global/dict_mysql.c index 732b63c04..3dd7c40d5 100644 --- a/postfix/src/global/dict_mysql.c +++ b/postfix/src/global/dict_mysql.c @@ -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); diff --git a/postfix/src/global/mail_version.h b/postfix/src/global/mail_version.h index 35dd4c389..7369da5fd 100644 --- a/postfix/src/global/mail_version.h +++ b/postfix/src/global/mail_version.h @@ -16,11 +16,11 @@ * 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