]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-3.4-20181125
authorWietse Venema <wietse@porcupine.org>
Sun, 25 Nov 2018 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <postfix-users@dukhovni.org>
Sun, 25 Nov 2018 18:43:11 +0000 (13:43 -0500)
20 files changed:
postfix/HISTORY
postfix/README_FILES/DATABASE_README
postfix/WISHLIST
postfix/html/DATABASE_README.html
postfix/html/pipe.8.html
postfix/html/postconf.1.html
postfix/html/postconf.5.html
postfix/man/man1/postconf.1
postfix/man/man5/postconf.5
postfix/man/man8/pipe.8
postfix/proto/DATABASE_README.html
postfix/proto/postconf.proto
postfix/src/global/mail_version.h
postfix/src/pipe/pipe.c
postfix/src/postconf/postconf.c
postfix/src/tlsproxy/tlsproxy.c
postfix/src/util/dict_file.c
postfix/src/util/dict_pcre_file.in
postfix/src/util/dict_pcre_file.map
postfix/src/util/dict_pcre_file.ref

index e6bf8b484fb038508e731ee95e798f471461525d..7dd3a7ddfa02cf12d72783f1cd47e30b93cfcc6b 100644 (file)
@@ -23842,3 +23842,15 @@ Apologies for any names omitted.
        tls_client_init request specifies an unexpected client
        identity, and the test for that condition is now moved to
        the right place. File: tlsproxy/tlsproxy.c.
+
+20181124
+
+       Documentation: clarified the behavior of whitespace within
+       "{}".  Files: proto/DATABASE_README.html, proto/postconf.proto,
+       pipe/pipe.c, postconf/postconf.c,
+
+20181125
+
+       Cleanup: dict_file_to_xxx() takes a list of file names
+       separated by CHARS_COMMA_SP. Shoe-horned into the existing
+       API, make it nicer when there is time. File: util/dict_file.c.
index 7526e0bc1c98cb586c23facb9d2d9e74c1b08a78..97287f32aea56d6d443a9e869eea75b4e27ceb5c 100644 (file)
@@ -215,9 +215,11 @@ To find out what database types your Postfix system supports, use the "p\bpo\bos\bs
     i\bin\bnl\bli\bin\bne\be (read-only)
         A non-shared, in-memory lookup table. Example: "inline:{ key=value,
         { key = text with whitespace or comma }}". Key-value pairs are
-        separated by whitespace or comma; whitespace after "{" and before "}"
-        is ignored. Inline tables eliminate the need to create a database file
-        for just a few fixed elements. See also the static: map type.
+        separated by whitespace or comma; with a key-value pair inside "{}",
+        whitespace is ignored after the opening "{", around the "=" between key
+        and value, and before the closing "}". Inline tables eliminate the need
+        to create a database file for just a few fixed elements. See also the
+        static: map type.
     i\bin\bnt\bte\ber\brn\bna\bal\bl
         A non-shared, in-memory hash table. Its content are lost when a process
         terminates.
@@ -289,8 +291,8 @@ To find out what database types your Postfix system supports, use the "p\bpo\bos\bs
         A table that always returns its name as the lookup result. For example,
         "static:foobar" always returns the string "foobar" as lookup result.
         Specify "static:{ text with whitespace }" when the result contains
-        whitespace; this form ignores whitespace after "{" and before "}". See
-        also the inline: map type.
+        whitespace; this form ignores whitespace after the opening "{" and
+        before the closing "}". See also the inline: map type.
     t\btc\bcp\bp
         TCP/IP client. The protocol is described in tcp_table(5). The lookup
         table name is "tcp:host:port" where "host" specifies a symbolic
index dfc4353dbbe447874db38a2cf6c7c94ef307bac4..928b65fadf5053b0114d6bd05c15fdf6ae6f4b03 100644 (file)
@@ -1,7 +1,10 @@
 Wish list:
 
-       With DICT_FLAG_RHS_IS_FILE, RHS is list of files (insert
-       newline for robustness).
+       Declumsify code that calls vstream_fread() to read data
+       into VSTRING buffer. This needs vstream_fread_buf(VSTREAM *,
+       VSTRING *, ssize_t) which calls VSTRING_SPACE(), appends
+       data to the buffer, and calls VSTRING_AT_OFFSET(). Current
+       code is error-prone.
 
        With DICT_FLAG_RHS_IS_FILE, should dict_update() open a
        file? base64-encode the value?
index 2d134cd44d549efab20b18a8c944a9fd33326dcc..dc10dd50e517a964e75b5c4aaf8d812aaa2bd4b9 100644 (file)
@@ -317,8 +317,10 @@ name as used in "<a href="DATABASE_README.html#types">hash</a>:table" is the dat
 
 <dd> A non-shared, in-memory lookup table. Example: "<a href="DATABASE_README.html#types">inline</a>:{
 <i>key=value</i>, { <i>key = text with whitespace or comma</i> }}".
-Key-value pairs are separated by whitespace or comma; whitespace
-after "{" and before "}" is ignored. Inline tables eliminate the
+Key-value pairs are separated by whitespace or comma; with a key-value
+pair inside "{}", whitespace is ignored after the opening "{",
+around the "=" between key and value, and before the closing "}".
+Inline tables eliminate the
 need to create a database file for just a few fixed elements. See
 also the <a href="DATABASE_README.html#types">static</a>: map type. </dd>
 
@@ -436,7 +438,8 @@ server. See <a href="socketmap_table.5.html">socketmap_table(5)</a> for details.
 For example, "<a href="DATABASE_README.html#types">static</a>:foobar" always returns the string "foobar" as
 lookup result. Specify "<a href="DATABASE_README.html#types">static</a>:{ <i>text with whitespace</i> }"
 when the result contains whitespace; this form ignores whitespace
-after "{" and before "}". See also the <a href="DATABASE_README.html#types">inline</a>: map type.  </dd>
+after the opening "{" and before the closing "}". See also the
+<a href="DATABASE_README.html#types">inline</a>: map type. </dd>
 
 <dt> <b>tcp</b> </dt>
 
index 51504053d65e6654942eea3b79d52effae48efde..d58775b0c38a444de165e049252fef7c1350a01f 100644 (file)
@@ -192,8 +192,8 @@ PIPE(8)                                                                PIPE(8)
               interpreter.
 
               Specify "{" and "}" around command arguments that contain white-
-              space (Postfix 3.0 and later). Whitespace after "{"  and  before
-              "}" is ignored.
+              space (Postfix 3.0 and later). Whitespace after the opening  "{"
+              and before the closing "}" is ignored.
 
               In  the command argument vector, the following macros are recog-
               nized and replaced with corresponding information from the Post-
index b81ec8826fea0280e8d423554934c19b522dc1ca..e6525618b8d4d59950edf76af1914a19b9a59647 100644 (file)
@@ -243,19 +243,20 @@ POSTCONF(1)                                                        POSTCONF(1)
                      A non-shared, in-memory lookup table. Example:  "<b><a href="DATABASE_README.html#types">inline</a>:{</b>
                      <i>key</i><b>=</b><i>value</i><b>,  {</b>  <i>key</i>  <b>=</b>  <i>text with whitespace or comma</i> <b>}}</b>".
                      Key-value pairs are separated  by  whitespace  or  comma;
-                     whitespace  after  "<b>{</b>"  and before "<b>}</b>" is ignored. Inline
-                     tables eliminate the need to create a database  file  for
-                     just  a  few  fixed  elements.   See also the <i><a href="DATABASE_README.html#types">static</a>:</i> map
-                     type.
+                     with  a key-value pair inside "<b>{}</b>", whitespace is ignored
+                     after the opening "<b>{</b>", around the  "<b>=</b>"  between  key  and
+                     value,  and  before the closing "<b>}</b>". Inline tables elimi-
+                     nate the need to create a database file for  just  a  few
+                     fixed elements.  See also the <i><a href="DATABASE_README.html#types">static</a>:</i> map type.
 
                      This feature is available with Postfix 3.0 and later.
 
               <b>internal</b>
-                     A non-shared, in-memory hash table. Its content are  lost
+                     A  non-shared, in-memory hash table. Its content are lost
                      when a process terminates.
 
-              <b>lmdb</b>   OpenLDAP   LMDB  database  (a  memory-mapped,  persistent
-                     file).  Available on systems with support for LMDB  data-
+              <b>lmdb</b>   OpenLDAP  LMDB  database  (a  memory-mapped,   persistent
+                     file).   Available on systems with support for LMDB data-
                      bases.  This is described in <a href="lmdb_table.5.html"><b>lmdb_table</b>(5)</a>.
 
                      This feature is available with Postfix 2.11 and later.
@@ -264,57 +265,57 @@ POSTCONF(1)                                                        POSTCONF(1)
                      LDAP database client. This is described in <a href="ldap_table.5.html"><b>ldap_table</b>(5)</a>.
 
               <b>memcache</b>
-                     Memcache database  client.  This  is  described  in  <a href="memcache_table.5.html"><b>mem-</b></a>
+                     Memcache  database  client.  This  is  described  in <a href="memcache_table.5.html"><b>mem-</b></a>
                      <a href="memcache_table.5.html"><b>cache_table</b>(5)</a>.
 
                      This feature is available with Postfix 2.9 and later.
 
               <b>mysql</b> (read-only)
                      MySQL database client.  Available on systems with support
-                     for MySQL databases.   This  is  described  in  <a href="mysql_table.5.html"><b>mysql_ta-</b></a>
+                     for  MySQL  databases.   This  is  described in <a href="mysql_table.5.html"><b>mysql_ta-</b></a>
                      <a href="mysql_table.5.html"><b>ble</b>(5)</a>.
 
               <b>pcre</b> (read-only)
-                     A  lookup  table based on Perl Compatible Regular Expres-
+                     A lookup table based on Perl Compatible  Regular  Expres-
                      sions.  The file format is described in <a href="pcre_table.5.html"><b>pcre_table</b>(5)</a>.
 
               <b>pgsql</b> (read-only)
-                     PostgreSQL  database  client.  This   is   described   in
+                     PostgreSQL   database   client.   This  is  described  in
                      <a href="pgsql_table.5.html"><b>pgsql_table</b>(5)</a>.
 
                      This feature is available with Postfix 2.1 and later.
 
               <b>pipemap</b> (read-only)
-                     A  lookup  table  that  constructs  a pipeline of tables.
-                     Example: "<b><a href="DATABASE_README.html#types">pipemap</a>:{</b><i>type</i><b>_</b><i>1:name</i><b>_</b><i>1,  ...,  type</i><b>_</b><i>n:name</i><b>_</b><i>n</i><b>}</b>".
-                     Each  "<a href="DATABASE_README.html#types">pipemap</a>:" query is given to the first table.  Each
+                     A lookup table that  constructs  a  pipeline  of  tables.
+                     Example:  "<b><a href="DATABASE_README.html#types">pipemap</a>:{</b><i>type</i><b>_</b><i>1:name</i><b>_</b><i>1,  ..., type</i><b>_</b><i>n:name</i><b>_</b><i>n</i><b>}</b>".
+                     Each "<a href="DATABASE_README.html#types">pipemap</a>:" query is given to the first table.   Each
                      lookup result becomes the query for the next table in the
-                     pipeline,  and  the last table produces the final result.
-                     When any table lookup produces no  result,  the  pipeline
-                     produces  no result. The first and last characters of the
+                     pipeline, and the last table produces the  final  result.
+                     When  any  table  lookup produces no result, the pipeline
+                     produces no result. The first and last characters of  the
                      "<a href="DATABASE_README.html#types">pipemap</a>:" table name must be "<b>{</b>" and "<b>}</b>".  Within these,
                      individual maps are separated with comma or whitespace.
 
                      This feature is available with Postfix 3.0 and later.
 
-              <b>proxy</b>  Postfix  <a href="proxymap.8.html"><b>proxymap</b>(8)</a>  client for shared access to Postfix
+              <b>proxy</b>  Postfix <a href="proxymap.8.html"><b>proxymap</b>(8)</a> client for shared access  to  Postfix
                      databases. The table name syntax is <i>type</i><b>:</b><i>name</i>.
 
                      This feature is available with Postfix 2.0 and later.
 
               <b>randmap</b> (read-only)
-                     An in-memory table that performs random selection.  Exam-
+                     An  in-memory table that performs random selection. Exam-
                      ple:  "<b><a href="DATABASE_README.html#types">randmap</a>:{</b><i>result</i><b>_</b><i>1,  ...,  result</i><b>_</b><i>n</i><b>}</b>".  Each  table
                      query returns a random choice from the specified results.
-                     The  first  and  last  characters of the "<a href="DATABASE_README.html#types">randmap</a>:" table
-                     name must be  "<b>{</b>"  and  "<b>}</b>".   Within  these,  individual
+                     The first and last characters  of  the  "<a href="DATABASE_README.html#types">randmap</a>:"  table
+                     name  must  be  "<b>{</b>"  and  "<b>}</b>".   Within these, individual
                      results are separated with comma or whitespace. To give a
                      specific result more weight, specify it multiple times.
 
                      This feature is available with Postfix 3.0 and later.
 
               <b>regexp</b> (read-only)
-                     A lookup table based on  regular  expressions.  The  file
+                     A  lookup  table  based  on regular expressions. The file
                      format is described in <a href="regexp_table.5.html"><b>regexp_table</b>(5)</a>.
 
               <b>sdbm</b>   An indexed file type based on hashing.  Available on sys-
@@ -323,9 +324,9 @@ POSTCONF(1)                                                        POSTCONF(1)
                      This feature is available with Postfix 2.2 and later.
 
               <b>socketmap</b> (read-only)
-                     Sendmail-style  socketmap  client.  The  table  name   is
-                     <b>inet</b>:<i>host</i>:<i>port</i>:<i>name</i>  for  a  TCP/IP server, or <b>unix</b>:<i>path-</i>
-                     <i>name</i>:<i>name</i> for a UNIX-domain server. This is described  in
+                     Sendmail-style   socketmap  client.  The  table  name  is
+                     <b>inet</b>:<i>host</i>:<i>port</i>:<i>name</i> for a TCP/IP  server,  or  <b>unix</b>:<i>path-</i>
+                     <i>name</i>:<i>name</i>  for a UNIX-domain server. This is described in
                      <a href="socketmap_table.5.html"><b>socketmap_table</b>(5)</a>.
 
                      This feature is available with Postfix 2.10 and later.
@@ -336,12 +337,12 @@ POSTCONF(1)                                                        POSTCONF(1)
                      This feature is available with Postfix 2.8 and later.
 
               <b>static</b> (read-only)
-                     A  table  that  always returns its name as lookup result.
+                     A table that always returns its name  as  lookup  result.
                      For example, <b><a href="DATABASE_README.html#types">static</a>:foobar</b> always returns the string <b>foo-</b>
-                     <b>bar</b>  as lookup result. Specify "<b><a href="DATABASE_README.html#types">static</a>:{</b> <i>text with white-</i>
-                     <i>space</i> <b>}</b>" when the result contains whitespace;  this  form
-                     ignores whitespace after "<b>{</b>" and before "<b>}</b>". See also the
-                     <i><a href="DATABASE_README.html#types">inline</a>:</i> map.
+                     <b>bar</b> as lookup result. Specify "<b><a href="DATABASE_README.html#types">static</a>:{</b> <i>text with  white-</i>
+                     <i>space</i>  <b>}</b>"  when the result contains whitespace; this form
+                     ignores whitespace after the opening "<b>{</b>" and  before  the
+                     closing "<b>}</b>". See also the <i><a href="DATABASE_README.html#types">inline</a>:</i> map.
 
                      The form "<b><a href="DATABASE_README.html#types">static</a>:{</b><i>text</i><b>}</b> is available with Postfix 3.0 and
                      later.
@@ -350,58 +351,58 @@ POSTCONF(1)                                                        POSTCONF(1)
                      TCP/IP client. The protocol is described in <a href="tcp_table.5.html"><b>tcp_table</b>(5)</a>.
 
               <b>texthash</b> (read-only)
-                     Produces similar results as <a href="DATABASE_README.html#types">hash</a>: files, except that  you
-                     don't  need  to run the <a href="postmap.1.html"><b>postmap</b>(1)</a> command before you can
-                     use the file, and that it does not detect  changes  after
+                     Produces  similar results as <a href="DATABASE_README.html#types">hash</a>: files, except that you
+                     don't need to run the <a href="postmap.1.html"><b>postmap</b>(1)</a> command before  you  can
+                     use  the  file, and that it does not detect changes after
                      the file is read.
 
                      This feature is available with Postfix 2.8 and later.
 
               <b>unionmap</b> (read-only)
-                     A  table  that sends each query to multiple lookup tables
-                     and that concatenates all  found  results,  separated  by
+                     A table that sends each query to multiple  lookup  tables
+                     and  that  concatenates  all  found results, separated by
                      comma.  The table name syntax is the same as for <b>pipemap</b>.
 
                      This feature is available with Postfix 3.0 and later.
 
               <b>unix</b> (read-only)
-                     A limited view of the UNIX authentication  database.  The
+                     A  limited  view of the UNIX authentication database. The
                      following tables are implemented:
 
                      <b>unix:passwd.byname</b>
-                            The  table  is the UNIX password database. The key
-                            is a login name.  The result is  a  password  file
+                            The table is the UNIX password database.  The  key
+                            is  a  login  name.  The result is a password file
                             entry in <b>passwd</b>(5) format.
 
                      <b>unix:group.byname</b>
                             The table is the UNIX group database. The key is a
-                            group name.  The result is a group file  entry  in
+                            group  name.   The result is a group file entry in
                             <b>group</b>(5) format.
 
-              Other  table types may exist depending on how Postfix was built.
+              Other table types may exist depending on how Postfix was  built.
 
-       <b>-M</b>     Show <a href="master.5.html"><b>master.cf</b></a> file contents instead of <a href="postconf.5.html"><b>main.cf</b></a>  file  contents.
+       <b>-M</b>     Show  <a href="master.5.html"><b>master.cf</b></a>  file contents instead of <a href="postconf.5.html"><b>main.cf</b></a> file contents.
               Specify <b>-Mf</b> to fold long lines for human readability.
 
               Specify zero or more arguments, each with a <i>service-name</i> or <i>ser-</i>
-              <i>vice-name/service-type</i> pair, where  <i>service-name</i>  is  the  first
-              field  of  a  <a href="master.5.html">master.cf</a>  entry and <i>service-type</i> is one of (<b>inet</b>,
+              <i>vice-name/service-type</i>  pair,  where  <i>service-name</i>  is the first
+              field of a <a href="master.5.html">master.cf</a> entry and <i>service-type</i>  is  one  of  (<b>inet</b>,
               <b>unix</b>, <b>fifo</b>, or <b>pass</b>).
 
-              If <i>service-name</i> or <i>service-name/service-type</i> is specified,  only
-              the  matching  <a href="master.5.html">master.cf</a>  entries  will  be output. For example,
-              "<b>postconf -Mf smtp</b>" will output all services named  "smtp",  and
-              "<b>postconf  -Mf smtp/inet</b>" will output only the smtp service that
-              listens on the network.  Trailing service type fields  that  are
+              If  <i>service-name</i> or <i>service-name/service-type</i> is specified, only
+              the matching <a href="master.5.html">master.cf</a> entries  will  be  output.  For  example,
+              "<b>postconf  -Mf  smtp</b>" will output all services named "smtp", and
+              "<b>postconf -Mf smtp/inet</b>" will output only the smtp service  that
+              listens  on  the network.  Trailing service type fields that are
               omitted will be handled as "*" wildcard fields.
 
               This feature is available with Postfix 2.9 and later. The syntax
-              was changed from "<i>name.type</i>" to "<i>name/type</i>",  and  "*"  wildcard
+              was  changed  from  "<i>name.type</i>" to "<i>name/type</i>", and "*" wildcard
               support was added with Postfix 2.11.
 
        <b>-n</b>     Show only configuration parameters that have explicit <i>name=value</i>
-              settings in <a href="postconf.5.html"><b>main.cf</b></a>.  Specify <b>-nf</b> to fold long lines  for  human
-              readability  (Postfix 2.9 and later). To show settings that dif-
+              settings  in  <a href="postconf.5.html"><b>main.cf</b></a>.  Specify <b>-nf</b> to fold long lines for human
+              readability (Postfix 2.9 and later). To show settings that  dif-
               fer from built-in defaults only, use the following bash syntax:
                   comm -23 &lt;(postconf -n) &lt;(postconf -d)
               Replace  "-23"  with  "-12"  to  show  settings  that  duplicate
@@ -416,38 +417,38 @@ POSTCONF(1)                                                        POSTCONF(1)
 
               This feature is available with Postfix 2.11 and later.
 
-       <b>-P</b>     Show  <a href="master.5.html"><b>master.cf</b></a>  service parameter settings (by default all ser-
-              vices and all parameters),  formatted  as  "<i>service/type/parame-</i>
+       <b>-P</b>     Show <a href="master.5.html"><b>master.cf</b></a> service parameter settings (by default  all  ser-
+              vices  and  all  parameters), formatted as "<i>service/type/parame-</i>
               <i>ter=value</i>", one per line.  Specify <b>-Pf</b> to fold long lines.
 
-              Specify  one  or  more "<i>service/type/parameter</i>" instances on the
-              <a href="postconf.1.html"><b>postconf</b>(1)</a> command line to limit the output  to  parameters  of
-              interest.   Trailing  parameter name or service type fields that
+              Specify one or more "<i>service/type/parameter</i>"  instances  on  the
+              <a href="postconf.1.html"><b>postconf</b>(1)</a>  command  line  to limit the output to parameters of
+              interest.  Trailing parameter name or service type  fields  that
               are omitted will be handled as "*" wildcard fields.
 
               This feature is available with Postfix 2.11 and later.
 
        <b>-t</b> [<i>template</i><b>_</b><i>file</i>]
-              Display the templates for text that appears at the beginning  of
-              delivery  status  notification (DSN) messages, without expanding
+              Display  the templates for text that appears at the beginning of
+              delivery status notification (DSN) messages,  without  expanding
               $<b>name</b> expressions.
 
-              To override the <b><a href="postconf.5.html#bounce_template_file">bounce_template_file</a></b> parameter setting,  specify
-              a  template  file  name  at the end of the "<b>postconf -t</b>" command
-              line. Specify an empty file name to display  built-in  templates
+              To  override the <b><a href="postconf.5.html#bounce_template_file">bounce_template_file</a></b> parameter setting, specify
+              a template file name at the end of  the  "<b>postconf  -t</b>"  command
+              line.  Specify  an empty file name to display built-in templates
               (in shell language: "").
 
               This feature is available with Postfix 2.3 and later.
 
        <b>-T</b> <i>mode</i>
-              If  Postfix  is compiled without TLS support, the <b>-T</b> option pro-
-              duces no output.  Otherwise, if an invalid  <i>mode</i>  is  specified,
-              the  <b>-T</b> option reports an error and exits with a non-zero status
+              If Postfix is compiled without TLS support, the <b>-T</b>  option  pro-
+              duces  no  output.   Otherwise, if an invalid <i>mode</i> is specified,
+              the <b>-T</b> option reports an error and exits with a non-zero  status
               code. The valid modes are:
 
               <b>compile-version</b>
                      Output the OpenSSL version that Postfix was compiled with
-                     (i.e.  the  OpenSSL version in a header file). The output
+                     (i.e. the OpenSSL version in a header file).  The  output
                      format is the same as with the command "<b>openssl version</b>".
 
               <b>run-version</b>
@@ -455,40 +456,40 @@ POSTCONF(1)                                                        POSTCONF(1)
                      runtime (i.e. the OpenSSL version in a shared library).
 
               <b>public-key-algorithms</b>
-                     Output the lower-case names of the  supported  public-key
+                     Output  the  lower-case names of the supported public-key
                      algorithms, one per-line.
 
               This feature is available with Postfix 3.1 and later.
 
-       <b>-v</b>     Enable  verbose  logging  for  debugging  purposes.  Multiple <b>-v</b>
+       <b>-v</b>     Enable verbose  logging  for  debugging  purposes.  Multiple  <b>-v</b>
               options make the software increasingly verbose.
 
-       <b>-x</b>     Expand <i>$name</i> in  <a href="postconf.5.html"><b>main.cf</b></a>  or  <a href="master.5.html"><b>master.cf</b></a>  parameter  values.  The
+       <b>-x</b>     Expand  <i>$name</i>  in  <a href="postconf.5.html"><b>main.cf</b></a>  or  <a href="master.5.html"><b>master.cf</b></a>  parameter values. The
               expansion is recursive.
 
               This feature is available with Postfix 2.10 and later.
 
-       <b>-X</b>     Edit  the  <a href="postconf.5.html"><b>main.cf</b></a> configuration file, and remove the parameters
+       <b>-X</b>     Edit the <a href="postconf.5.html"><b>main.cf</b></a> configuration file, and remove  the  parameters
               named on the <a href="postconf.1.html"><b>postconf</b>(1)</a> command line.  Specify a list of param-
               eter names, not "<i>name=value</i>" pairs.
 
-              With  <b>-M</b>,  edit the <a href="master.5.html"><b>master.cf</b></a> configuration file, and remove one
-              or more service entries as specified with "<i>service/type</i>" on  the
+              With <b>-M</b>, edit the <a href="master.5.html"><b>master.cf</b></a> configuration file, and  remove  one
+              or  more service entries as specified with "<i>service/type</i>" on the
               <a href="postconf.1.html"><b>postconf</b>(1)</a> command line.
 
-              With  <b>-P</b>,  edit the <a href="master.5.html"><b>master.cf</b></a> configuration file, and remove one
+              With <b>-P</b>, edit the <a href="master.5.html"><b>master.cf</b></a> configuration file, and  remove  one
               or more service parameter settings (-o parameter=value settings)
-              as  specified  with  "<i>service/type/parameter</i>" on the <a href="postconf.1.html"><b>postconf</b>(1)</a>
+              as specified with "<i>service/type/parameter</i>"  on  the  <a href="postconf.1.html"><b>postconf</b>(1)</a>
               command line.
 
               In all cases the file is copied to a temporary file then renamed
               into place.  Specify quotes to protect special characters on the
               <a href="postconf.1.html"><b>postconf</b>(1)</a> command line.
 
-              There is no <a href="postconf.1.html"><b>postconf</b>(1)</a> command to perform  the  reverse  opera-
+              There  is  no  <a href="postconf.1.html"><b>postconf</b>(1)</a> command to perform the reverse opera-
               tion.
 
-              This  feature is available with Postfix 2.10 and later.  Support
+              This feature is available with Postfix 2.10 and later.   Support
               for -M and -P was added with Postfix 2.11.
 
        <b>-#</b>     Edit the <a href="postconf.5.html"><b>main.cf</b></a> configuration file, and comment out the parame-
@@ -496,18 +497,18 @@ POSTCONF(1)                                                        POSTCONF(1)
               eters revert to their default values.  Specify a list of parame-
               ter names, not "<i>name=value</i>" pairs.
 
-              With  <b>-M</b>, edit the <a href="master.5.html"><b>master.cf</b></a> configuration file, and comment out
-              one or more service entries as specified with "<i>service/type</i>"  on
+              With <b>-M</b>, edit the <a href="master.5.html"><b>master.cf</b></a> configuration file, and comment  out
+              one  or more service entries as specified with "<i>service/type</i>" on
               the <a href="postconf.1.html"><b>postconf</b>(1)</a> command line.
 
               In all cases the file is copied to a temporary file then renamed
               into place.  Specify quotes to protect special characters on the
               <a href="postconf.1.html"><b>postconf</b>(1)</a> command line.
 
-              There  is  no  <a href="postconf.1.html"><b>postconf</b>(1)</a> command to perform the reverse opera-
+              There is no <a href="postconf.1.html"><b>postconf</b>(1)</a> command to perform  the  reverse  opera-
               tion.
 
-              This feature is available with Postfix 2.6  and  later.  Support
+              This  feature  is  available with Postfix 2.6 and later. Support
               for -M was added with Postfix 2.11.
 
 <b>DIAGNOSTICS</b>
@@ -518,18 +519,18 @@ POSTCONF(1)                                                        POSTCONF(1)
               Directory with Postfix configuration files.
 
 <b>CONFIGURATION PARAMETERS</b>
-       The  following  <a href="postconf.5.html"><b>main.cf</b></a> parameters are especially relevant to this pro-
+       The following <a href="postconf.5.html"><b>main.cf</b></a> parameters are especially relevant to  this  pro-
        gram.
 
-       The text below provides only a parameter summary. See  <a href="postconf.5.html"><b>postconf</b>(5)</a>  for
+       The  text  below provides only a parameter summary. See <a href="postconf.5.html"><b>postconf</b>(5)</a> for
        more details including examples.
 
        <b><a href="postconf.5.html#config_directory">config_directory</a> (see 'postconf -d' output)</b>
-              The  default  location of the Postfix <a href="postconf.5.html">main.cf</a> and <a href="master.5.html">master.cf</a> con-
+              The default location of the Postfix <a href="postconf.5.html">main.cf</a> and  <a href="master.5.html">master.cf</a>  con-
               figuration files.
 
        <b><a href="postconf.5.html#bounce_template_file">bounce_template_file</a> (empty)</b>
-              Pathname of a configuration file with bounce message  templates.
+              Pathname  of a configuration file with bounce message templates.
 
 <b>FILES</b>
        /etc/postfix/<a href="postconf.5.html">main.cf</a>, Postfix configuration parameters
index ff32ae5746070e1e1010e9df1aea05485a37362e..99ce58967ff693747921a276f066590be8bfca11 100644 (file)
@@ -3308,7 +3308,8 @@ time keeping on System-V-ish systems.
 <p>
 Specify a list of names and/or name=value pairs, separated by
 whitespace or comma. Specify "{ name=value }" to protect whitespace
-or comma in parameter values (whitespace after "{" and before "}"
+or comma in parameter values (whitespace after the opening "{" and
+before the closing "}"
 is ignored). The form name=value is supported with Postfix version
 2.1 and later; the use of {} is supported with Postfix 3.0 and
 later.  </p>
@@ -3885,7 +3886,8 @@ environment.  Examples of relevant parameters: </p>
 
 <p> Specify a list of names and/or name=value pairs, separated by
 whitespace or comma. Specify "{ name=value }" to protect whitespace
-or comma in parameter values (whitespace after "{" and before "}"
+or comma in parameter values (whitespace after the opening "{" and
+before the closing "}"
 is ignored). The form name=value is supported with Postfix version
 2.1 and later; the use of {} is supported with Postfix 3.0 and
 later.  </p>
index 4976f50104074f8b5ac12b01edb0f0bc99d41a12..1fb951fdc941c4a71e3f178801a86ef8445a891b 100644 (file)
@@ -274,8 +274,10 @@ with support for Berkeley DB databases.
 A non\-shared, in\-memory lookup table. Example: "\fBinline:{
 \fIkey\fB=\fIvalue\fB, { \fIkey\fB = \fItext with whitespace
 or comma\fB }}\fR". Key\-value pairs are separated by
-whitespace or comma; whitespace after "\fB{\fR" and before "\fB}\fR"
-is ignored. Inline tables eliminate the need to create a
+whitespace or comma; with a key\-value pair inside "\fB{}\fR",
+whitespace is ignored after the opening "\fB{\fR", around
+the "\fB=\fR" between key and value, and before the closing
+"\fB}\fR". Inline tables eliminate the need to create a
 database file for just a few fixed elements.  See also the
 \fIstatic:\fR map type.
 
@@ -359,7 +361,8 @@ A table that always returns its name as lookup result. For
 example, \fBstatic:foobar\fR always returns the string
 \fBfoobar\fR as lookup result. Specify "\fBstatic:{ \fItext
 with whitespace\fB }\fR" when the result contains whitespace;
-this form ignores whitespace after "\fB{\fR" and before
+this form ignores whitespace after the opening "\fB{\fR"
+and before the closing
 "\fB}\fR". See also the \fIinline:\fR map.
 
 The form "\fBstatic:{\fItext\fB}\fR is available with Postfix
index 13e6b2b3ca37accd7e7bff82e1aac97d90ff644a..1b5951a2705e6ab2f25d2aa6044c32e203c6205f 100644 (file)
@@ -2071,7 +2071,8 @@ time keeping on System\-V\-ish systems.
 .PP
 Specify a list of names and/or name=value pairs, separated by
 whitespace or comma. Specify "{ name=value }" to protect whitespace
-or comma in parameter values (whitespace after "{" and before "}"
+or comma in parameter values (whitespace after the opening "{" and
+before the closing "}"
 is ignored). The form name=value is supported with Postfix version
 2.1 and later; the use of {} is supported with Postfix 3.0 and
 later.
@@ -2409,7 +2410,8 @@ Needed to make "\fBpostfix \-c\fR" work.
 .PP
 Specify a list of names and/or name=value pairs, separated by
 whitespace or comma. Specify "{ name=value }" to protect whitespace
-or comma in parameter values (whitespace after "{" and before "}"
+or comma in parameter values (whitespace after the opening "{" and
+before the closing "}"
 is ignored). The form name=value is supported with Postfix version
 2.1 and later; the use of {} is supported with Postfix 3.0 and
 later.
index d6564b71ef86681afeedadc6bce9b8273f11ab1f..9a83d42c1f65a9cccb8a00b264e77d468662ffa9 100644 (file)
@@ -201,7 +201,7 @@ shell meta characters by a shell command interpreter.
 .sp
 Specify "{" and "}" around command arguments that contain
 whitespace (Postfix 3.0 and later). Whitespace
-after "{" and before "}" is ignored.
+after the opening "{" and before the closing "}" is ignored.
 .sp
 In the command argument vector, the following macros are recognized
 and replaced with corresponding information from the Postfix queue
index c6525ed4c2767d677d38373d0b5e26dfb90a4879..828772e78d8211ae2585c6e2b98cbc3ec87caaf0 100644 (file)
@@ -317,8 +317,10 @@ name as used in "hash:table" is the database file name without the
 
 <dd> A non-shared, in-memory lookup table. Example: "inline:{
 <i>key=value</i>, { <i>key = text with whitespace or comma</i> }}".
-Key-value pairs are separated by whitespace or comma; whitespace
-after "{" and before "}" is ignored. Inline tables eliminate the
+Key-value pairs are separated by whitespace or comma; with a key-value
+pair inside "{}", whitespace is ignored after the opening "{",
+around the "=" between key and value, and before the closing "}".
+Inline tables eliminate the
 need to create a database file for just a few fixed elements. See
 also the static: map type. </dd>
 
@@ -436,7 +438,8 @@ server. See socketmap_table(5) for details.  </dd>
 For example, "static:foobar" always returns the string "foobar" as
 lookup result. Specify "static:{ <i>text with whitespace</i> }"
 when the result contains whitespace; this form ignores whitespace
-after "{" and before "}". See also the inline: map type.  </dd>
+after the opening "{" and before the closing "}". See also the
+inline: map type. </dd>
 
 <dt> <b>tcp</b> </dt>
 
index 16d793463b1fdc28085d3e114c7b7ec7f6951978..c2b5294b761168babf24399396d015d2d9bb0c97 100644 (file)
@@ -1447,7 +1447,8 @@ time keeping on System-V-ish systems.
 <p>
 Specify a list of names and/or name=value pairs, separated by
 whitespace or comma. Specify "{ name=value }" to protect whitespace
-or comma in parameter values (whitespace after "{" and before "}"
+or comma in parameter values (whitespace after the opening "{" and
+before the closing "}"
 is ignored). The form name=value is supported with Postfix version
 2.1 and later; the use of {} is supported with Postfix 3.0 and
 later.  </p>
@@ -1918,7 +1919,8 @@ environment.  Examples of relevant parameters: </p>
 
 <p> Specify a list of names and/or name=value pairs, separated by
 whitespace or comma. Specify "{ name=value }" to protect whitespace
-or comma in parameter values (whitespace after "{" and before "}"
+or comma in parameter values (whitespace after the opening "{" and
+before the closing "}"
 is ignored). The form name=value is supported with Postfix version
 2.1 and later; the use of {} is supported with Postfix 3.0 and
 later.  </p>
index b20946ead5f7da0e6eb1f60fbda3f6c893b2b305..592785ce5071761f0c39b86201fb1995b64dfcc0 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      "20181123"
+#define MAIL_RELEASE_DATE      "20181125"
 #define MAIL_VERSION_NUMBER    "3.4"
 
 #ifdef SNAPSHOT
index 5eb5f21b235a5a57cf69fa04dc574e44bbc89fe2..7167d9511ce9f4d125b0a9bbf1781eee17763dc4 100644 (file)
 /* .sp
 /*     Specify "{" and "}" around command arguments that contain
 /*     whitespace (Postfix 3.0 and later). Whitespace
-/*     after "{" and before "}" is ignored.
+/*     after the opening "{" and before the closing "}" is ignored.
 /* .sp
 /*     In the command argument vector, the following macros are recognized
 /*     and replaced with corresponding information from the Postfix queue
index dd8614ab29ff822523e2bf41d5ad925b8ea9ce76..026639ec155ab8786f4bad7859556c1ad684e897 100644 (file)
 /*     A non-shared, in-memory lookup table. Example: "\fBinline:{
 /*     \fIkey\fB=\fIvalue\fB, { \fIkey\fB = \fItext with whitespace
 /*     or comma\fB }}\fR". Key-value pairs are separated by
-/*     whitespace or comma; whitespace after "\fB{\fR" and before "\fB}\fR"
-/*     is ignored. Inline tables eliminate the need to create a
+/*     whitespace or comma; with a key-value pair inside "\fB{}\fR",
+/*     whitespace is ignored after the opening "\fB{\fR", around
+/*     the "\fB=\fR" between key and value, and before the closing
+/*     "\fB}\fR". Inline tables eliminate the need to create a
 /*     database file for just a few fixed elements.  See also the
 /*     \fIstatic:\fR map type.
 /*
 /*     example, \fBstatic:foobar\fR always returns the string
 /*     \fBfoobar\fR as lookup result. Specify "\fBstatic:{ \fItext
 /*     with whitespace\fB }\fR" when the result contains whitespace;
-/*     this form ignores whitespace after "\fB{\fR" and before
+/*     this form ignores whitespace after the opening "\fB{\fR"
+/*     and before the closing
 /*     "\fB}\fR". See also the \fIinline:\fR map.
 /*
 /*     The form "\fBstatic:{\fItext\fB}\fR is available with Postfix
index cf93c6c445e9cb33742b1a2070822e0b68817ebf..64e88ff112c63e745aaf0577a711399d3a37ff3f 100644 (file)
@@ -1026,10 +1026,10 @@ static int tlsp_client_init(TLS_APPL_STATE **client_appl_state,
     /*
      * Use one TLS_APPL_STATE object for all requests that specify the same
      * TLS_CLIENT_INIT_PROPS. Each TLS_APPL_STATE owns an SSL_CTX, which is
-     * expensive.
+     * expensive to create.
      * 
      * First, compute the TLS_APPL_STATE cache lookup key. Save a copy of the
-     * key that corresponds to the pre-jail internal call, which uses the
+     * key that corresponds to the pre-jail internal request, which uses the
      * tlsproxy_client_* settings.
      */
     buf = vstring_alloc(100);
@@ -1042,9 +1042,9 @@ static int tlsp_client_init(TLS_APPL_STATE **client_appl_state,
 
     /*
      * Log a warning if a post-jail request differs from the tlsproxy_client_*
-     * settings AND the request specifies file or directory arguments. Those
-     * are problematic after chroot (pathname resolution) and after dropping
-     * privileges (key files must be root read-only).
+     * settings AND the request specifies file/directory pathname arguments.
+     * Those are problematic after chroot (pathname resolution) and after
+     * dropping privileges (key files must be root read-only).
      * 
      * We can eliminate this complication by adding code that opens a cert/key
      * lookup table at pre-jail time, and by reading cert/key info on-the-fly
@@ -1410,17 +1410,20 @@ static void pre_jail_init(char *unused_name, char **unused_argv)
      * for the minority of sites that want to use TLS connection caching with
      * multiple TLS client identities. To alert the operator, tlsproxy will
      * log a warning when a TLS_CLIENT_INIT message specifies a different
-     * configuration with cert or key pathnames. The workaround is to have
-     * one tlsproxy process per TLS client identity.
+     * configuration than the tlsproxy pre-jail client configuration, and
+     * that different configuration specifies file/directory pathname
+     * arguments. The workaround is to have one tlsproxy process per TLS
+     * client identity.
      * 
      * The general solution for single-identity or multi-identity clients is to
      * stop loading certs and keys from individual files. Instead, have a
      * cert/key map, indexed by client identity, read-only by root. After
-     * opening the map at pre-jail time, tlsproxy can read certs/keys
-     * on-the-fly at post-jail time. This is the approach that was already
-     * proposed for server-side SNI support, and it could be reused here. It
-     * would also end the proliferation of RSA cert/key parameters, DSA
-     * cert/key parameters, EC cert/key parameters, and so on.
+     * opening the map as root at pre-jail time, tlsproxy can read certs/keys
+     * on-the-fly as an unprivileged process at post-jail time. This is the
+     * approach that was already proposed for server-side SNI support, and it
+     * could be reused here. It would also end the proliferation of RSA
+     * cert/key parameters, DSA cert/key parameters, EC cert/key parameters,
+     * and so on.
      * 
      * Horror: In order to create the same pre-jail TLS client context as the
      * one used in the Postfix SMTP client, we have to duplicate intricate
index 2b679c5606841a369568f6a7e6bdbed9dd8b08ec..809af9f65a20fe0d89f74ff6c47c47590398c9c1 100644 (file)
@@ -8,11 +8,11 @@
 /*
 /*     VSTRING *dict_file_to_buf(
 /*     DICT    *dict,
-/*     const char *pathname)
+/*     const char *pathnames)
 /*
 /*     VSTRING *dict_file_to_b64(
 /*     DICT    *dict,
-/*     const char *pathname)
+/*     const char *pathnames)
 /*
 /*     VSTRING *dict_file_from_b64(
 /*     DICT    *dict,
 /*     void    dict_file_purge_buffers(
 /*     DICT    *dict)
 /* DESCRIPTION
-/*     dict_file_to_buf() reads the content of the specified file.
+/*     dict_file_to_buf() reads the content of the specified
+/*     files, with names separated by CHARS_COMMA_SP, while inserting
+/*     a gratuitous newline character between files.
 /*     It returns a pointer to a buffer which is owned by the DICT,
 /*     or a null pointer in case of error.
 /*
-/*     dict_file_to_b64() reads the content of the specified file,
+/*     dict_file_to_b64() reads the content of the specified
+/*     files, with names separated by CHARS_COMMA_SP, while inserting
+/*     a gratuitous newline character between files,
 /*     and converts the result to base64.
 /*     It returns a pointer to a buffer which is owned by the DICT,
 /*     or a null pointer in case of error.
 #define STR(x) vstring_str(x)
 #define LEN(x) VSTRING_LEN(x)
 
-/* dict_file_to_buf - read a file into a buffer */
+/* dict_file_to_buf - read files into a buffer */
 
-VSTRING *dict_file_to_buf(DICT *dict, const char *pathname)
+VSTRING *dict_file_to_buf(DICT *dict, const char *pathnames)
 {
     struct stat st;
-    VSTREAM *fp;
+    VSTREAM *fp = 0;
+    ARGV   *argv;
+    char  **cpp;
 
     /* dict_file_to_buf() postcondition: dict->file_buf exists. */
     if (dict->file_buf == 0)
        dict->file_buf = vstring_alloc(100);
 
-    if ((fp = vstream_fopen(pathname, O_RDONLY, 0)) == 0
-       || fstat(vstream_fileno(fp), &st) < 0) {
-       vstring_sprintf(dict->file_buf, "open %s: %m", pathname);
-       if (fp)
-           vstream_fclose(fp);
-       return (0);
+#define DICT_FILE_ERR_RETURN do { \
+       argv_free(argv); \
+       if (fp) vstream_fclose(fp); \
+       return (0); \
+    } while (0);
+
+    argv = argv_split(pathnames, CHARS_COMMA_SP);
+    if (argv->argc == 0) {
+       vstring_sprintf(dict->file_buf, "empty pathname list: >>%s<<'",
+                       pathnames);
+       DICT_FILE_ERR_RETURN;
     }
     VSTRING_RESET(dict->file_buf);
-    VSTRING_SPACE(dict->file_buf, st.st_size);
-    if (vstream_fread(fp, STR(dict->file_buf), st.st_size) != st.st_size) {
-       vstring_sprintf(dict->file_buf, "read %s: %m", pathname);
-       vstream_fclose(fp);
-       return (0);
+    for (cpp = argv->argv; *cpp; cpp++) {
+       if ((fp = vstream_fopen(*cpp, O_RDONLY, 0)) == 0
+           || fstat(vstream_fileno(fp), &st) < 0) {
+           vstring_sprintf(dict->file_buf, "open %s: %m", *cpp);
+           DICT_FILE_ERR_RETURN;
+       }
+       if (st.st_size > SSIZE_T_MAX - LEN(dict->file_buf)) {
+           vstring_sprintf(dict->file_buf, "file too large: %s", pathnames);
+           DICT_FILE_ERR_RETURN;
+       }
+       VSTRING_SPACE(dict->file_buf, st.st_size);
+       if (vstream_fread(fp, STR(dict->file_buf) + LEN(dict->file_buf),
+                         st.st_size) != st.st_size) {
+           vstring_sprintf(dict->file_buf, "read %s: %m", *cpp);
+           DICT_FILE_ERR_RETURN;
+       }
+       (void) vstream_fclose(fp);
+       VSTRING_AT_OFFSET(dict->file_buf, LEN(dict->file_buf) + st.st_size);
+       if (cpp[1] != 0)
+           VSTRING_ADDCH(dict->file_buf, '\n');
     }
-    (void) vstream_fclose(fp);
-    VSTRING_AT_OFFSET(dict->file_buf, st.st_size);
+    argv_free(argv);
     VSTRING_TERMINATE(dict->file_buf);
     return (dict->file_buf);
 }
 
-/* dict_file_to_b64 - read a file into a base64-encoded buffer */
+/* dict_file_to_b64 - read files into a base64-encoded buffer */
 
-VSTRING *dict_file_to_b64(DICT *dict, const char *pathname)
+VSTRING *dict_file_to_b64(DICT *dict, const char *pathnames)
 {
     ssize_t helper;
 
-    if (dict_file_to_buf(dict, pathname) == 0)
+    if (dict_file_to_buf(dict, pathnames) == 0)
        return (0);
     if (dict->file_b64 == 0)
        dict->file_b64 = vstring_alloc(100);
-    helper = (VSTRING_LEN(dict->file_buf) + 2) / 3;
+    helper = (LEN(dict->file_buf) + 2) / 3;
     if (helper > SSIZE_T_MAX / 4) {
-       vstring_sprintf(dict->file_buf, "file too large: %s", pathname);
+       vstring_sprintf(dict->file_buf, "file too large: %s", pathnames);
        return (0);
     }
     VSTRING_RESET(dict->file_b64);
index fef4146ea9a16bf1c7b7c6fcb30e0eef65d2da20..28c0bd5bdeac4259836f2da888ac59bfa763d29b 100644 (file)
@@ -1,3 +1,4 @@
 get file1
 get file2
 get file3
+get files12
index 1633759c8eeab9caef24b8527efe063d4ca16d62..4fd12e60ecbf17df6312b57b5337ca7a561494d0 100644 (file)
@@ -1,3 +1,6 @@
 /file1/ dict_pcre_file1
 /file2/ dict_pcre_file2
 /file3/ dict_pcre_file3
+/files12/ dict_pcre_file1, dict_pcre_file2
+/files13/ dict_pcre_file1, dict_pcre_file3
+/file-comma/ ,
index 8e58457af82ddf7b32c8b3265c4b0db41c64fdb9..727306d91c37a56f0d01ceaf8cbc31e5a29d7a71 100644 (file)
@@ -1,4 +1,6 @@
 ./dict_open: warning: pcre map dict_pcre_file.map, line 3: open dict_pcre_file3: No such file or directory: skipping this rule
+./dict_open: warning: pcre map dict_pcre_file.map, line 5: open dict_pcre_file3: No such file or directory: skipping this rule
+./dict_open: warning: pcre map dict_pcre_file.map, line 6: empty pathname list: >>,<<': skipping this rule
 owner=untrusted (uid=USER)
 > get file1
 file1=dGhpcy1pcy1maWxlMQo=
@@ -6,3 +8,5 @@ file1=dGhpcy1pcy1maWxlMQo=
 file2=dGhpcy1pcy1maWxlMgo=
 > get file3
 file3: not found
+> get files12
+files12=dGhpcy1pcy1maWxlMQoKdGhpcy1pcy1maWxlMgo=