]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-2.12-20140701
authorWietse Venema <wietse@porcupine.org>
Tue, 1 Jul 2014 23:59:13 +0000 (09:59 +1000)
committerViktor Dukhovni <ietf-dane@dukhovni.org>
Tue, 1 Jul 2014 23:59:13 +0000 (09:59 +1000)
28 files changed:
postfix/HISTORY
postfix/README_FILES/DATABASE_README
postfix/README_FILES/SMTPD_POLICY_README
postfix/RELEASE_NOTES
postfix/html/DATABASE_README.html
postfix/html/SMTPD_POLICY_README.html
postfix/html/postconf.1.html
postfix/html/postconf.5.html
postfix/html/smtpd.8.html
postfix/man/man1/postconf.1
postfix/man/man5/postconf.5
postfix/man/man8/smtpd.8
postfix/mantools/postlink
postfix/proto/DATABASE_README.html
postfix/proto/SMTPD_POLICY_README.html
postfix/proto/postconf.proto
postfix/src/global/mail_params.h
postfix/src/global/mail_version.h
postfix/src/postconf/postconf.c
postfix/src/smtpd/smtpd.c
postfix/src/smtpd/smtpd_check.c
postfix/src/util/attr_clnt.c
postfix/src/util/attr_clnt.h
postfix/src/util/dict_open.c
postfix/src/util/dict_pipe.c
postfix/src/util/dict_pipe.h
postfix/src/util/dict_random.c
postfix/src/util/dict_random.h

index d0eb957a54943771a046fa9d074c51b8cae3d526..d49bc716abaee2c9b6019f58415973bcaa5fed44 100644 (file)
@@ -20077,3 +20077,20 @@ Apologies for any names omitted.
        Cleanup: use ${mail_version} as the MAIL_VERSION-unexpanded
        form.  Viktor Dukhovni. Files: makedefs, postfix-install,
        conf/postfix-files.
+
+20140630
+
+       Cleanup: the pipeline and random lookup tables are now
+       called pipemap and randmap, respectively. These names are
+       more specific. The old names remain available, at least
+       temporarily.  Files: util/dict_pipe.[hc], util/dict_random.[hc],
+       postconf/postconf.c, mantools/postlink, proto/DATABASE_README.html.
+
+       Feature: smtpd_policy_service_request_limit to limit the
+       number of requests per Postfix SMTP server policy connection.
+       This is a workaround to avoid error-recovery delays with
+       policy servers that cannot maintain a persistent connection.
+       Based on code by Markus Benning. Files: global/mail_params.h,
+       mantools/postlink, proto/SMTPD_POLICY_README.html,
+       proto/postconf.proto, smtpd/smtpd.c, smtpd/smtpd_check.c,
+       util/attr_clnt.[hc].
index 708d845a33b08114b6fdbbc902f770c980a4675a..bb361307e36d331c75460cd1f6c2c5f2c4a8ddf9 100644 (file)
@@ -242,13 +242,13 @@ To find out what database types your Postfix system supports, use the "p\bpo\bos\bs
         A lookup table based on Perl Compatible Regular Expressions. The file
         format is described in pcre_table(5). The lookup table name as used in
         "pcre:table" is the name of the regular expression file.
-    p\bpi\bip\bpe\bel\bli\bin\bne\be (read-only)
-        A pipeline of lookup tables. Example: "p\bpi\bip\bpe\bel\bli\bin\bne\be:\b:!type_1:name_1! ...
-        !type_n:name_n". Each "pipeline:" 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 ASCII
-        character after "pipeline:" will be used as the separator between the
+    p\bpi\bip\bpe\bem\bma\bap\bp (read-only)
+        A pipeline of lookup tables. Example: "p\bpi\bip\bpe\bem\bma\bap\bp:\b:!type1:name1! ...
+        !typen:namen". Each "pipemap:" 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 ASCII
+        character after "pipemap:" will be used as the separator between the
         lookup tables that follow (do not use space, ",", ":" or non-ASCII).
     p\bpg\bgs\bsq\bql\bl (read-only)
         PostgreSQL database client. Configuration details are given in
@@ -256,11 +256,11 @@ To find out what database types your Postfix system supports, use the "p\bpo\bos\bs
     p\bpr\bro\box\bxy\by
         Postfix proxymap(8) client for shared access to Postfix databases. The
         lookup table name syntax is "proxy:type:table".
-    r\bra\ban\bnd\bdo\bom\bm (read-only)
-        An in-memory table that performs random selection. Example: "r\bra\ban\bnd\bdo\bom\bm:\b:
-        !result_1! ... !result_n". Each table query returns a random choice
-        from the specified results. The ASCII character after "random:" will be
-        used as the separator between the results that follow (do not use
+    r\bra\ban\bnd\bdm\bma\bap\bp (read-only)
+        An in-memory table that performs random selection. Example: "r\bra\ban\bnd\bdm\bma\bap\bp:\b:
+        !result1! ... !resultn". Each table query returns a random choice from
+        the specified results. The first ASCII character after "randmap:" will
+        be used as the separator between the results that follow (do not use
         space, ",", ":" or non-ASCII).
     r\bre\beg\bge\bex\bxp\bp (read-only)
         A lookup table based on regular expressions. The file format is
index 17d816f43f1c6a330aad6df33e2773adcabee3e5..6a6e867a49b0751698924c6937707d3010c77a25 100644 (file)
@@ -196,6 +196,7 @@ use something like this:
      9         check_policy_service unix:private/policy
     10         ...
     11     policy_time_limit = 3600
+    12     # smtpd_policy_service_request_limit = 1
 
 NOTES:
 
@@ -227,6 +228,9 @@ NOTES:
         (in the above example, "policy") and a built-in suffix (in the above
         example: "_time_limit").
 
+  * Line 12: specify smtpd_policy_service_request_limit to avoid error-recovery
+    delays with policy servers that cannot maintain a persistent connection.
+
   * With Solaris < 9, or Postfix < 2.10 on any Solaris version, use TCP sockets
     instead of UNIX-domain sockets:
 
@@ -241,9 +245,10 @@ NOTES:
      9         check_policy_service inet:127.0.0.1:9998
     10         ...
     11     127.0.0.1:9998_time_limit = 3600
+    12     # smtpd_policy_service_request_limit = 1
 
-Other configuration parameters that control the client side of the policy
-delegation protocol:
+Configuration parameters that control the client side of the policy delegation
+protocol:
 
   * smtpd_policy_service_max_idle (default: 300s): The amount of time before
     the Postfix SMTP server closes an unused policy client connection.
@@ -254,6 +259,17 @@ delegation protocol:
   * smtpd_policy_service_timeout (default: 100s): The time limit to connect to,
     send to or receive from a policy server.
 
+  * smtpd_policy_service_request_limit (default: 0): The maximal number of
+    requests per policy connection, or zero (no limit).
+
+Configuration parameters that control the server side of the policy delegation
+protocol:
+
+  * transport_time_limit ($command_time_limit): The maximal amount of time the
+    policy daemon is allowed to run before it is terminated. The transport is
+    the service name of the master.cf entry for the policy daemon service. In
+    the above examples, the service name is "policy" or "127.0.0.1:9998".
+
 E\bEx\bxa\bam\bmp\bpl\ble\be:\b: g\bgr\bre\bey\byl\bli\bis\bst\bt p\bpo\bol\bli\bic\bcy\by s\bse\ber\brv\bve\ber\br
 
 Greylisting is a defense against junk email that is described at http://
@@ -309,6 +325,7 @@ socket that is accessible by Postfix processes only:
      9         reject_unauth_destination
     10         check_policy_service unix:private/greylist
     11         ...
+    12     # smtpd_policy_service_request_limit = 1
 
 Notes:
 
@@ -340,6 +357,9 @@ Notes:
         service name (in the above example, "greylist") and a built-in suffix
         (in the above example: "_time_limit").
 
+  * Line 12: specify smtpd_policy_service_request_limit to avoid error-recovery
+    delays with policy servers that cannot maintain a persistent connection.
+
 With Solaris < 9, or Postfix < 2.10 on any Solaris version, use inet: style
 sockets instead of unix: style, as detailed in the "Policy client/server
 configuration" section above.
@@ -355,6 +375,7 @@ configuration" section above.
      9         reject_unauth_destination
     10         check_policy_service inet:127.0.0.1:9998
     11         ...
+    12     # smtpd_policy_service_request_limit = 1
 
 G\bGr\bre\bey\byl\bli\bis\bst\bti\bin\bng\bg m\bma\bai\bil\bl f\bfr\bro\bom\bm f\bfr\bre\beq\bqu\bue\ben\bnt\btl\bly\by f\bfo\bor\brg\bge\bed\bd d\bdo\bom\bma\bai\bin\bns\bs
 
index e50d7d3c963d81abb6f00ffd0cd4bc3dce54dcf9..6c5db23ec1fe47f3247f65b6e5d5c8fd2ae6c419 100644 (file)
@@ -41,6 +41,13 @@ Maintainers may also benefit from the makedefs documentation
 (mantools/srctoman - makedefs | nroff -man | less) with information
 about build options that are not described in the INSTALL instructions.
 
+Incompatible changes with snapshot 20140701
+===========================================
+
+For clarity, the pipeline and random lookup tables are now called
+pipemap and randmap, respectively. The 20140618 text below has been
+updated accordingly. The old names remain supported for a while.
+
 Incompatible changes with snapshot 20140625
 ===========================================
 
@@ -70,10 +77,10 @@ Major changes with snapshot 20140618
 
 This introduces several lookup tables with unusual properties.
 
-random table
+randmap table
 ------------
 
-The "random" lookup table performs random selection. This may be
+The "randmap" lookup table performs random selection. This may be
 used to implement load balancing, for example:
 
 /etc/postfix/transport:
@@ -86,48 +93,48 @@ used to implement load balancing, for example:
        # Deliver my own domain as usual.
        hash:/etc/postfix/transport 
        # Deliver other domains via randomly-selected relayhosts
-       random:!smtp:smtp0.example.com!smtp:smtp1.example.com
+       randmap:!smtp:smtp0.example.com!smtp:smtp1.example.com
 
 A variant of this can randomly select SMTP clients with different
 smtp_bind_address settings.
 
-The ASCII character after "random:" will be used as the separator
-between the results that follow (do not use space, ",", ":" or
-non-ASCII).
+The first ASCII character after "randmap:" will be used as the
+separator between the results that follow (do not use space, ",",
+":" or non-ASCII).
 
-Some future version may support the form random:/path/to/file,
+Some future version may support the form randmap:/path/to/file,
 to load the list of random values, one per line, from a textfile.
 
 To implement different weights, specify lookup results multiple
 times. For example, to choose smtp:smtp1.example.com twice as often
 as smtp:smtp0.example.com, specify smtp:smtp1.example.com twice.
 
-pipeline table
+pipemap table
 --------------
 
-As the name suggests, the "pipeline" table implements a pipeline
+As the name suggests, the "pipemap" table implements a pipeline
 of lookup tables. The name of the table specifies the pipeline as
 a sequence of tables. For example, the following prevents SMTP mail
 to system accounts that have "nologin" as their login shell:
 
     /etc/postfix/main.cf:
        local_recipient_maps = 
-           pipeline:!unix:passwd.byname!pcre:/etc/postfix/no-nologin.pcre
+           pipemap:!unix:passwd.byname!pcre:/etc/postfix/no-nologin.pcre
            alias_maps
 
     /etc/postfix/no-nologin.pcre:
        !/nologin/      whatever
 
-The ASCII character after "pipeline:" will be used as the separator
-between the lookup tables that follow (do not use space, ",", ":"
-or non-ASCII).
+The first ASCII character after "pipemap:" will be used as the
+separator between the lookup tables that follow (do not use space,
+",", ":" or non-ASCII).
 
-Each "pipeline:" query is given to the first table. Each table
+Each "pipemap:" query is given to the first table. Each table
 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 entire pipeline produces no result.
 
-Some future version may support the form pipeline:/path/to/file,
+Some future version may support the form pipemap:/path/to/file,
 to load the list of lookup tables, one per line, from a textfile.
 
 Incompatible changes with snapshot 20140530
index 06e909430680c339e4e8bf4db205628fd3bd901f..3f0d9ec4e2526e41adf562a2fc0e06b8ed8b8823 100644 (file)
@@ -362,16 +362,17 @@ The file format is described in <a href="pcre_table.5.html">pcre_table(5)</a>. T
 name as used in "<a href="pcre_table.5.html">pcre</a>:table" is the name of the regular expression
 file.  </dd>
 
-<dt> <b>pipeline</b> (read-only) </dt>
+<dt> <b>pipemap</b> (read-only) </dt>
 
 <dd> A pipeline of lookup tables. Example:
-"<b><a href="DATABASE_README.html#types">pipeline</a>:</b><i>!type_1:name_1! ... !type_n:name_n</i>".  Each
-"<a href="DATABASE_README.html#types">pipeline</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 ASCII character
-after "<a href="DATABASE_README.html#types">pipeline</a>:" will be used as the separator between the lookup
-tables that follow (do not use space, ",", ":" or non-ASCII).  </dd>
+"<b><a href="DATABASE_README.html#types">pipemap</a>:</b><i>!type<sub>1</sub>:name<sub>1</sub>! ...
+!type<sub>n</sub>:name<sub>n</sub></i>".  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 ASCII character after "<a href="DATABASE_README.html#types">pipemap</a>:"
+will be used as the separator between the lookup tables that follow
+(do not use space, ",", ":" or non-ASCII).  </dd>
 
 <dt> <b>pgsql</b> (read-only) </dt>
 
@@ -384,14 +385,14 @@ in <a href="pgsql_table.5.html">pgsql_table(5)</a>. </dd>
 databases. The lookup table name syntax is "<a href="proxymap.8.html">proxy</a>:<a href="DATABASE_README.html">type:table</a>".
 </dd>
 
-<dt> <b>random</b> (read-only) </dt>
+<dt> <b>randmap</b> (read-only) </dt>
 
 <dd> An in-memory table that performs random selection.  Example:
-"<b><a href="DATABASE_README.html#types">random</a>:</b><i>!result_1! ... !result_n</i>". Each table query
-returns a random choice from the specified results. The ASCII
-character after "<a href="DATABASE_README.html#types">random</a>:" will be used as the separator between the
-results that follow (do not use space, ",", ":" or non-ASCII).
-</dd>
+"<b><a href="DATABASE_README.html#types">randmap</a>:</b><i>!result<sub>1</sub>! ... !result<sub>n</sub></i>".
+Each table query returns a random choice from the specified results.
+The first ASCII character after "<a href="DATABASE_README.html#types">randmap</a>:" will be used as the
+separator between the results that follow (do not use space, ",",
+":" or non-ASCII).  </dd>
 
 <dt> <b>regexp</b> (read-only) </dt>
 
index aaccc22f5c31abb8a80e2f3809639b215b04208b..3c404154c376caa2ca20b46b625447eb62ba40b3 100644 (file)
@@ -266,6 +266,7 @@ daemon, you would use something like this: </p>
  9         <a href="postconf.5.html#check_policy_service">check_policy_service</a> unix:private/policy 
 10         ...
 11     <a href="postconf.5.html#transport_time_limit">policy_time_limit</a> = 3600
+12     # <a href="postconf.5.html#smtpd_policy_service_request_limit">smtpd_policy_service_request_limit</a> = 1
 </pre>
 </blockquote>
 
@@ -305,6 +306,10 @@ of a <a href="master.5.html">master.cf</a> service name (in the above example, "
 built-in suffix (in the above example: "_time_limit").  </p>
 </blockquote>
 
+<li> <p> Line 12: specify <a href="postconf.5.html#smtpd_policy_service_request_limit">smtpd_policy_service_request_limit</a> to
+avoid error-recovery delays with policy servers that cannot
+maintain a persistent connection. </p>
+
 <li> <p> With Solaris &lt; 9, or Postfix &lt; 2.10 on any Solaris
 version, use TCP sockets instead of UNIX-domain sockets: </p>
 
@@ -323,11 +328,12 @@ version, use TCP sockets instead of UNIX-domain sockets: </p>
  9         <a href="postconf.5.html#check_policy_service">check_policy_service</a> inet:127.0.0.1:9998
 10         ...
 11     127.0.0.1:9998_time_limit = 3600
+12     # <a href="postconf.5.html#smtpd_policy_service_request_limit">smtpd_policy_service_request_limit</a> = 1
 </pre>
 </blockquote>
 
-<p> Other configuration parameters that control the client side of
-the policy delegation protocol: </p>
+<p> Configuration parameters that control the client side of the
+policy delegation protocol: </p>
 
 <ul>
 
@@ -342,6 +348,22 @@ client connection. </p>
 <li> <p> <a href="postconf.5.html#smtpd_policy_service_timeout">smtpd_policy_service_timeout</a> (default: 100s): The time
 limit to connect to, send to or receive from a policy server. </p>
 
+<li> <p> <a href="postconf.5.html#smtpd_policy_service_request_limit">smtpd_policy_service_request_limit</a> (default: 0): The maximal
+number of requests per policy connection, or zero (no limit). </p>
+
+</ul>
+
+<p> Configuration parameters that control the server side of the
+policy delegation protocol: </p>
+
+<ul>
+
+<li> <p> <a href="postconf.5.html#transport_time_limit"><i>transport</i>_time_limit</a> ($<a href="postconf.5.html#command_time_limit">command_time_limit</a>): The
+maximal amount of time the policy daemon is allowed to run before
+it is terminated. The <i>transport</i> is the service name of the
+<a href="master.5.html">master.cf</a> entry for the policy daemon service. In the above
+examples, the service name is "policy" or "127.0.0.1:9998". </p>
+
 </ul>
 
 <h2><a name="greylist">Example: greylist policy server</a></h2>
@@ -415,6 +437,7 @@ processes only: </p>
  9         <a href="postconf.5.html#reject_unauth_destination">reject_unauth_destination</a> 
 10         <a href="postconf.5.html#check_policy_service">check_policy_service</a> unix:private/greylist
 11         ...
+12     # <a href="postconf.5.html#smtpd_policy_service_request_limit">smtpd_policy_service_request_limit</a> = 1
 </pre>
 </blockquote>
 
@@ -453,6 +476,10 @@ of a <a href="master.5.html">master.cf</a> service name (in the above example, "
 a built-in suffix (in the above example: "_time_limit").  </p>
 </blockquote>
 
+<li> <p> Line 12: specify <a href="postconf.5.html#smtpd_policy_service_request_limit">smtpd_policy_service_request_limit</a> to
+avoid error-recovery delays with policy servers that cannot
+maintain a persistent connection. </p>
+
 </ul>
 
 <p> With Solaris &lt; 9, or Postfix &lt; 2.10 on any Solaris
@@ -473,6 +500,7 @@ client/server configuration</a>" section above.  </p>
  9         <a href="postconf.5.html#reject_unauth_destination">reject_unauth_destination</a> 
 10         <a href="postconf.5.html#check_policy_service">check_policy_service</a> inet:127.0.0.1:9998
 11         ...
+12     # <a href="postconf.5.html#smtpd_policy_service_request_limit">smtpd_policy_service_request_limit</a> = 1
 </pre>
 </blockquote>
 
index f5969b7539e8aa055a4706e64a5bf5593a2ccd9f..bf2ddd9eb637347c40089cf8f4f89d9574742a65 100644 (file)
@@ -253,46 +253,47 @@ POSTCONF(1)                                                        POSTCONF(1)
                      PostgreSQL   database   client.   This  is  described  in
                      <a href="pgsql_table.5.html"><b>pgsql_table</b>(5)</a>.
 
-              <b>pipeline</b> (read-only)
-                     A   pipeline   of   lookup   tables.    Example:   "<b><a href="DATABASE_README.html#types">pipe-</b>
-                     <b>line</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>".  Each "<a href="DATABASE_README.html#types">pipe-
-                     line</a>:" query is given to the first  table.   Each  lookup
-                     result  becomes the query for the next table in the pipe-
-                     line, and the last table produces the final result.  When
-                     any  table  lookup  produces no result, the pipeline pro-
-                     duces no result. The ASCII  character  after  "<a href="DATABASE_README.html#types">pipeline</a>:"
-                     will  be  used as the separator between the lookup tables
-                     that follow (do not use space, ",", ":" or non-ASCII).
-
-              <b>proxy</b>  Postfix <a href="proxymap.8.html"><b>proxymap</b>(8)</a> client for shared access  to  Postfix
+              <b>pipemap</b> (read-only)
+                     A    pipeline     of     lookup     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>".   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  ASCII  character  after
+                     "<a href="DATABASE_README.html#types">pipemap</a>:"  will  be  used  as  the separator between the
+                     lookup tables that follow (do not use space, ",", ":"  or
+                     non-ASCII).
+
+              <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>.
 
-              <b>random</b> (read-only)
-                     An  in-memory table that performs random selection. Exam-
-                     ple: "<b><a href="DATABASE_README.html#types">random</a>:</b><i>!result</i><b>_</b><i>1! ... !result</i><b>_</b><i>n</i>". Each table  query
-                     returns  a  random choice from the specified results. The
-                     ASCII character after "<a href="DATABASE_README.html#types">random</a>:" will be used as the sepa-
-                     rator  between the results that follow (do not use space,
-                     ",", ":" or non-ASCII).
+              <b>randmap</b> (read-only)
+                     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>". Each table query
+                     returns a random choice from the specified  results.  The
+                     first  ASCII  character  after "<a href="DATABASE_README.html#types">randmap</a>:" will be used as
+                     the separator between the results that follow (do not use
+                     space, ",", ":" or non-ASCII).
 
               <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-
                      tems with support for SDBM databases.
 
               <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>.
 
               <b>sqlite</b> (read-only)
                      SQLite database. This is described in <a href="sqlite_table.5.html"><b>sqlite_table</b>(5)</a>.
 
               <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.
 
@@ -300,48 +301,48 @@ 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.
 
               <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
+              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).
 
        <b>-o</b> <i>name=value</i>
@@ -353,50 +354,50 @@ 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-
+       <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   one   "<i>ser-</i>
-              <i>vice/type/parameter=value</i>" per line.  Specify <b>-Pf</b> to  fold  long
+              <i>vice/type/parameter=value</i>"  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 built-in templates, specify a template file name
-              at  the  end  of the <a href="postconf.1.html"><b>postconf</b>(1)</a> command line, or specify a file
+              at the end of the <a href="postconf.1.html"><b>postconf</b>(1)</a> command line, or  specify  a  file
               name in <a href="postconf.5.html"><b>main.cf</b></a> with the <b><a href="postconf.5.html#bounce_template_file">bounce_template_file</a></b> parameter.
 
-              To force selection of the built-in templates, specify  an  empty
-              template  file  name  on  the <a href="postconf.1.html"><b>postconf</b>(1)</a> command line (in shell
+              To  force  selection of the built-in templates, specify an empty
+              template file name on the <a href="postconf.1.html"><b>postconf</b>(1)</a>  command  line  (in  shell
               language: "").
 
               This feature is available with Postfix 2.3 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 specied with "<i>service/type/parameter</i>" on the <a href="postconf.1.html"><b>postconf</b>(1)</a> com-
               mand line.
@@ -405,10 +406,10 @@ POSTCONF(1)                                                        POSTCONF(1)
               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-
@@ -416,18 +417,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>
@@ -438,18 +439,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 5c3873c3c49a97cd355af663fb7ac4da48468793..832cfb1d0ec3b4ae0b082db82a519fada88d732d 100644 (file)
@@ -14113,6 +14113,25 @@ This feature is available in Postfix 2.1 and later.
 </p>
 
 
+</DD>
+
+<DT><b><a name="smtpd_policy_service_request_limit">smtpd_policy_service_request_limit</a>
+(default: 0)</b></DT><DD>
+
+<p>
+The maximal number of requests per Postfix SMTP server policy
+connection, or zero (no limit). Once a connection reaches this
+limit, the connection is closed and the next request will be sent
+over a new connection. This is a workaround to avoid error-recovery
+delays with policy servers that cannot maintain a persistent
+connection.
+</p>
+
+<p>
+This feature is available in Postfix 2.12 and later.
+</p>
+
+
 </DD>
 
 <DT><b><a name="smtpd_policy_service_timeout">smtpd_policy_service_timeout</a>
index 84e91653b13ae858f516fe17a759279b1959d376..641f28471b02b80aef01706b568b2b4b9a89e9ca 100644 (file)
@@ -862,15 +862,21 @@ SMTPD(8)                                                              SMTPD(8)
               The time limit for connecting to, writing to or receiving from a
               delegated SMTPD policy server.
 
+       Available in Postfix version 2.12 and later:
+
+       <b><a href="postconf.5.html#smtpd_policy_service_request_limit">smtpd_policy_service_request_limit</a> (0)</b>
+              The maximal number of requests per Postfix  SMTP  server  policy
+              connection, or zero (no limit).
+
 <b>ACCESS CONTROLS</b>
-       The <a href="SMTPD_ACCESS_README.html">SMTPD_ACCESS_README</a> document gives an introduction to all the  SMTP
+       The  <a href="SMTPD_ACCESS_README.html">SMTPD_ACCESS_README</a> document gives an introduction to all the SMTP
        server access control features.
 
        <b><a href="postconf.5.html#smtpd_delay_reject">smtpd_delay_reject</a> (yes)</b>
-              Wait    until    the   RCPT   TO   command   before   evaluating
+              Wait   until   the   RCPT   TO   command    before    evaluating
               $<a href="postconf.5.html#smtpd_client_restrictions">smtpd_client_restrictions</a>,     $<a href="postconf.5.html#smtpd_helo_restrictions">smtpd_helo_restrictions</a>     and
               $<a href="postconf.5.html#smtpd_sender_restrictions">smtpd_sender_restrictions</a>,  or  wait  until  the  ETRN  command
-              before      evaluating      $<a href="postconf.5.html#smtpd_client_restrictions">smtpd_client_restrictions</a>       and
+              before       evaluating      $<a href="postconf.5.html#smtpd_client_restrictions">smtpd_client_restrictions</a>      and
               $<a href="postconf.5.html#smtpd_helo_restrictions">smtpd_helo_restrictions</a>.
 
        <b><a href="postconf.5.html#parent_domain_matches_subdomains">parent_domain_matches_subdomains</a> (see 'postconf -d' output)</b>
@@ -878,45 +884,45 @@ SMTPD(8)                                                              SMTPD(8)
               cally, instead of requiring an explicit ".domain.tld" pattern.
 
        <b><a href="postconf.5.html#smtpd_client_restrictions">smtpd_client_restrictions</a> (empty)</b>
-              Optional restrictions that the Postfix SMTP  server  applies  in
+              Optional  restrictions  that  the Postfix SMTP server applies in
               the context of a client connection request.
 
        <b><a href="postconf.5.html#smtpd_helo_required">smtpd_helo_required</a> (no)</b>
-              Require  that  a  remote  SMTP client introduces itself with the
-              HELO or EHLO command before sending the MAIL  command  or  other
+              Require that a remote SMTP client  introduces  itself  with  the
+              HELO  or  EHLO  command before sending the MAIL command or other
               commands that require EHLO negotiation.
 
        <b><a href="postconf.5.html#smtpd_helo_restrictions">smtpd_helo_restrictions</a> (empty)</b>
-              Optional  restrictions  that  the Postfix SMTP server applies in
+              Optional restrictions that the Postfix SMTP  server  applies  in
               the context of a client HELO command.
 
        <b><a href="postconf.5.html#smtpd_sender_restrictions">smtpd_sender_restrictions</a> (empty)</b>
-              Optional restrictions that the Postfix SMTP  server  applies  in
+              Optional  restrictions  that  the Postfix SMTP server applies in
               the context of a client MAIL FROM command.
 
        <b><a href="postconf.5.html#smtpd_recipient_restrictions">smtpd_recipient_restrictions</a> (see 'postconf -d' output)</b>
-              Optional  restrictions  that  the Postfix SMTP server applies in
-              the   context   of   a   client   RCPT   TO    command,    after
+              Optional restrictions that the Postfix SMTP  server  applies  in
+              the    context    of   a   client   RCPT   TO   command,   after
               <a href="postconf.5.html#smtpd_relay_restrictions">smtpd_relay_restrictions</a>.
 
        <b><a href="postconf.5.html#smtpd_etrn_restrictions">smtpd_etrn_restrictions</a> (empty)</b>
-              Optional  restrictions  that  the Postfix SMTP server applies in
+              Optional restrictions that the Postfix SMTP  server  applies  in
               the context of a client ETRN command.
 
        <b><a href="postconf.5.html#allow_untrusted_routing">allow_untrusted_routing</a> (no)</b>
-              Forward      mail      with       sender-specified       routing
-              (user[@%!]remote[@%!]site)  from  untrusted  clients to destina-
+              Forward       mail       with      sender-specified      routing
+              (user[@%!]remote[@%!]site) from untrusted  clients  to  destina-
               tions matching $<a href="postconf.5.html#relay_domains">relay_domains</a>.
 
        <b><a href="postconf.5.html#smtpd_restriction_classes">smtpd_restriction_classes</a> (empty)</b>
               User-defined aliases for groups of access restrictions.
 
        <b><a href="postconf.5.html#smtpd_null_access_lookup_key">smtpd_null_access_lookup_key</a> (</b>&lt;&gt;<b>)</b>
-              The lookup key to be used in SMTP <a href="access.5.html"><b>access</b>(5)</a>  tables  instead  of
+              The  lookup  key  to be used in SMTP <a href="access.5.html"><b>access</b>(5)</a> tables instead of
               the null sender address.
 
        <b><a href="postconf.5.html#permit_mx_backup_networks">permit_mx_backup_networks</a> (empty)</b>
-              Restrict  the use of the <a href="postconf.5.html#permit_mx_backup">permit_mx_backup</a> SMTP access feature to
+              Restrict the use of the <a href="postconf.5.html#permit_mx_backup">permit_mx_backup</a> SMTP access feature  to
               only domains whose primary MX hosts match the listed networks.
 
        Available in Postfix version 2.0 and later:
@@ -926,19 +932,19 @@ SMTPD(8)                                                              SMTPD(8)
               applies in the context of the SMTP DATA command.
 
        <b><a href="postconf.5.html#smtpd_expansion_filter">smtpd_expansion_filter</a> (see 'postconf -d' output)</b>
-              What  characters  are  allowed  in $name expansions of RBL reply
+              What characters are allowed in $name  expansions  of  RBL  reply
               templates.
 
        Available in Postfix version 2.1 and later:
 
        <b><a href="postconf.5.html#smtpd_reject_unlisted_sender">smtpd_reject_unlisted_sender</a> (no)</b>
-              Request that the Postfix SMTP server rejects mail  from  unknown
-              sender  addresses,  even when no explicit <a href="postconf.5.html#reject_unlisted_sender">reject_unlisted_sender</a>
+              Request  that  the Postfix SMTP server rejects mail from unknown
+              sender addresses, even when no  explicit  <a href="postconf.5.html#reject_unlisted_sender">reject_unlisted_sender</a>
               access restriction is specified.
 
        <b><a href="postconf.5.html#smtpd_reject_unlisted_recipient">smtpd_reject_unlisted_recipient</a> (yes)</b>
-              Request that the Postfix SMTP server rejects  mail  for  unknown
-              recipient      addresses,      even     when     no     explicit
+              Request  that  the  Postfix SMTP server rejects mail for unknown
+              recipient     addresses,     even     when      no      explicit
               <a href="postconf.5.html#reject_unlisted_recipient">reject_unlisted_recipient</a> access restriction is specified.
 
        Available in Postfix version 2.2 and later:
@@ -952,17 +958,17 @@ SMTPD(8)                                                              SMTPD(8)
        <b><a href="postconf.5.html#smtpd_relay_restrictions">smtpd_relay_restrictions</a> (<a href="postconf.5.html#permit_mynetworks">permit_mynetworks</a>, <a href="postconf.5.html#permit_sasl_authenticated">permit_sasl_authenticated</a>,</b>
        <b><a href="postconf.5.html#defer_unauth_destination">defer_unauth_destination</a>)</b>
               Access restrictions for mail relay control that the Postfix SMTP
-              server applies in the context of the  RCPT  TO  command,  before
+              server  applies  in  the  context of the RCPT TO command, before
               <a href="postconf.5.html#smtpd_recipient_restrictions">smtpd_recipient_restrictions</a>.
 
 <b>SENDER AND RECIPIENT ADDRESS VERIFICATION CONTROLS</b>
-       Postfix  version  2.1 introduces sender and recipient address verifica-
+       Postfix version 2.1 introduces sender and recipient  address  verifica-
        tion.  This feature is implemented by sending probe email messages that
        are  not  actually  delivered.   This  feature  is  requested  via  the
-       <a href="postconf.5.html#reject_unverified_sender">reject_unverified_sender</a>   and    <a href="postconf.5.html#reject_unverified_recipient">reject_unverified_recipient</a>    access
-       restrictions.   The  status of verification probes is maintained by the
-       <a href="verify.8.html"><b>verify</b>(8)</a> server.  See the file <a href="ADDRESS_VERIFICATION_README.html">ADDRESS_VERIFICATION_README</a> for  infor-
-       mation  about how to configure and operate the Postfix sender/recipient
+       <a href="postconf.5.html#reject_unverified_sender">reject_unverified_sender</a>    and    <a href="postconf.5.html#reject_unverified_recipient">reject_unverified_recipient</a>   access
+       restrictions.  The status of verification probes is maintained  by  the
+       <a href="verify.8.html"><b>verify</b>(8)</a>  server.  See the file <a href="ADDRESS_VERIFICATION_README.html">ADDRESS_VERIFICATION_README</a> for infor-
+       mation about how to configure and operate the Postfix  sender/recipient
        address verification service.
 
        <b><a href="postconf.5.html#address_verify_poll_count">address_verify_poll_count</a> (normal: 3, overload: 1)</b>
@@ -974,7 +980,7 @@ SMTPD(8)                                                              SMTPD(8)
               fication request in progress.
 
        <b><a href="postconf.5.html#address_verify_sender">address_verify_sender</a> ($<a href="postconf.5.html#double_bounce_sender">double_bounce_sender</a>)</b>
-              The sender address to use in address verification probes;  prior
+              The  sender address to use in address verification probes; prior
               to Postfix 2.5 the default was "postmaster".
 
        <b><a href="postconf.5.html#unverified_sender_reject_code">unverified_sender_reject_code</a> (450)</b>
@@ -982,18 +988,18 @@ SMTPD(8)                                                              SMTPD(8)
               address is rejected by the <a href="postconf.5.html#reject_unverified_sender">reject_unverified_sender</a> restriction.
 
        <b><a href="postconf.5.html#unverified_recipient_reject_code">unverified_recipient_reject_code</a> (450)</b>
-              The  numerical  Postfix  SMTP  server  response when a recipient
-              address is rejected by the <a href="postconf.5.html#reject_unverified_recipient">reject_unverified_recipient</a>  restric-
+              The numerical Postfix SMTP  server  response  when  a  recipient
+              address  is rejected by the <a href="postconf.5.html#reject_unverified_recipient">reject_unverified_recipient</a> restric-
               tion.
 
        Available in Postfix version 2.6 and later:
 
        <b><a href="postconf.5.html#unverified_sender_defer_code">unverified_sender_defer_code</a> (450)</b>
-              The  numerical  Postfix  SMTP server response code when a sender
+              The numerical Postfix SMTP server response code  when  a  sender
               address probe fails due to a temporary error condition.
 
        <b><a href="postconf.5.html#unverified_recipient_defer_code">unverified_recipient_defer_code</a> (450)</b>
-              The numerical Postfix SMTP  server  response  when  a  recipient
+              The  numerical  Postfix  SMTP  server  response when a recipient
               address probe fails due to a temporary error condition.
 
        <b><a href="postconf.5.html#unverified_sender_reject_reason">unverified_sender_reject_reason</a> (empty)</b>
@@ -1005,17 +1011,17 @@ SMTPD(8)                                                              SMTPD(8)
               <a href="postconf.5.html#reject_unverified_recipient">reject_unverified_recipient</a>.
 
        <b><a href="postconf.5.html#unverified_sender_tempfail_action">unverified_sender_tempfail_action</a> ($<a href="postconf.5.html#reject_tempfail_action">reject_tempfail_action</a>)</b>
-              The  Postfix  SMTP server's action when <a href="postconf.5.html#reject_unverified_sender">reject_unverified_sender</a>
+              The Postfix SMTP server's action  when  <a href="postconf.5.html#reject_unverified_sender">reject_unverified_sender</a>
               fails due to a temporary error condition.
 
        <b><a href="postconf.5.html#unverified_recipient_tempfail_action">unverified_recipient_tempfail_action</a> ($<a href="postconf.5.html#reject_tempfail_action">reject_tempfail_action</a>)</b>
-              The Postfix SMTP server's action when  <a href="postconf.5.html#reject_unverified_recipient">reject_unverified_recipi</a>-
+              The  Postfix SMTP server's action when <a href="postconf.5.html#reject_unverified_recipient">reject_unverified_recipi</a>-
               <a href="postconf.5.html#reject_unverified_recipient">ent</a> fails due to a temporary error condition.
 
        Available with Postfix 2.9 and later:
 
        <b><a href="postconf.5.html#address_verify_sender_ttl">address_verify_sender_ttl</a> (0s)</b>
-              The  time  between  changes  in  the  time-dependent  portion of
+              The time  between  changes  in  the  time-dependent  portion  of
               address verification probe sender addresses.
 
 <b>ACCESS CONTROL RESPONSES</b>
@@ -1027,63 +1033,63 @@ SMTPD(8)                                                              SMTPD(8)
               map "reject" action.
 
        <b><a href="postconf.5.html#defer_code">defer_code</a> (450)</b>
-              The numerical Postfix SMTP server response code  when  a  remote
+              The  numerical  Postfix  SMTP server response code when a remote
               SMTP client request is rejected by the "defer" restriction.
 
        <b><a href="postconf.5.html#invalid_hostname_reject_code">invalid_hostname_reject_code</a> (501)</b>
-              The  numerical Postfix SMTP server response code when the client
-              HELO  or   EHLO   command   parameter   is   rejected   by   the
+              The numerical Postfix SMTP server response code when the  client
+              HELO   or   EHLO   command   parameter   is   rejected   by  the
               <a href="postconf.5.html#reject_invalid_helo_hostname">reject_invalid_helo_hostname</a> restriction.
 
        <b><a href="postconf.5.html#maps_rbl_reject_code">maps_rbl_reject_code</a> (554)</b>
-              The  numerical  Postfix  SMTP server response code when a remote
-              SMTP  client  request  is  blocked  by  the   <a href="postconf.5.html#reject_rbl_client">reject_rbl_client</a>,
+              The numerical Postfix SMTP server response code  when  a  remote
+              SMTP   client  request  is  blocked  by  the  <a href="postconf.5.html#reject_rbl_client">reject_rbl_client</a>,
               <a href="postconf.5.html#reject_rhsbl_client">reject_rhsbl_client</a>,                <a href="postconf.5.html#reject_rhsbl_reverse_client">reject_rhsbl_reverse_client</a>,
               <a href="postconf.5.html#reject_rhsbl_sender">reject_rhsbl_sender</a> or <a href="postconf.5.html#reject_rhsbl_recipient">reject_rhsbl_recipient</a> restriction.
 
        <b><a href="postconf.5.html#non_fqdn_reject_code">non_fqdn_reject_code</a> (504)</b>
-              The numerical Postfix SMTP  server  reply  code  when  a  client
-              request   is   rejected  by  the  <a href="postconf.5.html#reject_non_fqdn_helo_hostname">reject_non_fqdn_helo_hostname</a>,
+              The  numerical  Postfix  SMTP  server  reply  code when a client
+              request  is  rejected  by   the   <a href="postconf.5.html#reject_non_fqdn_helo_hostname">reject_non_fqdn_helo_hostname</a>,
               <a href="postconf.5.html#reject_non_fqdn_sender">reject_non_fqdn_sender</a> or <a href="postconf.5.html#reject_non_fqdn_recipient">reject_non_fqdn_recipient</a> restriction.
 
        <b><a href="postconf.5.html#plaintext_reject_code">plaintext_reject_code</a> (450)</b>
-              The  numerical  Postfix SMTP server response code when a request
+              The numerical Postfix SMTP server response code when  a  request
               is rejected by the <b><a href="postconf.5.html#reject_plaintext_session">reject_plaintext_session</a></b> restriction.
 
        <b><a href="postconf.5.html#reject_code">reject_code</a> (554)</b>
-              The numerical Postfix SMTP server response code  when  a  remote
+              The  numerical  Postfix  SMTP server response code when a remote
               SMTP client request is rejected by the "reject" restriction.
 
        <b><a href="postconf.5.html#relay_domains_reject_code">relay_domains_reject_code</a> (554)</b>
-              The  numerical  Postfix  SMTP server response code when a client
-              request is rejected by the  <a href="postconf.5.html#reject_unauth_destination">reject_unauth_destination</a>  recipient
+              The numerical Postfix SMTP server response code  when  a  client
+              request  is  rejected by the <a href="postconf.5.html#reject_unauth_destination">reject_unauth_destination</a> recipient
               restriction.
 
        <b><a href="postconf.5.html#unknown_address_reject_code">unknown_address_reject_code</a> (450)</b>
               The numerical Postfix SMTP server response code when a sender or
-              recipient      address      is       rejected       by       the
-              <a href="postconf.5.html#reject_unknown_sender_domain">reject_unknown_sender_domain</a>  or <a href="postconf.5.html#reject_unknown_recipient_domain">reject_unknown_recipient_domain</a>
+              recipient       address       is       rejected      by      the
+              <a href="postconf.5.html#reject_unknown_sender_domain">reject_unknown_sender_domain</a> or  <a href="postconf.5.html#reject_unknown_recipient_domain">reject_unknown_recipient_domain</a>
               restriction.
 
        <b><a href="postconf.5.html#unknown_client_reject_code">unknown_client_reject_code</a> (450)</b>
-              The numerical Postfix SMTP server response code  when  a  client
-              without  valid  address  &lt;=&gt;  name  mapping  is  rejected by the
+              The  numerical  Postfix  SMTP server response code when a client
+              without valid address  &lt;=&gt;  name  mapping  is  rejected  by  the
               <a href="postconf.5.html#reject_unknown_client_hostname">reject_unknown_client_hostname</a> restriction.
 
        <b><a href="postconf.5.html#unknown_hostname_reject_code">unknown_hostname_reject_code</a> (450)</b>
-              The numerical Postfix SMTP server response code when  the  host-
-              name  specified with the HELO or EHLO command is rejected by the
+              The  numerical  Postfix SMTP server response code when the host-
+              name specified with the HELO or EHLO command is rejected by  the
               <a href="postconf.5.html#reject_unknown_helo_hostname">reject_unknown_helo_hostname</a> restriction.
 
        Available in Postfix version 2.0 and later:
 
        <b><a href="postconf.5.html#default_rbl_reply">default_rbl_reply</a> (see 'postconf -d' output)</b>
-              The default Postfix SMTP server response template for a  request
+              The  default Postfix SMTP server response template for a request
               that is rejected by an RBL-based restriction.
 
        <b><a href="postconf.5.html#multi_recipient_bounce_reject_code">multi_recipient_bounce_reject_code</a> (550)</b>
-              The  numerical  Postfix  SMTP server response code when a remote
-              SMTP client  request  is  blocked  by  the  <a href="postconf.5.html#reject_multi_recipient_bounce">reject_multi_recipi</a>-
+              The numerical Postfix SMTP server response code  when  a  remote
+              SMTP  client  request  is  blocked  by  the <a href="postconf.5.html#reject_multi_recipient_bounce">reject_multi_recipi</a>-
               <a href="postconf.5.html#reject_multi_recipient_bounce">ent_bounce</a> restriction.
 
        <b><a href="postconf.5.html#rbl_reply_maps">rbl_reply_maps</a> (empty)</b>
@@ -1093,52 +1099,52 @@ SMTPD(8)                                                              SMTPD(8)
 
        <b><a href="postconf.5.html#access_map_defer_code">access_map_defer_code</a> (450)</b>
               The numerical Postfix SMTP server response code for an <a href="access.5.html"><b>access</b>(5)</a>
-              map   "defer"    action,    including    "<a href="postconf.5.html#defer_if_permit">defer_if_permit</a>"    or
+              map    "defer"    action,    including    "<a href="postconf.5.html#defer_if_permit">defer_if_permit</a>"   or
               "<a href="postconf.5.html#defer_if_reject">defer_if_reject</a>".
 
        <b><a href="postconf.5.html#reject_tempfail_action">reject_tempfail_action</a> (<a href="postconf.5.html#defer_if_permit">defer_if_permit</a>)</b>
-              The  Postfix SMTP server's action when a reject-type restriction
+              The Postfix SMTP server's action when a reject-type  restriction
               fails due to a temporary error condition.
 
        <b><a href="postconf.5.html#unknown_helo_hostname_tempfail_action">unknown_helo_hostname_tempfail_action</a> ($<a href="postconf.5.html#reject_tempfail_action">reject_tempfail_action</a>)</b>
-              The Postfix SMTP server's action when  <a href="postconf.5.html#reject_unknown_helo_hostname">reject_unknown_helo_host</a>-
+              The  Postfix SMTP server's action when <a href="postconf.5.html#reject_unknown_helo_hostname">reject_unknown_helo_host</a>-
               <a href="postconf.5.html#reject_unknown_helo_hostname">name</a> fails due to an temporary error condition.
 
        <b><a href="postconf.5.html#unknown_address_tempfail_action">unknown_address_tempfail_action</a> ($<a href="postconf.5.html#reject_tempfail_action">reject_tempfail_action</a>)</b>
-              The       Postfix       SMTP      server's      action      when
-              <a href="postconf.5.html#reject_unknown_sender_domain">reject_unknown_sender_domain</a> or  <a href="postconf.5.html#reject_unknown_recipient_domain">reject_unknown_recipient_domain</a>
+              The      Postfix      SMTP      server's       action       when
+              <a href="postconf.5.html#reject_unknown_sender_domain">reject_unknown_sender_domain</a>  or <a href="postconf.5.html#reject_unknown_recipient_domain">reject_unknown_recipient_domain</a>
               fail due to a temporary error condition.
 
 <b>MISCELLANEOUS CONTROLS</b>
        <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#daemon_timeout">daemon_timeout</a> (18000s)</b>
-              How much time a Postfix daemon process  may  take  to  handle  a
+              How  much  time  a  Postfix  daemon process may take to handle a
               request before it is terminated by a built-in watchdog timer.
 
        <b><a href="postconf.5.html#command_directory">command_directory</a> (see 'postconf -d' output)</b>
               The location of all postfix administrative commands.
 
        <b><a href="postconf.5.html#double_bounce_sender">double_bounce_sender</a> (double-bounce)</b>
-              The  sender  address of postmaster notifications that are gener-
+              The sender address of postmaster notifications that  are  gener-
               ated by the mail system.
 
        <b><a href="postconf.5.html#ipc_timeout">ipc_timeout</a> (3600s)</b>
-              The time limit for sending  or  receiving  information  over  an
+              The  time  limit  for  sending  or receiving information over an
               internal communication channel.
 
        <b><a href="postconf.5.html#mail_name">mail_name</a> (Postfix)</b>
-              The  mail system name that is displayed in Received: headers, in
+              The mail system name that is displayed in Received: headers,  in
               the SMTP greeting banner, and in bounced mail.
 
        <b><a href="postconf.5.html#mail_owner">mail_owner</a> (postfix)</b>
-              The UNIX system account that owns the  Postfix  queue  and  most
+              The  UNIX  system  account  that owns the Postfix queue and most
               Postfix daemon processes.
 
        <b><a href="postconf.5.html#max_idle">max_idle</a> (100s)</b>
-              The  maximum  amount of time that an idle Postfix daemon process
+              The maximum amount of time that an idle Postfix  daemon  process
               waits for an incoming connection before terminating voluntarily.
 
        <b><a href="postconf.5.html#max_use">max_use</a> (100)</b>
@@ -1149,11 +1155,11 @@ SMTPD(8)                                                              SMTPD(8)
               The internet hostname of this mail system.
 
        <b><a href="postconf.5.html#mynetworks">mynetworks</a> (see 'postconf -d' output)</b>
-              The list of "trusted" remote SMTP clients that have more  privi-
+              The  list of "trusted" remote SMTP clients that have more privi-
               leges than "strangers".
 
        <b><a href="postconf.5.html#myorigin">myorigin</a> ($<a href="postconf.5.html#myhostname">myhostname</a>)</b>
-              The  domain  name that locally-posted mail appears to come from,
+              The domain name that locally-posted mail appears to  come  from,
               and that locally posted mail is delivered to.
 
        <b><a href="postconf.5.html#process_id">process_id</a> (read-only)</b>
@@ -1166,26 +1172,26 @@ SMTPD(8)                                                              SMTPD(8)
               The location of the Postfix top-level queue directory.
 
        <b><a href="postconf.5.html#recipient_delimiter">recipient_delimiter</a> (empty)</b>
-              The set of characters that can separate a  user  name  from  its
-              extension  (example: user+foo), or a .forward file name from its
+              The  set  of  characters  that can separate a user name from its
+              extension (example: user+foo), or a .forward file name from  its
               extension (example: .forward+foo).
 
        <b><a href="postconf.5.html#smtpd_banner">smtpd_banner</a> ($<a href="postconf.5.html#myhostname">myhostname</a> ESMTP $<a href="postconf.5.html#mail_name">mail_name</a>)</b>
-              The text that follows the 220 status code in the  SMTP  greeting
+              The  text  that follows the 220 status code in the SMTP greeting
               banner.
 
        <b><a href="postconf.5.html#syslog_facility">syslog_facility</a> (mail)</b>
               The syslog facility of Postfix logging.
 
        <b><a href="postconf.5.html#syslog_name">syslog_name</a> (see 'postconf -d' output)</b>
-              The  mail  system  name that is prepended to the process name in
-              syslog records, so that "smtpd"  becomes,  for  example,  "post-
+              The mail system name that is prepended to the  process  name  in
+              syslog  records,  so  that  "smtpd" becomes, for example, "post-
               fix/smtpd".
 
        Available in Postfix version 2.2 and later:
 
        <b><a href="postconf.5.html#smtpd_forbidden_commands">smtpd_forbidden_commands</a> (CONNECT, GET, POST)</b>
-              List  of  commands that cause the Postfix SMTP server to immedi-
+              List of commands that cause the Postfix SMTP server  to  immedi-
               ately terminate the session with a 221 code.
 
        Available in Postfix version 2.5 and later:
index ec7d2db2cfec49d92da178a2068a306ac2840fcd..68f9bab24722b3f78bee97d1a698a2b1884ff4e1 100644 (file)
@@ -273,24 +273,24 @@ The file format is described in \fBpcre_table\fR(5).
 .IP "\fBpgsql\fR (read-only)"
 PostgreSQL database client. This is described in
 \fBpgsql_table\fR(5).
-.IP "\fBpipeline\fR (read-only)"
+.IP "\fBpipemap\fR (read-only)"
 A pipeline of lookup tables.  Example:
-"\fBpipeline:\fI!type_1:name_1!  ... !type_n:name_n\fR".
-Each "pipeline:" query is given to the first table.  Each
+"\fBpipemap:\fI!type_1:name_1!  ... !type_n:name_n\fR".
+Each "pipemap:" 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 ASCII character after "pipeline:"
+produces no result. The first ASCII character after "pipemap:"
 will be used as the separator between the lookup tables
 that follow (do not use space, ",", ":" or non-ASCII).
 .IP "\fBproxy\fR"
 Postfix \fBproxymap\fR(8) client for shared access to Postfix
 databases. The table name syntax is \fItype\fB:\fIname\fR.
-.IP "\fBrandom\fR (read-only)"
+.IP "\fBrandmap\fR (read-only)"
 An in-memory table that performs random selection. Example:
-"\fBrandom:\fI!result_1! ... !result_n\fR". Each table query
-returns a random choice from the specified results. The
-ASCII character after "random:" will be used as the separator
+"\fBrandmap:\fI!result_1! ... !result_n\fR". Each table query
+returns a random choice from the specified results. The first
+ASCII character after "randmap:" will be used as the separator
 between the results that follow (do not use space, ",", ":"
 or non-ASCII).
 .IP "\fBregexp\fR (read-only)"
index d74aab7e25148b1efcd8528cadb9b67bb5e84220..7fdda2a1ab7ce83dcfa8958abb7f3be89515729f 100644 (file)
@@ -9370,6 +9370,15 @@ The time after which an active SMTPD policy service connection is
 closed.
 .PP
 This feature is available in Postfix 2.1 and later.
+.SH smtpd_policy_service_request_limit (default: 0)
+The maximal number of requests per Postfix SMTP server policy
+connection, or zero (no limit). Once a connection reaches this
+limit, the connection is closed and the next request will be sent
+over a new connection. This is a workaround to avoid error-recovery
+delays with policy servers that cannot maintain a persistent
+connection.
+.PP
+This feature is available in Postfix 2.12 and later.
 .SH smtpd_policy_service_timeout (default: 100s)
 The time limit for connecting to, writing to or receiving from a
 delegated SMTPD policy server.
index 563ec475d5a3d641aaef65aff146e6bbfcfb4368..3cea206f9da4d47aaf97c653f18fd6af368bf147 100644 (file)
@@ -768,6 +768,11 @@ closed.
 .IP "\fBsmtpd_policy_service_timeout (100s)\fR"
 The time limit for connecting to, writing to or receiving from a
 delegated SMTPD policy server.
+.PP
+Available in Postfix version 2.12 and later:
+.IP "\fBsmtpd_policy_service_request_limit (0)\fR"
+The maximal number of requests per Postfix SMTP server policy
+connection, or zero (no limit).
 .SH "ACCESS CONTROLS"
 .na
 .nf
index fdf078c48080527665d4c4e78ae0fac2d85b3bed..79c89a31944f1b1cc0100742c0bbb2f43dc1b941 100755 (executable)
@@ -545,6 +545,7 @@ while (<>) {
     s;\bsmtpd_policy_service_max_idle\b;<a href="postconf.5.html#smtpd_policy_service_max_idle">$&</a>;g;
     s;\bsmtpd_policy_service_max_ttl\b;<a href="postconf.5.html#smtpd_policy_service_max_ttl">$&</a>;g;
     s;\bsmtpd_policy_service_timeout\b;<a href="postconf.5.html#smtpd_policy_service_timeout">$&</a>;g;
+    s;\bsmtpd_policy_service_request_limit\b;<a href="postconf.5.html#smtpd_policy_service_request_limit">$&</a>;g;
     s;\bsmtpd_proxy_ehlo\b;<a href="postconf.5.html#smtpd_proxy_ehlo">$&</a>;g;
     s;\bsmtpd_proxy_filter\b;<a href="postconf.5.html#smtpd_proxy_filter">$&</a>;g;
     s;\bsmtpd_proxy_timeout\b;<a href="postconf.5.html#smtpd_proxy_timeout">$&</a>;g;
@@ -1114,9 +1115,9 @@ while (<>) {
     s/\b(nisplus):/<a href="nisplus_table.5.html">$1<\/a>:/g;
     s/\b(pcre):/<a href="pcre_table.5.html">$1<\/a>:/g;
     s/\b(pgsql):/<a href="pgsql_table.5.html">$1<\/a>:/g;
-    s;\b(pipe[-</bB>]*\n*[ <bB>]*line):;<a href="DATABASE_README.html#types">$1<\/a>:;g;
+    s;\b(pipe[-</bB>]*\n*[ <bB>]*map):;<a href="DATABASE_README.html#types">$1<\/a>:;g;
     s/\b(proxy):/<a href="proxymap.8.html">$1<\/a>:/g;
-    s/\b(random):/<a href="DATABASE_README.html#types">$1<\/a>:/g;
+    s/\b(randmap):/<a href="DATABASE_README.html#types">$1<\/a>:/g;
     s/\b(regexp):/<a href="regexp_table.5.html">$1<\/a>:/g;
     s/\b(sdbm):/<a href="DATABASE_README.html#types">$1<\/a>:/g;
     s/\b(socketmap):/<a href="socketmap_table.html">$1<\/a>:/g;
index c21396db386fec997a509d32aba930c7f1330a1f..3ac27ec3d4f783283bcd6af414c1f159b4c6e987 100644 (file)
@@ -362,16 +362,17 @@ The file format is described in pcre_table(5). The lookup table
 name as used in "pcre:table" is the name of the regular expression
 file.  </dd>
 
-<dt> <b>pipeline</b> (read-only) </dt>
+<dt> <b>pipemap</b> (read-only) </dt>
 
 <dd> A pipeline of lookup tables. Example:
-"<b>pipeline:</b><i>!type_1:name_1! ... !type_n:name_n</i>".  Each
-"pipeline:" 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 ASCII character
-after "pipeline:" will be used as the separator between the lookup
-tables that follow (do not use space, ",", ":" or non-ASCII).  </dd>
+"<b>pipemap:</b><i>!type<sub>1</sub>:name<sub>1</sub>! ...
+!type<sub>n</sub>:name<sub>n</sub></i>".  Each "pipemap:" 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 ASCII character after "pipemap:"
+will be used as the separator between the lookup tables that follow
+(do not use space, ",", ":" or non-ASCII).  </dd>
 
 <dt> <b>pgsql</b> (read-only) </dt>
 
@@ -384,14 +385,14 @@ in pgsql_table(5). </dd>
 databases. The lookup table name syntax is "proxy:type:table".
 </dd>
 
-<dt> <b>random</b> (read-only) </dt>
+<dt> <b>randmap</b> (read-only) </dt>
 
 <dd> An in-memory table that performs random selection.  Example:
-"<b>random:</b><i>!result_1! ... !result_n</i>". Each table query
-returns a random choice from the specified results. The ASCII
-character after "random:" will be used as the separator between the
-results that follow (do not use space, ",", ":" or non-ASCII).
-</dd>
+"<b>randmap:</b><i>!result<sub>1</sub>! ... !result<sub>n</sub></i>".
+Each table query returns a random choice from the specified results.
+The first ASCII character after "randmap:" will be used as the
+separator between the results that follow (do not use space, ",",
+":" or non-ASCII).  </dd>
 
 <dt> <b>regexp</b> (read-only) </dt>
 
index 37e8cc02bbf6fd16263a5b3efd03d75c8852a612..7d59b09a9cdfbb02380837119f0a1c8ef6a3f262 100644 (file)
@@ -266,6 +266,7 @@ daemon, you would use something like this: </p>
  9         check_policy_service unix:private/policy 
 10         ...
 11     policy_time_limit = 3600
+12     # smtpd_policy_service_request_limit = 1
 </pre>
 </blockquote>
 
@@ -305,6 +306,10 @@ of a master.cf service name (in the above example, "policy") and a
 built-in suffix (in the above example: "_time_limit").  </p>
 </blockquote>
 
+<li> <p> Line 12: specify smtpd_policy_service_request_limit to
+avoid error-recovery delays with policy servers that cannot
+maintain a persistent connection. </p>
+
 <li> <p> With Solaris &lt; 9, or Postfix &lt; 2.10 on any Solaris
 version, use TCP sockets instead of UNIX-domain sockets: </p>
 
@@ -323,11 +328,12 @@ version, use TCP sockets instead of UNIX-domain sockets: </p>
  9         check_policy_service inet:127.0.0.1:9998
 10         ...
 11     127.0.0.1:9998_time_limit = 3600
+12     # smtpd_policy_service_request_limit = 1
 </pre>
 </blockquote>
 
-<p> Other configuration parameters that control the client side of
-the policy delegation protocol: </p>
+<p> Configuration parameters that control the client side of the
+policy delegation protocol: </p>
 
 <ul>
 
@@ -342,6 +348,22 @@ client connection. </p>
 <li> <p> smtpd_policy_service_timeout (default: 100s): The time
 limit to connect to, send to or receive from a policy server. </p>
 
+<li> <p> smtpd_policy_service_request_limit (default: 0): The maximal
+number of requests per policy connection, or zero (no limit). </p>
+
+</ul>
+
+<p> Configuration parameters that control the server side of the
+policy delegation protocol: </p>
+
+<ul>
+
+<li> <p> <i>transport</i>_time_limit ($command_time_limit): The
+maximal amount of time the policy daemon is allowed to run before
+it is terminated. The <i>transport</i> is the service name of the
+master.cf entry for the policy daemon service. In the above
+examples, the service name is "policy" or "127.0.0.1:9998". </p>
+
 </ul>
 
 <h2><a name="greylist">Example: greylist policy server</a></h2>
@@ -415,6 +437,7 @@ processes only: </p>
  9         reject_unauth_destination 
 10         check_policy_service unix:private/greylist
 11         ...
+12     # smtpd_policy_service_request_limit = 1
 </pre>
 </blockquote>
 
@@ -453,6 +476,10 @@ of a master.cf service name (in the above example, "greylist") and
 a built-in suffix (in the above example: "_time_limit").  </p>
 </blockquote>
 
+<li> <p> Line 12: specify smtpd_policy_service_request_limit to
+avoid error-recovery delays with policy servers that cannot
+maintain a persistent connection. </p>
+
 </ul>
 
 <p> With Solaris &lt; 9, or Postfix &lt; 2.10 on any Solaris
@@ -473,6 +500,7 @@ client/server configuration</a>" section above.  </p>
  9         reject_unauth_destination 
 10         check_policy_service inet:127.0.0.1:9998
 11         ...
+12     # smtpd_policy_service_request_limit = 1
 </pre>
 </blockquote>
 
index 2af63381b20e85b0465b668874da606efc69d2c9..4b9d531bc321152f1f98bb528cf40c39eddd4fde 100644 (file)
@@ -8343,6 +8343,21 @@ delegated SMTPD policy server.
 This feature is available in Postfix 2.1 and later.
 </p>
 
+%PARAM smtpd_policy_service_request_limit 0
+
+<p>
+The maximal number of requests per Postfix SMTP server policy
+connection, or zero (no limit). Once a connection reaches this
+limit, the connection is closed and the next request will be sent
+over a new connection. This is a workaround to avoid error-recovery
+delays with policy servers that cannot maintain a persistent
+connection.
+</p>
+
+<p>
+This feature is available in Postfix 2.12 and later.
+</p>
+
 %PARAM smtpd_reject_unlisted_recipient yes
 
 <p>
index 9e345d80a5c7c36cb0c6bd436bcbc261f7a59fdd..e96d165a558633edeb8d3dd9a5baeadf8021d76e 100644 (file)
@@ -2884,6 +2884,10 @@ extern char *var_smtpd_input_transp;
 #define DEF_SMTPD_POLICY_TMOUT         "100s"
 extern int var_smtpd_policy_tmout;
 
+#define VAR_SMTPD_POLICY_REQ_LIMIT     "smtpd_policy_service_request_limit"
+#define DEF_SMTPD_POLICY_REQ_LIMIT     0
+extern int var_smtpd_policy_req_limit;
+
 #define VAR_SMTPD_POLICY_IDLE          "smtpd_policy_service_max_idle"
 #define DEF_SMTPD_POLICY_IDLE          "300s"
 extern int var_smtpd_policy_idle;
index 497be7128f29ab3cd9d66921068c65fb28f35bcd..66222c83ac81e6684a9727b5244819c545da4f1b 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      "20140629"
+#define MAIL_RELEASE_DATE      "20140701"
 #define MAIL_VERSION_NUMBER    "2.12"
 
 #ifdef SNAPSHOT
index 127de63e11b2fdccee41a54efc2202b61929eaaa..c5251b8fcb3faf350670b1982e1a9c1f67e3a8fd 100644 (file)
 /* .IP "\fBpgsql\fR (read-only)"
 /*     PostgreSQL database client. This is described in
 /*     \fBpgsql_table\fR(5).
-/* .IP "\fBpipeline\fR (read-only)"
+/* .IP "\fBpipemap\fR (read-only)"
 /*     A pipeline of lookup tables.  Example:
-/*     "\fBpipeline:\fI!type_1:name_1!  ... !type_n:name_n\fR".
-/*     Each "pipeline:" query is given to the first table.  Each
+/*     "\fBpipemap:\fI!type_1:name_1!  ... !type_n:name_n\fR".
+/*     Each "pipemap:" 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 ASCII character after "pipeline:"
+/*     produces no result. The first ASCII character after "pipemap:"
 /*     will be used as the separator between the lookup tables
 /*     that follow (do not use space, ",", ":" or non-ASCII).
 /* .IP "\fBproxy\fR"
 /*     Postfix \fBproxymap\fR(8) client for shared access to Postfix
 /*     databases. The table name syntax is \fItype\fB:\fIname\fR.
-/* .IP "\fBrandom\fR (read-only)"
+/* .IP "\fBrandmap\fR (read-only)"
 /*     An in-memory table that performs random selection. Example:
-/*     "\fBrandom:\fI!result_1! ... !result_n\fR". Each table query
-/*     returns a random choice from the specified results. The
-/*     ASCII character after "random:" will be used as the separator
+/*     "\fBrandmap:\fI!result_1! ... !result_n\fR". Each table query
+/*     returns a random choice from the specified results. The first
+/*     ASCII character after "randmap:" will be used as the separator
 /*     between the results that follow (do not use space, ",", ":"
 /*     or non-ASCII).
 /* .IP "\fBregexp\fR (read-only)"
index d19bbde9111c57e48125f44a8dc1833c2b7121c3..4b8a6ba2baf277b62df09811c4b29ce6c684f399 100644 (file)
 /* .IP "\fBsmtpd_policy_service_timeout (100s)\fR"
 /*     The time limit for connecting to, writing to or receiving from a
 /*     delegated SMTPD policy server.
+/* .PP
+/*     Available in Postfix version 2.12 and later:
+/* .IP "\fBsmtpd_policy_service_request_limit (0)\fR"
+/*     The maximal number of requests per Postfix SMTP server policy
+/*     connection, or zero (no limit).
 /* ACCESS CONTROLS
 /* .ad
 /* .fi
@@ -1224,6 +1229,7 @@ char   *var_smtpd_proxy_ehlo;
 char   *var_smtpd_proxy_opts;
 char   *var_input_transp;
 int     var_smtpd_policy_tmout;
+int     var_smtpd_policy_req_limit;
 int     var_smtpd_policy_idle;
 int     var_smtpd_policy_ttl;
 char   *var_xclient_hosts;
@@ -5320,6 +5326,7 @@ int     main(int argc, char **argv)
 #ifdef USE_TLS
        VAR_SMTPD_TLS_CCERT_VD, DEF_SMTPD_TLS_CCERT_VD, &var_smtpd_tls_ccert_vd, 0, 0,
 #endif
+       VAR_SMTPD_POLICY_REQ_LIMIT, DEF_SMTPD_POLICY_REQ_LIMIT, &var_smtpd_policy_req_limit, 0, 0,
        0,
     };
     static const CONFIG_TIME_TABLE time_table[] = {
index 8ba92cbc3b19a6a8f0353faf0a9ad3368642cbf6..2774650a08f930625b2065ce46925035e0763706 100644 (file)
@@ -456,15 +456,20 @@ double  smtpd_space_multf = 1.5;
 
 static void policy_client_register(const char *name)
 {
+    ATTR_CLNT *client;
+
     if (policy_clnt_table == 0)
        policy_clnt_table = htable_create(1);
 
-    if (htable_find(policy_clnt_table, name) == 0)
-       htable_enter(policy_clnt_table, name,
-                    (char *) attr_clnt_create(name,
-                                              var_smtpd_policy_tmout,
-                                              var_smtpd_policy_idle,
-                                              var_smtpd_policy_ttl));
+    if (htable_find(policy_clnt_table, name) == 0) {
+       client = attr_clnt_create(name,
+                                 var_smtpd_policy_tmout,
+                                 var_smtpd_policy_idle,
+                                 var_smtpd_policy_ttl);
+       attr_clnt_control(client, ATTR_CLNT_CTL_REQ_LIMIT,
+                         var_smtpd_policy_req_limit, ATTR_CLNT_CTL_END);
+       htable_enter(policy_clnt_table, name, (char *) client);
+    }
 }
 
 /* smtpd_check_parse - pre-parse restrictions */
index 62b225bbf0358094d7a15cecd1ccc725dacdca3b..ed8dddcd918114f9d0328312f3c25d3452bb90e7 100644 (file)
@@ -54,6 +54,9 @@
 /* .IP "ATTR_CLNT_CTL_PROTO(ATTR_CLNT_PRINT_FN, ATTR_CLNT_SCAN_FN)"
 /*     Specifies alternatives for the attr_plain_print() and
 /*     attr_plain_scan() functions.
+/* .IP "ATTR_CLNT_CTL_REQ_LIMIT(int)"
+/*     The maximal number of requests per connection.  To enable
+/*     the limit, specify a value greater than zero.
 /* DIAGNOSTICS
 /*     Warnings: communication failure.
 /* SEE ALSO
@@ -95,6 +98,8 @@ struct ATTR_CLNT {
     AUTO_CLNT *auto_clnt;
     ATTR_CLNT_PRINT_FN print;
     ATTR_CLNT_SCAN_FN scan;
+    int     req_limit;
+    int     req_count;
 };
 
 /* attr_clnt_free - destroy attribute client */
@@ -116,6 +121,8 @@ ATTR_CLNT *attr_clnt_create(const char *service, int timeout,
     client->auto_clnt = auto_clnt_create(service, timeout, max_idle, max_ttl);
     client->scan = attr_vscan_plain;
     client->print = attr_vprint_plain;
+    client->req_limit = 0;
+    client->req_count = 0;
     return (client);
 }
 
@@ -188,8 +195,14 @@ int     attr_clnt_request(ATTR_CLNT *client, int send_flags,...)
                ret = client->scan(stream, recv_flags, ap);
                va_end(ap);
                /* Finalize argument lists before returning. */
-               if (ret > 0)
+               if (ret > 0) {
+                   if (client->req_limit > 0
+                       && (client->req_count += 1) >= client->req_limit) {
+                       auto_clnt_recover(client->auto_clnt);
+                       client->req_count = 0;
+                   }
                    break;
+               }
            }
        }
        if (++count >= 2
@@ -204,6 +217,7 @@ int     attr_clnt_request(ATTR_CLNT *client, int send_flags,...)
        }
        sleep(1);                               /* XXX make configurable */
        auto_clnt_recover(client->auto_clnt);
+       client->req_count = 0;
     }
     /* Finalize argument lists before returning. */
     va_end(saved_ap);
@@ -223,6 +237,11 @@ void    attr_clnt_control(ATTR_CLNT *client, int name,...)
            client->print = va_arg(ap, ATTR_CLNT_PRINT_FN);
            client->scan = va_arg(ap, ATTR_CLNT_SCAN_FN);
            break;
+       case ATTR_CLNT_CTL_REQ_LIMIT:
+           client->req_limit = va_arg(ap, int);
+           if (msg_verbose)
+               msg_info("%s: new request limit %d", myname, client->req_limit);
+           break;
        default:
            msg_panic("%s: bad name %d", myname, name);
        }
index 0a752094e3ddf06b678dc08c1443e900f306025d..fac4a5b0f5f480094345eae87eb65b0cd6650f6b 100644 (file)
@@ -35,6 +35,7 @@ extern void attr_clnt_control(ATTR_CLNT *, int, ...);
 
 #define ATTR_CLNT_CTL_END      0
 #define ATTR_CLNT_CTL_PROTO    1
+#define ATTR_CLNT_CTL_REQ_LIMIT        2
 
 /* LICENSE
 /* .ad
index d5ed9ce2fcf95f25e0e10cc6df7a915e47de76bf..48ae556d82ded9be8fdea1601b5a6740edbeb7b6 100644 (file)
@@ -343,7 +343,13 @@ static const DICT_OPEN_INFO dict_open_info[] = {
     DICT_TYPE_SOCKMAP, dict_sockmap_open,
     DICT_TYPE_FAIL, dict_fail_open,
     DICT_TYPE_PIPE, dict_pipe_open,
+#ifdef DICT_TYPE_PIPE_LEGACY
+    DICT_TYPE_PIPE_LEGACY, dict_pipe_open,
+#endif
     DICT_TYPE_RANDOM, dict_random_open,
+#ifdef DICT_TYPE_RANDOM_LEGACY
+    DICT_TYPE_RANDOM_LEGACY, dict_random_open,
+#endif
 #ifndef USE_DYNAMIC_MAPS
 #ifdef HAS_PCRE
     DICT_TYPE_PCRE, dict_pcre_open,
index de8f086d84262959abb907f3b162a5e4c32ba6c0..37c4f37b046a50bb92c7c3eb780d152dc41586ee 100644 (file)
 /*     int     dict_flags;
 /* DESCRIPTION
 /*     dict_pipe_open() opens a pipeline of one or more tables.
-/*     Example: "\fBpipeline:\fI!type_1:name_1! ... !type_n:name_n\fR".
+/*     Example: "\fBpipemap:\fI!type_1:name_1! ... !type_n:name_n\fR".
 /*
-/*     Each "pipeline:" query is given to the first table.  Each
+/*     Each "pipemap:" 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 ASCII character after "pipeline:" will be used as the
+/*     The ASCII character after "pipemap:" will be used as the
 /*     separator between the lookup tables that follow (do not use
 /*     space, ",", ":" or non-ASCII).
 /*
@@ -116,6 +116,11 @@ DICT   *dict_pipe_open(const char *name, int open_flags, int dict_flags)
     struct DICT_OWNER aggr_owner;
     char    delim[2];
 
+#ifdef DICT_TYPE_PIPE_LEGACY
+    msg_warn("obsolete dictionary type: \"%s\"; use \"%s\" instead",
+            DICT_TYPE_PIPE_LEGACY, DICT_TYPE_PIPE);
+#endif
+
     /*
      * Clarity first. Let the optimizer worry about redundant code.
      */
index 442fd4a8421218336c9051d2455de6de8f800c4d..fb0578e1fec538978800b5407197a1395a216ae8 100644 (file)
  /*
   * External interface.
   */
-#define DICT_TYPE_PIPE "pipeline"
+#define DICT_TYPE_PIPE "pipemap"
+
+#ifdef SNAPSHOT
+#define DICT_TYPE_PIPE_LEGACY  "pipeline"
+#endif
 
 extern DICT *dict_pipe_open(const char *, int, int);
 
index e085b20057a3fe6b21e778692d92fc954b8b16ff..0f1f07a290b12859197274efac1dbf64c4698196 100644 (file)
 /*     int     dict_flags;
 /* DESCRIPTION
 /*     dict_random_open() opens an in-memory, read-only, table.
-/*     Example: "\fBrandom:\fI!result_1! ... !result_n\fR".
+/*     Example: "\fBrandmap:\fI!result_1! ... !result_n\fR".
 /*
 /*     Each table query returns a random choice from the specified
 /*     results. Other table access methods are not supported.
 /*
-/*     The ASCII character after "random:" will be used as the
+/*     The ASCII character after "randmap:" will be used as the
 /*     separator between the results that follow (do not use space,
 /*     ",", ":" or non-ASCII).
 /* SEE ALSO
@@ -82,6 +82,11 @@ DICT   *dict_random_open(const char *name, int open_flags, int dict_flags)
     char   *saved_name = 0;
     char    delim[2];
 
+#ifdef DICT_TYPE_RANDOM_LEGACY
+    msg_warn("obsolete dictionary type: \"%s\"; use \"%s\" instead",
+             DICT_TYPE_RANDOM_LEGACY, DICT_TYPE_RANDOM);
+#endif
+
     /*
      * Clarity first. Let the optimizer worry about redundant code.
      */
index 374f8537eb2c72fcb2f9747df9c9796e68182712..fd16e9570a7e7fc6a3722c56b696868485d4a472 100644 (file)
  /*
   * External interface.
   */
-#define DICT_TYPE_RANDOM       "random"
+#define DICT_TYPE_RANDOM       "randmap"
+
+#ifdef SNAPSHOT
+#define DICT_TYPE_RANDOM_LEGACY        "random"
+#endif
 
 extern DICT *dict_random_open(const char *, int, int);