]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-3.2-20161101
authorWietse Venema <wietse@porcupine.org>
Tue, 1 Nov 2016 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <postfix-users@dukhovni.org>
Thu, 3 Nov 2016 10:43:32 +0000 (06:43 -0400)
17 files changed:
postfix/HISTORY
postfix/README_FILES/MILTER_README
postfix/RELEASE_NOTES
postfix/html/MILTER_README.html
postfix/html/postconf.5.html
postfix/html/smtpd.8.html
postfix/man/man5/postconf.5
postfix/man/man8/smtpd.8
postfix/mantools/postlink
postfix/proto/MILTER_README.html
postfix/proto/postconf.proto
postfix/src/global/mail_params.h
postfix/src/global/mail_version.h
postfix/src/smtpd/smtpd.c
postfix/src/smtpd/smtpd.h
postfix/src/smtpd/smtpd_sasl_proto.c
postfix/src/smtpd/smtpd_state.c

index cae5b09da80d410b315ef5251b32f1729b616e3b..efb39cca333fb1b4b1793592b99203ec5090c841 100644 (file)
@@ -22537,3 +22537,11 @@ Apologies for any names omitted.
        and "PASS" disables header, body, and Milter inspection for
        the remainder of the message content.  Contributed by Hobbit.
        Files: cleanup/cleanup_message.c, global/header_body_checks.c.
+
+20161024
+
+       Feature: smtpd_milter_maps, per-client Milter configuration
+       that overrides smtpd_milters, and that has the same syntax.
+       Files: mantools/postlink, proto/MILTER_README.html,
+       proto/postconf.proto, global/mail_params.h, smtpd/smtpd.c,
+       smtpd/smtpd.h, smtpd/smtpd_sasl_proto.c, smtpd/smtpd_state.c.
index e56a7d5eab2cb99a7e39f605897ec282b71931f6..a1b68b68d47cb2f1c26ead07873ba356c2c84427 100644 (file)
@@ -1,8 +1,8 @@
-P\bPo\bos\bst\btf\bfi\bix\bx b\bbe\bef\bfo\bor\bre\be-\b-q\bqu\bue\beu\bue\be M\bMi\bil\blt\bte\ber\br s\bsu\bup\bpp\bpo\bor\brt\bt
+Postfix before-queue Milter support
 
 -------------------------------------------------------------------------------
 
-I\bIn\bnt\btr\bro\bod\bdu\buc\bct\bti\bio\bon\bn
+Introduction
 
 Postfix implements support for the Sendmail version 8 Milter (mail filter)
 protocol. This protocol is used by applications that run outside the MTA to
@@ -30,7 +30,7 @@ This document provides information on the following topics:
   * Workarounds
   * Limitations
 
-H\bHo\bow\bw M\bMi\bil\blt\bte\ber\br a\bap\bpp\bpl\bli\bic\bca\bat\bti\bio\bon\bns\bs p\bpl\blu\bug\bg i\bin\bnt\bto\bo P\bPo\bos\bst\btf\bfi\bix\bx
+How Milter applications plug into Postfix
 
 The Postfix Milter implementation uses two different lists of mail filters: one
 list of filters for SMTP mail only, and one list of filters for non-SMTP mail.
@@ -80,7 +80,7 @@ Postfix architecture).
 
     Local   -> sendmail(1)
 
-B\bBu\bui\bil\bld\bdi\bin\bng\bg M\bMi\bil\blt\bte\ber\br a\bap\bpp\bpl\bli\bic\bca\bat\bti\bio\bon\bns\bs
+Building Milter applications
 
 Milter applications have been written in C, JAVA and Perl, but this document
 deals with C applications only. For these, you need an object library that
@@ -94,25 +94,25 @@ some Linux systems).
 Once libmilter is installed, applications such as OpenDKIM and OpenDMARC build
 out of the box without requiring any tinkering:
 
-    $ g\bgz\bzc\bca\bat\bt o\bop\bpe\ben\bnd\bdk\bki\bim\bm-\b-x\bx.\b.y\by.\b.z\bz.\b.t\bta\bar\br.\b.g\bgz\bz |\b| t\bta\bar\br x\bxf\bf -\b-
-    $ c\bcd\bd o\bop\bpe\ben\bnd\bdk\bki\bim\bm-\b-x\bx.\b.y\by.\b.z\bz
-    $ .\b./\b/c\bco\bon\bnf\bfi\big\bgu\bur\bre\be .\b..\b..\b.o\bop\bpt\bti\bio\bon\bns\bs.\b..\b..\b.
-    $ m\bma\bak\bke\be
+    $ gzcat opendkim-x.y.z.tar.gz | tar xf -
+    $ cd opendkim-x.y.z
+    $ ./configure ...options...
+    $ make
     [...lots of output omitted...]
-    $ m\bma\bak\bke\be i\bin\bns\bst\bta\bal\bll\bl
+    $ make install
 
-R\bRu\bun\bnn\bni\bin\bng\bg M\bMi\bil\blt\bte\ber\br a\bap\bpp\bpl\bli\bic\bca\bat\bti\bio\bon\bns\bs
+Running Milter applications
 
 To run a Milter application, see the documentation of the filter for options. A
 typical command looks like this:
 
-    # /\b/s\bso\bom\bme\be/\b/w\bwh\bhe\ber\bre\be/\b/o\bop\bpe\ben\bnd\bdk\bki\bim\bm -\b-l\bl -\b-u\bu u\bus\bse\ber\bri\bid\bd -\b-p\bp i\bin\bne\bet\bt:\b:p\bpo\bor\brt\btn\bnu\bum\bmb\bbe\ber\br@\b@l\blo\boc\bca\bal\blh\bho\bos\bst\bt .\b..\b..\b.o\bot\bth\bhe\ber\br
-    o\bop\bpt\bti\bio\bon\bns\bs.\b..\b..\b.
+    # /some/where/opendkim -l -u userid -p inet:portnumber@localhost ...other
+    options...
 
 Please specify a userid value that isn't used for other applications (not
 "postfix", not "www", etc.).
 
-C\bCo\bon\bnf\bfi\big\bgu\bur\bri\bin\bng\bg P\bPo\bos\bst\btf\bfi\bix\bx
+Configuring Postfix
 
 Like Sendmail, Postfix has a lot of configuration options that control how it
 talks to Milter applications. Besides global options that apply to all Milter
@@ -127,10 +127,11 @@ Information in this section:
   * Milter protocol version
   * Milter protocol timeouts
   * Different settings for different Milter applications
+  * Different settings for different SMTP clients
   * Sendmail macro emulation
   * What macros will Postfix send to Milters?
 
-S\bSM\bMT\bTP\bP-\b-O\bOn\bnl\bly\by M\bMi\bil\blt\bte\ber\br a\bap\bpp\bpl\bli\bic\bca\bat\bti\bio\bon\bns\bs
+SMTP-Only Milter applications
 
 The SMTP-only Milter applications handle mail that arrives via the Postfix
 smtpd(8) server. They are typically used to filter unwanted mail, and to sign
@@ -158,20 +159,23 @@ from other Milter applications.
 
 The general syntax for listening sockets is as follows:
 
-    u\bun\bni\bix\bx:\b:pathname
+    unix:pathname
         Connect to the local UNIX-domain server that is bound to the specified
         pathname. If the smtpd(8) or cleanup(8) process runs chrooted, an
         absolute pathname is interpreted relative to the Postfix queue
         directory.
 
-    i\bin\bne\bet\bt:\b:host:\b:port
+    inet:host:port
         Connect to the specified TCP port on the specified local or remote
         host. The host and port can be specified in numeric or symbolic form.
 
         NOTE: Postfix syntax differs from Milter syntax which has the form
-        i\bin\bne\bet\bt:\b:port@\b@host.
+        inet:port@host.
 
-N\bNo\bon\bn-\b-S\bSM\bMT\bTP\bP M\bMi\bil\blt\bte\ber\br a\bap\bpp\bpl\bli\bic\bca\bat\bti\bio\bon\bns\bs
+For advanced configuration see "Different settings for different SMTP clients"
+and "Different settings for different Milter applications".
+
+Non-SMTP Milter applications
 
 The non-SMTP Milter applications handle mail that arrives via the Postfix
 sendmail(1) command-line or via the Postfix qmqpd(8) server. They are typically
@@ -222,7 +226,7 @@ must not REJECT or TEMPFAIL simulated RCPT TO commands. When a
 non_smtpd_milters application REJECTs or TEMPFAILs a recipient, Postfix will
 report a configuration error, and mail will stay in the queue.
 
-S\bSi\big\bgn\bni\bin\bng\bg i\bin\bnt\bte\ber\brn\bna\bal\bll\bly\by-\b-g\bge\ben\bne\ber\bra\bat\bte\bed\bd b\bbo\bou\bun\bnc\bce\be m\bme\bes\bss\bsa\bag\bge\bes\bs
+Signing internally-generated bounce messages
 
 Postfix normally does not apply content filters to mail that is generated
 internally such as bounces or Postmaster notifications. Filtering internally-
@@ -239,7 +243,7 @@ non_smtpd_milters, header_checks or body_checks (lines 3-5 below).
     4     header_checks = don't reject internally-generated bounces
     5     body_checks = don't reject internally-generated bounces
 
-M\bMi\bil\blt\bte\ber\br e\ber\brr\bro\bor\br h\bha\ban\bnd\bdl\bli\bin\bng\bg
+Milter error handling
 
 The milter_default_action parameter specifies how Postfix handles Milter
 application errors. The default action is to respond with a temporary error
@@ -256,16 +260,16 @@ the message in the "hold" queue, and is available with Postfix 2.6 or later.
 See "Different settings for different Milter applications" for advanced
 configuration options.
 
-M\bMi\bil\blt\bte\ber\br p\bpr\bro\bot\bto\boc\bco\bol\bl v\bve\ber\brs\bsi\bio\bon\bn
+Milter protocol version
 
 As Postfix is not built with the Sendmail libmilter library, you may need to
 configure the Milter protocol version that Postfix should use. The default
 version is 6 (before Postfix 2.6 the default version is 2).
 
     /etc/postfix/main.cf:
-        # Postfix >= 2.6
+        # Postfix  2.6
         milter_protocol = 6
-        # 2.3 <= Postfix <= 2.5
+        # 2.3 ≤ Postfix ≤ 2.5
         milter_protocol = 2
 
 If the Postfix milter_protocol setting specifies a too low version, the
@@ -294,21 +298,21 @@ libmilter library does not expect.
 See "Different settings for different Milter applications" for advanced
 configuration options.
 
-M\bMi\bil\blt\bte\ber\br p\bpr\bro\bot\bto\boc\bco\bol\bl t\bti\bim\bme\beo\bou\but\bts\bs
+Milter protocol timeouts
 
 Postfix uses different time limits at different Milter protocol stages. The
 table shows the timeout settings and the corresponding protocol stages (EOH =
 end of headers; EOM = end of message).
 
-     _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b 
-    |P\bPo\bos\bst\btf\bfi\bix\bx p\bpa\bar\bra\bam\bme\bet\bte\ber\br     |T\bTi\bim\bme\be l\bli\bim\bmi\bit\bt|M\bMi\bil\blt\bte\ber\br p\bpr\bro\bot\bto\boc\bco\bol\bl s\bst\bta\bag\bge\be          |
-    |_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b |
+     _________________________________________________________________
+    |Postfix parameter     |Time limit|Milter protocol stage          |
+    |______________________|__________|_______________________________|
     |milter_connect_timeout|30s       |CONNECT                        |
-    |_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b |
+    |______________________|__________|_______________________________|
     |milter_command_timeout|30s       |HELO, MAIL, RCPT, DATA, UNKNOWN|
-    |_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b |
+    |______________________|__________|_______________________________|
     |milter_content_timeout|300s      |HEADER, EOH, BODY, EOM         |
-    |_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b |
+    |______________________|__________|_______________________________|
 
 Beware: 30s may be too short for Milter applications that do lots of DNS
 lookups. However, if you increase the above timeouts too much, remote SMTP
@@ -318,7 +322,7 @@ inherent problem with before-queue filtering.
 See "Different settings for different Milter applications" for advanced
 configuration options.
 
-D\bDi\bif\bff\bfe\ber\bre\ben\bnt\bt s\bse\bet\btt\bti\bin\bng\bgs\bs f\bfo\bor\br d\bdi\bif\bff\bfe\ber\bre\ben\bnt\bt M\bMi\bil\blt\bte\ber\br a\bap\bpp\bpl\bli\bic\bca\bat\bti\bio\bon\bns\bs
+Different settings for different Milter applications
 
 The previous sections list a number of Postfix main.cf parameters that control
 time limits and other settings for all Postfix Milter clients. This is
@@ -345,11 +349,31 @@ Instead of a server endpoint, we now have a list enclosed in {}.
     content_timeout, default_action, and protocol.
 
 Inside the list, syntax is similar to what we already know from main.cf: items
-separated by space or comma. There is one difference: y\byo\bou\bu m\bmu\bus\bst\bt e\ben\bnc\bcl\blo\bos\bse\be a\ba
-s\bse\bet\btt\bti\bin\bng\bg i\bin\bn p\bpa\bar\bre\ben\bnt\bth\bhe\bes\bse\bes\bs,\b, a\bas\bs i\bin\bn "\b"{\b{ n\bna\bam\bme\be =\b= v\bva\bal\blu\bue\be }\b}"\b",\b, i\bif\bf y\byo\bou\bu w\bwa\ban\bnt\bt t\bto\bo h\bha\bav\bve\be s\bsp\bpa\bac\bce\be o\bor\br
-c\bco\bom\bmm\bma\ba w\bwi\bit\bth\bhi\bin\bn a\ba v\bva\bal\blu\bue\be o\bor\br a\bar\bro\bou\bun\bnd\bd "\b"=\b="\b".
+separated by space or comma. There is one difference: you must enclose a
+setting in parentheses, as in "{ name = value }", if you want to have space or
+comma within a value or around "=".
+
+Different settings for different SMTP clients
+
+The smtpd_milter_maps feature supports different Milter settings for different
+client IP addresses. Lookup results override the the global smtpd_milters
+setting, and have the same syntax. For example, to disable Milter settings for
+local address ranges:
+
+/etc/postfix/main.cf:
+    smtpd_milter_maps = cidr:/etc/postfix/smtpd_milter_map
+    smtpd_milters = inet:host:port, { inet:host:port, ... }, ...
+
+/etc/postfix/smtpd_milter_map:
+    # Disable Milters for local clients.
+    127.0.0.0/8    DISABLE
+    192.168.0.0/16 DISABLE
+    ::/64          DISABLE
+    2001:db8::/32  DISABLE
+
+This feature is available with Postfix 3.2 and later.
 
-S\bSe\ben\bnd\bdm\bma\bai\bil\bl m\bma\bac\bcr\bro\bo e\bem\bmu\bul\bla\bat\bti\bio\bon\bn
+Sendmail macro emulation
 
 Postfix emulates a limited number of Sendmail macros, as shown in the table.
 Some macro values depend on whether a recipient is rejected (rejected
@@ -358,92 +382,70 @@ macros are available at different Milter protocol stages (EOH = end-of-header,
 EOM = end-of-message); their availability is not always the same as in
 Sendmail. See the workarounds section below for solutions.
 
-     _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b 
-    |S\bSe\ben\bnd\bdm\bma\bai\bil\bl m\bma\bac\bcr\bro\bo      |M\bMi\bil\blt\bte\ber\br p\bpr\bro\bot\bto\boc\bco\bol\bl s\bst\bta\bag\bge\be    |D\bDe\bes\bsc\bcr\bri\bip\bpt\bti\bio\bon\bn               |
-    |_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b |
-    |i                   |DATA, EOH, EOM           |Queue ID, also Postfix    |
-    |                    |                         |queue file name           |
-    |_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b |
-    |j                   |Always                   |Value of myhostname       |
-    |_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b |
-    |_                   |Always                   |The validated client name |
-    |                    |                         |and address               |
-    |_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b |
-    |{auth_authen}       |MAIL, DATA, EOH, EOM     |SASL login name           |
-    |_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b |
-    |{auth_author}       |MAIL, DATA, EOH, EOM     |SASL sender               |
-    |_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b |
-    |{auth_type}         |MAIL, DATA, EOH, EOM     |SASL login method         |
-    |_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b |
-    |{client_addr}       |Always                   |Remote client IP address  |
-    |_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b |
-    |                    |                         |Connection concurrency for|
-    |                    |                         |this client (zero if the  |
-    |{client_connections}|CONNECT                  |client is excluded from   |
-    |                    |                         |all smtpd_client_*        |
-    |                    |                         |limits).                  |
-    |_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b |
-    |                    |                         |Remote client hostname    |
-    |                    |                         |When address -> name      |
-    |{client_name}       |Always                   |lookup or name -> address |
-    |                    |                         |verification fails:       |
-    |                    |                         |"unknown"                 |
-    |_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b |
-    |{client_port}       |Always (Postfix >=2.5)   |Remote client TCP port    |
-    |_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b |
-    |                    |                         |Client name from address -|
-    |{client_ptr}        |CONNECT, HELO, MAIL, DATA|> name lookup             |
-    |                    |                         |When address -> name      |
-    |                    |                         |lookup fails: "unknown"   |
-    |_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b |
-    |{cert_issuer}       |HELO, MAIL, DATA, EOH,   |TLS client certificate    |
-    |                    |EOM                      |issuer                    |
-    |_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b |
-    |{cert_subject}      |HELO, MAIL, DATA, EOH,   |TLS client certificate    |
-    |                    |EOM                      |subject                   |
-    |_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b |
-    |{cipher_bits}       |HELO, MAIL, DATA, EOH,   |TLS session key size      |
-    |                    |EOM                      |                          |
-    |_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b |
-    |{cipher}            |HELO, MAIL, DATA, EOH,   |TLS cipher                |
-    |                    |EOM                      |                          |
-    |_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b |
-    |{daemon_addr}       |Always (Postfix >=3.2)   |Local server IP address   |
-    |_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b |
-    |{daemon_name}       |Always                   |value of                  |
-    |                    |                         |milter_macro_daemon_name  |
-    |_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b |
-    |{daemon_port}       |Always (Postfix >=3.2)   |Local server TCP port     |
-    |_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b |
-    |{mail_addr}         |MAIL                     |Sender address            |
-    |_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b |
-    |{mail_host}         |MAIL (Postfix >= 2.6,    |Sender next-hop           |
-    |                    |only with smtpd_milters) |destination               |
-    |_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b |
-    |{mail_mailer}       |MAIL (Postfix >= 2.6,    |Sender mail delivery      |
-    |                    |only with smtpd_milters) |transport                 |
-    |_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b |
-    |                    |                         |Recipient address         |
-    |{rcpt_addr}         |RCPT                     |With rejected recipient:  |
-    |                    |                         |descriptive text          |
-    |_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b |
-    |                    |                         |Recipient next-hop        |
-    |{rcpt_host}         |RCPT (Postfix >= 2.6,    |destination               |
-    |                    |only with smtpd_milters) |With rejected recipient:  |
-    |                    |                         |enhanced status code      |
-    |_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b |
-    |                    |                         |Recipient mail delivery   |
-    |{rcpt_mailer}       |RCPT (Postfix >= 2.6,    |transport                 |
-    |                    |only with smtpd_milters) |With rejected recipient:  |
-    |                    |                         |"error"                   |
-    |_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b |
-    |{tls_version}       |HELO, MAIL, DATA, EOH,   |TLS protocol version      |
-    |                    |EOM                      |                          |
-    |_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b |
-    |v                   |Always                   |value of milter_macro_v   |
-    |_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b |
-
-W\bWh\bha\bat\bt m\bma\bac\bcr\bro\bos\bs w\bwi\bil\bll\bl P\bPo\bos\bst\btf\bfi\bix\bx s\bse\ben\bnd\bd t\bto\bo M\bMi\bil\blt\bte\ber\brs\bs?\b?
+     _________________________________________________________________________________________________________________________________________
+    |Sendmail macro      |Milter protocol stage                          |Description                                                         |
+    |____________________|_______________________________________________|____________________________________________________________________|
+    |i                   |DATA, EOH, EOM                                 |Queue ID, also Postfix queue file name                              |
+    |____________________|_______________________________________________|____________________________________________________________________|
+    |j                   |Always                                         |Value of myhostname                                                 |
+    |____________________|_______________________________________________|____________________________________________________________________|
+    |_                   |Always                                         |The validated client name and address                               |
+    |____________________|_______________________________________________|____________________________________________________________________|
+    |{auth_authen}       |MAIL, DATA, EOH, EOM                           |SASL login name                                                     |
+    |____________________|_______________________________________________|____________________________________________________________________|
+    |{auth_author}       |MAIL, DATA, EOH, EOM                           |SASL sender                                                         |
+    |____________________|_______________________________________________|____________________________________________________________________|
+    |{auth_type}         |MAIL, DATA, EOH, EOM                           |SASL login method                                                   |
+    |____________________|_______________________________________________|____________________________________________________________________|
+    |{client_addr}       |Always                                         |Remote client IP address                                            |
+    |____________________|_______________________________________________|____________________________________________________________________|
+    |{client_connections}|CONNECT                                        |Connection concurrency for this client (zero if the client is       |
+    |                    |                                               |excluded from all smtpd_client_* limits).                           |
+    |____________________|_______________________________________________|____________________________________________________________________|
+    |                    |                                               |Remote client hostname                                              |
+    |{client_name}       |Always                                         |When address → name lookup or name → address verification fails:|
+    |                    |                                               |"unknown"                                                           |
+    |____________________|_______________________________________________|____________________________________________________________________|
+    |{client_port}       |Always (Postfix ≥2.5)                        |Remote client TCP port                                              |
+    |____________________|_______________________________________________|____________________________________________________________________|
+    |{client_ptr}        |CONNECT, HELO, MAIL, DATA                      |Client name from address → name lookup                            |
+    |                    |                                               |When address → name lookup fails: "unknown"                       |
+    |____________________|_______________________________________________|____________________________________________________________________|
+    |{cert_issuer}       |HELO, MAIL, DATA, EOH, EOM                     |TLS client certificate issuer                                       |
+    |____________________|_______________________________________________|____________________________________________________________________|
+    |{cert_subject}      |HELO, MAIL, DATA, EOH, EOM                     |TLS client certificate subject                                      |
+    |____________________|_______________________________________________|____________________________________________________________________|
+    |{cipher_bits}       |HELO, MAIL, DATA, EOH, EOM                     |TLS session key size                                                |
+    |____________________|_______________________________________________|____________________________________________________________________|
+    |{cipher}            |HELO, MAIL, DATA, EOH, EOM                     |TLS cipher                                                          |
+    |____________________|_______________________________________________|____________________________________________________________________|
+    |{daemon_addr}       |Always (Postfix ≥3.2)                        |Local server IP address                                             |
+    |____________________|_______________________________________________|____________________________________________________________________|
+    |{daemon_name}       |Always                                         |value of milter_macro_daemon_name                                   |
+    |____________________|_______________________________________________|____________________________________________________________________|
+    |{daemon_port}       |Always (Postfix ≥3.2)                        |Local server TCP port                                               |
+    |____________________|_______________________________________________|____________________________________________________________________|
+    |{mail_addr}         |MAIL                                           |Sender address                                                      |
+    |____________________|_______________________________________________|____________________________________________________________________|
+    |{mail_host}         |MAIL (Postfix ≥ 2.6, only with smtpd_milters)|Sender next-hop destination                                         |
+    |____________________|_______________________________________________|____________________________________________________________________|
+    |{mail_mailer}       |MAIL (Postfix ≥ 2.6, only with smtpd_milters)|Sender mail delivery transport                                      |
+    |____________________|_______________________________________________|____________________________________________________________________|
+    |{rcpt_addr}         |RCPT                                           |Recipient address                                                   |
+    |                    |                                               |With rejected recipient: descriptive text                           |
+    |____________________|_______________________________________________|____________________________________________________________________|
+    |{rcpt_host}         |RCPT (Postfix ≥ 2.6, only with smtpd_milters)|Recipient next-hop destination                                      |
+    |                    |                                               |With rejected recipient: enhanced status code                       |
+    |____________________|_______________________________________________|____________________________________________________________________|
+    |{rcpt_mailer}       |RCPT (Postfix ≥ 2.6, only with smtpd_milters)|Recipient mail delivery transport                                   |
+    |                    |                                               |With rejected recipient: "error"                                    |
+    |____________________|_______________________________________________|____________________________________________________________________|
+    |{tls_version}       |HELO, MAIL, DATA, EOH, EOM                     |TLS protocol version                                                |
+    |____________________|_______________________________________________|____________________________________________________________________|
+    |v                   |Always                                         |value of milter_macro_v                                             |
+    |____________________|_______________________________________________|____________________________________________________________________|
+
+What macros will Postfix send to Milters?
 
 Postfix sends specific sets of macros at different Milter protocol stages. The
 sets are configured with the parameters as shown in the table below (EOH = end
@@ -454,26 +456,26 @@ As of Sendmail 8.14.0, Milter applications can specify what macros they want to
 receive at different Milter protocol stages. An application-specified list
 takes precedence over a Postfix-specified list.
 
-     _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b 
-    |P\bPo\bos\bst\btf\bfi\bix\bx p\bpa\bar\bra\bam\bme\bet\bte\ber\br            |M\bMi\bil\blt\bte\ber\br p\bpr\bro\bot\bto\boc\bco\bol\bl|M\bMi\bil\blt\bte\ber\br p\bpr\bro\bot\bto\boc\bco\bol\bl s\bst\bta\bag\bge\be|
-    |                             |v\bve\ber\brs\bsi\bio\bon\bn        |                     |
-    |_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b |
+     ___________________________________________________________________
+    |Postfix parameter            |Milter protocol|Milter protocol stage|
+    |                             |version        |                     |
+    |_____________________________|_______________|_____________________|
     |milter_connect_macros        |2 or higher    |CONNECT              |
-    |_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b |
+    |_____________________________|_______________|_____________________|
     |milter_helo_macros           |2 or higher    |HELO/EHLO            |
-    |_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b |
+    |_____________________________|_______________|_____________________|
     |milter_mail_macros           |2 or higher    |MAIL FROM            |
-    |_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b |
+    |_____________________________|_______________|_____________________|
     |milter_rcpt_macros           |2 or higher    |RCPT TO              |
-    |_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b |
+    |_____________________________|_______________|_____________________|
     |milter_data_macros           |4 or higher    |DATA                 |
-    |_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b |
+    |_____________________________|_______________|_____________________|
     |milter_end_of_header_macros  |6 or higher    |EOH                  |
-    |_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b |
+    |_____________________________|_______________|_____________________|
     |milter_end_of_data_macros    |2 or higher    |EOM                  |
-    |_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b |
+    |_____________________________|_______________|_____________________|
     |milter_unknown_command_macros|3 or higher    |unknown command      |
-    |_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b |
+    |_____________________________|_______________|_____________________|
 
 By default, Postfix will send only macros whose values have been updated with
 information from main.cf or master.cf, from an SMTP session (for example; SASL
@@ -485,7 +487,7 @@ specify macro default values with the milter_macro_defaults parameter. Specify
 zero or more name=value pairs separated by comma or whitespace; you may even
 specify macro names that Postfix does know about!
 
-W\bWo\bor\brk\bka\bar\bro\bou\bun\bnd\bds\bs
+Workarounds
 
   * To avoid breaking DKIM etc. signatures with an SMTP-based content filter,
     update the before-filter SMTP client in master.cf, and add a line with "-
@@ -504,7 +506,7 @@ W\bWo\bor\brk\bka\bar\bro\bou\bun\bnd\bds\bs
 
   * Some Milter applications use the "{if_addr}" macro to recognize local mail;
     this macro does not exist in Postfix. Workaround: use the "{daemon_addr}"
-    (Postfix >= 3.2) or "{client_addr}" macro instead.
+    (Postfix  3.2) or "{client_addr}" macro instead.
 
   * Some Milter applications log a warning that looks like this:
 
@@ -533,19 +535,19 @@ W\bWo\bor\brk\bka\bar\bro\bou\bun\bnd\bds\bs
       o Edit the filter source file (typically named xxx-filter/xxx-filter.c or
         similar).
 
-      o Look up the mlfi_eom() function and add code near the top shown as b\bbo\bol\bld\bd
+      o Look up the mlfi_eom() function and add code near the top shown as bold
         text below:
 
         dfc = cc->cctx_msg;
         assert(dfc != NULL);
 
-        /\b/*\b* D\bDe\bet\bte\ber\brm\bmi\bin\bne\be t\bth\bhe\be j\bjo\bob\bb I\bID\bD f\bfo\bor\br l\blo\bog\bgg\bgi\bin\bng\bg.\b. *\b*/\b/
-        i\bif\bf (\b(d\bdf\bfc\bc-\b->\b>m\bmc\bct\btx\bx_\b_j\bjo\bob\bbi\bid\bd =\b==\b= 0\b0 |\b||\b| s\bst\btr\brc\bcm\bmp\bp(\b(d\bdf\bfc\bc-\b->\b>m\bmc\bct\btx\bx_\b_j\bjo\bob\bbi\bid\bd,\b, J\bJO\bOB\bBI\bID\bDU\bUN\bNK\bKN\bNO\bOW\bWN\bN)\b) =\b==\b= 0\b0)\b)
-        {\b{
-                c\bch\bha\bar\br *\b*j\bjo\bob\bbi\bid\bd =\b= s\bsm\bmf\bfi\bi_\b_g\bge\bet\bts\bsy\bym\bmv\bva\bal\bl(\b(c\bct\btx\bx,\b, "\b"i\bi"\b")\b);\b;
-                i\bif\bf (\b(j\bjo\bob\bbi\bid\bd !\b!=\b= 0\b0)\b)
-                        d\bdf\bfc\bc-\b->\b>m\bmc\bct\btx\bx_\b_j\bjo\bob\bbi\bid\bd =\b= j\bjo\bob\bbi\bid\bd;\b;
-        }\b}
+        /* Determine the job ID for logging. */
+        if (dfc->mctx_jobid == 0 || strcmp(dfc->mctx_jobid, JOBIDUNKNOWN) == 0)
+        {
+                char *jobid = smfi_getsymval(ctx, "i");
+                if (jobid != 0)
+                        dfc->mctx_jobid = jobid;
+        }
 
     NOTES:
 
@@ -557,7 +559,7 @@ W\bWo\bor\brk\bka\bar\bro\bou\bun\bnd\bds\bs
       o This change fixes only the ugly message header, but not the WARNING
         message. Fortunately, many Milters log that message only once.
 
-L\bLi\bim\bmi\bit\bta\bat\bti\bio\bon\bns\bs
+Limitations
 
 This section lists limitations of the Postfix Milter implementation. Some
 limitations will be removed as the implementation is extended over time. Of
@@ -567,22 +569,22 @@ the CONTENT_INSPECTION_README document for a discussion.
   * The Milter protocol has evolved over time. Therefore, different Postfix
     versions implement different feature sets.
 
-     _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b 
-    |P\bPo\bos\bst\btf\bfi\bix\bx|S\bSu\bup\bpp\bpo\bor\brt\bte\bed\bd M\bMi\bil\blt\bte\ber\br r\bre\beq\bqu\bue\bes\bst\bts\bs                                       |
-    |_\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b |
+     ________________________________________________________________________
+    |Postfix|Supported Milter requests                                       |
+    |_______|________________________________________________________________|
     |   2.6 |All Milter requests of Sendmail 8.14.0 (see notes below).       |
-    |_\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b |
+    |_______|________________________________________________________________|
     |       |All Milter requests of Sendmail 8.14.0, except:                 |
     |       |SMFIP_RCPT_REJ (report rejected recipients to the mail filter), |
     |   2.5 |SMFIR_CHGFROM (replace sender, with optional ESMTP parameters), |
     |       |SMFIR_ADDRCPT_PAR (add recipient, with optional ESMTP           |
     |       |parameters).                                                    |
-    |_\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b |
+    |_______|________________________________________________________________|
     |   2.4 |All Milter requests of Sendmail 8.13.0.                         |
-    |_\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b |
+    |_______|________________________________________________________________|
     |   2.3 |All Milter requests of Sendmail 8.13.0, except:                 |
     |       |SMFIR_REPLBODY (replace message body).                          |
-    |_\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b |
+    |_______|________________________________________________________________|
 
   * For Milter applications that are written in C, you need to use the Sendmail
     libmilter library.
index 03bc062b7128a4575decac33e61059cf9ad97607..c083b20b51f8def4fc0ad2b7d6e3c7cfe3635df2 100644 (file)
@@ -16,6 +16,13 @@ specifies the release date of a stable release or snapshot release.
 If you upgrade from Postfix 3.0 or earlier, read RELEASE_NOTES-3.1
 before proceeding.
 
+Major changes with snapshot 20161031
+====================================
+
+The smtpd_milter_maps feature supports per-client Milter configuration.
+This overrides the global smtpd_milters setting and has the same syntax. A
+lookup result of "DISABLE" turns off Milter support.
+
 Incompatible changes with snapshot 20160925
 ===========================================
 
index ee46ad4521a0e7e0a4132a047a22af2cd12708bf..99af63a12e63c88d2eebf58b132b9e554bed27e8 100644 (file)
@@ -259,6 +259,9 @@ support per-Milter timeouts, per-Milter error handling, etc. </p>
 <li><a href="#per-milter">Different settings for different Milter
 applications </a>
 
+<li><a href="#per-client">Different settings for different SMTP
+clients </a>
+
 <li><a href="#macros">Sendmail macro emulation</a>
 
 <li><a href="#send-macros">What macros will Postfix send to Milters?</a>
@@ -320,6 +323,11 @@ form <b>inet:</b><i>port</i><b>@</b><i>host</i>. </p>  </dd>
 
 </blockquote>
 
+<p> For advanced configuration see "<a href="#per-client">Different
+settings for different SMTP clients</a>" and "<a
+href="#per-milter">Different settings for different Milter
+applications</a>". </p>
+
 <h3> <a name="non-smtp-milters">Non-SMTP Milter applications </a> </h3>
 
 <p> The non-SMTP Milter applications handle mail that arrives via
@@ -564,6 +572,29 @@ and protocol.  </p>
 }", if you want to have space or comma within a value or around
 "="</b>.  </p>
 
+<h3><a name="per-client">Different settings for different SMTP
+clients </a></h3>
+
+<p> The <a href="postconf.5.html#smtpd_milter_maps">smtpd_milter_maps</a> feature supports different Milter settings
+for different client IP addresses. Lookup results override the the
+global <a href="postconf.5.html#smtpd_milters">smtpd_milters</a> setting, and have the same syntax. For example,
+to disable Milter settings for local address ranges: </p>
+
+<pre>
+/etc/postfix/<a href="postconf.5.html">main.cf</a>:
+    <a href="postconf.5.html#smtpd_milter_maps">smtpd_milter_maps</a> = <a href="cidr_table.5.html">cidr</a>:/etc/postfix/smtpd_milter_map
+    <a href="postconf.5.html#smtpd_milters">smtpd_milters</a> = inet:host:port, { inet:host:port, ... }, ...
+
+/etc/postfix/smtpd_milter_map:
+    # Disable Milters for local clients.
+    127.0.0.0/8    DISABLE
+    192.168.0.0/16 DISABLE
+    ::/64          DISABLE
+    2001:db8::/32  DISABLE
+</pre>
+
+<p> This feature is available with Postfix 3.2 and later. </p>
+
 <h3><a name="macros">Sendmail macro emulation</a></h3>
 
 <p> Postfix emulates a limited number of Sendmail macros, as shown
index 166c8073f240f96f1b5c4126db17e694a3c3c02d..9163af9f92227bd9c1ac05429c4a2a6fbf932965 100644 (file)
@@ -14637,6 +14637,39 @@ from the list. </p>
 <p> This feature is available in Postfix 2.10 and later.  </p>
 
 
+</DD>
+
+<DT><b><a name="smtpd_milter_maps">smtpd_milter_maps</a>
+(default: empty)</b></DT><DD>
+
+<p> Lookup tables with Milter settings per remote SMTP client IP
+address.  The lookup result overrides the <a href="postconf.5.html#smtpd_milters">smtpd_milters</a> setting,
+and has the same syntax. </p>
+
+<p> Note: lookup tables cannot return empty responses. Specify a
+lookup result of DISABLE (case does not matter) to indicate that
+Milter support should be disabled. </p>
+
+<p> Example to disable Milters for local clients: </p>
+
+<pre>
+/etc/postfix/<a href="postconf.5.html">main.cf</a>:
+    <a href="postconf.5.html#smtpd_milter_maps">smtpd_milter_maps</a> = <a href="cidr_table.5.html">cidr</a>:/etc/postfix/smtpd_milter_map
+    <a href="postconf.5.html#smtpd_milters">smtpd_milters</a> = inet:host:port, { inet:host:port, ... }, ...
+</pre>
+
+<pre>
+/etc/postfix/smtpd_milter_map:
+    # Disable Milters for local clients.
+    127.0.0.0/8    DISABLE
+    192.168.0.0/16 DISABLE
+    ::/64          DISABLE
+    2001:db8::/32  DISABLE
+</pre>
+
+<p> This feature is available in Postfix 3.2 and later.  </p>
+
+
 </DD>
 
 <DT><b><a name="smtpd_milters">smtpd_milters</a>
index f2ed4a70fdda6c65c4748311d77b8146ebfcbfa2..fd39227fbf339d9db2799408bc41df937034c52c 100644 (file)
@@ -297,8 +297,14 @@ SMTPD(8)                                                              SMTPD(8)
               for  arbitrary  macros  that Postfix may send to Milter applica-
               tions.
 
+       Available in Postfix version 3.2 and later:
+
+       <b><a href="postconf.5.html#smtpd_milter_maps">smtpd_milter_maps</a> (empty)</b>
+              Lookup tables with Milter settings per  remote  SMTP  client  IP
+              address.
+
 <b>GENERAL CONTENT INSPECTION CONTROLS</b>
-       The following parameters are applicable for both built-in and  external
+       The  following parameters are applicable for both built-in and external
        content filters.
 
        Available in Postfix version 2.1 and later:
@@ -308,51 +314,51 @@ SMTPD(8)                                                              SMTPD(8)
               ing, or address mapping.
 
 <b>EXTERNAL CONTENT INSPECTION CONTROLS</b>
-       The following parameters  are  applicable  for  both  before-queue  and
+       The  following  parameters  are  applicable  for  both before-queue and
        after-queue content filtering.
 
        Available in Postfix version 2.1 and later:
 
        <b><a href="postconf.5.html#smtpd_authorized_xforward_hosts">smtpd_authorized_xforward_hosts</a> (empty)</b>
-              What  remote  SMTP  clients are allowed to use the XFORWARD fea-
+              What remote SMTP clients are allowed to use  the  XFORWARD  fea-
               ture.
 
 <b>SASL AUTHENTICATION CONTROLS</b>
        Postfix SASL support (<a href="http://tools.ietf.org/html/rfc4954">RFC 4954</a>) can be used to authenticate remote SMTP
-       clients  to  the  Postfix  SMTP server, and to authenticate the Postfix
-       SMTP client to a remote SMTP server.  See the <a href="SASL_README.html">SASL_README</a> document  for
+       clients to the Postfix SMTP server, and  to  authenticate  the  Postfix
+       SMTP  client to a remote SMTP server.  See the <a href="SASL_README.html">SASL_README</a> document for
        details.
 
        <b><a href="postconf.5.html#broken_sasl_auth_clients">broken_sasl_auth_clients</a> (no)</b>
-              Enable  interoperability with remote SMTP clients that implement
+              Enable interoperability with remote SMTP clients that  implement
               an obsolete version of the AUTH command (<a href="http://tools.ietf.org/html/rfc4954">RFC 4954</a>).
 
        <b><a href="postconf.5.html#smtpd_sasl_auth_enable">smtpd_sasl_auth_enable</a> (no)</b>
               Enable SASL authentication in the Postfix SMTP server.
 
        <b><a href="postconf.5.html#smtpd_sasl_local_domain">smtpd_sasl_local_domain</a> (empty)</b>
-              The name of the Postfix SMTP server's local SASL  authentication
+              The  name of the Postfix SMTP server's local SASL authentication
               realm.
 
        <b><a href="postconf.5.html#smtpd_sasl_security_options">smtpd_sasl_security_options</a> (noanonymous)</b>
               Postfix SMTP server SASL security options; as of Postfix 2.3 the
-              list of available features depends on the SASL server  implemen-
+              list  of available features depends on the SASL server implemen-
               tation that is selected with <b><a href="postconf.5.html#smtpd_sasl_type">smtpd_sasl_type</a></b>.
 
        <b><a href="postconf.5.html#smtpd_sender_login_maps">smtpd_sender_login_maps</a> (empty)</b>
-              Optional  lookup  table  with  the SASL login names that own the
+              Optional lookup table with the SASL login  names  that  own  the
               sender (MAIL FROM) addresses.
 
        Available in Postfix version 2.1 and later:
 
        <b><a href="postconf.5.html#smtpd_sasl_exceptions_networks">smtpd_sasl_exceptions_networks</a> (empty)</b>
-              What remote SMTP clients the Postfix SMTP server will not  offer
+              What  remote SMTP clients the Postfix SMTP server will not offer
               AUTH support to.
 
        Available in Postfix version 2.1 and 2.2:
 
        <b><a href="postconf.5.html#smtpd_sasl_application_name">smtpd_sasl_application_name</a> (smtpd)</b>
-              The  application name that the Postfix SMTP server uses for SASL
+              The application name that the Postfix SMTP server uses for  SASL
               server initialization.
 
        Available in Postfix version 2.3 and later:
@@ -363,11 +369,11 @@ SMTPD(8)                                                              SMTPD(8)
 
        <b><a href="postconf.5.html#smtpd_sasl_path">smtpd_sasl_path</a> (smtpd)</b>
               Implementation-specific information that the Postfix SMTP server
-              passes through  to  the  SASL  plug-in  implementation  that  is
+              passes  through  to  the  SASL  plug-in  implementation  that is
               selected with <b><a href="postconf.5.html#smtpd_sasl_type">smtpd_sasl_type</a></b>.
 
        <b><a href="postconf.5.html#smtpd_sasl_type">smtpd_sasl_type</a> (cyrus)</b>
-              The  SASL  plug-in  type that the Postfix SMTP server should use
+              The SASL plug-in type that the Postfix SMTP  server  should  use
               for authentication.
 
        Available in Postfix version 2.5 and later:
@@ -379,20 +385,20 @@ SMTPD(8)                                                              SMTPD(8)
        Available in Postfix version 2.11 and later:
 
        <b>smtpd_sasl_service (smtp)</b>
-              The  service  name  that  is  passed to the SASL plug-in that is
+              The service name that is passed to  the  SASL  plug-in  that  is
               selected with <b><a href="postconf.5.html#smtpd_sasl_type">smtpd_sasl_type</a></b> and <b><a href="postconf.5.html#smtpd_sasl_path">smtpd_sasl_path</a></b>.
 
 <b>STARTTLS SUPPORT CONTROLS</b>
-       Detailed information about STARTTLS configuration may be found  in  the
+       Detailed  information  about STARTTLS configuration may be found in the
        <a href="TLS_README.html">TLS_README</a> document.
 
        <b><a href="postconf.5.html#smtpd_tls_security_level">smtpd_tls_security_level</a> (empty)</b>
-              The  SMTP TLS security level for the Postfix SMTP server; when a
+              The SMTP TLS security level for the Postfix SMTP server; when  a
               non-empty value is specified, this overrides the obsolete param-
               eters <a href="postconf.5.html#smtpd_use_tls">smtpd_use_tls</a> and <a href="postconf.5.html#smtpd_enforce_tls">smtpd_enforce_tls</a>.
 
        <b><a href="postconf.5.html#smtpd_sasl_tls_security_options">smtpd_sasl_tls_security_options</a> ($<a href="postconf.5.html#smtpd_sasl_security_options">smtpd_sasl_security_options</a>)</b>
-              The  SASL  authentication security options that the Postfix SMTP
+              The SASL authentication security options that the  Postfix  SMTP
               server uses for TLS encrypted SMTP sessions.
 
        <b><a href="postconf.5.html#smtpd_starttls_timeout">smtpd_starttls_timeout</a> (see 'postconf -d' output)</b>
@@ -400,25 +406,25 @@ SMTPD(8)                                                              SMTPD(8)
               during TLS startup and shutdown handshake procedures.
 
        <b><a href="postconf.5.html#smtpd_tls_CAfile">smtpd_tls_CAfile</a> (empty)</b>
-              A  file  containing  (PEM  format)  CA  certificates of root CAs
+              A file containing (PEM  format)  CA  certificates  of  root  CAs
               trusted to sign either remote SMTP client certificates or inter-
               mediate CA certificates.
 
        <b><a href="postconf.5.html#smtpd_tls_CApath">smtpd_tls_CApath</a> (empty)</b>
-              A  directory containing (PEM format) CA certificates of root CAs
+              A directory containing (PEM format) CA certificates of root  CAs
               trusted to sign either remote SMTP client certificates or inter-
               mediate CA certificates.
 
        <b><a href="postconf.5.html#smtpd_tls_always_issue_session_ids">smtpd_tls_always_issue_session_ids</a> (yes)</b>
-              Force  the  Postfix  SMTP server to issue a TLS session id, even
-              when  TLS  session  caching  is   turned   off   (<a href="postconf.5.html#smtpd_tls_session_cache_database">smtpd_tls_ses</a>-
+              Force the Postfix SMTP server to issue a TLS  session  id,  even
+              when   TLS   session   caching  is  turned  off  (<a href="postconf.5.html#smtpd_tls_session_cache_database">smtpd_tls_ses</a>-
               <a href="postconf.5.html#smtpd_tls_session_cache_database">sion_cache_database</a> is empty).
 
        <b><a href="postconf.5.html#smtpd_tls_ask_ccert">smtpd_tls_ask_ccert</a> (no)</b>
               Ask a remote SMTP client for a client certificate.
 
        <b><a href="postconf.5.html#smtpd_tls_auth_only">smtpd_tls_auth_only</a> (no)</b>
-              When  TLS  encryption is optional in the Postfix SMTP server, do
+              When TLS encryption is optional in the Postfix SMTP  server,  do
               not announce or accept SASL authentication over unencrypted con-
               nections.
 
@@ -429,18 +435,18 @@ SMTPD(8)                                                              SMTPD(8)
               File with the Postfix SMTP server RSA certificate in PEM format.
 
        <b><a href="postconf.5.html#smtpd_tls_exclude_ciphers">smtpd_tls_exclude_ciphers</a> (empty)</b>
-              List of ciphers or cipher types to exclude from the SMTP  server
+              List  of ciphers or cipher types to exclude from the SMTP server
               cipher list at all TLS security levels.
 
        <b><a href="postconf.5.html#smtpd_tls_dcert_file">smtpd_tls_dcert_file</a> (empty)</b>
               File with the Postfix SMTP server DSA certificate in PEM format.
 
        <b><a href="postconf.5.html#smtpd_tls_dh1024_param_file">smtpd_tls_dh1024_param_file</a> (empty)</b>
-              File with DH parameters that the Postfix SMTP server should  use
+              File  with DH parameters that the Postfix SMTP server should use
               with non-export EDH ciphers.
 
        <b><a href="postconf.5.html#smtpd_tls_dh512_param_file">smtpd_tls_dh512_param_file</a> (empty)</b>
-              File  with DH parameters that the Postfix SMTP server should use
+              File with DH parameters that the Postfix SMTP server should  use
               with export-grade EDH ciphers.
 
        <b><a href="postconf.5.html#smtpd_tls_dkey_file">smtpd_tls_dkey_file</a> ($<a href="postconf.5.html#smtpd_tls_dcert_file">smtpd_tls_dcert_file</a>)</b>
@@ -453,35 +459,35 @@ SMTPD(8)                                                              SMTPD(8)
               Enable additional Postfix SMTP server logging of TLS activity.
 
        <b><a href="postconf.5.html#smtpd_tls_mandatory_ciphers">smtpd_tls_mandatory_ciphers</a> (medium)</b>
-              The minimum TLS cipher grade that the Postfix SMTP  server  will
+              The  minimum  TLS cipher grade that the Postfix SMTP server will
               use with mandatory TLS encryption.
 
        <b><a href="postconf.5.html#smtpd_tls_mandatory_exclude_ciphers">smtpd_tls_mandatory_exclude_ciphers</a> (empty)</b>
-              Additional  list  of ciphers or cipher types to exclude from the
-              Postfix SMTP server cipher list at mandatory TLS  security  lev-
+              Additional list of ciphers or cipher types to exclude  from  the
+              Postfix  SMTP  server cipher list at mandatory TLS security lev-
               els.
 
        <b><a href="postconf.5.html#smtpd_tls_mandatory_protocols">smtpd_tls_mandatory_protocols</a> (!SSLv2, !SSLv3)</b>
-              The  SSL/TLS  protocols accepted by the Postfix SMTP server with
+              The SSL/TLS protocols accepted by the Postfix SMTP  server  with
               mandatory TLS encryption.
 
        <b><a href="postconf.5.html#smtpd_tls_received_header">smtpd_tls_received_header</a> (no)</b>
               Request that the Postfix SMTP server produces Received:  message
-              headers  that  include information about the protocol and cipher
-              used, as well as the remote SMTP client  CommonName  and  client
+              headers that include information about the protocol  and  cipher
+              used,  as  well  as the remote SMTP client CommonName and client
               certificate issuer CommonName.
 
        <b><a href="postconf.5.html#smtpd_tls_req_ccert">smtpd_tls_req_ccert</a> (no)</b>
-              With  mandatory  TLS  encryption,  require a trusted remote SMTP
+              With mandatory TLS encryption, require  a  trusted  remote  SMTP
               client certificate in order to allow TLS connections to proceed.
 
        <b><a href="postconf.5.html#smtpd_tls_wrappermode">smtpd_tls_wrappermode</a> (no)</b>
-              Run  the Postfix SMTP server in the non-standard "wrapper" mode,
+              Run the Postfix SMTP server in the non-standard "wrapper"  mode,
               instead of using the STARTTLS command.
 
        <b><a href="postconf.5.html#tls_daemon_random_bytes">tls_daemon_random_bytes</a> (32)</b>
-              The number of pseudo-random bytes that an  <a href="smtp.8.html"><b>smtp</b>(8)</a>  or  <a href="smtpd.8.html"><b>smtpd</b>(8)</a>
-              process  requests from the <a href="tlsmgr.8.html"><b>tlsmgr</b>(8)</a> server in order to seed its
+              The  number  of  pseudo-random bytes that an <a href="smtp.8.html"><b>smtp</b>(8)</a> or <a href="smtpd.8.html"><b>smtpd</b>(8)</a>
+              process requests from the <a href="tlsmgr.8.html"><b>tlsmgr</b>(8)</a> server in order to seed  its
               internal pseudo random number generator (PRNG).
 
        <b><a href="postconf.5.html#tls_high_cipherlist">tls_high_cipherlist</a> (see 'postconf -d' output)</b>
@@ -497,41 +503,41 @@ SMTPD(8)                                                              SMTPD(8)
               The OpenSSL cipherlist for "export" or higher grade ciphers.
 
        <b><a href="postconf.5.html#tls_null_cipherlist">tls_null_cipherlist</a> (eNULL:!aNULL)</b>
-              The OpenSSL cipherlist for "NULL"  grade  ciphers  that  provide
+              The  OpenSSL  cipherlist  for  "NULL" grade ciphers that provide
               authentication without encryption.
 
        Available in Postfix version 2.5 and later:
 
        <b><a href="postconf.5.html#smtpd_tls_fingerprint_digest">smtpd_tls_fingerprint_digest</a> (md5)</b>
-              The   message   digest   algorithm   to  construct  remote  SMTP
-              client-certificate  fingerprints  or  public  key   fingerprints
-              (Postfix   2.9   and  later)  for  <b><a href="postconf.5.html#check_ccert_access">check_ccert_access</a></b>  and  <b>per-</b>
+              The  message  digest  algorithm   to   construct   remote   SMTP
+              client-certificate   fingerprints  or  public  key  fingerprints
+              (Postfix  2.9  and  later)  for  <b><a href="postconf.5.html#check_ccert_access">check_ccert_access</a></b>   and   <b>per-</b>
               <b>mit_tls_clientcerts</b>.
 
        Available in Postfix version 2.6 and later:
 
        <b><a href="postconf.5.html#smtpd_tls_protocols">smtpd_tls_protocols</a> (!SSLv2, !SSLv3)</b>
-              List of TLS protocols that the Postfix SMTP server will  exclude
+              List  of TLS protocols that the Postfix SMTP server will exclude
               or include with opportunistic TLS encryption.
 
        <b><a href="postconf.5.html#smtpd_tls_ciphers">smtpd_tls_ciphers</a> (medium)</b>
-              The  minimum  TLS cipher grade that the Postfix SMTP server will
+              The minimum TLS cipher grade that the Postfix SMTP  server  will
               use with opportunistic TLS encryption.
 
        <b><a href="postconf.5.html#smtpd_tls_eccert_file">smtpd_tls_eccert_file</a> (empty)</b>
-              File with the Postfix SMTP server ECDSA certificate in PEM  for-
+              File  with the Postfix SMTP server ECDSA certificate in PEM for-
               mat.
 
        <b><a href="postconf.5.html#smtpd_tls_eckey_file">smtpd_tls_eckey_file</a> ($<a href="postconf.5.html#smtpd_tls_eccert_file">smtpd_tls_eccert_file</a>)</b>
-              File  with the Postfix SMTP server ECDSA private key in PEM for-
+              File with the Postfix SMTP server ECDSA private key in PEM  for-
               mat.
 
        <b><a href="postconf.5.html#smtpd_tls_eecdh_grade">smtpd_tls_eecdh_grade</a> (see 'postconf -d' output)</b>
-              The Postfix SMTP server  security  grade  for  ephemeral  ellip-
+              The  Postfix  SMTP  server  security  grade for ephemeral ellip-
               tic-curve Diffie-Hellman (EECDH) key exchange.
 
        <b><a href="postconf.5.html#tls_eecdh_strong_curve">tls_eecdh_strong_curve</a> (prime256v1)</b>
-              The  elliptic curve used by the Postfix SMTP server for sensibly
+              The elliptic curve used by the Postfix SMTP server for  sensibly
               strong ephemeral ECDH key exchange.
 
        <b><a href="postconf.5.html#tls_eecdh_ultra_curve">tls_eecdh_ultra_curve</a> (secp384r1)</b>
@@ -542,7 +548,7 @@ SMTPD(8)                                                              SMTPD(8)
 
        <b><a href="postconf.5.html#tls_preempt_cipherlist">tls_preempt_cipherlist</a> (no)</b>
               With SSLv3 and later, use the Postfix SMTP server's cipher pref-
-              erence order instead of the remote  client's  cipher  preference
+              erence  order  instead  of the remote client's cipher preference
               order.
 
        <b><a href="postconf.5.html#tls_disable_workarounds">tls_disable_workarounds</a> (see 'postconf -d' output)</b>
@@ -555,17 +561,17 @@ SMTPD(8)                                                              SMTPD(8)
 
        Available in Postfix version 3.0 and later:
 
-       <b><a href="postconf.5.html#tls_session_ticket_cipher">tls_session_ticket_cipher</a>  (Postfix</b> &gt;<b>= 3.0: aes-256-cbc, Postfix</b> &lt; <b>3.0:</b>
+       <b><a href="postconf.5.html#tls_session_ticket_cipher">tls_session_ticket_cipher</a> (Postfix</b> &gt;<b>= 3.0: aes-256-cbc, Postfix</b> &lt;  <b>3.0:</b>
        <b>aes-128-cbc)</b>
               Algorithm used to encrypt <a href="http://tools.ietf.org/html/rfc5077">RFC5077</a> TLS session tickets.
 
 <b>OBSOLETE STARTTLS CONTROLS</b>
-       The  following  configuration  parameters  exist for compatibility with
-       Postfix versions before 2.3. Support for these will  be  removed  in  a
+       The following configuration parameters  exist  for  compatibility  with
+       Postfix  versions  before  2.3.  Support for these will be removed in a
        future release.
 
        <b><a href="postconf.5.html#smtpd_use_tls">smtpd_use_tls</a> (no)</b>
-              Opportunistic  TLS:  announce  STARTTLS  support  to remote SMTP
+              Opportunistic TLS: announce  STARTTLS  support  to  remote  SMTP
               clients, but do not require that clients use TLS encryption.
 
        <b><a href="postconf.5.html#smtpd_enforce_tls">smtpd_enforce_tls</a> (no)</b>
@@ -573,85 +579,85 @@ SMTPD(8)                                                              SMTPD(8)
               and require that clients use TLS encryption.
 
        <b><a href="postconf.5.html#smtpd_tls_cipherlist">smtpd_tls_cipherlist</a> (empty)</b>
-              Obsolete  Postfix  &lt; 2.3 control for the Postfix SMTP server TLS
+              Obsolete Postfix &lt; 2.3 control for the Postfix SMTP  server  TLS
               cipher list.
 
 <b>SMTPUTF8 CONTROLS</b>
        Preliminary SMTPUTF8 support is introduced with Postfix 3.0.
 
        <b><a href="postconf.5.html#smtputf8_enable">smtputf8_enable</a> (yes)</b>
-              Enable preliminary SMTPUTF8 support for the protocols  described
+              Enable  preliminary SMTPUTF8 support for the protocols described
               in <a href="http://tools.ietf.org/html/rfc6531">RFC 6531</a>..6533.
 
        <b><a href="postconf.5.html#strict_smtputf8">strict_smtputf8</a> (no)</b>
               Enable stricter enforcement of the SMTPUTF8 protocol.
 
        <b><a href="postconf.5.html#smtputf8_autodetect_classes">smtputf8_autodetect_classes</a> (sendmail, verify)</b>
-              Detect  that  a message requires SMTPUTF8 support for the speci-
+              Detect that a message requires SMTPUTF8 support for  the  speci-
               fied mail origin classes.
 
 <b>VERP SUPPORT CONTROLS</b>
-       With VERP style delivery, each recipient of a message receives  a  cus-
-       tomized  copy of the message with his/her own recipient address encoded
+       With  VERP  style delivery, each recipient of a message receives a cus-
+       tomized copy of the message with his/her own recipient address  encoded
        in the envelope sender address.  The <a href="VERP_README.html">VERP_README</a> file describes config-
-       uration  and operation details of Postfix support for variable envelope
-       return path addresses.  VERP style delivery is requested with the  SMTP
-       XVERP  command  or  with  the  "sendmail -V" command-line option and is
+       uration and operation details of Postfix support for variable  envelope
+       return  path addresses.  VERP style delivery is requested with the SMTP
+       XVERP command or with the "sendmail  -V"  command-line  option  and  is
        available in Postfix version 1.1 and later.
 
        <b><a href="postconf.5.html#default_verp_delimiters">default_verp_delimiters</a> (+=)</b>
               The two default VERP delimiter characters.
 
        <b><a href="postconf.5.html#verp_delimiter_filter">verp_delimiter_filter</a> (-=+)</b>
-              The characters Postfix accepts as VERP delimiter  characters  on
+              The  characters  Postfix accepts as VERP delimiter characters on
               the Postfix <a href="sendmail.1.html"><b>sendmail</b>(1)</a> command line and in SMTP commands.
 
        Available in Postfix version 1.1 and 2.0:
 
        <b><a href="postconf.5.html#authorized_verp_clients">authorized_verp_clients</a> ($<a href="postconf.5.html#mynetworks">mynetworks</a>)</b>
-              What  remote  SMTP clients are allowed to specify the XVERP com-
+              What remote SMTP clients are allowed to specify the  XVERP  com-
               mand.
 
        Available in Postfix version 2.1 and later:
 
        <b><a href="postconf.5.html#smtpd_authorized_verp_clients">smtpd_authorized_verp_clients</a> ($<a href="postconf.5.html#authorized_verp_clients">authorized_verp_clients</a>)</b>
-              What remote SMTP clients are allowed to specify the  XVERP  com-
+              What  remote  SMTP clients are allowed to specify the XVERP com-
               mand.
 
 <b>TROUBLE SHOOTING CONTROLS</b>
-       The  <a href="DEBUG_README.html">DEBUG_README</a>  document describes how to debug parts of the Postfix
-       mail system. The methods vary from making the software  log  a  lot  of
+       The <a href="DEBUG_README.html">DEBUG_README</a> document describes how to debug parts of  the  Postfix
+       mail  system.  The  methods  vary from making the software log a lot of
        detail, to running some daemon processes under control of a call tracer
        or debugger.
 
        <b><a href="postconf.5.html#debug_peer_level">debug_peer_level</a> (2)</b>
-              The increment in verbose logging level when a remote  client  or
+              The  increment  in verbose logging level when a remote client or
               server matches a pattern in the <a href="postconf.5.html#debug_peer_list">debug_peer_list</a> parameter.
 
        <b><a href="postconf.5.html#debug_peer_list">debug_peer_list</a> (empty)</b>
-              Optional  list  of  remote  client or server hostname or network
+              Optional list of remote client or  server  hostname  or  network
               address  patterns  that  cause  the  verbose  logging  level  to
               increase by the amount specified in $<a href="postconf.5.html#debug_peer_level">debug_peer_level</a>.
 
        <b><a href="postconf.5.html#error_notice_recipient">error_notice_recipient</a> (postmaster)</b>
-              The  recipient  of  postmaster notifications about mail delivery
+              The recipient of postmaster notifications  about  mail  delivery
               problems that are caused by policy, resource, software or proto-
               col errors.
 
        <b><a href="postconf.5.html#internal_mail_filter_classes">internal_mail_filter_classes</a> (empty)</b>
-              What   categories  of  Postfix-generated  mail  are  subject  to
-              before-queue   content    inspection    by    <a href="postconf.5.html#non_smtpd_milters">non_smtpd_milters</a>,
+              What  categories  of  Postfix-generated  mail  are  subject   to
+              before-queue    content    inspection    by   <a href="postconf.5.html#non_smtpd_milters">non_smtpd_milters</a>,
               <a href="postconf.5.html#header_checks">header_checks</a> and <a href="postconf.5.html#body_checks">body_checks</a>.
 
        <b><a href="postconf.5.html#notify_classes">notify_classes</a> (resource, software)</b>
               The list of error classes that are reported to the postmaster.
 
        <b><a href="postconf.5.html#smtpd_reject_footer">smtpd_reject_footer</a> (empty)</b>
-              Optional  information  that  is appended after each Postfix SMTP
+              Optional information that is appended after  each  Postfix  SMTP
               server 4XX or 5XX response.
 
        <b><a href="postconf.5.html#soft_bounce">soft_bounce</a> (no)</b>
-              Safety net to keep mail queued that would otherwise be  returned
+              Safety  net to keep mail queued that would otherwise be returned
               to the sender.
 
        Available in Postfix version 2.1 and later:
@@ -662,105 +668,105 @@ SMTPD(8)                                                              SMTPD(8)
        Available in Postfix version 2.10 and later:
 
        <b><a href="postconf.5.html#smtpd_log_access_permit_actions">smtpd_log_access_permit_actions</a> (empty)</b>
-              Enable logging of the named  "permit"  actions  in  SMTP  server
-              access  lists (by default, the SMTP server logs "reject" actions
+              Enable  logging  of  the  named  "permit" actions in SMTP server
+              access lists (by default, the SMTP server logs "reject"  actions
               but not "permit" actions).
 
 <b>KNOWN VERSUS UNKNOWN RECIPIENT CONTROLS</b>
-       As of Postfix version 2.0, the SMTP server  rejects  mail  for  unknown
+       As  of  Postfix  version  2.0, the SMTP server rejects mail for unknown
        recipients. This prevents the mail queue from clogging up with undeliv-
-       erable MAILER-DAEMON messages. Additional information on this topic  is
+       erable  MAILER-DAEMON messages. Additional information on this topic is
        in the <a href="LOCAL_RECIPIENT_README.html">LOCAL_RECIPIENT_README</a> and <a href="ADDRESS_CLASS_README.html">ADDRESS_CLASS_README</a> documents.
 
        <b><a href="postconf.5.html#show_user_unknown_table_name">show_user_unknown_table_name</a> (yes)</b>
-              Display  the  name  of the recipient table in the "User unknown"
+              Display the name of the recipient table in  the  "User  unknown"
               responses.
 
        <b><a href="postconf.5.html#canonical_maps">canonical_maps</a> (empty)</b>
-              Optional address mapping lookup tables for message  headers  and
+              Optional  address  mapping lookup tables for message headers and
               envelopes.
 
        <b><a href="postconf.5.html#recipient_canonical_maps">recipient_canonical_maps</a> (empty)</b>
-              Optional  address  mapping lookup tables for envelope and header
+              Optional address mapping lookup tables for envelope  and  header
               recipient addresses.
 
        Parameters concerning known/unknown local recipients:
 
        <b><a href="postconf.5.html#mydestination">mydestination</a> ($<a href="postconf.5.html#myhostname">myhostname</a>, localhost.$<a href="postconf.5.html#mydomain">mydomain</a>, localhost)</b>
-              The list of domains that are delivered via the  $<a href="postconf.5.html#local_transport">local_transport</a>
+              The  list of domains that are delivered via the $<a href="postconf.5.html#local_transport">local_transport</a>
               mail delivery transport.
 
        <b><a href="postconf.5.html#inet_interfaces">inet_interfaces</a> (all)</b>
-              The  network  interface addresses that this mail system receives
+              The network interface addresses that this mail  system  receives
               mail on.
 
        <b><a href="postconf.5.html#proxy_interfaces">proxy_interfaces</a> (empty)</b>
-              The network interface addresses that this mail  system  receives
+              The  network  interface addresses that this mail system receives
               mail on by way of a proxy or network address translation unit.
 
        <b><a href="postconf.5.html#inet_protocols">inet_protocols</a> (all)</b>
-              The  Internet  protocols Postfix will attempt to use when making
+              The Internet protocols Postfix will attempt to use  when  making
               or accepting connections.
 
        <b><a href="postconf.5.html#local_recipient_maps">local_recipient_maps</a> (<a href="proxymap.8.html">proxy</a>:unix:passwd.byname $<a href="postconf.5.html#alias_maps">alias_maps</a>)</b>
               Lookup tables with all names or addresses of local recipients: a
-              recipient  address  is local when its domain matches $<a href="postconf.5.html#mydestination">mydestina</a>-
+              recipient address is local when its domain  matches  $<a href="postconf.5.html#mydestination">mydestina</a>-
               <a href="postconf.5.html#mydestination">tion</a>, $<a href="postconf.5.html#inet_interfaces">inet_interfaces</a> or $<a href="postconf.5.html#proxy_interfaces">proxy_interfaces</a>.
 
        <b><a href="postconf.5.html#unknown_local_recipient_reject_code">unknown_local_recipient_reject_code</a> (550)</b>
               The numerical Postfix SMTP server response code when a recipient
-              address  is local, and $<a href="postconf.5.html#local_recipient_maps">local_recipient_maps</a> specifies a list of
+              address is local, and $<a href="postconf.5.html#local_recipient_maps">local_recipient_maps</a> specifies a list  of
               lookup tables that does not match the recipient.
 
        Parameters concerning known/unknown recipients of relay destinations:
 
        <b><a href="postconf.5.html#relay_domains">relay_domains</a> (Postfix</b> &gt;<b>= 3.0: empty, Postfix</b> &lt; <b>3.0: $<a href="postconf.5.html#mydestination">mydestination</a>)</b>
-              What destination domains (and subdomains  thereof)  this  system
+              What  destination  domains  (and subdomains thereof) this system
               will relay mail to.
 
        <b><a href="postconf.5.html#relay_recipient_maps">relay_recipient_maps</a> (empty)</b>
-              Optional  lookup  tables with all valid addresses in the domains
+              Optional lookup tables with all valid addresses in  the  domains
               that match $<a href="postconf.5.html#relay_domains">relay_domains</a>.
 
        <b><a href="postconf.5.html#unknown_relay_recipient_reject_code">unknown_relay_recipient_reject_code</a> (550)</b>
-              The numerical Postfix SMTP server reply code  when  a  recipient
-              address  matches $<a href="postconf.5.html#relay_domains">relay_domains</a>, and <a href="postconf.5.html#relay_recipient_maps">relay_recipient_maps</a> speci-
-              fies a list of lookup tables that does not match  the  recipient
+              The  numerical  Postfix  SMTP server reply code when a recipient
+              address matches $<a href="postconf.5.html#relay_domains">relay_domains</a>, and <a href="postconf.5.html#relay_recipient_maps">relay_recipient_maps</a>  speci-
+              fies  a  list of lookup tables that does not match the recipient
               address.
 
-       Parameters   concerning   known/unknown  recipients  in  virtual  alias
+       Parameters  concerning  known/unknown  recipients  in   virtual   alias
        domains:
 
        <b><a href="postconf.5.html#virtual_alias_domains">virtual_alias_domains</a> ($<a href="postconf.5.html#virtual_alias_maps">virtual_alias_maps</a>)</b>
-              Postfix is final destination for the specified list  of  virtual
-              alias  domains,  that  is,  domains  for which all addresses are
+              Postfix  is  final destination for the specified list of virtual
+              alias domains, that is, domains  for  which  all  addresses  are
               aliased to addresses in other local or remote domains.
 
        <b><a href="postconf.5.html#virtual_alias_maps">virtual_alias_maps</a> ($<a href="postconf.5.html#virtual_maps">virtual_maps</a>)</b>
-              Optional lookup tables that alias  specific  mail  addresses  or
+              Optional  lookup  tables  that  alias specific mail addresses or
               domains to other local or remote address.
 
        <b><a href="postconf.5.html#unknown_virtual_alias_reject_code">unknown_virtual_alias_reject_code</a> (550)</b>
-              The  Postfix  SMTP  server  reply  code when a recipient address
-              matches $<a href="postconf.5.html#virtual_alias_domains">virtual_alias_domains</a>, and  $<a href="postconf.5.html#virtual_alias_maps">virtual_alias_maps</a>  speci-
-              fies  a  list of lookup tables that does not match the recipient
+              The Postfix SMTP server reply  code  when  a  recipient  address
+              matches  $<a href="postconf.5.html#virtual_alias_domains">virtual_alias_domains</a>,  and $<a href="postconf.5.html#virtual_alias_maps">virtual_alias_maps</a> speci-
+              fies a list of lookup tables that does not match  the  recipient
               address.
 
        Parameters  concerning  known/unknown  recipients  in  virtual  mailbox
        domains:
 
        <b><a href="postconf.5.html#virtual_mailbox_domains">virtual_mailbox_domains</a> ($<a href="postconf.5.html#virtual_mailbox_maps">virtual_mailbox_maps</a>)</b>
-              Postfix  is final destination for the specified list of domains;
-              mail is  delivered  via  the  $<a href="postconf.5.html#virtual_transport">virtual_transport</a>  mail  delivery
+              Postfix is final destination for the specified list of  domains;
+              mail  is  delivered  via  the  $<a href="postconf.5.html#virtual_transport">virtual_transport</a>  mail delivery
               transport.
 
        <b><a href="postconf.5.html#virtual_mailbox_maps">virtual_mailbox_maps</a> (empty)</b>
-              Optional  lookup  tables with all valid addresses in the domains
+              Optional lookup tables with all valid addresses in  the  domains
               that match $<a href="postconf.5.html#virtual_mailbox_domains">virtual_mailbox_domains</a>.
 
        <b><a href="postconf.5.html#unknown_virtual_mailbox_reject_code">unknown_virtual_mailbox_reject_code</a> (550)</b>
-              The Postfix SMTP server reply  code  when  a  recipient  address
-              matches   $<a href="postconf.5.html#virtual_mailbox_domains">virtual_mailbox_domains</a>,   and  $<a href="postconf.5.html#virtual_mailbox_maps">virtual_mailbox_maps</a>
+              The  Postfix  SMTP  server  reply  code when a recipient address
+              matches  $<a href="postconf.5.html#virtual_mailbox_domains">virtual_mailbox_domains</a>,   and   $<a href="postconf.5.html#virtual_mailbox_maps">virtual_mailbox_maps</a>
               specifies a list of lookup tables that does not match the recip-
               ient address.
 
@@ -769,7 +775,7 @@ SMTPD(8)                                                              SMTPD(8)
        control client request rates.
 
        <b><a href="postconf.5.html#line_length_limit">line_length_limit</a> (2048)</b>
-              Upon input, long lines are chopped up into  pieces  of  at  most
+              Upon  input,  long  lines  are chopped up into pieces of at most
               this length; upon delivery, long lines are reconstructed.
 
        <b><a href="postconf.5.html#queue_minfree">queue_minfree</a> (0)</b>
@@ -777,58 +783,58 @@ SMTPD(8)                                                              SMTPD(8)
               tem that is needed to receive mail.
 
        <b><a href="postconf.5.html#message_size_limit">message_size_limit</a> (10240000)</b>
-              The maximal size in  bytes  of  a  message,  including  envelope
+              The  maximal  size  in  bytes  of  a message, including envelope
               information.
 
        <b><a href="postconf.5.html#smtpd_recipient_limit">smtpd_recipient_limit</a> (1000)</b>
-              The  maximal  number  of recipients that the Postfix SMTP server
+              The maximal number of recipients that the  Postfix  SMTP  server
               accepts per message delivery request.
 
        <b><a href="postconf.5.html#smtpd_timeout">smtpd_timeout</a> (normal: 300s, overload: 10s)</b>
-              The time limit for sending a Postfix SMTP  server  response  and
+              The  time  limit  for sending a Postfix SMTP server response and
               for receiving a remote SMTP client request.
 
        <b><a href="postconf.5.html#smtpd_history_flush_threshold">smtpd_history_flush_threshold</a> (100)</b>
-              The  maximal  number of lines in the Postfix SMTP server command
-              history before it is flushed upon receipt of EHLO, RSET, or  end
+              The maximal number of lines in the Postfix SMTP  server  command
+              history  before it is flushed upon receipt of EHLO, RSET, or end
               of DATA.
 
        Available in Postfix version 2.3 and later:
 
        <b><a href="postconf.5.html#smtpd_peername_lookup">smtpd_peername_lookup</a> (yes)</b>
-              Attempt  to  look up the remote SMTP client hostname, and verify
+              Attempt to look up the remote SMTP client hostname,  and  verify
               that the name matches the client IP address.
 
        The per SMTP client connection count and request rate limits are imple-
-       mented  in co-operation with the <a href="anvil.8.html"><b>anvil</b>(8)</a> service, and are available in
+       mented in co-operation with the <a href="anvil.8.html"><b>anvil</b>(8)</a> service, and are available  in
        Postfix version 2.2 and later.
 
        <b><a href="postconf.5.html#smtpd_client_connection_count_limit">smtpd_client_connection_count_limit</a> (50)</b>
-              How many simultaneous connections any client is allowed to  make
+              How  many simultaneous connections any client is allowed to make
               to this service.
 
        <b><a href="postconf.5.html#smtpd_client_connection_rate_limit">smtpd_client_connection_rate_limit</a> (0)</b>
-              The  maximal number of connection attempts any client is allowed
+              The maximal number of connection attempts any client is  allowed
               to make to this service per time unit.
 
        <b><a href="postconf.5.html#smtpd_client_message_rate_limit">smtpd_client_message_rate_limit</a> (0)</b>
-              The maximal number of message delivery requests that any  client
-              is  allowed to make to this service per time unit, regardless of
+              The  maximal number of message delivery requests that any client
+              is allowed to make to this service per time unit, regardless  of
               whether or not Postfix actually accepts those messages.
 
        <b><a href="postconf.5.html#smtpd_client_recipient_rate_limit">smtpd_client_recipient_rate_limit</a> (0)</b>
-              The maximal number of recipient addresses  that  any  client  is
-              allowed  to  send  to  this service per time unit, regardless of
+              The  maximal  number  of  recipient addresses that any client is
+              allowed to send to this service per  time  unit,  regardless  of
               whether or not Postfix actually accepts those recipients.
 
        <b><a href="postconf.5.html#smtpd_client_event_limit_exceptions">smtpd_client_event_limit_exceptions</a> ($<a href="postconf.5.html#mynetworks">mynetworks</a>)</b>
-              Clients that are excluded  from  smtpd_client_*_count/rate_limit
+              Clients  that  are excluded from smtpd_client_*_count/rate_limit
               restrictions.
 
        Available in Postfix version 2.3 and later:
 
        <b><a href="postconf.5.html#smtpd_client_new_tls_session_rate_limit">smtpd_client_new_tls_session_rate_limit</a> (0)</b>
-              The  maximal  number of new (i.e., uncached) TLS sessions that a
+              The maximal number of new (i.e., uncached) TLS sessions  that  a
               remote SMTP client is allowed to negotiate with this service per
               time unit.
 
@@ -836,68 +842,68 @@ SMTPD(8)                                                              SMTPD(8)
 
        <b><a href="postconf.5.html#smtpd_per_record_deadline">smtpd_per_record_deadline</a> (normal: no, overload: yes)</b>
               Change  the  behavior  of  the  <a href="postconf.5.html#smtpd_timeout">smtpd_timeout</a>  and  <a href="postconf.5.html#smtpd_starttls_timeout">smtpd_start</a>-
-              <a href="postconf.5.html#smtpd_starttls_timeout">tls_timeout</a> time limits, from a time limit  per  read  or  write
-              system  call,  to  a  time  limit  to send or receive a complete
-              record (an SMTP command line, SMTP response line,  SMTP  message
+              <a href="postconf.5.html#smtpd_starttls_timeout">tls_timeout</a>  time  limits,  from  a time limit per read or write
+              system call, to a time limit  to  send  or  receive  a  complete
+              record  (an  SMTP command line, SMTP response line, SMTP message
               content line, or TLS protocol message).
 
        Available in Postfix version 3.1 and later:
 
        <b><a href="postconf.5.html#smtpd_client_auth_rate_limit">smtpd_client_auth_rate_limit</a> (0)</b>
-              The  maximal  number of AUTH commands that any client is allowed
-              to send to this service per time unit, regardless of whether  or
+              The maximal number of AUTH commands that any client  is  allowed
+              to  send to this service per time unit, regardless of whether or
               not Postfix actually accepts those commands.
 
 <b>TARPIT CONTROLS</b>
-       When  a  remote  SMTP  client makes errors, the Postfix SMTP server can
-       insert delays before responding. This can help to  slow  down  run-away
-       software.   The  behavior is controlled by an error counter that counts
+       When a remote SMTP client makes errors, the  Postfix  SMTP  server  can
+       insert  delays  before  responding. This can help to slow down run-away
+       software.  The behavior is controlled by an error counter  that  counts
        the number of errors within an SMTP session that a client makes without
        delivering mail.
 
        <b><a href="postconf.5.html#smtpd_error_sleep_time">smtpd_error_sleep_time</a> (1s)</b>
-              With  Postfix  version  2.1  and later: the SMTP server response
-              delay after a client has made more than  $<a href="postconf.5.html#smtpd_soft_error_limit">smtpd_soft_error_limit</a>
-              errors,  and  fewer than $<a href="postconf.5.html#smtpd_hard_error_limit">smtpd_hard_error_limit</a> errors, without
+              With Postfix version 2.1 and later:  the  SMTP  server  response
+              delay  after a client has made more than $<a href="postconf.5.html#smtpd_soft_error_limit">smtpd_soft_error_limit</a>
+              errors, and fewer than $<a href="postconf.5.html#smtpd_hard_error_limit">smtpd_hard_error_limit</a>  errors,  without
               delivering mail.
 
        <b><a href="postconf.5.html#smtpd_soft_error_limit">smtpd_soft_error_limit</a> (10)</b>
-              The number of errors a remote SMTP client  is  allowed  to  make
-              without  delivering  mail  before  the Postfix SMTP server slows
+              The  number  of  errors  a remote SMTP client is allowed to make
+              without delivering mail before the  Postfix  SMTP  server  slows
               down all its responses.
 
        <b><a href="postconf.5.html#smtpd_hard_error_limit">smtpd_hard_error_limit</a> (normal: 20, overload: 1)</b>
-              The maximal number of errors a remote SMTP client is allowed  to
+              The  maximal number of errors a remote SMTP client is allowed to
               make without delivering mail.
 
        <b><a href="postconf.5.html#smtpd_junk_command_limit">smtpd_junk_command_limit</a> (normal: 100, overload: 1)</b>
-              The  number  of  junk commands (NOOP, VRFY, ETRN or RSET) that a
-              remote SMTP client can  send  before  the  Postfix  SMTP  server
+              The number of junk commands (NOOP, VRFY, ETRN or  RSET)  that  a
+              remote  SMTP  client  can  send  before  the Postfix SMTP server
               starts to increment the error counter with each junk command.
 
        Available in Postfix version 2.1 and later:
 
        <b><a href="postconf.5.html#smtpd_recipient_overshoot_limit">smtpd_recipient_overshoot_limit</a> (1000)</b>
-              The  number  of recipients that a remote SMTP client can send in
+              The number of recipients that a remote SMTP client can  send  in
               excess  of  the  limit  specified  with  $<a href="postconf.5.html#smtpd_recipient_limit">smtpd_recipient_limit</a>,
-              before  the Postfix SMTP server increments the per-session error
+              before the Postfix SMTP server increments the per-session  error
               count for each excess recipient.
 
 <b>ACCESS POLICY DELEGATION CONTROLS</b>
-       As of version 2.1, Postfix can be configured to delegate access  policy
-       decisions  to  an  external  server that runs outside Postfix.  See the
+       As  of version 2.1, Postfix can be configured to delegate access policy
+       decisions to an external server that runs  outside  Postfix.   See  the
        file <a href="SMTPD_POLICY_README.html">SMTPD_POLICY_README</a> for more information.
 
        <b><a href="postconf.5.html#smtpd_policy_service_max_idle">smtpd_policy_service_max_idle</a> (300s)</b>
-              The time after which an idle SMTPD policy service connection  is
+              The  time after which an idle SMTPD policy service connection is
               closed.
 
        <b><a href="postconf.5.html#smtpd_policy_service_max_ttl">smtpd_policy_service_max_ttl</a> (1000s)</b>
-              The  time  after which an active SMTPD policy service connection
+              The time after which an active SMTPD policy  service  connection
               is closed.
 
        <b><a href="postconf.5.html#smtpd_policy_service_timeout">smtpd_policy_service_timeout</a> (100s)</b>
-              The time limit for connecting to, writing to, or receiving  from
+              The  time limit for connecting to, writing to, or receiving from
               a delegated SMTPD policy server.
 
        Available in Postfix version 3.0 and later:
@@ -907,81 +913,81 @@ SMTPD(8)                                                              SMTPD(8)
               The default action when an SMTPD policy service request fails.
 
        <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 SMTPD policy service connec-
+              The maximal number of requests per SMTPD policy service  connec-
               tion, or zero (no limit).
 
        <b><a href="postconf.5.html#smtpd_policy_service_try_limit">smtpd_policy_service_try_limit</a> (2)</b>
-              The maximal number of attempts to send an SMTPD  policy  service
+              The  maximal  number of attempts to send an SMTPD policy service
               request before giving up.
 
        <b><a href="postconf.5.html#smtpd_policy_service_retry_delay">smtpd_policy_service_retry_delay</a> (1s)</b>
-              The  delay between attempts to resend a failed SMTPD policy ser-
+              The delay between attempts to resend a failed SMTPD policy  ser-
               vice request.
 
        Available in Postfix version 3.1 and later:
 
        <b><a href="postconf.5.html#smtpd_policy_service_policy_context">smtpd_policy_service_policy_context</a> (empty)</b>
-              Optional information that the Postfix SMTP server  specifies  in
-              the  "policy_context"  attribute  of  a  policy  service request
-              (originally, to share the same service endpoint  among  multiple
+              Optional  information  that the Postfix SMTP server specifies in
+              the "policy_context"  attribute  of  a  policy  service  request
+              (originally,  to  share the same service endpoint among multiple
               <a href="postconf.5.html#check_policy_service">check_policy_service</a> clients).
 
 <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>
-              A list of Postfix features where the pattern "example.com"  also
-              matches  subdomains  of  example.com,  instead  of  requiring an
+              A  list of Postfix features where the pattern "example.com" also
+              matches subdomains  of  example.com,  instead  of  requiring  an
               explicit ".example.com" 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:
@@ -991,19 +997,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:
@@ -1017,17 +1023,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>
@@ -1039,7 +1045,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>
@@ -1047,18 +1053,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>
@@ -1070,17 +1076,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>
@@ -1092,36 +1098,36 @@ 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>
@@ -1129,24 +1135,24 @@ SMTPD(8)                                                              SMTPD(8)
               a sender or recipient address because its domain is unknown.
 
        <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>
@@ -1156,52 +1162,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>
@@ -1212,11 +1218,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>
@@ -1229,25 +1235,25 @@ 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>
-              A  prefix  that  is  prepended  to  the  process  name in syslog
+              A prefix that  is  prepended  to  the  process  name  in  syslog
               records, so that, for example, "smtpd" becomes "prefix/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 1cebf490d403dbbd75fda21b1c8eb5acfeacd400..fb7dfa9edf0bacfb060131ad2486a7f1102df15b 100644 (file)
@@ -9827,6 +9827,41 @@ Examples:
 .ft R
 .PP
 This feature is available in Postfix 2.10 and later.
+.SH smtpd_milter_maps (default: empty)
+Lookup tables with Milter settings per remote SMTP client IP
+address.  The lookup result overrides the smtpd_milters setting,
+and has the same syntax.
+.PP
+Note: lookup tables cannot return empty responses. Specify a
+lookup result of DISABLE (case does not matter) to indicate that
+Milter support should be disabled.
+.PP
+Example to disable Milters for local clients:
+.PP
+.nf
+.na
+.ft C
+/etc/postfix/main.cf:
+    smtpd_milter_maps = cidr:/etc/postfix/smtpd_milter_map
+    smtpd_milters = inet:host:port, { inet:host:port, ... }, ...
+.fi
+.ad
+.ft R
+.PP
+.nf
+.na
+.ft C
+/etc/postfix/smtpd_milter_map:
+    # Disable Milters for local clients.
+    127.0.0.0/8    DISABLE
+    192.168.0.0/16 DISABLE
+    ::/64          DISABLE
+    2001:db8::/32  DISABLE
+.fi
+.ad
+.ft R
+.PP
+This feature is available in Postfix 3.2 and later.
 .SH smtpd_milters (default: empty)
 A list of Milter (mail filter) applications for new mail that
 arrives via the Postfix \fBsmtpd\fR(8) server. Specify space or comma as
index acc8d06c7cff94d8d18fe58fbd6e8cd87088f81b..b6381d4bbcfba4d4e0bd6880c079452a75dfb670 100644 (file)
@@ -284,6 +284,11 @@ Available in Postfix version 3.1 and later:
 Optional list of \fIname=value\fR pairs that specify default
 values for arbitrary macros that Postfix may send to Milter
 applications.
+.PP
+Available in Postfix version 3.2 and later:
+.IP "\fBsmtpd_milter_maps (empty)\fR"
+Lookup tables with Milter settings per remote SMTP client IP
+address.
 .SH "GENERAL CONTENT INSPECTION CONTROLS"
 .na
 .nf
index 2bb97ccf9ae098ee96d516c7f1f772ff71f7abee..cb3515e96923dede5cf84bd8c92d897cfdd3750e 100755 (executable)
@@ -550,6 +550,7 @@ while (<>) {
     s;\bsmtpd_history_flush_threshold\b;<a href="postconf.5.html#smtpd_history_flush_threshold">$&</a>;g;
     s;\bsmtpd_junk_command_limit\b;<a href="postconf.5.html#smtpd_junk_command_limit">$&</a>;g;
     s;\bsmtpd_milters\b;<a href="postconf.5.html#smtpd_milters">$&</a>;g;
+    s;\bsmtpd_milter_maps\b;<a href="postconf.5.html#smtpd_milter_maps">$&</a>;g;
     s;\bsmtpd_noop_commands\b;<a href="postconf.5.html#smtpd_noop_commands">$&</a>;g;
     s;\bsmtpd_null_access_lookup_key\b;<a href="postconf.5.html#smtpd_null_access_lookup_key">$&</a>;g;
     s;\bsmtpd_recipient_overshoot_limit\b;<a href="postconf.5.html#smtpd_recipient_overshoot_limit">$&</a>;g;
index eb687356912e53584bc4434be163e44eb2ef4678..6ccc8a6dfc5350c04108860c3f8a7e5d57a58532 100644 (file)
@@ -259,6 +259,9 @@ support per-Milter timeouts, per-Milter error handling, etc. </p>
 <li><a href="#per-milter">Different settings for different Milter
 applications </a>
 
+<li><a href="#per-client">Different settings for different SMTP
+clients </a>
+
 <li><a href="#macros">Sendmail macro emulation</a>
 
 <li><a href="#send-macros">What macros will Postfix send to Milters?</a>
@@ -320,6 +323,11 @@ form <b>inet:</b><i>port</i><b>@</b><i>host</i>. </p>  </dd>
 
 </blockquote>
 
+<p> For advanced configuration see "<a href="#per-client">Different
+settings for different SMTP clients</a>" and "<a
+href="#per-milter">Different settings for different Milter
+applications</a>". </p>
+
 <h3> <a name="non-smtp-milters">Non-SMTP Milter applications </a> </h3>
 
 <p> The non-SMTP Milter applications handle mail that arrives via
@@ -564,6 +572,29 @@ main.cf: items separated by space or comma. There is one difference:
 }", if you want to have space or comma within a value or around
 "="</b>.  </p>
 
+<h3><a name="per-client">Different settings for different SMTP
+clients </a></h3>
+
+<p> The smtpd_milter_maps feature supports different Milter settings
+for different client IP addresses. Lookup results override the the
+global smtpd_milters setting, and have the same syntax. For example,
+to disable Milter settings for local address ranges: </p>
+
+<pre>
+/etc/postfix/main.cf:
+    smtpd_milter_maps = cidr:/etc/postfix/smtpd_milter_map
+    smtpd_milters = inet:host:port, { inet:host:port, ... }, ...
+
+/etc/postfix/smtpd_milter_map:
+    # Disable Milters for local clients.
+    127.0.0.0/8    DISABLE
+    192.168.0.0/16 DISABLE
+    ::/64          DISABLE
+    2001:db8::/32  DISABLE
+</pre>
+
+<p> This feature is available with Postfix 3.2 and later. </p>
+
 <h3><a name="macros">Sendmail macro emulation</a></h3>
 
 <p> Postfix emulates a limited number of Sendmail macros, as shown
index 8bc5e6d36a7135797a0ed21121a5c30b97c77b1e..89ffe6cc12aa61b9aa95bd522623598db733a68b 100644 (file)
@@ -16675,3 +16675,32 @@ the verify(8) daemon automatically refreshes an active address
 before it expires. </p>
 
 <p> This feature is available in Postfix 3.1 and later.  </p>
+
+%PARAM smtpd_milter_maps
+
+<p> Lookup tables with Milter settings per remote SMTP client IP
+address.  The lookup result overrides the smtpd_milters setting,
+and has the same syntax. </p>
+
+<p> Note: lookup tables cannot return empty responses. Specify a
+lookup result of DISABLE (case does not matter) to indicate that
+Milter support should be disabled. </p>
+
+<p> Example to disable Milters for local clients: </p>
+
+<pre>
+/etc/postfix/main.cf:
+    smtpd_milter_maps = cidr:/etc/postfix/smtpd_milter_map
+    smtpd_milters = inet:host:port, { inet:host:port, ... }, ...
+</pre>
+
+<pre>
+/etc/postfix/smtpd_milter_map:
+    # Disable Milters for local clients.
+    127.0.0.0/8    DISABLE
+    192.168.0.0/16 DISABLE
+    ::/64          DISABLE
+    2001:db8::/32  DISABLE
+</pre>
+
+<p> This feature is available in Postfix 3.2 and later.  </p>
index b4b51eb6d961c3919d017dc015f4c39eafae6003..c7ccc7f046ca9b0f82e60d5041ed2bd65d8b68fa 100644 (file)
@@ -3250,6 +3250,11 @@ extern bool var_tls_dane_taa_dgst;
 #define DEF_SMTPD_MILTERS              ""
 extern char *var_smtpd_milters;
 
+#define VAR_SMTPD_MILTER_MAPS          "smtpd_milter_maps"
+#define DEF_SMTPD_MILTER_MAPS          ""
+extern char *var_smtpd_milter_maps;
+#define SMTPD_MILTERS_DISABLE          "DISABLE"
+
 #define VAR_CLEANUP_MILTERS            "non_smtpd_milters"
 #define DEF_CLEANUP_MILTERS            ""
 extern char *var_cleanup_milters;
index 03afe4a557c3f340258792dcde0b2926637e7795..d24f7c29369ceb14bb3c3ec35f982cb9bda4b44b 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      "20161008"
+#define MAIL_RELEASE_DATE      "20161101"
 #define MAIL_VERSION_NUMBER    "3.2"
 
 #ifdef SNAPSHOT
index 6e2a194f894f3809e5786911aa47390c6e91209a..d94d585f3d8481a310e1d708918f0328e210e5fc 100644 (file)
 /*     Optional list of \fIname=value\fR pairs that specify default
 /*     values for arbitrary macros that Postfix may send to Milter
 /*     applications.
+/* .PP
+/*     Available in Postfix version 3.2 and later:
+/* .IP "\fBsmtpd_milter_maps (empty)\fR"
+/*     Lookup tables with Milter settings per remote SMTP client IP
+/*     address.
 /* GENERAL CONTENT INSPECTION CONTROLS
 /* .ad
 /* .fi
@@ -1355,6 +1360,7 @@ bool    var_smtpd_peername_lookup;
 int     var_plaintext_code;
 bool    var_smtpd_delay_open;
 char   *var_smtpd_milters;
+char   *var_smtpd_milter_maps;
 int     var_milt_conn_time;
 int     var_milt_cmd_time;
 int     var_milt_msg_time;
@@ -1402,6 +1408,13 @@ int     var_smtpd_uproxy_tmout;
   */
 static MAPS *ehlo_discard_maps;
 
+ /*
+  * Per-client Milter support.
+  */
+static MAPS *smtpd_milter_maps;
+static void setup_milters(SMTPD_STATE *);
+static void teardown_milters(SMTPD_STATE *);
+
  /*
   * VERP command name.
   */
@@ -1459,11 +1472,6 @@ static void tls_reset(SMTPD_STATE *);
 #define REASON_LOST_CONNECTION "lost connection"
 #define REASON_ERROR_LIMIT     "too many errors"
 
- /*
-  * Mail filter initialization status.
-  */
-MILTERS *smtpd_milters;
-
 #ifdef USE_TLS
 
  /*
@@ -1640,10 +1648,9 @@ static int helo_cmd(SMTPD_STATE *state, int argc, SMTPD_TOKEN *argv)
 #define PUSH_STRING(old, curr, new)    { char *old = (curr); (curr) = (new);
 #define POP_STRING(old, curr)          (curr) = old; }
 
-    if (smtpd_milters != 0
-       && SMTPD_STAND_ALONE(state) == 0
+    if (state->milters != 0
        && (state->saved_flags & MILTER_SKIP_FLAGS) == 0
-      && (err = milter_helo_event(smtpd_milters, argv[1].strval, 0)) != 0) {
+     && (err = milter_helo_event(state->milters, argv[1].strval, 0)) != 0) {
        /* Log reject etc. with correct HELO information. */
        PUSH_STRING(saved_helo, state->helo_name, argv[1].strval);
        err = check_milter_reply(state, err);
@@ -1726,10 +1733,9 @@ static int ehlo_cmd(SMTPD_STATE *state, int argc, SMTPD_TOKEN *argv)
      * other commands such as AUTH, STARTTLS, and VRFY.
      */
     err = 0;
-    if (smtpd_milters != 0
-       && SMTPD_STAND_ALONE(state) == 0
+    if (state->milters != 0
        && (state->saved_flags & MILTER_SKIP_FLAGS) == 0
-      && (err = milter_helo_event(smtpd_milters, argv[1].strval, 1)) != 0) {
+     && (err = milter_helo_event(state->milters, argv[1].strval, 1)) != 0) {
        /* Log reject etc. with correct HELO information. */
        PUSH_STRING(saved_helo, state->helo_name, argv[1].strval);
        err = check_milter_reply(state, err);
@@ -1904,8 +1910,8 @@ static void helo_reset(SMTPD_STATE *state)
     if (state->helo_name) {
        myfree(state->helo_name);
        state->helo_name = 0;
-       if (SMTPD_STAND_ALONE(state) == 0 && smtpd_milters != 0)
-           milter_abort(smtpd_milters);
+       if (state->milters != 0)
+           milter_abort(state->milters);
     }
     if (state->ehlo_argv) {
        argv_free(state->ehlo_argv);
@@ -2036,10 +2042,10 @@ static int mail_open_stream(SMTPD_STATE *state)
        state->cleanup = state->dest->stream;
        state->queue_id = mystrdup(state->dest->id);
        if (SMTPD_STAND_ALONE(state) == 0) {
-           if (smtpd_milters != 0
+           if (state->milters != 0
                && (state->saved_flags & MILTER_SKIP_FLAGS) == 0)
                /* Send place-holder smtpd_milters list. */
-               (void) milter_dummy(smtpd_milters, state->cleanup);
+               (void) milter_dummy(state->milters, state->cleanup);
            rec_fprintf(state->cleanup, REC_TYPE_TIME, REC_TYPE_TIME_FORMAT,
                        REC_TYPE_TIME_ARG(state->arrival_time));
            if (*var_filter_xport)
@@ -2533,11 +2539,10 @@ static int mail_cmd(SMTPD_STATE *state, int argc, SMTPD_TOKEN *argv)
        smtpd_chat_reply(state, "%s", err);
        return (-1);
     }
-    if (smtpd_milters != 0
-       && SMTPD_STAND_ALONE(state) == 0
+    if (state->milters != 0
        && (state->saved_flags & MILTER_SKIP_FLAGS) == 0) {
        PUSH_STRING(saved_sender, state->sender, STR(state->addr_buf));
-       err = milter_mail_event(smtpd_milters,
+       err = milter_mail_event(state->milters,
                                milter_argv(state, argc - 2, argv + 2));
        if (err != 0) {
            /* Log reject etc. with correct sender information. */
@@ -2653,8 +2658,8 @@ static void mail_reset(SMTPD_STATE *state)
        state->queue_id = 0;
     }
     if (state->sender) {
-       if (SMTPD_STAND_ALONE(state) == 0 && smtpd_milters != 0)
-           milter_abort(smtpd_milters);
+       if (state->milters != 0)
+           milter_abort(state->milters);
        myfree(state->sender);
        state->sender = 0;
     }
@@ -2868,11 +2873,11 @@ static int rcpt_cmd(SMTPD_STATE *state, int argc, SMTPD_TOKEN *argv)
        } else {
            err = smtpd_check_rcpt(state, STR(state->addr_buf));
        }
-       if (smtpd_milters != 0
+       if (state->milters != 0
            && (state->saved_flags & MILTER_SKIP_FLAGS) == 0) {
            PUSH_STRING(saved_rcpt, state->recipient, STR(state->addr_buf));
            state->milter_reject_text = err;
-           milter_err = milter_rcpt_event(smtpd_milters,
+           milter_err = milter_rcpt_event(state->milters,
                                           err == 0 ? MILTER_FLAG_NONE :
                                           MILTER_FLAG_WANT_RCPT_REJ,
                                    milter_argv(state, argc - 2, argv + 2));
@@ -3143,10 +3148,9 @@ static int data_cmd(SMTPD_STATE *state, int argc, SMTPD_TOKEN *unused_argv)
        smtpd_chat_reply(state, "%s", err);
        return (-1);
     }
-    if (smtpd_milters != 0
-       && SMTPD_STAND_ALONE(state) == 0
+    if (state->milters != 0
        && (state->saved_flags & MILTER_SKIP_FLAGS) == 0
-       && (err = milter_data_event(smtpd_milters)) != 0
+       && (err = milter_data_event(state->milters)) != 0
        && (err = check_milter_reply(state, err)) != 0) {
        smtpd_chat_reply(state, "%s", err);
        return (-1);
@@ -3186,10 +3190,10 @@ static int data_cmd(SMTPD_STATE *state, int argc, SMTPD_TOKEN *unused_argv)
      */
     if (state->cleanup) {
        if (SMTPD_STAND_ALONE(state) == 0) {
-           if (smtpd_milters != 0
+           if (state->milters != 0
                && (state->saved_flags & MILTER_SKIP_FLAGS) == 0)
                /* Send actual smtpd_milters list. */
-               (void) milter_send(smtpd_milters, state->cleanup);
+               (void) milter_send(state->milters, state->cleanup);
            if (state->saved_flags)
                rec_fprintf(state->cleanup, REC_TYPE_FLGS, "%d",
                            state->saved_flags);
@@ -3437,7 +3441,7 @@ static int data_cmd(SMTPD_STATE *state, int argc, SMTPD_TOKEN *unused_argv)
      * XXX See exception below in code that overrides state->access_denied for
      * compliance with RFC 2821 Sec 3.1.
      */
-    if (smtpd_milters != 0 && (state->err & CLEANUP_STAT_WRITE) != 0)
+    if (state->milters != 0 && (state->err & CLEANUP_STAT_WRITE) != 0)
        state->access_denied = mystrdup("421 4.3.0 Mail system error");
 
     /*
@@ -3658,7 +3662,7 @@ static int vrfy_cmd(SMTPD_STATE *state, int argc, SMTPD_TOKEN *argv)
                         state->addr);
        return (-1);
     }
-    if (smtpd_milters != 0 && (err = milter_other_event(smtpd_milters)) != 0
+    if (state->milters != 0 && (err = milter_other_event(state->milters)) != 0
        && (err[0] == '5' || err[0] == '4')) {
        state->error_mask |= MAIL_ERROR_POLICY;
        smtpd_chat_reply(state, "%s", err);
@@ -3713,7 +3717,7 @@ static int etrn_cmd(SMTPD_STATE *state, int argc, SMTPD_TOKEN *argv)
        smtpd_chat_reply(state, "503 Error: send HELO/EHLO first");
        return (-1);
     }
-    if (smtpd_milters != 0 && (err = milter_other_event(smtpd_milters)) != 0
+    if (state->milters != 0 && (err = milter_other_event(state->milters)) != 0
        && (err[0] == '5' || err[0] == '4')) {
        state->error_mask |= MAIL_ERROR_POLICY;
        smtpd_chat_reply(state, "%s", err);
@@ -4154,8 +4158,11 @@ static int xclient_cmd(SMTPD_STATE *state, int argc, SMTPD_TOKEN *argv)
     chat_reset(state, 0);
     mail_reset(state);
     rcpt_reset(state);
-    if (smtpd_milters)
-       milter_disc_event(smtpd_milters);
+    if (state->milters)
+       milter_disc_event(state->milters);
+    /* Following duplicates the top-level connect/disconnect handler. */
+    teardown_milters(state);
+    setup_milters(state);
     vstream_longjmp(state->client, SMTP_ERR_NONE);
     return (0);
 }
@@ -4634,7 +4641,7 @@ static int starttls_cmd(SMTPD_STATE *state, int argc, SMTPD_TOKEN *unused_argv)
        smtpd_chat_reply(state, "501 5.5.4 Syntax: STARTTLS");
        return (-1);
     }
-    if (smtpd_milters != 0 && (err = milter_other_event(smtpd_milters)) != 0) {
+    if (state->milters != 0 && (err = milter_other_event(state->milters)) != 0) {
        if (err[0] == '5') {
            state->error_mask |= MAIL_ERROR_POLICY;
            smtpd_chat_reply(state, "%s", err);
@@ -5035,10 +5042,10 @@ static void smtpd_proto(SMTPD_STATE *state)
         */
        else {
            err = 0;
-           if (smtpd_milters != 0 && SMTPD_STAND_ALONE(state) == 0) {
-               milter_macro_callback(smtpd_milters, smtpd_milter_eval,
+           if (state->milters != 0) {
+               milter_macro_callback(state->milters, smtpd_milter_eval,
                                      (void *) state);
-               if ((err = milter_conn_event(smtpd_milters, state->name,
+               if ((err = milter_conn_event(state->milters, state->name,
                                             state->addr,
                                  strcmp(state->port, CLIENT_PORT_UNKNOWN) ?
                                             state->port : "0",
@@ -5163,9 +5170,8 @@ static void smtpd_proto(SMTPD_STATE *state)
            }
            /* state->access_denied == 0 || cmdp->action == quit_cmd */
            if (cmdp->name == 0) {
-               if (smtpd_milters != 0
-                   && SMTPD_STAND_ALONE(state) == 0
-                   && (err = milter_unknown_event(smtpd_milters,
+               if (state->milters != 0
+                   && (err = milter_unknown_event(state->milters,
                                                   argv[0].strval)) != 0
                    && (err = check_milter_reply(state, err)) != 0) {
                    smtpd_chat_reply(state, "%s", err);
@@ -5270,8 +5276,8 @@ static void smtpd_proto(SMTPD_STATE *state)
     chat_reset(state, 0);
     mail_reset(state);
     rcpt_reset(state);
-    if (smtpd_milters)
-       milter_disc_event(smtpd_milters);
+    if (state->milters)
+       milter_disc_event(state->milters);
 }
 
 /* smtpd_format_cmd_stats - format per-command statistics */
@@ -5313,6 +5319,59 @@ static char *smtpd_format_cmd_stats(VSTRING *buf)
     return (lowercase(STR(buf)));
 }
 
+/* setup_milters - set up Milters after a connection is established */
+
+static void setup_milters(SMTPD_STATE *state)
+{
+    const char *milter_string;
+
+    /*
+     * Postcondition: either state->milters is set, or the
+     * INPUT_TRANSP_MILTER flag is passed down-stream.
+     */
+    if (SMTPD_STAND_ALONE(state) == 0
+       && (smtpd_input_transp_mask & INPUT_TRANSP_MILTER) == 0
+       && ((smtpd_milter_maps
+            && (milter_string =
+                maps_find(smtpd_milter_maps, state->addr, 0)) != 0)
+           || *(milter_string = var_smtpd_milters) != 0)
+       && strcasecmp(milter_string, SMTPD_MILTERS_DISABLE) != 0) {
+       state->milters = milter_create(milter_string,
+                                      var_milt_conn_time,
+                                      var_milt_cmd_time,
+                                      var_milt_msg_time,
+                                      var_milt_protocol,
+                                      var_milt_def_action,
+                                      var_milt_conn_macros,
+                                      var_milt_helo_macros,
+                                      var_milt_mail_macros,
+                                      var_milt_rcpt_macros,
+                                      var_milt_data_macros,
+                                      var_milt_eoh_macros,
+                                      var_milt_eod_macros,
+                                      var_milt_unk_macros,
+                                      var_milt_macro_deflts);
+    }
+
+    /*
+     * Safety: disable non_smtpd_milters when not sending our own mail filter
+     * list. Otherwise the next stage could handle this message as a local
+     * submission.
+     */
+    if (state->milters == 0)
+       smtpd_input_transp_mask |= INPUT_TRANSP_MILTER;
+}
+
+/* teardown_milters - release resources */
+
+static void teardown_milters(SMTPD_STATE *state)
+{
+    if (state->milters) {
+       milter_free(state->milters);
+       state->milters = 0;
+    }
+}
+
 
 /* smtpd_service - service one client */
 
@@ -5374,6 +5433,11 @@ static void smtpd_service(VSTREAM *stream, char *service, char **argv)
      */
     debug_peer_check(state.name, state.addr);
 
+    /*
+     * Set up Milters, or disable Milters down-stream.
+     */
+    setup_milters(&state);                     /* duplicates xclient_cmd */
+
     /*
      * Provide the SMTP service.
      */
@@ -5386,6 +5450,7 @@ static void smtpd_service(VSTREAM *stream, char *service, char **argv)
      */
     msg_info("disconnect from %s%s", state.namaddr,
             smtpd_format_cmd_stats(state.buffer));
+    teardown_milters(&state);                  /* duplicates xclient_cmd */
     smtpd_state_reset(&state);
     debug_peer_restore();
 }
@@ -5598,6 +5663,14 @@ static void pre_jail_init(char *unused_name, char **unused_argv)
                                        var_smtpd_ehlo_dis_maps,
                                        DICT_FLAG_LOCK);
 
+    /*
+     * Per-client Milter support.
+     */
+    if (*var_smtpd_milter_maps)
+       smtpd_milter_maps = maps_create(VAR_SMTPD_MILTER_MAPS,
+                                       var_smtpd_milter_maps,
+                                       DICT_FLAG_LOCK);
+
     /*
      * DNS reply filter.
      */
@@ -5627,35 +5700,6 @@ static void post_jail_init(char *unused_name, char **unused_argv)
        smtpd_proxy_opts =
            smtpd_proxy_parse_opts(VAR_SMTPD_PROXY_OPTS, var_smtpd_proxy_opts);
 
-    /*
-     * Sendmail mail filters.
-     * 
-     * XXX Should not do this when running in stand-alone mode. But that test
-     * looks at VSTREAM_IN which is not available at this point.
-     * 
-     * XXX Disable non_smtpd_milters when not sending our own mail filter list.
-     */
-    if ((smtpd_input_transp_mask & INPUT_TRANSP_MILTER) == 0) {
-       if (*var_smtpd_milters)
-           smtpd_milters = milter_create(var_smtpd_milters,
-                                         var_milt_conn_time,
-                                         var_milt_cmd_time,
-                                         var_milt_msg_time,
-                                         var_milt_protocol,
-                                         var_milt_def_action,
-                                         var_milt_conn_macros,
-                                         var_milt_helo_macros,
-                                         var_milt_mail_macros,
-                                         var_milt_rcpt_macros,
-                                         var_milt_data_macros,
-                                         var_milt_eoh_macros,
-                                         var_milt_eod_macros,
-                                         var_milt_unk_macros,
-                                         var_milt_macro_deflts);
-       else
-           smtpd_input_transp_mask |= INPUT_TRANSP_MILTER;
-    }
-
     /*
      * Sanity checks. The queue_minfree value should be at least as large as
      * (process_limit * message_size_limit) but that is unpractical, so we
@@ -5865,6 +5909,7 @@ int     main(int argc, char **argv)
        VAR_MILT_DAEMON_NAME, DEF_MILT_DAEMON_NAME, &var_milt_daemon_name, 1, 0,
        VAR_MILT_V, DEF_MILT_V, &var_milt_v, 1, 0,
        VAR_MILT_MACRO_DEFLTS, DEF_MILT_MACRO_DEFLTS, &var_milt_macro_deflts, 0, 0,
+       VAR_SMTPD_MILTER_MAPS, DEF_SMTPD_MILTER_MAPS, &var_smtpd_milter_maps, 0, 0,
        VAR_STRESS, DEF_STRESS, &var_stress, 0, 0,
        VAR_UNV_FROM_WHY, DEF_UNV_FROM_WHY, &var_unv_from_why, 0, 0,
        VAR_UNV_RCPT_WHY, DEF_UNV_RCPT_WHY, &var_unv_rcpt_why, 0, 0,
index fdce249293e11d9dab783a8c5b98b503b07b5880..4facfb0803d9c0ebf233ffb2eb14d9c5908e2fb0 100644 (file)
@@ -182,6 +182,7 @@ typedef struct {
     const char **milter_argv;          /* SMTP command vector */
     ssize_t milter_argc;               /* SMTP command vector */
     const char *milter_reject_text;    /* input to call-back from Milter */
+    MILTERS *milters;                  /* Milter initialization status.*/
 
     /*
      * EHLO temporary space.
index a04d9daf6c34a60e6ba6a74a6ed06ba13777a1fc..5a11a87bdbb969d3125358577247f2c3f49a55e7 100644 (file)
@@ -163,7 +163,7 @@ int     smtpd_sasl_auth_cmd(SMTPD_STATE *state, int argc, SMTPD_TOKEN *argv)
        smtpd_chat_reply(state, "503 5.5.1 Error: MAIL transaction in progress");
        return (-1);
     }
-    if (smtpd_milters != 0 && (err = milter_other_event(smtpd_milters)) != 0) {
+    if (state->milters != 0 && (err = milter_other_event(state->milters)) != 0) {
        if (err[0] == '5') {
            state->error_mask |= MAIL_ERROR_POLICY;
            smtpd_chat_reply(state, "%s", err);
index c03dfbef8725d6c974aa36bce330db3106a7596e..7a117a8b243371dc42c93e3b58748b9a74da393d 100644 (file)
@@ -159,6 +159,7 @@ void    smtpd_state_init(SMTPD_STATE *state, VSTREAM *stream,
 
     state->milter_argv = 0;
     state->milter_argc = 0;
+    state->milters = 0;
 
     /*
      * Initialize peer information.