]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-3.9-20240216
authorWietse Z Venema <wietse@porcupine.org>
Fri, 16 Feb 2024 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <ietf-dane@dukhovni.org>
Mon, 19 Feb 2024 01:04:51 +0000 (20:04 -0500)
19 files changed:
postfix/.indent.pro
postfix/HISTORY
postfix/README_FILES/MONGODB_README
postfix/WISHLIST
postfix/html/MONGODB_README.html
postfix/html/postconf.1.html
postfix/html/postconf.5.html
postfix/man/man1/postconf.1
postfix/man/man5/postconf.5
postfix/proto/MONGODB_README.html
postfix/proto/postconf.proto
postfix/proto/stop
postfix/proto/stop.double-history
postfix/src/global/dict_mongodb.c
postfix/src/global/mail_version.h
postfix/src/postconf/Makefile.in
postfix/src/postconf/postconf.c
postfix/src/postconf/postconf_dbms.c
postfix/src/postconf/test29.ref

index 4ba45d081a72433fe3cfc24cf5b513dba2706927..414c6520405207d735127ff8b71f8fb523c27db1 100644 (file)
@@ -88,6 +88,7 @@
 -TDICT_LDAP
 -TDICT_LMDB
 -TDICT_MC
+-TDICT_MONGODB
 -TDICT_MYSQL
 -TDICT_NI
 -TDICT_NIS
 -TXSASL_SERVER_IMPL
 -TXSASL_SERVER_IMPL_INFO
 -Tbind_props
+-Tbson_iter_t
 -Tcipher_probe_t
 -Td2i_X509_t
 -Tdane_digest
index c900cf30260a707eab8424e663ce4972318f9425..1de0492d300238f471ff8f8cefc80f1ad96ae7e8 100644 (file)
@@ -27874,3 +27874,24 @@ Apologies for any names omitted.
 
        Logging: indicate which (usually, substring) lookups are
        skipped. File: global/maps.c.
+
+20240215
+
+       Portability: Clang versions that predate support for the
+       C23 standard do not allow a declaration immediately after
+       a (switch) label. The workaround is to add a null statement
+       between label and declaration. File: global/dict_mongodb.c.
+
+       Documentation: minor edits. Files: proto/mongodb_README.html,
+       proto/mongodb_table.html.
+
+20240216
+
+       Documentation: dropped text about partial matches from the
+       check_{client,helo,sender,recipient,etrn}_access summaries,
+       deferring to the access(5) manpage for details, for consistency
+       with the check_xx_yy_access features. File: proto/postconf.proto.
+
+       Cleanup: missing mongodb checks in the postconf command,
+       missing mongodb under "postconf -m" manpage entry. Files:
+       postconf/postconf.c, postconf/postconf_dbms.c.
index aaeb71c07d879c482c168ae37f01579f64618c6f..c8b8fc64d7a272f809a67f48cb6305dfbd76f191 100644 (file)
@@ -20,6 +20,7 @@ Topics covered in this document:
   * Example: Mailing lists
   * Example: MongoDB projections
   * Feedback
+  * Credits
 
 B\bBu\bui\bil\bld\bdi\bin\bng\bg P\bPo\bos\bst\btf\bfi\bix\bx w\bwi\bit\bth\bh M\bMo\bon\bng\bgo\boD\bDB\bB s\bsu\bup\bpp\bpo\bor\brt\bt
 
@@ -27,10 +28,11 @@ These instructions assume that you build Postfix from source code as described
 in the INSTALL document. Some modification may be required if you build Postfix
 from a vendor-specific source package.
 
-The Postfix MongoDB client requires the mongo-c-driver library. This can be
-built from source code from the mongod-c project, or as a binary package from
-your OS distribution, typically named m\bmo\bon\bng\bgo\bo-\b-c\bc-\b-d\bdr\bri\biv\bve\ber\br-\b-d\bde\bev\bve\bel\bl or l\bli\bib\bbm\bmo\bon\bng\bgo\boc\bc-\b-d\bde\bev\bv.
-Installing the mongo-c-driver library may also install l\bli\bib\bbb\bbs\bso\bon\bn as a dependency.
+The Postfix MongoDB client requires the m\bmo\bon\bng\bgo\bo-\b-c\bc-\b-d\bdr\bri\biv\bve\ber\br library. This can be
+built from source code from the mongod-c project, or this can be installed as a
+binary package from your OS distribution, typically named m\bmo\bon\bng\bgo\bo-\b-c\bc-\b-d\bdr\bri\biv\bve\ber\br,
+m\bmo\bon\bng\bgo\bo-\b-c\bc-\b-d\bdr\bri\biv\bve\ber\br-\b-d\bde\bev\bve\bel\bl or l\bli\bib\bbm\bmo\bon\bng\bgo\boc\bc-\b-d\bde\bev\bv. Installing the mongo-c-driver library
+may also install l\bli\bib\bbb\bbs\bso\bon\bn as a dependency.
 
 To build Postfix with mongodb map support, add to the CCARGS environment
 variable the options -DHAS_MONGODB and -I for the directory containing the
@@ -95,6 +97,15 @@ provided credentials, and search for any entries whose username is, or alias
 field has "admin@example.com". It will return the username attribute of those
 found, and build a list of their email addresses.
 
+Notes:
+
+  * As with p\bpr\bro\boj\bje\bec\bct\bti\bio\bon\bn (see below), the Postfix mongodb client automatically
+    removes the top-level '_id' field from a result_attribute result.
+
+  * The Postfix mongodb client will only parse result fields with data types
+    UTF8, INT32, INT64 and ARRAY. Other fields will be ignored, with a warning
+    in the logs.
+
 E\bEx\bxa\bam\bmp\bpl\ble\be:\b: M\bMa\bai\bil\bli\bin\bng\bg l\bli\bis\bst\bts\bs
 
 When it comes to mailing lists, one way of implementing one would be as below:
@@ -110,8 +121,8 @@ addresses in this list.
 
 Notes:
 
-  * As with p\bpr\bro\boj\bje\bec\bct\bti\bio\bon\bn, the Postfix mongodb client automatically removes the
-    top-level '_id' field from a result.
+  * As with p\bpr\bro\boj\bje\bec\bct\bti\bio\bon\bn (see below), the Postfix mongodb client automatically
+    removes the top-level '_id' field from a result_attribute result.
 
   * The Postfix mongodb client will only parse result fields with data types
     UTF8, INT32, INT64 and ARRAY. Other fields will be ignored, with a warning
@@ -167,3 +178,11 @@ postconf, which libraries you built with, and such. If your question involves
 your database contents, please include the applicable bits of some database
 entries.
 
+C\bCr\bre\bed\bdi\bit\bts\bs
+
+  * Stephan Ferraro (Aionda GmbH) implemented an early version of the Postfix
+    MongoDB client.
+  * Hamid Maadani (Dextrous Technologies, LLC) added support for projections
+    and %letter interpolation, and added documentation.
+  * Wietse Venema adopted and restructured the code and documentation.
+
index d9610bb9148ab9e1f5c2dfa7c5b990baa2bb1daa..88c66fb1e8415caf0603c422fe485138bcb84a39 100644 (file)
@@ -1,5 +1,7 @@
 Wish list:
 
+       The postconf command needs more mongodb tests.
+
        Things to do before the stable release:
 
        make pre-release-check, HTML validator check.
index 7835bab785e15e1a8a85336d765f1d810b17bc49..a05d1f5bf7ff40957ac1c4ac84118dbedac0ef77 100644 (file)
@@ -28,6 +28,7 @@ without the hassle and delay of having to copy it to each. </p>
 <li><a href="#example_mailing_list">Example: Mailing lists</a>
 <li><a href="#example_projections">Example: MongoDB projections</a>
 <li><a href="#feedback">Feedback</a>
+<li><a href="#credits">Credits</a>
 </ul>
 
 <h2><a name="build">Building Postfix with MongoDB support</a></h2>
@@ -37,11 +38,12 @@ code as described in the <a href="INSTALL.html">INSTALL</a> document. Some modif
 be required if you build Postfix from a vendor-specific source
 package. </p>
 
-<p>The Postfix MongoDB client requires the mongo-c-driver library.
-This can be built from source code from <a
+<p>The Postfix MongoDB client requires the <b>mongo-c-driver</b>
+library. This can be built from source code from <a
 href="https://github.com/mongodb/mongo-c-driver/releases">the
-mongod-c project</a>, or as a binary package from your OS distribution,
-typically named <b>mongo-c-driver-devel</b> or <b>libmongoc-dev</b>.
+mongod-c project</a>, or this can be installed as a binary package
+from your OS distribution, typically named <b>mongo-c-driver</b>,
+<b>mongo-c-driver-devel</b> or <b>libmongoc-dev</b>.
 Installing the mongo-c-driver library may also install <b>libbson</b>
 as a dependency. </p>
 
@@ -129,6 +131,20 @@ entries whose username is, or alias field has "admin@example.com".
 It will return the username attribute of those found, and build a
 list of their email addresses. </p>
 
+<p> Notes: </p>
+
+<ul>
+
+<li><p> As with <b>projection</b> (see below), the Postfix mongodb
+client automatically removes the top-level '_id' field from a
+result_attribute result. </p> </li>
+
+<li><p> The Postfix mongodb client will only parse result fields
+with data types UTF8, INT32, INT64 and ARRAY. Other fields will be
+ignored, with a warning in the logs. </p> </li>
+
+</ul>
+
 <h2><a name="example_mailing_list">Example: Mailing lists</a></h2>
 
 <p>When it comes to mailing lists, one way of implementing one would
@@ -155,9 +171,9 @@ result_attribute = address
 
 <ul>
 
-<li><p> As with <b>projection</b>, the Postfix mongodb client
-automatically removes the top-level '_id' field from a result. </p>
-</li>
+<li><p> As with <b>projection</b> (see below), the Postfix mongodb
+client automatically removes the top-level '_id' field from a
+result_attribute result. </p> </li>
 
 <li><p> The Postfix mongodb client will only parse result fields
 with data types UTF8, INT32, INT64 and ARRAY. Other fields will be
@@ -219,6 +235,7 @@ with a warning in the logs. It is suggested to exclude any unnecessary
 fields when using a projection. </p></li>
 
 </ul>
+
 <h2><a name="feedback">Feedback</a></h2>
 
 <p> If you have questions, send them to postfix-users@postfix.org.
@@ -227,6 +244,20 @@ MongoDB-related output from postconf, which libraries you built
 with, and such. If your question involves your database contents,
 please include the applicable bits of some database entries. </p>
 
+<h2><a name="credits">Credits</a></h2>
+
+<ul>
+
+<li> Stephan Ferraro (Aionda GmbH) implemented an early version of the
+Postfix MongoDB client.
+
+<li> Hamid Maadani (Dextrous Technologies, LLC) added support for
+projections and %<i>letter</i> interpolation, and added documentation.
+
+<li> Wietse Venema adopted and restructured the code and documentation.
+
+</ul>
+
 </body>
 
 </html>
index 4269a5e126300b4c7f9eade55bb96b0bb2be5ab4..25441c31608c5404a87b21db10b19fe143e843e1 100644 (file)
@@ -272,52 +272,58 @@ POSTCONF(1)                                                        POSTCONF(1)
 
                      This feature is available with Postfix 2.9 and later.
 
+              <b>mongodb</b>
+                     MongoDB database client. This is described in <a href="mongodb_table.5.html"><b>mongodb_ta-</b></a>
+                     <a href="mongodb_table.5.html"><b>ble</b>(5)</a>.
+
+                     This feature is available with Postfix 3.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-
@@ -326,9 +332,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.
@@ -339,11 +345,11 @@ 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 the opening "<b>{</b>" and before the
+                     <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
@@ -353,66 +359,66 @@ 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:
                   LANG=C comm -23 &lt;(postconf -n) &lt;(postconf -d)
               Replace  "-23"  with  "-12"  to  show  settings  that  duplicate
               built-in defaults.
 
        <b>-o</b> <i>name=value</i>
-              Override  <a href="postconf.5.html"><b>main.cf</b></a>  parameter  settings.   This  lets you see the
-              effect changing a parameter would have when it is used in  other
+              Override <a href="postconf.5.html"><b>main.cf</b></a> parameter settings.   This  lets  you  see  the
+              effect  changing a parameter would have when it is used in other
               configuration parameters, e.g.:
                   postconf -x -o stress=yes
 
@@ -422,38 +428,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>
@@ -461,40 +467,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-
@@ -502,18 +508,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>
@@ -524,18 +530,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 4feae490889049f9a51f87051efa18db0cfa5dc3..bdc88b4d75bb5ab7bcb973aca4314b59a2f9c7cf 100644 (file)
@@ -15212,9 +15212,8 @@ pubkey_fingerprint } } </dd>
 
 <dt><b><a name="check_client_access">check_client_access</a> <i><a href="DATABASE_README.html">type:table</a></i></b></dt>
 
-<dd>Search the specified access database for the client hostname,
-parent domains, client IP address, or networks obtained by stripping
-least significant octets. See the <a href="access.5.html">access(5)</a> manual page for details. </dd>
+<dd>Search the specified access database for the client hostname
+or IP address. See the <a href="access.5.html">access(5)</a> manual page for details. </dd>
 
 <dt><b><a name="check_client_a_access">check_client_a_access</a> <i><a href="DATABASE_README.html">type:table</a></i></b></dt>
 
@@ -15245,8 +15244,7 @@ available in Postfix 2.7 and later.  </dd>
 <dt><b><a name="check_reverse_client_hostname_access">check_reverse_client_hostname_access</a> <i><a href="DATABASE_README.html">type:table</a></i></b></dt>
 
 <dd>Search the specified access database for the unverified reverse
-client hostname, parent domains, client IP address, or networks
-obtained by stripping least significant octets. See the <a href="access.5.html">access(5)</a>
+client hostname or IP address. See the <a href="access.5.html">access(5)</a>
 manual page for details.  Note: a result of "OK" is not allowed for
 safety reasons.  Instead, use DUNNO in order to exclude specific
 hosts from denylists.  This feature is available in Postfix 2.6
@@ -15904,8 +15902,8 @@ received with the ETRN command.
 
 <dt><b><a name="check_etrn_access">check_etrn_access</a> <i><a href="DATABASE_README.html">type:table</a></i></b></dt>
 
-<dd>Search the specified access database for the ETRN domain name
-or its parent domains. See the <a href="access.5.html">access(5)</a> manual page for details.
+<dd>Search the specified access database for the ETRN domain name.
+See the <a href="access.5.html">access(5)</a> manual page for details.
 </dd>
 
 </dl>
@@ -16223,7 +16221,7 @@ received with the HELO or EHLO command.
 <dt><b><a name="check_helo_access">check_helo_access</a> <i><a href="DATABASE_README.html">type:table</a></i></b></dt>
 
 <dd>Search the specified <a href="access.5.html">access(5)</a> database for the HELO or EHLO
-hostname or parent domains, and execute the corresponding action.
+hostname, and execute the corresponding action.
 Note: specify "<a href="postconf.5.html#smtpd_helo_required">smtpd_helo_required</a> = yes" to fully enforce this
 restriction (without "<a href="postconf.5.html#smtpd_helo_required">smtpd_helo_required</a> = yes", a client can
 simply skip <a href="postconf.5.html#check_helo_access">check_helo_access</a> by not sending HELO or EHLO).  </dd>
@@ -16887,8 +16885,7 @@ that is received with the RCPT TO command.
 <dt><b><a name="check_recipient_access">check_recipient_access</a> <i><a href="DATABASE_README.html">type:table</a></i></b></dt>
 
 <dd>Search the specified <a href="access.5.html">access(5)</a> database for the resolved RCPT
-TO address, domain, parent domains, or localpart@, and execute the
-corresponding action.  </dd>
+TO address, and execute the corresponding action.  </dd>
 
 <dt><b><a name="check_recipient_a_access">check_recipient_a_access</a> <i><a href="DATABASE_README.html">type:table</a></i></b></dt>
 
@@ -17735,8 +17732,7 @@ received with the MAIL FROM command.
 <dt><b><a name="check_sender_access">check_sender_access</a> <i><a href="DATABASE_README.html">type:table</a></i></b></dt>
 
 <dd>Search the specified <a href="access.5.html">access(5)</a> database for the MAIL FROM
-address, domain, parent domains, or localpart@, and execute the
-corresponding action. </dd>
+address, and execute the corresponding action. </dd>
 
 <dt><b><a name="check_sender_a_access">check_sender_a_access</a> <i><a href="DATABASE_README.html">type:table</a></i></b></dt>
 
index e4224299e9e3587f2b8703419f75abd385af5717..c5049432e4de5019b3405fa5e57571c803e80fa1 100644 (file)
@@ -299,6 +299,11 @@ Memcache database client. This is described in
 \fBmemcache_table\fR(5).
 
 This feature is available with Postfix 2.9 and later.
+.IP "\fBmongodb\fR"
+MongoDB database client. This is described in
+\fBmongodb_table\fR(5).
+
+This feature is available with Postfix 3.9 and later.
 .IP "\fBmysql\fR (read\-only)"
 MySQL database client.  Available on systems with support
 for MySQL databases.  This is described in \fBmysql_table\fR(5).
index ba46aecb875b4c73f32656ad19b180cc96c0fd88..d73298abbaafcdf2b3a41ad63bc3aff448d0fc54 100644 (file)
@@ -10405,9 +10405,8 @@ pubkey_fingerprint } }
 The commas are optional.
 .br
 .IP "\fBcheck_client_access \fItype:table\fR\fR"
-Search the specified access database for the client hostname,
-parent domains, client IP address, or networks obtained by stripping
-least significant octets. See the \fBaccess\fR(5) manual page for details.
+Search the specified access database for the client hostname
+or IP address. See the \fBaccess\fR(5) manual page for details.
 .br
 .IP "\fBcheck_client_a_access \fItype:table\fR\fR"
 Search the specified \fBaccess\fR(5) database for the IP addresses for the
@@ -10434,8 +10433,7 @@ available in Postfix 2.7 and later.
 .br
 .IP "\fBcheck_reverse_client_hostname_access \fItype:table\fR\fR"
 Search the specified access database for the unverified reverse
-client hostname, parent domains, client IP address, or networks
-obtained by stripping least significant octets. See the \fBaccess\fR(5)
+client hostname or IP address. See the \fBaccess\fR(5)
 manual page for details.  Note: a result of "OK" is not allowed for
 safety reasons.  Instead, use DUNNO in order to exclude specific
 hosts from denylists.  This feature is available in Postfix 2.6
@@ -10998,8 +10996,8 @@ restriction that matches wins.
 The following restrictions are specific to the domain name information
 received with the ETRN command.
 .IP "\fBcheck_etrn_access \fItype:table\fR\fR"
-Search the specified access database for the ETRN domain name
-or its parent domains. See the \fBaccess\fR(5) manual page for details.
+Search the specified access database for the ETRN domain name.
+See the \fBaccess\fR(5) manual page for details.
 .br
 .br
 .PP
@@ -11251,7 +11249,7 @@ The following restrictions are specific to the hostname information
 received with the HELO or EHLO command.
 .IP "\fBcheck_helo_access \fItype:table\fR\fR"
 Search the specified \fBaccess\fR(5) database for the HELO or EHLO
-hostname or parent domains, and execute the corresponding action.
+hostname, and execute the corresponding action.
 Note: specify "smtpd_helo_required = yes" to fully enforce this
 restriction (without "smtpd_helo_required = yes", a client can
 simply skip check_helo_access by not sending HELO or EHLO).
@@ -11717,8 +11715,7 @@ The following restrictions are specific to the recipient address
 that is received with the RCPT TO command.
 .IP "\fBcheck_recipient_access \fItype:table\fR\fR"
 Search the specified \fBaccess\fR(5) database for the resolved RCPT
-TO address, domain, parent domains, or localpart@, and execute the
-corresponding action.
+TO address, and execute the corresponding action.
 .br
 .IP "\fBcheck_recipient_a_access \fItype:table\fR\fR"
 Search the specified \fBaccess\fR(5) database for the IP addresses for
@@ -12376,8 +12373,7 @@ The following restrictions are specific to the sender address
 received with the MAIL FROM command.
 .IP "\fBcheck_sender_access \fItype:table\fR\fR"
 Search the specified \fBaccess\fR(5) database for the MAIL FROM
-address, domain, parent domains, or localpart@, and execute the
-corresponding action.
+address, and execute the corresponding action.
 .br
 .IP "\fBcheck_sender_a_access \fItype:table\fR\fR"
 Search the specified \fBaccess\fR(5) database for the IP addresses for
index c660fc1992dc5b9cd8d9b8ac4b167bfa232e0e03..f5e1d5f54723eecbd38b39b09411ea8fdd01f075 100644 (file)
@@ -28,6 +28,7 @@ without the hassle and delay of having to copy it to each. </p>
 <li><a href="#example_mailing_list">Example: Mailing lists</a>
 <li><a href="#example_projections">Example: MongoDB projections</a>
 <li><a href="#feedback">Feedback</a>
+<li><a href="#credits">Credits</a>
 </ul>
 
 <h2><a name="build">Building Postfix with MongoDB support</a></h2>
@@ -37,11 +38,12 @@ code as described in the INSTALL document. Some modification may
 be required if you build Postfix from a vendor-specific source
 package. </p>
 
-<p>The Postfix MongoDB client requires the mongo-c-driver library.
-This can be built from source code from <a
+<p>The Postfix MongoDB client requires the <b>mongo-c-driver</b>
+library. This can be built from source code from <a
 href="https://github.com/mongodb/mongo-c-driver/releases">the
-mongod-c project</a>, or as a binary package from your OS distribution,
-typically named <b>mongo-c-driver-devel</b> or <b>libmongoc-dev</b>.
+mongod-c project</a>, or this can be installed as a binary package
+from your OS distribution, typically named <b>mongo-c-driver</b>,
+<b>mongo-c-driver-devel</b> or <b>libmongoc-dev</b>.
 Installing the mongo-c-driver library may also install <b>libbson</b>
 as a dependency. </p>
 
@@ -129,6 +131,20 @@ entries whose username is, or alias field has "admin@example.com".
 It will return the username attribute of those found, and build a
 list of their email addresses. </p>
 
+<p> Notes: </p>
+
+<ul>
+
+<li><p> As with <b>projection</b> (see below), the Postfix mongodb
+client automatically removes the top-level '_id' field from a
+result_attribute result. </p> </li>
+
+<li><p> The Postfix mongodb client will only parse result fields
+with data types UTF8, INT32, INT64 and ARRAY. Other fields will be
+ignored, with a warning in the logs. </p> </li>
+
+</ul>
+
 <h2><a name="example_mailing_list">Example: Mailing lists</a></h2>
 
 <p>When it comes to mailing lists, one way of implementing one would
@@ -155,9 +171,9 @@ result_attribute = address
 
 <ul>
 
-<li><p> As with <b>projection</b>, the Postfix mongodb client
-automatically removes the top-level '_id' field from a result. </p>
-</li>
+<li><p> As with <b>projection</b> (see below), the Postfix mongodb
+client automatically removes the top-level '_id' field from a
+result_attribute result. </p> </li>
 
 <li><p> The Postfix mongodb client will only parse result fields
 with data types UTF8, INT32, INT64 and ARRAY. Other fields will be
@@ -219,6 +235,7 @@ with a warning in the logs. It is suggested to exclude any unnecessary
 fields when using a projection. </p></li>
 
 </ul>
+
 <h2><a name="feedback">Feedback</a></h2>
 
 <p> If you have questions, send them to postfix-users@postfix.org.
@@ -227,6 +244,20 @@ MongoDB-related output from postconf, which libraries you built
 with, and such. If your question involves your database contents,
 please include the applicable bits of some database entries. </p>
 
+<h2><a name="credits">Credits</a></h2>
+
+<ul>
+
+<li> Stephan Ferraro (Aionda GmbH) implemented an early version of the
+Postfix MongoDB client.
+
+<li> Hamid Maadani (Dextrous Technologies, LLC) added support for
+projections and %<i>letter</i> interpolation, and added documentation.
+
+<li> Wietse Venema adopted and restructured the code and documentation.
+
+</ul>
+
 </body>
 
 </html>
index 8ecd15a5299fae2035d169a6c80295d0dafe2d93..0da915282001fc2eb08e1dcc9ffe5353470db82e 100644 (file)
@@ -5303,9 +5303,8 @@ pubkey_fingerprint } } </dd>
 
 <dt><b><a name="check_client_access">check_client_access</a> <i><a href="DATABASE_README.html">type:table</a></i></b></dt>
 
-<dd>Search the specified access database for the client hostname,
-parent domains, client IP address, or networks obtained by stripping
-least significant octets. See the access(5) manual page for details. </dd>
+<dd>Search the specified access database for the client hostname
+or IP address. See the access(5) manual page for details. </dd>
 
 <dt><b><a name="check_client_a_access">check_client_a_access</a> <i><a href="DATABASE_README.html">type:table</a></i></b></dt>
 
@@ -5336,8 +5335,7 @@ available in Postfix 2.7 and later.  </dd>
 <dt><b><a name="check_reverse_client_hostname_access">check_reverse_client_hostname_access</a> <i><a href="DATABASE_README.html">type:table</a></i></b></dt>
 
 <dd>Search the specified access database for the unverified reverse
-client hostname, parent domains, client IP address, or networks
-obtained by stripping least significant octets. See the access(5)
+client hostname or IP address. See the access(5)
 manual page for details.  Note: a result of "OK" is not allowed for
 safety reasons.  Instead, use DUNNO in order to exclude specific
 hosts from denylists.  This feature is available in Postfix 2.6
@@ -5810,8 +5808,8 @@ received with the ETRN command.
 
 <dt><b><a name="check_etrn_access">check_etrn_access</a> <i><a href="DATABASE_README.html">type:table</a></i></b></dt>
 
-<dd>Search the specified access database for the ETRN domain name
-or its parent domains. See the access(5) manual page for details.
+<dd>Search the specified access database for the ETRN domain name.
+See the access(5) manual page for details.
 </dd>
 
 </dl>
@@ -5926,7 +5924,7 @@ received with the HELO or EHLO command.
 <dt><b><a name="check_helo_access">check_helo_access</a> <i><a href="DATABASE_README.html">type:table</a></i></b></dt>
 
 <dd>Search the specified access(5) database for the HELO or EHLO
-hostname or parent domains, and execute the corresponding action.
+hostname, and execute the corresponding action.
 Note: specify "smtpd_helo_required = yes" to fully enforce this
 restriction (without "smtpd_helo_required = yes", a client can
 simply skip check_helo_access by not sending HELO or EHLO).  </dd>
@@ -6221,8 +6219,7 @@ that is received with the RCPT TO command.
 <dt><b><a name="check_recipient_access">check_recipient_access</a> <i><a href="DATABASE_README.html">type:table</a></i></b></dt>
 
 <dd>Search the specified access(5) database for the resolved RCPT
-TO address, domain, parent domains, or localpart@, and execute the
-corresponding action.  </dd>
+TO address, and execute the corresponding action.  </dd>
 
 <dt><b><a name="check_recipient_a_access">check_recipient_a_access</a> <i><a href="DATABASE_README.html">type:table</a></i></b></dt>
 
@@ -6736,8 +6733,7 @@ received with the MAIL FROM command.
 <dt><b><a name="check_sender_access">check_sender_access</a> <i><a href="DATABASE_README.html">type:table</a></i></b></dt>
 
 <dd>Search the specified access(5) database for the MAIL FROM
-address, domain, parent domains, or localpart@, and execute the
-corresponding action. </dd>
+address, and execute the corresponding action. </dd>
 
 <dt><b><a name="check_sender_a_access">check_sender_a_access</a> <i><a href="DATABASE_README.html">type:table</a></i></b></dt>
 
index 37436858b4eff73c2357663e62b0505434712c8e..e3e8ac6c7f89be1f95703f5d06a31ca1d88d3d5a 100644 (file)
@@ -1596,3 +1596,9 @@ chunking
 allowlists
 FWS
 mongodb
+Aionda
+Ferraro
+GmbH
+Hamid
+LLC
+Maadani
index e3b91b5fa2b0b65fa5ef167d7f70638991f751ab..690f12b792281b9d9a6f3d5e9e016992e57fecca 100644 (file)
@@ -108,3 +108,4 @@ proto  proto aliases proto virtual proto ADDRESS_REWRITING_README html
  postlogd postlogd c 
  qmgr qmgr c qmqpd qmqpd c trivial rewrite trivial rewrite c 
  strategies File smtp smtp c 
+ postconf postconf c postconf postconf_dbms c 
index 1aa36b3f280463d7bd8cc7883a86084331eec0c4..18144b7198f4d02b2baac78e1bf8e91ea53dd43f 100644 (file)
@@ -255,6 +255,7 @@ static char *get_result_string(DICT_MONGODB *dict_mongodb,
                                           resultString, expansion, key);
            break;
        case BSON_TYPE_ARRAY:
+           ;                                   /* For pre-C23 Clang. */
            const uint8_t *dataBuffer = NULL;
            unsigned int len = 0;
            bson_iter_t dataIter;
index 0506725e4fd41962409ac687fe431e3a5f6b2362..94c51864f2cd5da5baeab7d833e768a4197dc2a5 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      "20240213"
+#define MAIL_RELEASE_DATE      "20240216"
 #define MAIL_VERSION_NUMBER    "3.9"
 
 #ifdef SNAPSHOT
index 0aa29e8888db5886ffc9725bcd034cb9d9e796d8..079824ab4f49b0e3cf699860fdfa01a28ebdcaaa 100644 (file)
@@ -469,6 +469,9 @@ test29:     $(PROG) test29.ref
        echo 'memcachexx = proxy:memcache:memcachefoo' >> main.cf
        echo 'memcachefoo_domain = bar' >> main.cf
        echo 'memcachefoo_domainx = bar' >> main.cf
+       echo 'mongodbxx = proxy:mongodb:mongodbfoo' >> main.cf
+       echo 'mongodbfoo_domain = bar' >> main.cf
+       echo 'mongodbfoo_domainx = bar' >> main.cf
        touch -t 197101010000 main.cf
        $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -nc . >test29.tmp 2>&1
        diff test29.ref test29.tmp
@@ -1146,13 +1149,13 @@ postconf_dbms.o: ../../include/dict.h
 postconf_dbms.o: ../../include/dict_ht.h
 postconf_dbms.o: ../../include/dict_ldap.h
 postconf_dbms.o: ../../include/dict_memcache.h
+postconf_dbms.o: ../../include/dict_mongodb.h
 postconf_dbms.o: ../../include/dict_mysql.h
 postconf_dbms.o: ../../include/dict_pcre.h
 postconf_dbms.o: ../../include/dict_pgsql.h
 postconf_dbms.o: ../../include/dict_proxy.h
 postconf_dbms.o: ../../include/dict_regexp.h
 postconf_dbms.o: ../../include/dict_sqlite.h
-postconf_dbms.o: ../../include/dict_mongodb.h
 postconf_dbms.o: ../../include/htable.h
 postconf_dbms.o: ../../include/mac_expand.h
 postconf_dbms.o: ../../include/mac_parse.h
@@ -1171,10 +1174,10 @@ postconf_dbms.o: ../../include/vstream.h
 postconf_dbms.o: ../../include/vstring.h
 postconf_dbms.o: pcf_ldap_suffixes.h
 postconf_dbms.o: pcf_memcache_suffixes.h
+postconf_dbms.o: pcf_mongodb_suffixes.h
 postconf_dbms.o: pcf_mysql_suffixes.h
 postconf_dbms.o: pcf_pgsql_suffixes.h
 postconf_dbms.o: pcf_sqlite_suffixes.h
-postconf_dbms.o: pcf_mongodb_suffixes.h
 postconf_dbms.o: postconf.h
 postconf_dbms.o: postconf_dbms.c
 postconf_edit.o: ../../include/argv.h
index f598a5be6ae2453ec37fa936091c2c0dffe71758..5a10f5e96623d52ab094b121acc329dda5a39c2d 100644 (file)
 /*     \fBmemcache_table\fR(5).
 /*
 /*     This feature is available with Postfix 2.9 and later.
+/* .IP "\fBmongodb\fR"
+/*     MongoDB database client. This is described in
+/*     \fBmongodb_table\fR(5).
+/*
+/*     This feature is available with Postfix 3.9 and later.
 /* .IP "\fBmysql\fR (read-only)"
 /*     MySQL database client.  Available on systems with support
 /*     for MySQL databases.  This is described in \fBmysql_table\fR(5).
index 0ed5b53372a83f9cf65346a1c4b62daa97d1120c..3320875d8582485801d129b97bb787811bec47a3 100644 (file)
@@ -77,6 +77,7 @@
 #include <dict_pgsql.h>
 #include <dict_sqlite.h>
 #include <dict_memcache.h>
+#include <dict_mongodb.h>
 #include <dict_regexp.h>
 #include <dict_pcre.h>
 
@@ -131,6 +132,13 @@ static const char *pcf_memcache_suffixes[] = {
     0,
 };
 
+/* See mongodb_table(5). */
+
+static const char *pcf_mongodb_suffixes[] = {
+#include "pcf_mongodb_suffixes.h"
+    0,
+};
+
  /*
   * Bundle up the database types and their suffix lists.
   */
@@ -149,6 +157,7 @@ static const PCF_DBMS_INFO pcf_dbms_info[] = {
     {DICT_TYPE_PGSQL, PCF_DBMS_CLASS_CLIENT, pcf_pgsql_suffixes},
     {DICT_TYPE_SQLITE, PCF_DBMS_CLASS_CLIENT, pcf_sqlite_suffixes},
     {DICT_TYPE_MEMCACHE, PCF_DBMS_CLASS_CLIENT, pcf_memcache_suffixes},
+    {DICT_TYPE_MONGODB, PCF_DBMS_CLASS_CLIENT, pcf_mongodb_suffixes},
     {DICT_TYPE_REGEXP, PCF_DBMS_CLASS_REGEX},
     {DICT_TYPE_PCRE, PCF_DBMS_CLASS_REGEX},
     {0},
index 646890aaa1c54c02c8efe8973491a01966f9ceb4..c3bbaecab6ffdd680f3e5310355f5fea449871c2 100644 (file)
@@ -2,15 +2,18 @@ config_directory = .
 ./postconf: warning: ./main.cf: unused parameter: pgsqlfoo_domain=bar
 ./postconf: warning: ./main.cf: unused parameter: sqlitefoo_domain=bar
 ./postconf: warning: ./main.cf: unused parameter: ldapxx=proxy:ldap:ldapfoo
+./postconf: warning: ./main.cf: unused parameter: mongodbfoo_domain=bar
 ./postconf: warning: ./main.cf: unused parameter: sqlitexx=proxy:sqlite:sqlitefoo
 ./postconf: warning: ./main.cf: unused parameter: mysqlfoo_domain=bar
 ./postconf: warning: ./main.cf: unused parameter: sqlitefoo_domainx=bar
 ./postconf: warning: ./main.cf: unused parameter: memcachefoo_domain=bar
 ./postconf: warning: ./main.cf: unused parameter: pgsqlfoo_domainx=bar
+./postconf: warning: ./main.cf: unused parameter: mongodbfoo_domainx=bar
 ./postconf: warning: ./main.cf: unused parameter: ldapfoo_domainx=bar
 ./postconf: warning: ./main.cf: unused parameter: ldapfoo_domain=bar
 ./postconf: warning: ./main.cf: unused parameter: memcachexx=proxy:memcache:memcachefoo
 ./postconf: warning: ./main.cf: unused parameter: memcachefoo_domainx=bar
 ./postconf: warning: ./main.cf: unused parameter: mysqlfoo_domainx=bar
 ./postconf: warning: ./main.cf: unused parameter: mysqlxx=proxy:mysql:mysqlfoo
+./postconf: warning: ./main.cf: unused parameter: mongodbxx=proxy:mongodb:mongodbfoo
 ./postconf: warning: ./main.cf: unused parameter: pgsqlxx=proxy:pgsql:pgsqlfoo