]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-2.7-20090428
authorWietse Venema <wietse@porcupine.org>
Tue, 28 Apr 2009 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <viktor@dukhovni.org>
Tue, 5 Feb 2013 06:35:22 +0000 (06:35 +0000)
57 files changed:
postfix/HISTORY
postfix/README_FILES/MILTER_README
postfix/README_FILES/SMTPD_ACCESS_README
postfix/RELEASE_NOTES
postfix/WISHLIST
postfix/html/MILTER_README.html
postfix/html/SMTPD_ACCESS_README.html
postfix/html/cleanup.8.html
postfix/html/local.8.html
postfix/html/postconf.5.html
postfix/html/smtpd.8.html
postfix/man/man5/postconf.5
postfix/man/man8/cleanup.8
postfix/man/man8/local.8
postfix/man/man8/smtpd.8
postfix/proto/MILTER_README.html
postfix/proto/SMTPD_ACCESS_README.html
postfix/proto/postconf.proto
postfix/src/bounce/bounce_notify_service.c
postfix/src/bounce/bounce_notify_verp.c
postfix/src/bounce/bounce_one_service.c
postfix/src/bounce/bounce_trace_service.c
postfix/src/bounce/bounce_warn_service.c
postfix/src/cleanup/Makefile.in
postfix/src/cleanup/cleanup.c
postfix/src/cleanup/cleanup.h
postfix/src/cleanup/cleanup_envelope.c
postfix/src/cleanup/cleanup_milter.c
postfix/src/cleanup/cleanup_milter.in13a [new file with mode: 0644]
postfix/src/cleanup/cleanup_milter.in13b [new file with mode: 0644]
postfix/src/cleanup/cleanup_milter.in13c [new file with mode: 0644]
postfix/src/cleanup/cleanup_milter.in13d [new file with mode: 0644]
postfix/src/cleanup/cleanup_milter.ref11
postfix/src/cleanup/cleanup_milter.ref13a [new file with mode: 0644]
postfix/src/cleanup/cleanup_milter.ref13b [new file with mode: 0644]
postfix/src/cleanup/cleanup_milter.ref13c [new file with mode: 0644]
postfix/src/cleanup/cleanup_milter.ref13d [new file with mode: 0644]
postfix/src/cleanup/cleanup_state.c
postfix/src/cleanup/test-queue-file11
postfix/src/cleanup/test-queue-file13a [new file with mode: 0644]
postfix/src/cleanup/test-queue-file13b [new file with mode: 0644]
postfix/src/cleanup/test-queue-file13c [new file with mode: 0644]
postfix/src/cleanup/test-queue-file13d [new file with mode: 0644]
postfix/src/global/int_filt.c
postfix/src/global/int_filt.h
postfix/src/global/mail_params.h
postfix/src/global/mail_version.h
postfix/src/local/local.c
postfix/src/milter/milter.c
postfix/src/milter/milter.h
postfix/src/milter/milter8.c
postfix/src/milter/test-milter.c
postfix/src/smtp/smtp_chat.c
postfix/src/smtp/smtp_proto.c
postfix/src/smtpd/smtpd.c
postfix/src/smtpd/smtpd_chat.c
postfix/src/verify/verify.c

index c31a01698ee2248ca7068bdceb50b03529780b94..273c29c74a6a130ded02802b8ff77e3e4b193846 100644 (file)
@@ -15169,10 +15169,28 @@ Apologies for any names omitted.
        milter/milter.[hc], smtpd/smtpd.[hc], smtpd/smtpd_milter.c,
        smtpd/smtpd_resolve.c.
 
-       Feature: new support for SMFIP_RCPT_REJ. When a recipient
-       is rejected, Postfix reports the event as decribed in
+       Feature: support to report rejected recipients to Milters
+       (SMFIP_RCPT_REJ). Postfix reports the event as decribed in
        Sendmail 8.14.0 documentation: {rcpt_mailer} = "error",
        {rcpt_host} = enhanced status code (e.g., "5.7.1"), and
        {rcpt_addr} = reason to reject (e.g., "Relay access denied").
        Files: milter/milter.[hc], milter/milter8.c, smtpd/smtpd.[hc],
        smtpd/smtpd_milter.c.
+
+20090427
+
+       Feature: Milter support for replacing the envelope sender
+       and adding recipients (SMFIR_CHGFROM, SMFIR_ADDRCPT_PAR).
+       This support currently ignores ESMTP command parameters.
+       Files: milter/milter8.c, cleanup/cleanup_milter.c.
+
+20090428
+
+       Compatibility: to make all the new Milter features usable,
+       raise the default milter_protocol setting from 2 to 6.
+       This has been tested with a Sendmail 8.14 libmilter.
+       File: global/mail_params.h.
+
+       Bugfix: don't disable MIME parsing with smtp_header_checks,
+       smtp_mime_header_checks, smtp_nested_header_checks or with
+       smtp_body_checks. Bug reported by Victor. File: smtp/smtp_proto.c.
index fc99ce8134e5a30e14f537d35d79d33ce60ae5ad..f0094f25f41e9785be48c81cebed6b7822b5360c 100644 (file)
@@ -262,10 +262,12 @@ M\bMi\bil\blt\bte\ber\br p\bpr\bro\bot\bto\boc\bco\bol\bl v\bve\ber\brs\bsi\bio\bon\bn
 
 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 2. Other protocol versions are 3 and 4 (Postfix 2.3 and later), and
-6 (Postfix 2.5 an later).
+version is 6 (before Postfix 2.6 the default version is 2).
 
     /etc/postfix/main.cf:
+        # Postfix >= 2.6
+        milter_protocol = 6
+        # 2.3 <= Postfix <= 2.5
         milter_protocol = 2
 
 If the Postfix milter_protocol setting specifies a too low version, the
@@ -313,8 +315,10 @@ with before-queue filtering.
 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
 
 Postfix emulates a limited number of Sendmail macros, as shown in the table.
-Different macros are available at different SMTP protocol stages (EOH = end-of-
-header, EOM = end-of-message); their availability is not always the same as in
+Some macro values depend on whether a recipient is rejected (rejected
+recipients are available on request by the Milter application). Different
+macros are available at different SMTP 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 
@@ -338,15 +342,18 @@ Sendmail. See the workarounds section below for solutions.
     |{client_connections}|CONNECT                  |Connection concurrency for|
     |                    |                         |this client               |
     |_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\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 hostname, "unknown"|
-    |{client_name}       |Always                   |when lookup or            |
-    |                    |                         |verification fails        |
+    |                    |                         |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)   |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 reverse  |
-    |{client_ptr}        |CONNECT, HELO, MAIL, DATA|lookup, "unknown" when    |
-    |                    |                         |lookup fails              |
+    |                    |                         |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                    |
@@ -371,14 +378,19 @@ Sendmail. See the workarounds section below for solutions.
     |{mail_mailer}       |MAIL (Postfix >= 2.6)    |Sender mail delivery      |
     |                    |                         |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 |
-    |{rcpt_addr}         |RCPT                     |Recipient address         |
+    |                    |                         |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 |
-    |{rcpt_host}         |RCPT (Postfix >= 2.6)    |Recipient next-hop        |
-    |                    |                         |destination               |
+    |                    |                         |Recipient next-hop        |
+    |{rcpt_host}         |RCPT (Postfix >= 2.6)    |destination               |
+    |                    |                         |With rejected recpient:   |
+    |                    |                         |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, "error" for    |
-    |                    |                         |rejected recipient.       |
+    |{rcpt_mailer}       |RCPT (Postfix >= 2.6)    |transport                 |
+    |                    |                         |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                      |                          |
@@ -507,26 +519,21 @@ limitations will be removed as the implementation is extended over time. Of
 course the usual limitations of before-queue filtering will always apply. See
 the CONTENT_INSPECTION_README document for a discussion.
 
-  * Postfix version 2.3 introduces support for Sendmail 8 milter protocol
-    versions 2, 3 and 4; Postfix version 2.5 adds support for protocol version
-    6, which is available with Sendmail 8.14. Support for other protocol types
-    or protocol versions may be added later.
-
-  * For applications that are written in C, you need to use the Sendmail
-    libmilter library. A Postfix replacement may be provided in the future.
+  * For Milter applications that are written in C, you need to use the Sendmail
+    libmilter library.
 
   * There are TWO sets of mail filters: filters that are used for SMTP mail
     only (specified with the smtpd_milters parameter), and filters for non-SMTP
     mail (specified with the non_smtpd_milters parameter). The non-SMTP filters
     are primarily for local submissions.
 
-  * When mail is filtered by non-SMTP filters, the Postfix cleanup(8) server
-    has to simulate the SMTP client CONNECT and DISCONNECT events, and the SMTP
-    client EHLO, MAIL FROM, RCPT TO and DATA commands. This works as expected,
-    with only one exception: non-SMTP filters must not REJECT or TEMPFAIL
-    simulated RCPT TO commands. When a non-SMTP filter REJECTs or TEMPFAILs a
-    recipient, Postfix will report a configuration error, and mail will stay in
-    the queue.
+      o When mail is filtered by non-SMTP filters, the Postfix cleanup(8)
+        server has to simulate the SMTP client CONNECT and DISCONNECT events,
+        and the SMTP client EHLO, MAIL FROM, RCPT TO and DATA commands. This
+        works as expected, with only one exception: non-SMTP filters must not
+        REJECT or TEMPFAIL simulated RCPT TO commands. When a non-SMTP filter
+        REJECTs or TEMPFAILs a recipient, Postfix will report a configuration
+        error, and mail will stay in the queue.
 
   * Postfix currently does not apply content filters to mail that is forwarded
     or aliased internally, or to mail that is generated internally such as
@@ -538,20 +545,43 @@ the CONTENT_INSPECTION_README document for a discussion.
     command information; they have no access to the message header or body, and
     cannot make modifications to the message or to the envelope.
 
-  * Postfix 2.3 does not support Milter requests to replace the message body.
-    Milter applications that request this unsupported operation will log a
-    warning like this:
+  * Postfix version 2.6 implements all Sendmail 8.14 Milter features, except it
+    ignores the optional ESMTP command parameters with requests to replace the
+    sender (SMFIR_CHGFROM), or to append a recipient (SMFIR_ADDRCPT_PAR). When
+    a Milter application supplies ESMTP command parameters, these are logged as
+    follows:
 
-        application name: st_optionneg[134563840]: 0x3d does not fulfill action
-        requirements 0x1e
+    postfix/cleanup[40629]: warning: 100B22B3293: cleanup_chg_from: ignoring
+    ESMTP arguments "whatever"
 
-    The solution is to use Postfix version 2.4 or later.
+    Specify "milter_protocol = 6" to enable all available Sendmail 8.14 and
+    earlier Milter features.
 
-  * Postfix version 2.5 implements the Sendmail 8.14 features except:
+  * Postfix version 2.5 implements all Sendmail 8.14 Milter features except:
     SMFIP_RCPT_REJ (report rejected recipients to the mail filter),
     SMFIR_CHGFROM (replace sender, with optional ESMTP command parameters), and
     SMFIR_ADDRCPT_PAR (add recipient, with optional ESMTP command parameters).
 
+    Specify "milter_protocol = 6" to enable all available Sendmail 8.14 and
+    earlier Milter features.
+
+  * Postfix 2.4 implements all Sendmail 8.13 Milter features.
+
+    Specify "milter_protocol = 4" to enable all available Sendmail 8.13 and
+    earlier Milter features.
+
+  * Postfix 2.3 implements all Sendmail 8.13 Milter features except requests to
+    replace the message body. Milter applications that request this unsupported
+    operation will log a warning like
+
+        application name: st_optionneg[134563840]: 0x3d does not fulfill action
+        requirements 0x1e
+
+    The solution is to use Postfix version 2.4 or later.
+
+    Specify "milter_protocol = 4" to enable all available Sendmail 8.13 and
+    earlier Milter features.
+
   * Most Milter configuration options are global. Future Postfix versions may
     support per-Milter timeouts, per-Milter error handling, etc.
 
index 9bdc8874d39f79164344b9639250f0988f36ccac..f2c1c45791d44e8d23b8279010fa6ed9bf45c3fe 100644 (file)
@@ -136,8 +136,8 @@ Each restriction list is evaluated from left to right until some restriction
 produces a result of PERMIT, REJECT or DEFER (try again later). The end of the
 list is equivalent to a PERMIT result. By placing a PERMIT restriction before a
 REJECT restriction you can make exceptions for specific clients or users. This
-is called whitelisting; the last example above allows mail from local networks
-but otherwise rejects mail to arbitrary destinations.
+is called whitelisting; the fourth example above allows mail from local
+networks but otherwise rejects mail to arbitrary destinations.
 
 The table below summarizes the purpose of each SMTP access restriction list.
 All lists use the exact same syntax; they differ only in the time of evaluation
index 970dc5ced6fc2e1f916eb068ce00253a348c4a46..d3674c1b9f24759eb865cdb8b2941d5290cc21c0 100644 (file)
@@ -11,17 +11,31 @@ instead, a new snapshot is released.
 The mail_release_date configuration parameter (format: yyyymmdd)
 specifies the release date of a stable release or snapshot release.
 
-Incompatibility with snapshot 20090426
+Incompatibility with snapshot 20090428
 ======================================
 
-The Postfix SMTP client no longer tries to use the obsolete SSLv2
+The Postfix SMTP client(!) no longer tries to use the obsolete SSLv2
 protocol by default, as this may prevent the use of modern SSL
 features.  Lack of SSLv2 support should never be a problem, since
-SSLv3 was defined in 1996, and TLSv1 in 2006. The Postfix SMTP
-server maintains SSLv2 support for backwards compatibility with
-ancient clients.
+SSLv3 was defined in 1996, and TLSv1 in 2006, but you can undo the
+change by specifying empty main.cf values for smtp_tls_protocols
+and lmtp_tls_protocols. The Postfix SMTP server maintains SSLv2
+support for backwards compatibility with ancient clients.
 
-Major changes with snapshot 20090426
+The default Milter protocol version is increased from 2 to 6; this
+enables all available features up to and including Sendmail 8.14.0.
+The new milter_protocol setting may break compatibility with older
+Milter libraries or applications, and may cause Postfix to log
+warning messages such as:
+
+    postfix/smtpd[21045]: warning: milter inet:host:port: can't read packet
+    header: Unknown error : 0
+    postfix/cleanup[15190]: warning: milter inet:host:port: can't read packet
+    header: Success
+
+To restore compatibility, specify "milter_protocol = 2" in main.cf.
+
+Major changes with snapshot 20090428
 ====================================
 
 The following improvements have been made to the Milter implementation:
@@ -31,9 +45,19 @@ The following improvements have been made to the Milter implementation:
 - Support for the {mail_host}, {mail_mailer}, {rcpt_host} and
 {rcpt_mailer} macros.
 
-- Milters can now request rejected recipients with the SMFIP_RCPT_REJ
-feature. In this case, {rcpt_mailer} is "error", {rcpt_host} is an
-enhanced status code, and {rcpt_addr} is descriptive text.
+- Milter applications can now request rejected recipients with the
+SMFIP_RCPT_REJ feature. Rejected recipients are reported with
+{rcpt_mailer} = "error", {rcpt_host} = enhanced status code, and
+{rcpt_addr} = descriptive text. This feature requires "milter_protocol
+= 6" or higher (default as of Postfix 2.6).
+
+- Milters can now replace the envelope sender address with the
+SMFIR_CHGFROM request, and can add recipients with SMFIR_ADDRCPT_PAR.
+These implementations currently ignore ESMTP command parameters
+with a warning message as follows:
+
+    postfix/cleanup[40629]: warning: 100B22B3293: cleanup_chg_from:
+    ignoring ESMTP arguments "whatever"
 
 Incompatibility with snapshot 20090330
 ======================================
index a7b7d4e9daa4862e465c8e4a322850c3f22e8ae1..ea127674a05f4e843fcde0f64912d3d2030f5a7d 100644 (file)
@@ -2,6 +2,9 @@ Wish list:
 
        Remove this file from the stable release.
 
+       Need to sign delivery status notifications, to avoid surprises
+       when eventually people start enforcing DKIM etc. signatures.
+
        "postconf -N" option to print user-defined parameter names
        (these have no defaults, since they exist only when 
        specified in main.cf or with "-o name=value").
@@ -25,8 +28,8 @@ Wish list:
        if it contains any text that is special, then rfc822_externalize
        the whole thing.
 
-       SMTP server: make the server_addr and server_port port
-       available to policy server, Dovecot, and perhaps Milters.
+       SMTP server: make the server_addr and server_port available
+       to policy server, Dovecot, and perhaps Milters.
 
        Maybe change maps_rbl_reject_code default to 521, and
        update wording in STRESS_README.
@@ -88,7 +91,7 @@ Wish list:
        Combine smtpd_peer.c and qmqpd_peer.c into a single function
        that produces a client context object, and provide attribute
        print/scan routines that pass these client context objects
-       around. With this, we no longer have to update multiple
+       around. With this, we no longer have to update multiple
        pieces of code when a client attribute is added. Ditto for
        SASL and TLS context.
 
@@ -189,9 +192,9 @@ Wish list:
        Check that "UINT32 == unsigned int" choice is ok (i.e. LP64
        UNIX).
 
-       Tempfail when a Milter application wants content access,
-       while it is configured in an SMTP server that runs before
-       the smtpd_proxy filter.
+       Tempfail when a Milter application tries to negotiate content
+       access, while it is configured in an SMTP server that runs
+       before the smtpd_proxy filter.
 
        Log DSN original recipient when rejecting mail.
 
index 9909e85f265bc0d161449ab04045186a6ce4f20c..aa2bbf206262d9164fba63437739ffc6066801ef 100644 (file)
@@ -442,12 +442,15 @@ in the "<a href="QSHAPE_README.html#hold_queue">hold" queue</a>, and is availabl
 
 <p> 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 2. Other protocol versions are
-3 and 4 (Postfix 2.3 and later), and 6 (Postfix 2.5 an later).  </p>
+should use.  The default version is 6 (before Postfix 2.6 the default
+version is 2). </p>
 
 <blockquote>
 <pre>
 /etc/postfix/<a href="postconf.5.html">main.cf</a>:
+    # Postfix &ge; 2.6
+    <a href="postconf.5.html#milter_protocol">milter_protocol</a> = 6
+    # 2.3 &le; Postfix &le; 2.5
     <a href="postconf.5.html#milter_protocol">milter_protocol</a> = 2
 </pre>
 </blockquote>
@@ -515,7 +518,9 @@ times. This is an inherent problem with before-queue filtering. </p>
 <h3><a name="macros">Sendmail macro emulation</a></h3>
 
 <p> Postfix emulates a limited number of Sendmail macros, as shown
-in the table. Different macros are available at different SMTP
+in the table. Some macro values depend on whether a recipient is
+rejected (rejected recipients are available on request by the Milter
+application). Different macros are available at different SMTP
 protocol stages (EOH = end-of-header, EOM = end-of-message); their
 availability is not
 always the same as in Sendmail. See the <a
@@ -552,15 +557,16 @@ address </td> </tr>
 <tr> <td> {client_connections} </td> <td> CONNECT </td> <td>
 Connection concurrency for this client </td> </tr>
 
-<tr> <td> {client_name} </td> <td> Always </td> <td> Client hostname,
-"unknown" when lookup or verification fails </td> </tr>
+<tr> <td> {client_name} </td> <td> Always </td> <td> Client hostname
+<br> When address &rarr; name lookup or name &rarr; address
+verification fails: "unknown" </td> </tr>
 
 <tr> <td> {client_port} </td> <td> Always (Postfix &ge;2.5) </td>
 <td> Client TCP port </td> </tr>
 
 <tr> <td> {client_ptr} </td> <td> CONNECT, HELO, MAIL, DATA </td>
-<td> Client name from reverse lookup, "unknown" when lookup fails
-</td> </tr>
+<td> Client name from address &rarr; name lookup <br> When address
+&rarr; name lookup fails: "unknown" </td> </tr>
 
 <tr> <td> {cert_issuer} </td> <td> HELO, MAIL, DATA, EOH, EOM </td> <td>
 TLS client certificate issuer </td> </tr>
@@ -587,14 +593,15 @@ Sender next-hop destination </td> </tr>
 <td> Sender mail delivery transport </td> </tr>
 
 <tr> <td> {rcpt_addr} </td> <td> RCPT </td> <td> Recipient address
-</td> </tr>
+<br> With rejected recipient: descriptive text </td> </tr>
 
 <tr> <td> {rcpt_host} </td> <td> RCPT (Postfix &ge; 2.6) </td> <td>
-Recipient next-hop destination </td> </tr>
+Recipient next-hop destination <br> With rejected recpient: enhanced
+status code </td> </tr>
 
 <tr> <td> {rcpt_mailer} </td> <td> RCPT (Postfix &ge; 2.6) </td>
-<td> Recipient mail delivery transport, "error" for rejected
-recipient.  </td> </tr>
+<td> Recipient mail delivery transport <br> With rejected recipient:
+"error" </td> </tr>
 
 <tr> <td> {tls_version} </td> <td> HELO, MAIL, DATA, EOH, EOM </td>
 <td> TLS protocol version </td> </tr>
@@ -790,15 +797,8 @@ a discussion. </p>
 
 <ul>
 
-<li> <p> Postfix version 2.3 introduces support for Sendmail 8
-milter protocol versions 2, 3 and 4; Postfix version 2.5 adds support
-for protocol version 6, which is available with Sendmail 8.14.
-Support for other protocol types or protocol versions may be added
-later. </p>
-
-<li> <p> For applications that are written in C, you need to use
-the Sendmail libmilter library. A Postfix replacement may be 
-provided in the future. </p>
+<li> <p> For Milter applications that are written in C, you need
+to use the Sendmail libmilter library. </p>
 
 <li> <p> There are TWO sets of mail filters: filters that are used
 for SMTP mail only (specified with the <a href="postconf.5.html#smtpd_milters">smtpd_milters</a> parameter),
@@ -806,6 +806,8 @@ and filters for non-SMTP mail (specified with the <a href="postconf.5.html#non_s
 parameter).  The non-SMTP filters are primarily for local submissions.
 </p>
 
+<ul>
+
 <li> <p> When mail is filtered by non-SMTP filters, the Postfix
 <a href="cleanup.8.html">cleanup(8)</a> server has to simulate the SMTP client CONNECT and
 DISCONNECT events, and the SMTP client EHLO, MAIL FROM, RCPT TO and
@@ -815,6 +817,8 @@ commands.  When a non-SMTP filter REJECTs or TEMPFAILs a recipient,
 Postfix will report a configuration error, and mail will stay in
 the queue.  </p>
 
+</ul>
+
 <li> <p> Postfix currently does not apply content filters to mail
 that is forwarded or aliased internally, or to mail that is generated
 internally such as bounces or Postmaster notifications. This may
@@ -827,9 +831,37 @@ only to the SMTP command information; they have no access to the
 message header or body, and cannot make modifications to the message
 or to the envelope. </p>
 
-<li> <p> Postfix 2.3 does not support Milter requests to replace
-the message body. Milter applications that request this unsupported
-operation will log a warning like this: </p>
+<li> <p> Postfix version 2.6 implements all Sendmail 8.14 Milter
+features, except it ignores the optional ESMTP command parameters
+with requests to replace the sender (SMFIR_CHGFROM), or to append
+a recipient (SMFIR_ADDRCPT_PAR). When a Milter application supplies
+ESMTP command parameters, these are logged as follows: </p>
+
+<pre>
+postfix/cleanup[40629]: warning: 100B22B3293: cleanup_chg_from: ignoring ESMTP arguments "<i>whatever</i>"
+</pre>
+
+<p> Specify "<a href="postconf.5.html#milter_protocol">milter_protocol</a> = 6" to enable all available Sendmail
+8.14 and earlier Milter features. </p>
+
+<li> <p> Postfix version 2.5 implements all Sendmail 8.14 Milter
+features except: SMFIP_RCPT_REJ (report rejected recipients to the
+mail filter), SMFIR_CHGFROM (replace sender, with optional ESMTP
+command parameters), and SMFIR_ADDRCPT_PAR (add recipient, with
+optional ESMTP command parameters). </p>
+
+<p> Specify "<a href="postconf.5.html#milter_protocol">milter_protocol</a> = 6" to enable all available Sendmail
+8.14 and earlier Milter features. </p>
+
+<li> <p> Postfix 2.4 implements all Sendmail 8.13 Milter features.
+</p>
+
+<p> Specify "<a href="postconf.5.html#milter_protocol">milter_protocol</a> = 4" to enable all available Sendmail
+8.13 and earlier Milter features. </p>
+
+<li> <p> Postfix 2.3 implements all Sendmail 8.13 Milter features
+except requests to replace the message body. Milter applications
+that request this unsupported operation will log a warning like
 
 <blockquote>
 <pre>
@@ -839,11 +871,8 @@ operation will log a warning like this: </p>
 
 <p> The solution is to use Postfix version 2.4 or later. </p>
 
-<li> <p> Postfix version 2.5 implements the Sendmail 8.14 features
-except: SMFIP_RCPT_REJ (report rejected recipients to the mail
-filter), SMFIR_CHGFROM (replace sender, with optional ESMTP command
-parameters), and SMFIR_ADDRCPT_PAR (add recipient, with optional
-ESMTP command parameters).
+<p> Specify "<a href="postconf.5.html#milter_protocol">milter_protocol</a> = 4" to enable all available Sendmail
+8.13 and earlier Milter features. </p>
 
 <li> <p> Most Milter configuration options are global. Future Postfix
 versions may support per-Milter timeouts, per-Milter error handling,
index 0f8ae5237fa258a8e3d00b3007f6a17da0fb4aa4..9476da6d72f91bdeb1962e680103dd53e319d268 100644 (file)
@@ -193,8 +193,8 @@ some restriction produces a result of PERMIT, REJECT or DEFER (try
 again later).  The end of the list is equivalent to a PERMIT result.
 By placing a PERMIT restriction before a REJECT restriction you
 can make exceptions for specific clients or users. This is called
-whitelisting; the last example above allows mail from local networks
-but otherwise rejects mail to arbitrary destinations. </p>
+whitelisting; the fourth example above allows mail from local
+networks but otherwise rejects mail to arbitrary destinations. </p>
 
 <p> The table below summarizes the purpose of each SMTP access
 restriction list. All lists use the exact same syntax; they differ
index 0b0fa7aa512d8b3e985ace5b8a0f5d0b207bd6c2..9c6196aff0232747ade0cb7c55ea250ce7030cf2 100644 (file)
@@ -154,13 +154,14 @@ CLEANUP(8)                                                          CLEANUP(8)
               mail that does not arrive via the Postfix  <a href="smtpd.8.html"><b>smtpd</b>(8)</a>
               server.
 
-       <b><a href="postconf.5.html#milter_protocol">milter_protocol</a> (2)</b>
+       <b><a href="postconf.5.html#milter_protocol">milter_protocol</a> (6)</b>
               The  mail filter protocol version and optional pro-
               tocol extensions for communication  with  a  Milter
-              (mail filter) application.
+              application;  prior to Postfix 2.6 the default pro-
+              tocol is 2.
 
        <b><a href="postconf.5.html#milter_default_action">milter_default_action</a> (tempfail)</b>
-              The  default  action  when  a  Milter (mail filter)
+              The default action  when  a  Milter  (mail  filter)
               application is unavailable or mis-configured.
 
        <b><a href="postconf.5.html#milter_macro_daemon_name">milter_macro_daemon_name</a> ($<a href="postconf.5.html#myhostname">myhostname</a>)</b>
@@ -172,55 +173,55 @@ CLEANUP(8)                                                          CLEANUP(8)
               cations.
 
        <b><a href="postconf.5.html#milter_connect_timeout">milter_connect_timeout</a> (30s)</b>
-              The time limit for connecting  to  a  Milter  (mail
-              filter)  application,  and for negotiating protocol
+              The  time  limit  for  connecting to a Milter (mail
+              filter) application, and for  negotiating  protocol
               options.
 
        <b><a href="postconf.5.html#milter_command_timeout">milter_command_timeout</a> (30s)</b>
-              The time limit for sending an  SMTP  command  to  a
+              The  time  limit  for  sending an SMTP command to a
               Milter (mail filter) application, and for receiving
               the response.
 
        <b><a href="postconf.5.html#milter_content_timeout">milter_content_timeout</a> (300s)</b>
-              The time limit for sending  message  content  to  a
+              The  time  limit  for  sending message content to a
               Milter (mail filter) application, and for receiving
               the response.
 
        <b><a href="postconf.5.html#milter_connect_macros">milter_connect_macros</a> (see 'postconf -d' output)</b>
-              The macros that are sent to  Milter  (mail  filter)
-              applications  after  completion  of an SMTP connec-
+              The  macros  that  are sent to Milter (mail filter)
+              applications after completion of  an  SMTP  connec-
               tion.
 
        <b><a href="postconf.5.html#milter_helo_macros">milter_helo_macros</a> (see 'postconf -d' output)</b>
-              The macros that are sent to  Milter  (mail  filter)
+              The  macros  that  are sent to Milter (mail filter)
               applications after the SMTP HELO or EHLO command.
 
        <b><a href="postconf.5.html#milter_mail_macros">milter_mail_macros</a> (see 'postconf -d' output)</b>
-              The  macros  that  are sent to Milter (mail filter)
+              The macros that are sent to  Milter  (mail  filter)
               applications after the SMTP MAIL FROM command.
 
        <b><a href="postconf.5.html#milter_rcpt_macros">milter_rcpt_macros</a> (see 'postconf -d' output)</b>
-              The macros that are sent to  Milter  (mail  filter)
+              The  macros  that  are sent to Milter (mail filter)
               applications after the SMTP RCPT TO command.
 
        <b><a href="postconf.5.html#milter_data_macros">milter_data_macros</a> (see 'postconf -d' output)</b>
-              The  macros  that  are  sent to version 4 or higher
-              Milter (mail filter) applications  after  the  SMTP
+              The macros that are sent to  version  4  or  higher
+              Milter  (mail  filter)  applications after the SMTP
               DATA command.
 
        <b><a href="postconf.5.html#milter_unknown_command_macros">milter_unknown_command_macros</a> (see 'postconf -d' output)</b>
-              The  macros  that  are  sent to version 3 or higher
-              Milter (mail filter) applications after an  unknown
+              The macros that are sent to  version  3  or  higher
+              Milter  (mail filter) applications after an unknown
               SMTP command.
 
        <b><a href="postconf.5.html#milter_end_of_data_macros">milter_end_of_data_macros</a> (see 'postconf -d' output)</b>
-              The  macros  that  are sent to Milter (mail filter)
+              The macros that are sent to  Milter  (mail  filter)
               applications after the message end-of-data.
 
        Available in Postfix version 2.5 and later:
 
        <b><a href="postconf.5.html#milter_end_of_header_macros">milter_end_of_header_macros</a> (see 'postconf -d' output)</b>
-              The macros that are sent to  Milter  (mail  filter)
+              The  macros  that  are sent to Milter (mail filter)
               applications after the end of the message header.
 
 <b>MIME PROCESSING CONTROLS</b>
@@ -238,27 +239,27 @@ CLEANUP(8)                                                          CLEANUP(8)
               will handle.
 
        <b><a href="postconf.5.html#strict_8bitmime">strict_8bitmime</a> (no)</b>
-              Enable  both  <a href="postconf.5.html#strict_7bit_headers">strict_7bit_headers</a>  and strict_8bit-
+              Enable both  <a href="postconf.5.html#strict_7bit_headers">strict_7bit_headers</a>  and  strict_8bit-
               mime_body.
 
        <b><a href="postconf.5.html#strict_7bit_headers">strict_7bit_headers</a> (no)</b>
               Reject mail with 8-bit text in message headers.
 
        <b><a href="postconf.5.html#strict_8bitmime_body">strict_8bitmime_body</a> (no)</b>
-              Reject 8-bit message body text without  8-bit  MIME
+              Reject  8-bit  message body text without 8-bit MIME
               content encoding information.
 
        <b><a href="postconf.5.html#strict_mime_encoding_domain">strict_mime_encoding_domain</a> (no)</b>
               Reject mail with invalid Content-Transfer-Encoding:
-              information for the message/* or  multipart/*  MIME
+              information  for  the message/* or multipart/* MIME
               content types.
 
        Available in Postfix version 2.5 and later:
 
        <b><a href="postconf.5.html#detect_8bit_encoding_header">detect_8bit_encoding_header</a> (yes)</b>
               Automatically detect 8BITMIME body content by look-
-              ing at Content-Transfer-Encoding: message  headers;
-              historically,  this  behavior  was hard-coded to be
+              ing  at Content-Transfer-Encoding: message headers;
+              historically, this behavior was  hard-coded  to  be
               "always on".
 
 <b>AUTOMATIC BCC RECIPIENT CONTROLS</b>
@@ -266,31 +267,31 @@ CLEANUP(8)                                                          CLEANUP(8)
        mail enters the mail system:
 
        <b><a href="postconf.5.html#always_bcc">always_bcc</a> (empty)</b>
-              Optional  address  that  receives  a  "blind carbon
+              Optional address  that  receives  a  "blind  carbon
               copy" of each message that is received by the Post-
               fix mail system.
 
        Available in Postfix version 2.1 and later:
 
        <b><a href="postconf.5.html#sender_bcc_maps">sender_bcc_maps</a> (empty)</b>
-              Optional  BCC  (blind  carbon-copy)  address lookup
+              Optional BCC  (blind  carbon-copy)  address  lookup
               tables, indexed by sender address.
 
        <b><a href="postconf.5.html#recipient_bcc_maps">recipient_bcc_maps</a> (empty)</b>
-              Optional BCC  (blind  carbon-copy)  address  lookup
+              Optional  BCC  (blind  carbon-copy)  address lookup
               tables, indexed by recipient address.
 
 <b>ADDRESS TRANSFORMATION CONTROLS</b>
-       Address  rewriting  is delegated to the <a href="trivial-rewrite.8.html"><b>trivial-rewrite</b>(8)</a>
-       daemon.  The <a href="cleanup.8.html"><b>cleanup</b>(8)</a>  server  implements  table  driven
+       Address rewriting is delegated to  the  <a href="trivial-rewrite.8.html"><b>trivial-rewrite</b>(8)</a>
+       daemon.   The  <a href="cleanup.8.html"><b>cleanup</b>(8)</a>  server  implements table driven
        address mapping.
 
        <b><a href="postconf.5.html#empty_address_recipient">empty_address_recipient</a> (MAILER-DAEMON)</b>
-              The   recipient  of  mail  addressed  to  the  null
+              The  recipient  of  mail  addressed  to  the   null
               address.
 
        <b><a href="postconf.5.html#canonical_maps">canonical_maps</a> (empty)</b>
-              Optional address mapping lookup tables for  message
+              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>
@@ -301,49 +302,49 @@ CLEANUP(8)                                                          CLEANUP(8)
               Optional address mapping lookup tables for envelope
               and header sender addresses.
 
-       <b><a href="postconf.5.html#masquerade_classes">masquerade_classes</a>     (envelope_sender,    header_sender,</b>
+       <b><a href="postconf.5.html#masquerade_classes">masquerade_classes</a>    (envelope_sender,     header_sender,</b>
        <b>header_recipient)</b>
               What addresses are subject to address masquerading.
 
        <b><a href="postconf.5.html#masquerade_domains">masquerade_domains</a> (empty)</b>
-              Optional list of domains whose subdomain  structure
+              Optional  list of domains whose subdomain structure
               will be stripped off in email addresses.
 
        <b><a href="postconf.5.html#masquerade_exceptions">masquerade_exceptions</a> (empty)</b>
-              Optional  list of user names that are not subjected
-              to address masquerading, even  when  their  address
+              Optional list of user names that are not  subjected
+              to  address  masquerading,  even when their address
               matches $<a href="postconf.5.html#masquerade_domains">masquerade_domains</a>.
 
        <b><a href="postconf.5.html#propagate_unmatched_extensions">propagate_unmatched_extensions</a> (canonical, virtual)</b>
-              What  address  lookup tables copy an address exten-
+              What address lookup tables copy an  address  exten-
               sion from the lookup key to the lookup result.
 
        Available before Postfix version 2.0:
 
        <b><a href="postconf.5.html#virtual_maps">virtual_maps</a> (empty)</b>
               Optional lookup tables with a) names of domains for
-              which  all  addresses  are  aliased to addresses in
-              other local or remote  domains,  and  b)  addresses
-              that  are  aliased  to  addresses in other local or
+              which all addresses are  aliased  to  addresses  in
+              other  local  or  remote  domains, and b) addresses
+              that are aliased to addresses  in  other  local  or
               remote domains.
 
        Available in Postfix version 2.0 and later:
 
        <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  domains  to  other  local  or remote
+              Optional  lookup  tables  that  alias specific mail
+              addresses or  domains  to  other  local  or  remote
               address.
 
        Available in Postfix version 2.2 and later:
 
-       <b><a href="postconf.5.html#canonical_classes">canonical_classes</a>  (envelope_sender,   envelope_recipient,</b>
+       <b><a href="postconf.5.html#canonical_classes">canonical_classes</a>   (envelope_sender,  envelope_recipient,</b>
        <b>header_sender, header_recipient)</b>
-              What  addresses  are  subject   to   <a href="postconf.5.html#canonical_maps">canonical_maps</a>
+              What   addresses   are  subject  to  <a href="postconf.5.html#canonical_maps">canonical_maps</a>
               address mapping.
 
        <b><a href="postconf.5.html#recipient_canonical_classes">recipient_canonical_classes</a>           (envelope_recipient,</b>
        <b>header_recipient)</b>
-              What  addresses  are  subject  to <a href="postconf.5.html#recipient_canonical_maps">recipient_canoni</a>-
+              What addresses  are  subject  to  <a href="postconf.5.html#recipient_canonical_maps">recipient_canoni</a>-
               <a href="postconf.5.html#recipient_canonical_maps">cal_maps</a> address mapping.
 
        <b><a href="postconf.5.html#sender_canonical_classes">sender_canonical_classes</a> (envelope_sender, header_sender)</b>
@@ -351,15 +352,15 @@ CLEANUP(8)                                                          CLEANUP(8)
               address mapping.
 
        <b><a href="postconf.5.html#remote_header_rewrite_domain">remote_header_rewrite_domain</a> (empty)</b>
-              Don't  rewrite  message headers from remote clients
+              Don't rewrite message headers from  remote  clients
               at all when this parameter is empty; otherwise, re-
-              write  message  headers  and  append  the specified
+              write message  headers  and  append  the  specified
               domain name to incomplete addresses.
 
 <b>RESOURCE AND RATE CONTROLS</b>
        <b><a href="postconf.5.html#duplicate_filter_limit">duplicate_filter_limit</a> (1000)</b>
-              The maximal number of addresses remembered  by  the
-              address  duplicate  filter  for  <a href="aliases.5.html"><b>aliases</b>(5)</a> or <a href="virtual.5.html"><b>vir-</b></a>
+              The  maximal  number of addresses remembered by the
+              address duplicate filter  for  <a href="aliases.5.html"><b>aliases</b>(5)</a>  or  <a href="virtual.5.html"><b>vir-</b></a>
               <a href="virtual.5.html"><b>tual</b>(5)</a> alias expansion, or for <a href="showq.8.html"><b>showq</b>(8)</a> queue dis-
               plays.
 
@@ -368,16 +369,16 @@ CLEANUP(8)                                                          CLEANUP(8)
               message header.
 
        <b><a href="postconf.5.html#hopcount_limit">hopcount_limit</a> (50)</b>
-              The maximal number of  Received:   message  headers
+              The  maximal  number  of Received:  message headers
               that is allowed in the primary message headers.
 
        <b><a href="postconf.5.html#in_flow_delay">in_flow_delay</a> (1s)</b>
-              Time  to pause before accepting a new message, when
+              Time to pause before accepting a new message,  when
               the message arrival rate exceeds the message deliv-
               ery rate.
 
        <b><a href="postconf.5.html#message_size_limit">message_size_limit</a> (10240000)</b>
-              The  maximal  size in bytes of a message, including
+              The maximal size in bytes of a  message,  including
               envelope information.
 
        Available in Postfix version 2.0 and later:
@@ -395,35 +396,35 @@ CLEANUP(8)                                                          CLEANUP(8)
               will handle.
 
        <b><a href="postconf.5.html#queue_file_attribute_count_limit">queue_file_attribute_count_limit</a> (100)</b>
-              The  maximal number of (name=value) attributes that
+              The maximal number of (name=value) attributes  that
               may be stored in a Postfix queue file.
 
        Available in Postfix version 2.1 and later:
 
        <b><a href="postconf.5.html#virtual_alias_expansion_limit">virtual_alias_expansion_limit</a> (1000)</b>
-              The maximal number of addresses that virtual  alias
+              The  maximal number of addresses that virtual alias
               expansion produces from each original recipient.
 
        <b><a href="postconf.5.html#virtual_alias_recursion_limit">virtual_alias_recursion_limit</a> (1000)</b>
-              The  maximal  nesting depth of virtual alias expan-
+              The maximal nesting depth of virtual  alias  expan-
               sion.
 
 <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
+              The  default  location  of  the Postfix <a href="postconf.5.html">main.cf</a> and
               <a href="master.5.html">master.cf</a> configuration 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 request  before  it  is  terminated  by  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#delay_logging_resolution_limit">delay_logging_resolution_limit</a> (2)</b>
-              The  maximal  number  of  digits  after the decimal
+              The maximal number  of  digits  after  the  decimal
               point when logging sub-second delay values.
 
        <b><a href="postconf.5.html#delay_warning_time">delay_warning_time</a> (0h)</b>
-              The time after which the sender receives  the  mes-
+              The  time  after which the sender receives the mes-
               sage headers of mail that is still queued.
 
        <b><a href="postconf.5.html#ipc_timeout">ipc_timeout</a> (3600s)</b>
@@ -431,13 +432,13 @@ CLEANUP(8)                                                          CLEANUP(8)
               over an internal communication channel.
 
        <b><a href="postconf.5.html#max_idle">max_idle</a> (100s)</b>
-              The maximum amount of time  that  an  idle  Postfix
-              daemon  process  waits  for  an incoming connection
+              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>
-              The maximal number of incoming connections  that  a
-              Postfix  daemon  process will service before termi-
+              The  maximal  number of incoming connections that a
+              Postfix daemon process will service  before  termi-
               nating voluntarily.
 
        <b><a href="postconf.5.html#myhostname">myhostname</a> (see 'postconf -d' output)</b>
@@ -445,19 +446,19 @@ CLEANUP(8)                                                          CLEANUP(8)
 
        <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,  and that locally posted mail is deliv-
+              come from, and that locally posted mail  is  deliv-
               ered to.
 
        <b><a href="postconf.5.html#process_id">process_id</a> (read-only)</b>
-              The process ID  of  a  Postfix  command  or  daemon
+              The  process  ID  of  a  Postfix  command or daemon
               process.
 
        <b><a href="postconf.5.html#process_name">process_name</a> (read-only)</b>
-              The  process  name  of  a Postfix command or daemon
+              The process name of a  Postfix  command  or  daemon
               process.
 
        <b><a href="postconf.5.html#queue_directory">queue_directory</a> (see 'postconf -d' output)</b>
-              The location of the Postfix top-level queue  direc-
+              The  location of the Postfix top-level queue direc-
               tory.
 
        <b><a href="postconf.5.html#soft_bounce">soft_bounce</a> (no)</b>
@@ -468,14 +469,14 @@ CLEANUP(8)                                                          CLEANUP(8)
               The syslog facility of Postfix logging.
 
        <b><a href="postconf.5.html#syslog_name">syslog_name</a> (see 'postconf -d' output)</b>
-              The mail system  name  that  is  prepended  to  the
-              process  name  in  syslog  records, so that "smtpd"
+              The  mail  system  name  that  is  prepended to the
+              process name in syslog  records,  so  that  "smtpd"
               becomes, for example, "postfix/smtpd".
 
        Available in Postfix version 2.1 and later:
 
        <b><a href="postconf.5.html#enable_original_recipient">enable_original_recipient</a> (yes)</b>
-              Enable  support  for  the   X-Original-To   message
+              Enable   support   for  the  X-Original-To  message
               header.
 
 <b>FILES</b>
@@ -499,7 +500,7 @@ CLEANUP(8)                                                          CLEANUP(8)
        <a href="CONTENT_INSPECTION_README.html">CONTENT_INSPECTION_README</a> content inspection
 
 <b>LICENSE</b>
-       The Secure Mailer license must be  distributed  with  this
+       The  Secure  Mailer  license must be distributed with this
        software.
 
 <b>AUTHOR(S)</b>
index 363755725f7c49146d01c4b0a60be4ec5360ae55..ff058f9254f8bf5e3082afd37af1d62e875bb503 100644 (file)
@@ -308,10 +308,6 @@ LOCAL(8)                                                              LOCAL(8)
        <b>ward</b>+<i>foo</i> or in ~<i>name</i>/.<b>forward</b>, to the mailbox owned by the
        user <i>name</i>, or it is sent back as undeliverable.
 
-       In  all  cases  the  <a href="local.8.html"><b>local</b>(8)</a>  daemon prepends an optional
-       `<b>Delivered-To:</b>  header  line  with  the  final   recipient
-       address.
-
 <b>DELIVERY RIGHTS</b>
        Deliveries  to  external  files  and external commands are
        made with the rights of the receiving user on whose behalf
index 500502a4684dfb60fea20609da1295b072455997..4098156e7aa94673ba11d60282f9beb0cc4bc6ae 100644 (file)
@@ -5697,10 +5697,11 @@ for a list of available macro names and their meanings. </p>
 </DD>
 
 <DT><b><a name="milter_protocol">milter_protocol</a>
-(default: 2)</b></DT><DD>
+(default: 6)</b></DT><DD>
 
 <p> The mail filter protocol version and optional protocol extensions
-for communication with a Milter (mail filter) application. Postfix
+for communication with a Milter application; prior to Postfix 2.6
+the default protocol is 2. Postfix
 sends this version number during the initial protocol handshake.
 It should match the version number that is expected by the mail
 filter application (or by its Milter library).  </p>
@@ -5710,14 +5711,15 @@ filter application (or by its Milter library).  </p>
 <dl compact>
 
 <dt>2</dt> <dd>Use Sendmail 8 mail filter protocol version 2 (default
-as of Sendmail version 8.11).</dd>
+with Sendmail version 8.11 .. 8.13 and Postfix version 2.3 ..
+2.5).</dd>
 
 <dt>3</dt> <dd>Use Sendmail 8 mail filter protocol version 3.</dd>
 
 <dt>4</dt> <dd>Use Sendmail 8 mail filter protocol version 4.</dd>
 
 <dt>6</dt> <dd>Use Sendmail 8 mail filter protocol version 6 (default
-as of Sendmail version 8.14).</dd>
+with Sendmail version 8.14 and Postfix version 2.6).</dd>
 
 </dl>
 
index 1cb2827673f80af0bcc6b790fce9e70fb7fb2e1b..836e9c09cdd9d778ee7b155972d4dc8e85243b78 100644 (file)
@@ -209,13 +209,14 @@ SMTPD(8)                                                              SMTPD(8)
               A list of Milter (mail filter) applications for new
               mail  that arrives via the Postfix <a href="smtpd.8.html"><b>smtpd</b>(8)</a> server.
 
-       <b><a href="postconf.5.html#milter_protocol">milter_protocol</a> (2)</b>
+       <b><a href="postconf.5.html#milter_protocol">milter_protocol</a> (6)</b>
               The mail filter protocol version and optional  pro-
               tocol  extensions  for  communication with a Milter
-              (mail filter) application.
+              application; prior to Postfix 2.6 the default  pro-
+              tocol is 2.
 
        <b><a href="postconf.5.html#milter_default_action">milter_default_action</a> (tempfail)</b>
-              The default action  when  a  Milter  (mail  filter)
+              The  default  action  when  a  Milter (mail filter)
               application is unavailable or mis-configured.
 
        <b><a href="postconf.5.html#milter_macro_daemon_name">milter_macro_daemon_name</a> ($<a href="postconf.5.html#myhostname">myhostname</a>)</b>
@@ -227,190 +228,190 @@ SMTPD(8)                                                              SMTPD(8)
               cations.
 
        <b><a href="postconf.5.html#milter_connect_timeout">milter_connect_timeout</a> (30s)</b>
-              The  time  limit  for  connecting to a Milter (mail
-              filter) application, and for  negotiating  protocol
+              The time limit for connecting  to  a  Milter  (mail
+              filter)  application,  and for negotiating protocol
               options.
 
        <b><a href="postconf.5.html#milter_command_timeout">milter_command_timeout</a> (30s)</b>
-              The  time  limit  for  sending an SMTP command to a
+              The time limit for sending an  SMTP  command  to  a
               Milter (mail filter) application, and for receiving
               the response.
 
        <b><a href="postconf.5.html#milter_content_timeout">milter_content_timeout</a> (300s)</b>
-              The  time  limit  for  sending message content to a
+              The time limit for sending  message  content  to  a
               Milter (mail filter) application, and for receiving
               the response.
 
        <b><a href="postconf.5.html#milter_connect_macros">milter_connect_macros</a> (see 'postconf -d' output)</b>
-              The  macros  that  are sent to Milter (mail filter)
-              applications after completion of  an  SMTP  connec-
+              The macros that are sent to  Milter  (mail  filter)
+              applications  after  completion  of an SMTP connec-
               tion.
 
        <b><a href="postconf.5.html#milter_helo_macros">milter_helo_macros</a> (see 'postconf -d' output)</b>
-              The  macros  that  are sent to Milter (mail filter)
+              The macros that are sent to  Milter  (mail  filter)
               applications after the SMTP HELO or EHLO command.
 
        <b><a href="postconf.5.html#milter_mail_macros">milter_mail_macros</a> (see 'postconf -d' output)</b>
-              The macros that are sent to  Milter  (mail  filter)
+              The  macros  that  are sent to Milter (mail filter)
               applications after the SMTP MAIL FROM command.
 
        <b><a href="postconf.5.html#milter_rcpt_macros">milter_rcpt_macros</a> (see 'postconf -d' output)</b>
-              The  macros  that  are sent to Milter (mail filter)
+              The macros that are sent to  Milter  (mail  filter)
               applications after the SMTP RCPT TO command.
 
        <b><a href="postconf.5.html#milter_data_macros">milter_data_macros</a> (see 'postconf -d' output)</b>
-              The macros that are sent to  version  4  or  higher
-              Milter  (mail  filter)  applications after the SMTP
+              The  macros  that  are  sent to version 4 or higher
+              Milter (mail filter) applications  after  the  SMTP
               DATA command.
 
        <b><a href="postconf.5.html#milter_unknown_command_macros">milter_unknown_command_macros</a> (see 'postconf -d' output)</b>
-              The macros that are sent to  version  3  or  higher
-              Milter  (mail filter) applications after an unknown
+              The  macros  that  are  sent to version 3 or higher
+              Milter (mail filter) applications after an  unknown
               SMTP command.
 
        <b><a href="postconf.5.html#milter_end_of_header_macros">milter_end_of_header_macros</a> (see 'postconf -d' output)</b>
-              The macros that are sent to  Milter  (mail  filter)
+              The  macros  that  are sent to Milter (mail filter)
               applications after the end of the message header.
 
        <b><a href="postconf.5.html#milter_end_of_data_macros">milter_end_of_data_macros</a> (see 'postconf -d' output)</b>
-              The  macros  that  are sent to Milter (mail filter)
+              The macros that are sent to  Milter  (mail  filter)
               applications after the message end-of-data.
 
 <b>GENERAL CONTENT INSPECTION CONTROLS</b>
-       The following parameters are applicable for both  built-in
+       The  following parameters are applicable for both built-in
        and external content filters.
 
        Available in Postfix version 2.1 and later:
 
        <b><a href="postconf.5.html#receive_override_options">receive_override_options</a> (empty)</b>
-              Enable  or  disable  recipient validation, built-in
+              Enable or disable  recipient  validation,  built-in
               content filtering, or address mapping.
 
 <b>EXTERNAL CONTENT INSPECTION CONTROLS</b>
-       The following parameters are applicable for  both  before-
+       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  SMTP  clients are allowed to use the XFORWARD
+              What SMTP clients are allowed to use  the  XFORWARD
               feature.
 
 <b>SASL AUTHENTICATION CONTROLS</b>
-       Postfix SASL support (<a href="http://tools.ietf.org/html/rfc4954">RFC 4954</a>) can be used  to  authenti-
-       cate  remote  SMTP clients to the Postfix SMTP server, and
-       to authenticate the Postfix SMTP client to a  remote  SMTP
+       Postfix  SASL  support (<a href="http://tools.ietf.org/html/rfc4954">RFC 4954</a>) can be used to authenti-
+       cate 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 details.
 
        <b><a href="postconf.5.html#broken_sasl_auth_clients">broken_sasl_auth_clients</a> (no)</b>
-              Enable  inter-operability  with  SMTP  clients that
-              implement an obsolete version of the  AUTH  command
+              Enable inter-operability  with  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
+              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
+              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 implementation that is selected
+              Postfix SMTP server SASL security  options;  as  of
+              Postfix  2.3 the list of available features depends
+              on the SASL server 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_sender_login_maps">smtpd_sender_login_maps</a> (empty)</b>
-              Optional lookup table with  the  SASL  login  names
+              Optional  lookup  table  with  the SASL login names
               that own 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
+              What remote SMTP clients the  Postfix  SMTP  server
               will not offer AUTH support to.
 
        Available in Postfix version 2.1 and 2.2:
 
        <b>smtpd_sasl_application_name (smtpd)</b>
-              The application name that the Postfix  SMTP  server
+              The  application  name that the Postfix SMTP server
               uses for SASL server initialization.
 
        Available in Postfix version 2.3 and later:
 
        <b><a href="postconf.5.html#smtpd_sasl_authenticated_header">smtpd_sasl_authenticated_header</a> (no)</b>
-              Report  the  SASL  authenticated  user  name in the
+              Report the SASL  authenticated  user  name  in  the
               <a href="smtpd.8.html"><b>smtpd</b>(8)</a> Received message header.
 
        <b><a href="postconf.5.html#smtpd_sasl_path">smtpd_sasl_path</a> (smtpd)</b>
-              Implementation-specific information that the  Post-
-              fix  SMTP server passes through to the SASL plug-in
-              implementation    that     is     selected     with
+              Implementation-specific  information that the Post-
+              fix SMTP server 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
+              The SASL plug-in type that the Postfix SMTP  server
               should use for authentication.
 
        Available in Postfix version 2.5 and later:
 
        <b><a href="postconf.5.html#cyrus_sasl_config_path">cyrus_sasl_config_path</a> (empty)</b>
-              Search path for Cyrus SASL  application  configura-
-              tion  files,  currently  used  only  to  locate the
+              Search  path  for Cyrus SASL application configura-
+              tion files,  currently  used  only  to  locate  the
               $<a href="postconf.5.html#smtpd_sasl_path">smtpd_sasl_path</a>.conf file.
 
 <b>STARTTLS SUPPORT CONTROLS</b>
-       Detailed information about STARTTLS configuration  may  be
+       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 non-empty value is  specified,  this
+              The SMTP TLS security level for  the  Postfix  SMTP
+              server;  when  a non-empty value is specified, this
               overrides the obsolete parameters <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_secu</a>-</b>
        <b><a href="postconf.5.html#smtpd_sasl_security_options">rity_options</a>)</b>
-              The SASL authentication security options  that  the
-              Postfix  SMTP  server  uses  for TLS encrypted 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> (300s)</b>
-              The time limit for Postfix SMTP  server  write  and
-              read  operations  during  TLS  startup and shutdown
+              The  time  limit  for Postfix SMTP server write and
+              read operations 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 trusted to sign either remote SMTP client
+              A  file  containing (PEM format) CA certificates of
+              root CAs trusted to sign either remote SMTP  client
               certificates or intermediate 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  trusted  to  sign either remote SMTP
-              client certificates  or  intermediate  CA  certifi-
+              of root CAs trusted  to  sign  either  remote  SMTP
+              client  certificates  or  intermediate  CA certifi-
               cates.
 
        <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 ses-
-              sion id, even when TLS session  caching  is  turned
+              Force the Postfix SMTP server to issue a  TLS  ses-
+              sion  id,  even  when TLS session caching is turned
               off (<a href="postconf.5.html#smtpd_tls_session_cache_database">smtpd_tls_session_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.
+              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 not announce or accept SASL authentica-
+              server, do not announce or accept SASL  authentica-
               tion over unencrypted connections.
 
        <b><a href="postconf.5.html#smtpd_tls_ccert_verifydepth">smtpd_tls_ccert_verifydepth</a> (9)</b>
-              The verification depth for remote SMTP client  cer-
+              The  verification depth for remote SMTP client cer-
               tificates.
 
        <b><a href="postconf.5.html#smtpd_tls_cert_file">smtpd_tls_cert_file</a> (empty)</b>
-              File  with  the Postfix SMTP server RSA certificate
+              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>
@@ -418,56 +419,56 @@ SMTPD(8)                                                              SMTPD(8)
               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
+              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
+              File with  DH  parameters  that  the  Postfix  SMTP
               server should use with 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
+              File  with  DH  parameters  that  the  Postfix SMTP
               server should use with 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>
-              File  with  the Postfix SMTP server DSA private key
+              File with the Postfix SMTP server DSA  private  key
               in PEM format.
 
        <b><a href="postconf.5.html#smtpd_tls_key_file">smtpd_tls_key_file</a> ($<a href="postconf.5.html#smtpd_tls_cert_file">smtpd_tls_cert_file</a>)</b>
-              File with the Postfix SMTP server RSA  private  key
+              File  with  the Postfix SMTP server RSA private key
               in PEM format.
 
        <b><a href="postconf.5.html#smtpd_tls_loglevel">smtpd_tls_loglevel</a> (0)</b>
-              Enable  additional  Postfix  SMTP server logging of
+              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
+              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 SMTP server cipher list at  manda-
+              Additional list  of  ciphers  or  cipher  types  to
+              exclude  from the SMTP server cipher list at manda-
               tory TLS security levels.
 
        <b><a href="postconf.5.html#smtpd_tls_mandatory_protocols">smtpd_tls_mandatory_protocols</a> (SSLv3, TLSv1)</b>
-              The  SSL/TLS protocols accepted by the Postfix SMTP
+              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
-              client  CommonName  and  client  certificate issuer
+              about  the protocol and cipher used, as well as the
+              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  client  certificate in order to allow
+              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_session_cache_database">smtpd_tls_session_cache_database</a> (empty)</b>
-              Name of the file containing  the  optional  Postfix
+              Name  of  the  file containing the optional Postfix
               SMTP server TLS session cache.
 
        <b><a href="postconf.5.html#smtpd_tls_session_cache_timeout">smtpd_tls_session_cache_timeout</a> (3600s)</b>
@@ -475,14 +476,14 @@ SMTPD(8)                                                              SMTPD(8)
               sion cache information.
 
        <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, instead of using the STARTTLS com-
+              Run  the  Postfix  SMTP  server in the non-standard
+              "wrapper" mode, instead of using the STARTTLS  com-
               mand.
 
        <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 internal pseudo  random
+              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></b>
@@ -494,7 +495,7 @@ SMTPD(8)                                                              SMTPD(8)
               ciphers.
 
        <b><a href="postconf.5.html#tls_low_cipherlist">tls_low_cipherlist</a> (ALL:!EXPORT:+RC4:@STRENGTH)</b>
-              The OpenSSL cipherlist for "LOW"  or  higher  grade
+              The  OpenSSL  cipherlist  for "LOW" or higher grade
               ciphers.
 
        <b><a href="postconf.5.html#tls_export_cipherlist">tls_export_cipherlist</a> (ALL:+RC4:@STRENGTH)</b>
@@ -502,26 +503,26 @@ SMTPD(8)                                                              SMTPD(8)
               ciphers.
 
        <b><a href="postconf.5.html#tls_null_cipherlist">tls_null_cipherlist</a> (eNULL:!aNULL)</b>
-              The OpenSSL cipherlist  for  "NULL"  grade  ciphers
+              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  used  to construct
+              The message  digest  algorithm  used  to  construct
               client-certificate         fingerprints         for
               <b><a href="postconf.5.html#check_ccert_access">check_ccert_access</a></b> and <b><a href="postconf.5.html#permit_tls_clientcerts">permit_tls_clientcerts</a></b>.
 
        Available in Postfix version 2.6 and later:
 
        <b><a href="postconf.5.html#smtpd_tls_protocols">smtpd_tls_protocols</a> (empty)</b>
-              List  of TLS protocols that the Postfix SMTP server
-              will exclude  or  include  with  opportunistic  TLS
+              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> (export)</b>
-              The  minimum TLS cipher grade that the Postfix SMTP
-              server will use with opportunistic TLS  encryption.
+              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
@@ -532,7 +533,7 @@ SMTPD(8)                                                              SMTPD(8)
               in PEM format.
 
        <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
+              The  Postfix  SMTP  server   security   grade   for
               ephemeral elliptic-curve Diffie-Hellman (EECDH) key
               exchange.
 
@@ -545,18 +546,18 @@ SMTPD(8)                                                              SMTPD(8)
               imally strong ephemeral ECDH key exchange.
 
 <b>OBSOLETE STARTTLS CONTROLS</b>
-       The  following configuration parameters exist for compati-
+       The following configuration parameters exist for  compati-
        bility 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
-              SMTP clients, but do not require that  clients  use
+              Opportunistic TLS:  announce  STARTTLS  support  to
+              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>
-              Mandatory  TLS:  announce  STARTTLS support to SMTP
-              clients, and require that clients use  TLS  encryp-
+              Mandatory TLS: announce STARTTLS  support  to  SMTP
+              clients,  and  require that clients use TLS encryp-
               tion.
 
        <b><a href="postconf.5.html#smtpd_tls_cipherlist">smtpd_tls_cipherlist</a> (empty)</b>
@@ -564,64 +565,64 @@ SMTPD(8)                                                              SMTPD(8)
               server TLS cipher list.
 
 <b>VERP SUPPORT CONTROLS</b>
-       With VERP style delivery,  each  recipient  of  a  message
+       With  VERP  style  delivery,  each  recipient of a message
        receives a customized copy of the message with his/her own
-       recipient address encoded in the envelope sender  address.
+       recipient  address encoded in the envelope sender address.
        The <a href="VERP_README.html">VERP_README</a> file describes configuration and operation
-       details of Postfix support for  variable  envelope  return
+       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.
+       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 Postfix <a href="sendmail.1.html"><b>sendmail</b>(1)</a> command line
+              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 SMTP clients are allowed to specify the  XVERP
+              What  SMTP clients are allowed to specify the XVERP
               command.
 
        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  SMTP clients are allowed to specify the XVERP
+              What SMTP clients are allowed to specify the  XVERP
               command.
 
 <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 detail, to running some daemon  pro-
+       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 pro-
        cesses 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 server matches a  pattern  in  the
+              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 address patterns that cause the  verbose
-              logging  level  to increase by the amount specified
+              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  problems that are caused by policy,
+              The  recipient  of  postmaster  notifications about
+              mail delivery problems that are caused  by  policy,
               resource, software or protocol 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  sub-
-              ject   to   before-queue   content   inspection  by
+              What  categories of Postfix-generated mail are sub-
+              ject  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
+              The  list of error classes that are reported to the
               postmaster.
 
        <b><a href="postconf.5.html#soft_bounce">soft_bounce</a> (no)</b>
@@ -631,22 +632,22 @@ SMTPD(8)                                                              SMTPD(8)
        Available in Postfix version 2.1 and later:
 
        <b><a href="postconf.5.html#smtpd_authorized_xclient_hosts">smtpd_authorized_xclient_hosts</a> (empty)</b>
-              What SMTP clients are allowed to  use  the  XCLIENT
+              What  SMTP  clients  are allowed to use the XCLIENT
               feature.
 
 <b>KNOWN VERSUS UNKNOWN RECIPIENT CONTROLS</b>
-       As  of  Postfix  version 2.0, the SMTP server rejects mail
-       for unknown recipients. This prevents the mail queue  from
-       clogging  up  with  undeliverable  MAILER-DAEMON messages.
-       Additional  information  on   this   topic   is   in   the
+       As of Postfix version 2.0, the SMTP  server  rejects  mail
+       for  unknown recipients. This prevents the mail queue from
+       clogging up  with  undeliverable  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
+              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
+              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>
@@ -657,7 +658,7 @@ SMTPD(8)                                                              SMTPD(8)
 
        <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>,  local-</b>
        <b>host)</b>
-              The  list  of  domains  that  are delivered via the
+              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>
@@ -666,146 +667,146 @@ SMTPD(8)                                                              SMTPD(8)
 
        <b><a href="postconf.5.html#proxy_interfaces">proxy_interfaces</a> (empty)</b>
               The network interface addresses that this mail sys-
-              tem receives mail on by way of a proxy  or  network
+              tem  receives  mail on by way of a proxy or network
               address translation unit.
 
        <b><a href="postconf.5.html#inet_protocols">inet_protocols</a> (ipv4)</b>
-              The  Internet protocols Postfix will attempt to use
+              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</b>
        <b>$<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">mydestination</a>, $<a href="postconf.5.html#inet_interfaces">inet_interfaces</a>  or
+              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">mydestination</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 lookup
+              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  lookup
               tables that does not match the recipient.
 
-       Parameters concerning known/unknown  recipients  of  relay
+       Parameters  concerning  known/unknown  recipients of relay
        destinations:
 
        <b><a href="postconf.5.html#relay_domains">relay_domains</a> ($<a href="postconf.5.html#mydestination">mydestination</a>)</b>
-              What  destination  domains (and subdomains thereof)
+              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
+              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>  specifies  a  list  of lookup
+              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> specifies  a  list  of  lookup
               tables that does not match the recipient address.
 
-       Parameters concerning known/unknown recipients in  virtual
+       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  aliased to addresses in
+              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  domains  to  other  local  or remote
+              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 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">vir</a>-
-              <a href="postconf.5.html#virtual_alias_maps">tual_alias_maps</a> specifies a list of  lookup  tables
+              matches    $<a href="postconf.5.html#virtual_alias_domains">virtual_alias_domains</a>,    and     $<a href="postconf.5.html#virtual_alias_maps">vir</a>-
+              <a href="postconf.5.html#virtual_alias_maps">tual_alias_maps</a>  specifies  a list of lookup tables
               that does not match the recipient address.
 
-       Parameters  concerning known/unknown recipients in virtual
+       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">vir</a>-
+              of  domains;  mail  is  delivered  via  the   $<a href="postconf.5.html#virtual_transport">vir</a>-
               <a href="postconf.5.html#virtual_transport">tual_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
+              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 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">vir</a>-
+              matches    $<a href="postconf.5.html#virtual_mailbox_domains">virtual_mailbox_domains</a>,    and   $<a href="postconf.5.html#virtual_mailbox_maps">vir</a>-
               <a href="postconf.5.html#virtual_mailbox_maps">tual_mailbox_maps</a> specifies a list of lookup tables
               that does not match the recipient address.
 
 <b>RESOURCE AND RATE CONTROLS</b>
-       The following parameters limit resource usage by the  SMTP
+       The  following parameters limit resource usage by the SMTP
        server and/or 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 this length; upon delivery,  long  lines
+              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>
-              The  minimal  amount  of free space in bytes in the
+              The minimal amount of free space in  bytes  in  the
               queue file system 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
+              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
+              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, stress: 10s)</b>
-              The time limit for sending a  Postfix  SMTP  server
-              response  and  for  receiving  a remote SMTP client
+              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
+              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  that  the  name  matches the client IP
+              and verify that the  name  matches  the  client  IP
               address.
 
        The per SMTP client connection count and request rate lim-
        its are implemented in co-operation with the <a href="anvil.8.html"><b>anvil</b>(8)</a> ser-
-       vice, and are available in Postfix version 2.2 and  later.
+       vice,  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
+              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 to make to this service per time
+              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
+              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
+              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  connection  count,
+              Clients  that  are  excluded from connection count,
               connection rate, or SMTP request rate restrictions.
 
        Available in Postfix version 2.3 and later:
@@ -816,52 +817,52 @@ SMTPD(8)                                                              SMTPD(8)
               tiate with this service per time unit.
 
 <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  con-
-       trolled  by  an  error  counter  that counts the number of
-       errors within an SMTP session that a client makes  without
+       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 con-
+       trolled 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  delivering
+              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
+              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, stress: 1)</b>
-              The  maximal  number of errors a remote SMTP client
+              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, stress: 1)</b>
-              The number of junk commands (NOOP,  VRFY,  ETRN  or
+              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
+              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 excess  of  the  limit  specified  with
+              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  count  for
+              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  file <a href="SMTPD_POLICY_README.html">SMTPD_POLICY_README</a> for
+       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
+              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>
@@ -869,150 +870,150 @@ SMTPD(8)                                                              SMTPD(8)
               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
+              The  time  limit  for  connecting to, writing to or
               receiving from a delegated SMTPD policy server.
 
 <b>ACCESS CONTROLS</b>
-       The  <a href="SMTPD_ACCESS_README.html">SMTPD_ACCESS_README</a> document gives an introduction to
+       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>,    $smtpd_helo_restric-
               tions and $<a href="postconf.5.html#smtpd_sender_restrictions">smtpd_sender_restrictions</a>, or wait until
-              the      ETRN     command     before     evaluating
+              the     ETRN     command     before      evaluating
               $<a href="postconf.5.html#smtpd_client_restrictions">smtpd_client_restrictions</a> and $smtpd_helo_restric-
               tions.
 
-       <b><a href="postconf.5.html#parent_domain_matches_subdomains">parent_domain_matches_subdomains</a>  (see  'postconf -d' out-</b>
+       <b><a href="postconf.5.html#parent_domain_matches_subdomains">parent_domain_matches_subdomains</a> (see 'postconf  -d'  out-</b>
        <b>put)</b>
               What   Postfix   features   match   subdomains   of
               "domain.tld" automatically, instead of requiring an
               explicit ".domain.tld" pattern.
 
        <b><a href="postconf.5.html#smtpd_client_restrictions">smtpd_client_restrictions</a> (empty)</b>
-              Optional  SMTP  server  access  restrictions in the
+              Optional SMTP server  access  restrictions  in  the
               context of a client SMTP 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
-              at  the  beginning of an SMTP session with the HELO
+              at the beginning of an SMTP session with  the  HELO
               or EHLO command.
 
        <b><a href="postconf.5.html#smtpd_helo_restrictions">smtpd_helo_restrictions</a> (empty)</b>
-              Optional restrictions that the Postfix SMTP  server
+              Optional  restrictions that the Postfix SMTP server
               applies in the context of the SMTP HELO command.
 
        <b><a href="postconf.5.html#smtpd_sender_restrictions">smtpd_sender_restrictions</a> (empty)</b>
-              Optional  restrictions that the Postfix SMTP server
+              Optional restrictions that the Postfix SMTP  server
               applies in the context of the MAIL FROM command.
 
        <b><a href="postconf.5.html#smtpd_recipient_restrictions">smtpd_recipient_restrictions</a>           (<a href="postconf.5.html#permit_mynetworks">permit_mynetworks</a>,</b>
        <b><a href="postconf.5.html#reject_unauth_destination">reject_unauth_destination</a>)</b>
               The  access  restrictions  that  the  Postfix  SMTP
-              server  applies  in the context of the RCPT TO com-
+              server applies in the context of the RCPT  TO  com-
               mand.
 
        <b><a href="postconf.5.html#smtpd_etrn_restrictions">smtpd_etrn_restrictions</a> (empty)</b>
-              Optional SMTP server  access  restrictions  in  the
+              Optional  SMTP  server  access  restrictions in the
               context of a client ETRN request.
 
        <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
+              Forward   mail   with   sender-specified    routing
+              (user[@%!]remote[@%!]site)  from  untrusted clients
               to destinations 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 restric-
+              User-defined aliases for groups of access  restric-
               tions.
 
        <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
+              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 only  domains  whose  primary  MX
+              access  feature  to  only  domains whose primary MX
               hosts match the listed networks.
 
        Available in Postfix version 2.0 and later:
 
        <b><a href="postconf.5.html#smtpd_data_restrictions">smtpd_data_restrictions</a> (empty)</b>
-              Optional  access restrictions that the Postfix SMTP
+              Optional access restrictions that the Postfix  SMTP
               server applies in the context of the SMTP DATA com-
               mand.
 
        <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
+              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> access  restriction
+              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
+              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 restric-
+              explicit <a href="postconf.5.html#reject_unlisted_recipient">reject_unlisted_recipient</a> access  restric-
               tion is specified.
 
        Available in Postfix version 2.2 and later:
 
        <b><a href="postconf.5.html#smtpd_end_of_data_restrictions">smtpd_end_of_data_restrictions</a> (empty)</b>
-              Optional access restrictions that the Postfix  SMTP
-              server  applies  in the context of the SMTP END-OF-
+              Optional  access restrictions that the Postfix SMTP
+              server applies in the context of the  SMTP  END-OF-
               DATA command.
 
 <b>SENDER AND RECIPIENT ADDRESS VERIFICATION CONTROLS</b>
-       Postfix  version  2.1  introduces  sender  and   recipient
-       address  verification.   This  feature  is  implemented by
-       sending probe email messages that are not actually  deliv-
-       ered.   This  feature  is requested via the reject_unveri-
-       fied_sender   and    <a href="postconf.5.html#reject_unverified_recipient">reject_unverified_recipient</a>    access
-       restrictions.   The status of verification probes is main-
+       Postfix   version  2.1  introduces  sender  and  recipient
+       address verification.   This  feature  is  implemented  by
+       sending  probe email messages that are not actually deliv-
+       ered.  This feature is requested  via  the  reject_unveri-
+       fied_sender    and    <a href="postconf.5.html#reject_unverified_recipient">reject_unverified_recipient</a>   access
+       restrictions.  The status of verification probes is  main-
        tained by the <a href="verify.8.html"><b>verify</b>(8)</a> server.  See the file <a href="ADDRESS_VERIFICATION_README.html">ADDRESS_VER</a>-
-       <a href="ADDRESS_VERIFICATION_README.html">IFICATION_README</a>  for  information  about how to configure
+       <a href="ADDRESS_VERIFICATION_README.html">IFICATION_README</a> for information about  how  to  configure
        and operate the Postfix sender/recipient address verifica-
        tion service.
 
        <b><a href="postconf.5.html#address_verify_poll_count">address_verify_poll_count</a> (3)</b>
-              How  many  times to query the <a href="verify.8.html"><b>verify</b>(8)</a> service for
-              the completion of an address  verification  request
+              How many times to query the <a href="verify.8.html"><b>verify</b>(8)</a>  service  for
+              the  completion  of an address verification request
               in progress.
 
        <b><a href="postconf.5.html#address_verify_poll_delay">address_verify_poll_delay</a> (3s)</b>
-              The  delay between queries for the completion of an
+              The delay between queries for the completion of  an
               address verification 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
+              The  sender  address to use in address verification
               probes; prior to Postfix 2.5 the default was "post-
               master".
 
        <b><a href="postconf.5.html#unverified_sender_reject_code">unverified_sender_reject_code</a> (450)</b>
-              The numerical Postfix  SMTP  server  response  code
-              when   a  recipient  address  is  rejected  by  the
+              The  numerical  Postfix  SMTP  server response code
+              when  a  recipient  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
+              The  numerical  Postfix SMTP server response when a
               recipient address is rejected by the reject_unveri-
               fied_recipient restriction.
 
        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 address probe fails due to a tempo-
+              The  numerical  Postfix  SMTP  server response code
+              when a sender address probe fails due to  a  tempo-
               rary 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  address  probe  fails due to a temporary
+              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>
@@ -1026,7 +1027,7 @@ SMTPD(8)                                                              SMTPD(8)
        <b><a href="postconf.5.html#unverified_sender_tempfail_action">unverified_sender_tempfail_action</a>           ($<a href="postconf.5.html#reject_tempfail_action">reject_temp</a>-</b>
        <b><a href="postconf.5.html#reject_tempfail_action">fail_action</a>)</b>
               The Postfix SMTP server's action when <a href="postconf.5.html#reject_unverified_sender">reject_unver</a>-
-              <a href="postconf.5.html#reject_unverified_sender">ified_sender</a>  fails due to a temporary error condi-
+              <a href="postconf.5.html#reject_unverified_sender">ified_sender</a> fails due to a temporary error  condi-
               tion.
 
        <b><a href="postconf.5.html#unverified_recipient_tempfail_action">unverified_recipient_tempfail_action</a>        ($<a href="postconf.5.html#reject_tempfail_action">reject_temp</a>-</b>
@@ -1036,7 +1037,7 @@ SMTPD(8)                                                              SMTPD(8)
               dition.
 
 <b>ACCESS CONTROL RESPONSES</b>
-       The following  parameters  control  numerical  SMTP  reply
+       The  following  parameters  control  numerical  SMTP reply
        codes and/or text responses.
 
        <b><a href="postconf.5.html#access_map_reject_code">access_map_reject_code</a> (554)</b>
@@ -1044,18 +1045,18 @@ SMTPD(8)                                                              SMTPD(8)
               an <a href="access.5.html"><b>access</b>(5)</a> 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  SMTP client request is rejected by
+              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    <a href="postconf.5.html#reject_invalid_helo_hostname">reject_invalid_helo_hostname</a>
+              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
+              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_sender">reject_rhsbl_sender</a>    or    <a href="postconf.5.html#reject_rhsbl_recipient">reject_rhsbl_recipient</a>
@@ -1063,53 +1064,53 @@ SMTPD(8)                                                              SMTPD(8)
 
        <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
+              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 is  rejected  by  the  <b>reject_plain-</b>
+              The numerical Postfix  SMTP  server  response  code
+              when  a  request  is  rejected by the <b>reject_plain-</b>
               <b>text_session</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 SMTP client request  is  rejected  by
+              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
+              The numerical Postfix  SMTP  server  response  code
+              when   a   client   request   is  rejected  by  the
               <a href="postconf.5.html#reject_unauth_destination">reject_unauth_destination</a> recipient restriction.
 
        <b><a href="postconf.5.html#unknown_address_reject_code">unknown_address_reject_code</a> (450)</b>
-              The  numerical  Postfix  SMTP  server response code
-              when a sender or recipient address is  rejected  by
+              The numerical Postfix  SMTP  server  response  code
+              when  a  sender or recipient address is rejected by
               the         <a href="postconf.5.html#reject_unknown_sender_domain">reject_unknown_sender_domain</a>         or
               <a href="postconf.5.html#reject_unknown_recipient_domain">reject_unknown_recipient_domain</a> restriction.
 
        <b><a href="postconf.5.html#unknown_client_reject_code">unknown_client_reject_code</a> (450)</b>
-              The numerical Postfix  SMTP  server  response  code
-              when  a  client without valid address &lt;=&gt; name map-
+              The  numerical  Postfix  SMTP  server response code
+              when a client without valid address &lt;=&gt;  name  map-
               ping is rejected by the reject_unknown_client_host-
               name 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 hostname specified with the HELO  or  EHLO
-              command        is       rejected       by       the
+              The numerical Postfix  SMTP  server  response  code
+              when  the  hostname 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 SMTP server  response  template  for  a
-              request  that  is rejected by an RBL-based restric-
+              The  default  SMTP  server  response template for a
+              request that is rejected by an  RBL-based  restric-
               tion.
 
        <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
+              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_recipient_bounce</a> restriction.
 
@@ -1120,38 +1121,38 @@ 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
+              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 "<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 fails due to a temporary  error  condi-
+              restriction  fails  due to a temporary error condi-
               tion.
 
        <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_temp</a>-</b>
        <b><a href="postconf.5.html#reject_tempfail_action">fail_action</a>)</b>
-              The    Postfix    SMTP    server's    action   when
+              The   Postfix    SMTP    server's    action    when
               <a href="postconf.5.html#reject_unknown_helo_hostname">reject_unknown_helo_hostname</a> fails due to an tempo-
               rary 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
+              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 tem-
+              <a href="postconf.5.html#reject_unknown_recipient_domain">reject_unknown_recipient_domain</a> fail due to a  tem-
               porary 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
+              The  default  location  of  the Postfix <a href="postconf.5.html">main.cf</a> and
               <a href="master.5.html">master.cf</a> configuration 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 request  before  it  is  terminated  by  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 com-
+              The location of  all  postfix  administrative  com-
               mands.
 
        <b><a href="postconf.5.html#double_bounce_sender">double_bounce_sender</a> (double-bounce)</b>
@@ -1172,37 +1173,37 @@ SMTPD(8)                                                              SMTPD(8)
               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 waits  for  an  incoming  connection
+              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>
-              The  maximal  number of incoming connections that a
-              Postfix daemon process will service  before  termi-
+              The maximal number of incoming connections  that  a
+              Postfix  daemon  process will service before termi-
               nating voluntarily.
 
        <b><a href="postconf.5.html#myhostname">myhostname</a> (see 'postconf -d' output)</b>
               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" SMTP clients that have more
+              The list of "trusted" SMTP clients that  have  more
               privileges 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,  and that locally posted mail is deliv-
+              come from, and that locally posted mail  is  deliv-
               ered to.
 
        <b><a href="postconf.5.html#process_id">process_id</a> (read-only)</b>
-              The process ID  of  a  Postfix  command  or  daemon
+              The  process  ID  of  a  Postfix  command or daemon
               process.
 
        <b><a href="postconf.5.html#process_name">process_name</a> (read-only)</b>
-              The  process  name  of  a Postfix command or daemon
+              The process name of a  Postfix  command  or  daemon
               process.
 
        <b><a href="postconf.5.html#queue_directory">queue_directory</a> (see 'postconf -d' output)</b>
-              The location of the Postfix top-level queue  direc-
+              The  location of the Postfix top-level queue direc-
               tory.
 
        <b><a href="postconf.5.html#recipient_delimiter">recipient_delimiter</a> (empty)</b>
@@ -1210,28 +1211,28 @@ SMTPD(8)                                                              SMTPD(8)
               sions (user+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
+              The  text  that  follows the 220 status code in the
               SMTP greeting banner.
 
        <b><a href="postconf.5.html#syslog_facility">syslog_facility</a> (mail)</b>
               The syslog facility of Postfix logging.
 
        <b><a href="postconf.5.html#syslog_name">syslog_name</a> (see 'postconf -d' output)</b>
-              The  mail  system  name  that  is  prepended to the
-              process name in syslog  records,  so  that  "smtpd"
+              The mail system  name  that  is  prepended  to  the
+              process  name  in  syslog  records, so that "smtpd"
               becomes, for example, "postfix/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  causes  the  Postfix SMTP
-              server to immediately terminate the session with  a
+              List of  commands  that  causes  the  Postfix  SMTP
+              server  to immediately terminate the session with a
               221 code.
 
        Available in Postfix version 2.5 and later:
 
        <b><a href="postconf.5.html#smtpd_client_port_logging">smtpd_client_port_logging</a> (no)</b>
-              Enable  logging  of  the remote SMTP client port in
+              Enable logging of the remote SMTP  client  port  in
               addition to the hostname and IP address.
 
 <b>SEE ALSO</b>
@@ -1261,7 +1262,7 @@ SMTPD(8)                                                              SMTPD(8)
        <a href="XFORWARD_README.html">XFORWARD_README</a>, Postfix XFORWARD extension
 
 <b>LICENSE</b>
-       The  Secure  Mailer  license must be distributed with this
+       The Secure Mailer license must be  distributed  with  this
        software.
 
 <b>AUTHOR(S)</b>
index 54015f74fc607e5216e53b9193da42b0f1bc4d20..32d879201dec560eba26db89f9240a10da1115ae 100644 (file)
@@ -3162,9 +3162,10 @@ after the SMTP MAIL FROM command. See MILTER_README
 for a list of available macro names and their meanings.
 .PP
 This feature is available in Postfix 2.3 and later.
-.SH milter_protocol (default: 2)
+.SH milter_protocol (default: 6)
 The mail filter protocol version and optional protocol extensions
-for communication with a Milter (mail filter) application. Postfix
+for communication with a Milter application; prior to Postfix 2.6
+the default protocol is 2. Postfix
 sends this version number during the initial protocol handshake.
 It should match the version number that is expected by the mail
 filter application (or by its Milter library).
@@ -3172,14 +3173,15 @@ filter application (or by its Milter library).
 Protocol versions:
 .IP "2"
 Use Sendmail 8 mail filter protocol version 2 (default
-as of Sendmail version 8.11).
+with Sendmail version 8.11 .. 8.13 and Postfix version 2.3 ..
+2.5).
 .IP "3"
 Use Sendmail 8 mail filter protocol version 3.
 .IP "4"
 Use Sendmail 8 mail filter protocol version 4.
 .IP "6"
 Use Sendmail 8 mail filter protocol version 6 (default
-as of Sendmail version 8.14).
+with Sendmail version 8.14 and Postfix version 2.6).
 .PP
 Protocol extensions:
 .IP "no_header_reply"
index 6b1884268d69be374692adedf475e062eb9c6e81..de5f912f0898a789c173f8929af71cfb5b1c7041 100644 (file)
@@ -144,9 +144,10 @@ see the MILTER_README document.
 .IP "\fBnon_smtpd_milters (empty)\fR"
 A list of Milter (mail filter) applications for new mail that
 does not arrive via the Postfix \fBsmtpd\fR(8) server.
-.IP "\fBmilter_protocol (2)\fR"
+.IP "\fBmilter_protocol (6)\fR"
 The mail filter protocol version and optional protocol extensions
-for communication with a Milter (mail filter) application.
+for communication with a Milter application; prior to Postfix 2.6
+the default protocol is 2.
 .IP "\fBmilter_default_action (tempfail)\fR"
 The default action when a Milter (mail filter) application is
 unavailable or mis-configured.
index 382637136a1f9d9d6baa820cbaf974e908413ad6..4a847abbc45e88e558de4142764cf8198aa0f009 100644 (file)
@@ -320,10 +320,6 @@ or to the alias \fIname\fR, to the destinations listed in
 ~\fIname\fR/.\fBforward\fR+\fIfoo\fR or in ~\fIname\fR/.\fBforward\fR,
 to the mailbox owned by the user \fIname\fR, or it is sent back as
 undeliverable.
-
-In all cases the \fBlocal\fR(8) daemon prepends an optional
-`\fBDelivered-To:\fR header line with the final recipient
-address.
 .SH "DELIVERY RIGHTS"
 .na
 .nf
index 36525066d6a231ca9107eaeb5e27dd020f69c1b2..dc7ebc13dc498c2e1b26edc1b1bcd2df477c24d2 100644 (file)
@@ -200,9 +200,10 @@ mail is queued. For details see the MILTER_README document.
 .IP "\fBsmtpd_milters (empty)\fR"
 A list of Milter (mail filter) applications for new mail that
 arrives via the Postfix \fBsmtpd\fR(8) server.
-.IP "\fBmilter_protocol (2)\fR"
+.IP "\fBmilter_protocol (6)\fR"
 The mail filter protocol version and optional protocol extensions
-for communication with a Milter (mail filter) application.
+for communication with a Milter application; prior to Postfix 2.6
+the default protocol is 2.
 .IP "\fBmilter_default_action (tempfail)\fR"
 The default action when a Milter (mail filter) application is
 unavailable or mis-configured.
index 34fd0791b050b240da9f3184f89df78202dbb356..ca544dd69d2124884ecb8eb4e6da5b85341a68b8 100644 (file)
@@ -442,12 +442,15 @@ in the "hold" queue, and is available with Postfix 2.6 or later.
 
 <p> 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 2. Other protocol versions are
-3 and 4 (Postfix 2.3 and later), and 6 (Postfix 2.5 an later).  </p>
+should use.  The default version is 6 (before Postfix 2.6 the default
+version is 2). </p>
 
 <blockquote>
 <pre>
 /etc/postfix/main.cf:
+    # Postfix &ge; 2.6
+    milter_protocol = 6
+    # 2.3 &le; Postfix &le; 2.5
     milter_protocol = 2
 </pre>
 </blockquote>
@@ -515,7 +518,9 @@ times. This is an inherent problem with before-queue filtering. </p>
 <h3><a name="macros">Sendmail macro emulation</a></h3>
 
 <p> Postfix emulates a limited number of Sendmail macros, as shown
-in the table. Different macros are available at different SMTP
+in the table. Some macro values depend on whether a recipient is
+rejected (rejected recipients are available on request by the Milter
+application). Different macros are available at different SMTP
 protocol stages (EOH = end-of-header, EOM = end-of-message); their
 availability is not
 always the same as in Sendmail. See the <a
@@ -552,15 +557,16 @@ address </td> </tr>
 <tr> <td> {client_connections} </td> <td> CONNECT </td> <td>
 Connection concurrency for this client </td> </tr>
 
-<tr> <td> {client_name} </td> <td> Always </td> <td> Client hostname,
-"unknown" when lookup or verification fails </td> </tr>
+<tr> <td> {client_name} </td> <td> Always </td> <td> Client hostname
+<br> When address &rarr; name lookup or name &rarr; address
+verification fails: "unknown" </td> </tr>
 
 <tr> <td> {client_port} </td> <td> Always (Postfix &ge;2.5) </td>
 <td> Client TCP port </td> </tr>
 
 <tr> <td> {client_ptr} </td> <td> CONNECT, HELO, MAIL, DATA </td>
-<td> Client name from reverse lookup, "unknown" when lookup fails
-</td> </tr>
+<td> Client name from address &rarr; name lookup <br> When address
+&rarr; name lookup fails: "unknown" </td> </tr>
 
 <tr> <td> {cert_issuer} </td> <td> HELO, MAIL, DATA, EOH, EOM </td> <td>
 TLS client certificate issuer </td> </tr>
@@ -587,14 +593,15 @@ Sender next-hop destination </td> </tr>
 <td> Sender mail delivery transport </td> </tr>
 
 <tr> <td> {rcpt_addr} </td> <td> RCPT </td> <td> Recipient address
-</td> </tr>
+<br> With rejected recipient: descriptive text </td> </tr>
 
 <tr> <td> {rcpt_host} </td> <td> RCPT (Postfix &ge; 2.6) </td> <td>
-Recipient next-hop destination </td> </tr>
+Recipient next-hop destination <br> With rejected recpient: enhanced
+status code </td> </tr>
 
 <tr> <td> {rcpt_mailer} </td> <td> RCPT (Postfix &ge; 2.6) </td>
-<td> Recipient mail delivery transport, "error" for rejected
-recipient.  </td> </tr>
+<td> Recipient mail delivery transport <br> With rejected recipient:
+"error" </td> </tr>
 
 <tr> <td> {tls_version} </td> <td> HELO, MAIL, DATA, EOH, EOM </td>
 <td> TLS protocol version </td> </tr>
@@ -790,15 +797,8 @@ a discussion. </p>
 
 <ul>
 
-<li> <p> Postfix version 2.3 introduces support for Sendmail 8
-milter protocol versions 2, 3 and 4; Postfix version 2.5 adds support
-for protocol version 6, which is available with Sendmail 8.14.
-Support for other protocol types or protocol versions may be added
-later. </p>
-
-<li> <p> For applications that are written in C, you need to use
-the Sendmail libmilter library. A Postfix replacement may be 
-provided in the future. </p>
+<li> <p> For Milter applications that are written in C, you need
+to use the Sendmail libmilter library. </p>
 
 <li> <p> There are TWO sets of mail filters: filters that are used
 for SMTP mail only (specified with the smtpd_milters parameter),
@@ -806,6 +806,8 @@ and filters for non-SMTP mail (specified with the non_smtpd_milters
 parameter).  The non-SMTP filters are primarily for local submissions.
 </p>
 
+<ul>
+
 <li> <p> When mail is filtered by non-SMTP filters, the Postfix
 cleanup(8) server has to simulate the SMTP client CONNECT and
 DISCONNECT events, and the SMTP client EHLO, MAIL FROM, RCPT TO and
@@ -815,6 +817,8 @@ commands.  When a non-SMTP filter REJECTs or TEMPFAILs a recipient,
 Postfix will report a configuration error, and mail will stay in
 the queue.  </p>
 
+</ul>
+
 <li> <p> Postfix currently does not apply content filters to mail
 that is forwarded or aliased internally, or to mail that is generated
 internally such as bounces or Postmaster notifications. This may
@@ -827,9 +831,37 @@ only to the SMTP command information; they have no access to the
 message header or body, and cannot make modifications to the message
 or to the envelope. </p>
 
-<li> <p> Postfix 2.3 does not support Milter requests to replace
-the message body. Milter applications that request this unsupported
-operation will log a warning like this: </p>
+<li> <p> Postfix version 2.6 implements all Sendmail 8.14 Milter
+features, except it ignores the optional ESMTP command parameters
+with requests to replace the sender (SMFIR_CHGFROM), or to append
+a recipient (SMFIR_ADDRCPT_PAR). When a Milter application supplies
+ESMTP command parameters, these are logged as follows: </p>
+
+<pre>
+postfix/cleanup[40629]: warning: 100B22B3293: cleanup_chg_from: ignoring ESMTP arguments "<i>whatever</i>"
+</pre>
+
+<p> Specify "milter_protocol = 6" to enable all available Sendmail
+8.14 and earlier Milter features. </p>
+
+<li> <p> Postfix version 2.5 implements all Sendmail 8.14 Milter
+features except: SMFIP_RCPT_REJ (report rejected recipients to the
+mail filter), SMFIR_CHGFROM (replace sender, with optional ESMTP
+command parameters), and SMFIR_ADDRCPT_PAR (add recipient, with
+optional ESMTP command parameters). </p>
+
+<p> Specify "milter_protocol = 6" to enable all available Sendmail
+8.14 and earlier Milter features. </p>
+
+<li> <p> Postfix 2.4 implements all Sendmail 8.13 Milter features.
+</p>
+
+<p> Specify "milter_protocol = 4" to enable all available Sendmail
+8.13 and earlier Milter features. </p>
+
+<li> <p> Postfix 2.3 implements all Sendmail 8.13 Milter features
+except requests to replace the message body. Milter applications
+that request this unsupported operation will log a warning like
 
 <blockquote>
 <pre>
@@ -839,11 +871,8 @@ operation will log a warning like this: </p>
 
 <p> The solution is to use Postfix version 2.4 or later. </p>
 
-<li> <p> Postfix version 2.5 implements the Sendmail 8.14 features
-except: SMFIP_RCPT_REJ (report rejected recipients to the mail
-filter), SMFIR_CHGFROM (replace sender, with optional ESMTP command
-parameters), and SMFIR_ADDRCPT_PAR (add recipient, with optional
-ESMTP command parameters).
+<p> Specify "milter_protocol = 4" to enable all available Sendmail
+8.13 and earlier Milter features. </p>
 
 <li> <p> Most Milter configuration options are global. Future Postfix
 versions may support per-Milter timeouts, per-Milter error handling,
index 39210a4f392a40be9e3c01656b2beddb3f167fe7..e40a402b7b0eb7899344f73155b99c4ab5ff513d 100644 (file)
@@ -193,8 +193,8 @@ some restriction produces a result of PERMIT, REJECT or DEFER (try
 again later).  The end of the list is equivalent to a PERMIT result.
 By placing a PERMIT restriction before a REJECT restriction you
 can make exceptions for specific clients or users. This is called
-whitelisting; the last example above allows mail from local networks
-but otherwise rejects mail to arbitrary destinations. </p>
+whitelisting; the fourth example above allows mail from local
+networks but otherwise rejects mail to arbitrary destinations. </p>
 
 <p> The table below summarizes the purpose of each SMTP access
 restriction list. All lists use the exact same syntax; they differ
index 083d51c48681bb3f39acc2f0e2b6099a08d69bcd..b1d88550c4a76e7c38802ec1a2f63b5718cee241 100644 (file)
@@ -10454,10 +10454,11 @@ for details.  </p>
 
 <p> This feature is available in Postfix 2.3 and later. </p>
 
-%PARAM milter_protocol 2
+%PARAM milter_protocol 6
 
 <p> The mail filter protocol version and optional protocol extensions
-for communication with a Milter (mail filter) application. Postfix
+for communication with a Milter application; prior to Postfix 2.6
+the default protocol is 2. Postfix
 sends this version number during the initial protocol handshake.
 It should match the version number that is expected by the mail
 filter application (or by its Milter library).  </p>
@@ -10467,14 +10468,15 @@ filter application (or by its Milter library).  </p>
 <dl compact>
 
 <dt>2</dt> <dd>Use Sendmail 8 mail filter protocol version 2 (default
-as of Sendmail version 8.11).</dd>
+with Sendmail version 8.11 .. 8.13 and Postfix version 2.3 ..
+2.5).</dd>
 
 <dt>3</dt> <dd>Use Sendmail 8 mail filter protocol version 3.</dd>
 
 <dt>4</dt> <dd>Use Sendmail 8 mail filter protocol version 4.</dd>
 
 <dt>6</dt> <dd>Use Sendmail 8 mail filter protocol version 6 (default
-as of Sendmail version 8.14).</dd>
+with Sendmail version 8.14 and Postfix version 2.6).</dd>
 
 </dl>
 
index 2f9fdb81b212a8709ece4e1d48acab044f145d4b..75c490082389dfa06ff424e21fc5744c2a6cd071 100644 (file)
@@ -174,7 +174,7 @@ int     bounce_notify_service(int flags, char *service, char *queue_name,
            postmaster = var_2bounce_rcpt;
            if ((bounce = post_mail_fopen_nowait(mail_addr_double_bounce(),
                                                 postmaster,
-                                                INT_FILT_BOUNCE,
+                                                INT_FILT_MASK_BOUNCE,
                                                 NULL_TRACE_FLAGS,
                                                 new_id)) != 0) {
 
@@ -213,7 +213,7 @@ int     bounce_notify_service(int flags, char *service, char *queue_name,
      */
     else {
        if ((bounce = post_mail_fopen_nowait(NULL_SENDER, recipient,
-                                            INT_FILT_BOUNCE,
+                                            INT_FILT_MASK_BOUNCE,
                                             NULL_TRACE_FLAGS,
                                             new_id)) != 0) {
 
@@ -267,7 +267,7 @@ int     bounce_notify_service(int flags, char *service, char *queue_name,
            postmaster = var_bounce_rcpt;
            if ((bounce = post_mail_fopen_nowait(mail_addr_double_bounce(),
                                                 postmaster,
-                                                INT_FILT_BOUNCE,
+                                                INT_FILT_MASK_BOUNCE,
                                                 NULL_TRACE_FLAGS,
                                                 new_id)) != 0) {
                count = -1;
index 749b347c867e310b845d9436d40a91478c08321c..3968c73aab4db24a96b6cf456fa3a71ea55ef056 100644 (file)
@@ -160,7 +160,7 @@ int     bounce_notify_verp(int flags, char *service, char *queue_name,
        } else {
            verp_sender(verp_buf, verp_delims, recipient, rcpt);
            if ((bounce = post_mail_fopen_nowait(NULL_SENDER, STR(verp_buf),
-                                                INT_FILT_BOUNCE,
+                                                INT_FILT_MASK_BOUNCE,
                                                 NULL_TRACE_FLAGS,
                                                 new_id)) != 0) {
 
@@ -219,7 +219,7 @@ int     bounce_notify_verp(int flags, char *service, char *queue_name,
            postmaster = var_bounce_rcpt;
            if ((bounce = post_mail_fopen_nowait(mail_addr_double_bounce(),
                                                 postmaster,
-                                                INT_FILT_BOUNCE,
+                                                INT_FILT_MASK_BOUNCE,
                                                 NULL_TRACE_FLAGS,
                                                 new_id)) != 0) {
                if (bounce_header(bounce, bounce_info, postmaster,
index 5373e74e1a467e9dc9387597b3adfbd77d2592cc..7a3da8230d139379147fdf526768ea0e59df22a0 100644 (file)
@@ -147,7 +147,7 @@ int     bounce_one_service(int flags, char *queue_name, char *queue_id,
        } else {
            if ((bounce = post_mail_fopen_nowait(mail_addr_double_bounce(),
                                                 var_2bounce_rcpt,
-                                                INT_FILT_BOUNCE,
+                                                INT_FILT_MASK_BOUNCE,
                                                 NULL_TRACE_FLAGS,
                                                 new_id)) != 0) {
 
@@ -183,7 +183,7 @@ int     bounce_one_service(int flags, char *queue_name, char *queue_id,
            bounce_status = 0;
        } else {
            if ((bounce = post_mail_fopen_nowait(NULL_SENDER, orig_sender,
-                                                INT_FILT_BOUNCE,
+                                                INT_FILT_MASK_BOUNCE,
                                                 NULL_TRACE_FLAGS,
                                                 new_id)) != 0) {
 
@@ -228,7 +228,7 @@ int     bounce_one_service(int flags, char *queue_name, char *queue_id,
             */
            if ((bounce = post_mail_fopen_nowait(mail_addr_double_bounce(),
                                                 var_bounce_rcpt,
-                                                INT_FILT_BOUNCE,
+                                                INT_FILT_MASK_BOUNCE,
                                                 NULL_TRACE_FLAGS,
                                                 new_id)) != 0) {
                if (bounce_header(bounce, bounce_info, var_bounce_rcpt,
index 78d1b9362b265ca375071fdfb6e019db25ab178d..850515902a78f7269f960af9b174f346c7e19356 100644 (file)
@@ -140,7 +140,7 @@ int     bounce_trace_service(int flags, char *service, char *queue_name,
      * a new queue file.
      */
     if ((bounce = post_mail_fopen_nowait(NULL_SENDER, recipient,
-                                        INT_FILT_BOUNCE,
+                                        INT_FILT_MASK_BOUNCE,
                                         NULL_TRACE_FLAGS,
                                         new_id)) != 0) {
        count = -1;
index cb19579a101db3b2afcf2912e7274cd156c1a3a5..f4b62c75b002fa1b0d0ae8d4a2864b437ab41dd1 100644 (file)
@@ -164,7 +164,7 @@ int     bounce_warn_service(int unused_flags, char *service, char *queue_name,
            postmaster = var_delay_rcpt;
            if ((bounce = post_mail_fopen_nowait(mail_addr_double_bounce(),
                                                 postmaster,
-                                                INT_FILT_BOUNCE,
+                                                INT_FILT_MASK_BOUNCE,
                                                 NULL_TRACE_FLAGS,
                                                 new_id)) != 0) {
 
@@ -202,7 +202,7 @@ int     bounce_warn_service(int unused_flags, char *service, char *queue_name,
      */
     else {
        if ((bounce = post_mail_fopen_nowait(NULL_SENDER, recipient,
-                                            INT_FILT_BOUNCE,
+                                            INT_FILT_MASK_BOUNCE,
                                             NULL_TRACE_FLAGS,
                                             new_id)) != 0) {
 
@@ -252,7 +252,7 @@ int     bounce_warn_service(int unused_flags, char *service, char *queue_name,
            postmaster = var_delay_rcpt;
            if ((bounce = post_mail_fopen_nowait(mail_addr_double_bounce(),
                                                 postmaster,
-                                                INT_FILT_BOUNCE,
+                                                INT_FILT_MASK_BOUNCE,
                                                 NULL_TRACE_FLAGS,
                                                 new_id)) != 0) {
                count = -1;
index d2bc00fcfc558fecfb4d02f1edf7ea835b660a5e..161ebf2dd0c9e8257304dde7ed3e2fb57cc25605 100644 (file)
@@ -74,7 +74,9 @@ milter_tests: cleanup_milter_test bug_tests \
        cleanup_milter_test5 cleanup_milter_test6 cleanup_milter_test7 \
        cleanup_milter_test8 cleanup_milter_test9 cleanup_milter_test10a \
        cleanup_milter_test10b cleanup_milter_test10c cleanup_milter_test10d \
-       cleanup_milter_test10e cleanup_milter_test11 cleanup_milter_test12
+       cleanup_milter_test10e cleanup_milter_test11 cleanup_milter_test12 \
+       cleanup_milter_test13a cleanup_milter_test13b cleanup_milter_test13c \
+       cleanup_milter_test13d
 
 root_tests:
 
@@ -296,6 +298,42 @@ cleanup_milter_test12: cleanup_milter test-queue-file12 cleanup_milter.in12 \
        diff cleanup_milter.ref12 cleanup_milter.tmp
        rm -f test-queue-file12.tmp cleanup_milter.tmp
 
+cleanup_milter_test13a: cleanup_milter test-queue-file13a cleanup_milter.in13a \
+       cleanup_milter.ref13a ../postcat/postcat
+       cp test-queue-file13a test-queue-file13a.tmp
+       chmod u+w test-queue-file13a.tmp
+       ./cleanup_milter <cleanup_milter.in13a
+       ../postcat/postcat -ov test-queue-file13a.tmp 2>/dev/null >cleanup_milter.tmp
+       diff cleanup_milter.ref13a cleanup_milter.tmp
+       rm -f test-queue-file13a.tmp cleanup_milter.tmp
+
+cleanup_milter_test13b: cleanup_milter test-queue-file13b cleanup_milter.in13b \
+       cleanup_milter.ref13b ../postcat/postcat
+       cp test-queue-file13b test-queue-file13b.tmp
+       chmod u+w test-queue-file13b.tmp
+       ./cleanup_milter <cleanup_milter.in13b
+       ../postcat/postcat -ov test-queue-file13b.tmp 2>/dev/null >cleanup_milter.tmp
+       diff cleanup_milter.ref13b cleanup_milter.tmp
+       rm -f test-queue-file13b.tmp cleanup_milter.tmp
+
+cleanup_milter_test13c: cleanup_milter test-queue-file13c cleanup_milter.in13c \
+       cleanup_milter.ref13c ../postcat/postcat
+       cp test-queue-file13c test-queue-file13c.tmp
+       chmod u+w test-queue-file13c.tmp
+       ./cleanup_milter <cleanup_milter.in13c
+       ../postcat/postcat -ov test-queue-file13c.tmp 2>/dev/null >cleanup_milter.tmp
+       diff cleanup_milter.ref13c cleanup_milter.tmp
+       rm -f test-queue-file13c.tmp cleanup_milter.tmp
+
+cleanup_milter_test13d: cleanup_milter test-queue-file13d cleanup_milter.in13d \
+       cleanup_milter.ref13d ../postcat/postcat
+       cp test-queue-file13d test-queue-file13d.tmp
+       chmod u+w test-queue-file13d.tmp
+       ./cleanup_milter <cleanup_milter.in13d
+       ../postcat/postcat -ov test-queue-file13d.tmp 2>/dev/null >cleanup_milter.tmp
+       diff cleanup_milter.ref13d cleanup_milter.tmp
+       rm -f test-queue-file13d.tmp cleanup_milter.tmp
+
 depend: $(MAKES)
        (sed '1,/^# do not edit/!d' Makefile.in; \
        set -e; for i in [a-z][a-z0-9]*.c; do \
index a9dbdf5b71166e87d398f79291d1c21a21910dd4..0289931e9038996358cb6a37fdaa17ee8c31bd95 100644 (file)
 /* .IP "\fBnon_smtpd_milters (empty)\fR"
 /*     A list of Milter (mail filter) applications for new mail that
 /*     does not arrive via the Postfix \fBsmtpd\fR(8) server.
-/* .IP "\fBmilter_protocol (2)\fR"
+/* .IP "\fBmilter_protocol (6)\fR"
 /*     The mail filter protocol version and optional protocol extensions
-/*     for communication with a Milter (mail filter) application.
+/*     for communication with a Milter application; prior to Postfix 2.6
+/*     the default protocol is 2.
 /* .IP "\fBmilter_default_action (tempfail)\fR"
 /*     The default action when a Milter (mail filter) application is
 /*     unavailable or mis-configured.
index 514b72066f08d593c0c33071ccca5d2853be9fdc..d8bfe08f82e3a513b8a9bd2d39badd5ddb72034a 100644 (file)
@@ -72,6 +72,8 @@ typedef struct CLEANUP_STATE {
     off_t   body_offset;               /* start of body content */
     off_t   xtra_offset;               /* start of extra segment */
     off_t   cont_length;               /* length including Milter edits */
+    off_t   sender_pt_offset;          /* replace sender here */
+    off_t   sender_pt_target;          /* record after sender address */
     off_t   append_rcpt_pt_offset;     /* append recipient here */
     off_t   append_rcpt_pt_target;     /* target of above record */
     off_t   append_hdr_pt_offset;      /* append header here */
index b21da3e8572638f1b11ae46bfe63d3e90b7f2da7..a7a964692bd3d532745925049b22ff962ebd0bc8 100644 (file)
@@ -377,7 +377,20 @@ static void cleanup_envelope_process(CLEANUP_STATE *state, int type,
            state->errs |= CLEANUP_STAT_BAD;
            return;
        }
+       if (state->milters || cleanup_milters) {
+           /* Remember the sender record offset. */
+           if ((state->sender_pt_offset = vstream_ftell(state->dst)) < 0)
+               msg_fatal("%s: vstream_ftell %s: %m:", myname, cleanup_path);
+       }
        cleanup_addr_sender(state, buf);
+       if (state->milters || cleanup_milters) {
+           /* Make room to replace sender. */
+           if (len < REC_TYPE_PTR_PAYL_SIZE)
+               rec_pad(state->dst, REC_TYPE_PTR, REC_TYPE_PTR_PAYL_SIZE - len);
+           /* Remember the after-sender record offset. */
+           if ((state->sender_pt_target = vstream_ftell(state->dst)) < 0)
+               msg_fatal("%s: vstream_ftell %s: %m:", myname, cleanup_path);
+       }
        if (cleanup_milters != 0
            && state->milters == 0
            && CLEANUP_MILTER_OK(state))
index b80d530204a7afc89c7d0f0822b6575f6bd13a61..fdab9f5cc15f254eaafd872284a58f3d8bf2a283 100644 (file)
@@ -959,6 +959,99 @@ static const char *cleanup_del_header(void *context, ssize_t index,
     return (CLEANUP_OUT_OK(state) ? 0 : cleanup_milter_error(state, 0));
 }
 
+/* cleanup_chg_from - replace sender address, ignore ESMTP arguments */
+
+static const char *cleanup_chg_from(void *context, const char *ext_from,
+                                           const char *esmtp_args)
+{
+    const char *myname = "cleanup_chg_from";
+    CLEANUP_STATE *state = (CLEANUP_STATE *) context;
+    off_t   new_sender_offset;
+    int     addr_count;
+    TOK822 *tree;
+    TOK822 *tp;
+    VSTRING *int_sender_buf;
+
+    if (msg_verbose)
+       msg_info("%s: \"%s\" \"%s\"", myname, ext_from, esmtp_args);
+
+    if (esmtp_args[0])
+       msg_warn("%s: %s: ignoring ESMTP arguments \"%.100s\"",
+                state->queue_id, myname, esmtp_args);
+
+    /*
+     * The cleanup server remembers the location of the the original sender
+     * address record (offset in sender_pt_offset) and the file offset of the
+     * record that follows the sender address (offset in sender_pt_target).
+     * Short original sender records are padded, so that they can safely be
+     * overwritten with a pointer record to the new sender address record.
+     */
+    if (state->sender_pt_offset < 0)
+       msg_panic("%s: no original sender record offset", myname);
+    if (state->sender_pt_target < 0)
+       msg_panic("%s: no post-sender record offset", myname);
+
+    /*
+     * Allocate space after the end of the queue file, and write the new
+     * sender record, followed by a reverse pointer record that points to the
+     * record that follows the original sender address record. No padding is
+     * needed for a "new" short sender record, since the record is not meant
+     * to be overwritten. When the "new" sender is replaced, we allocate a
+     * new record at the end of the queue file.
+     * 
+     * We update the queue file in a safe manner: save the new sender after the
+     * end of the queue file, write the reverse pointer, and only then
+     * overwrite the old sender record with the forward pointer to the new
+     * sender.
+     */
+    if ((new_sender_offset = vstream_fseek(state->dst, (off_t) 0, SEEK_END)) < 0) {
+       msg_warn("%s: seek file %s: %m", myname, cleanup_path);
+       return (cleanup_milter_error(state, errno));
+    }
+
+    /*
+     * Transform the address from external form to internal form. This also
+     * removes the enclosing <>, if present.
+     * 
+     * XXX vstring_alloc() rejects zero-length requests.
+     */
+    int_sender_buf = vstring_alloc(strlen(ext_from) + 1);
+    tree = tok822_parse(ext_from);
+    for (addr_count = 0, tp = tree; tp != 0; tp = tp->next) {
+       if (tp->type == TOK822_ADDR) {
+           if (addr_count == 0) {
+               tok822_internalize(int_sender_buf, tp->head, TOK822_STR_DEFL);
+               addr_count += 1;
+           } else {
+               msg_warn("%s: Milter request to add multi-sender: \"%s\"",
+                        state->queue_id, ext_from);
+               break;
+           }
+       }
+    }
+    tok822_free_tree(tree);
+    cleanup_addr_sender(state, STR(int_sender_buf));
+    vstring_free(int_sender_buf);
+    cleanup_out_format(state, REC_TYPE_PTR, REC_TYPE_PTR_FORMAT,
+                      (long) state->sender_pt_target);
+
+    /*
+     * Overwrite the original sender record with the pointer to the new
+     * sender address record.
+     */
+    if (vstream_fseek(state->dst, state->sender_pt_offset, SEEK_SET) < 0) {
+       msg_warn("%s: seek file %s: %m", myname, cleanup_path);
+       return (cleanup_milter_error(state, errno));
+    }
+    cleanup_out_format(state, REC_TYPE_PTR, REC_TYPE_PTR_FORMAT,
+                      (long) new_sender_offset);
+
+    /*
+     * In case of error while doing record output.
+     */
+    return (CLEANUP_OUT_OK(state) ? 0 : cleanup_milter_error(state, 0));
+}
+
 /* cleanup_add_rcpt - append recipient address */
 
 static const char *cleanup_add_rcpt(void *context, const char *ext_rcpt)
@@ -1065,6 +1158,20 @@ static const char *cleanup_add_rcpt(void *context, const char *ext_rcpt)
     return (CLEANUP_OUT_OK(state) ? 0 : cleanup_milter_error(state, 0));
 }
 
+/* cleanup_add_rcpt_par - append recipient address, ignore ESMTP arguments */
+
+static const char *cleanup_add_rcpt_par(void *context, const char *ext_rcpt,
+                                               const char *esmtp_args)
+{
+    const char *myname = "cleanup_add_rcpt";
+    CLEANUP_STATE *state = (CLEANUP_STATE *) context;
+
+    if (esmtp_args[0])
+       msg_warn("%s: %s: ignoring ESMTP arguments \"%.100s\"",
+                state->queue_id, myname, esmtp_args);
+    return (cleanup_add_rcpt(context, ext_rcpt));
+}
+
 /* cleanup_del_rcpt - remove recipient and all its expansions */
 
 static const char *cleanup_del_rcpt(void *context, const char *ext_rcpt)
@@ -1366,7 +1473,8 @@ void    cleanup_milter_receive(CLEANUP_STATE *state, int count)
     milter_edit_callback(state->milters,
                         cleanup_add_header, cleanup_upd_header,
                         cleanup_ins_header, cleanup_del_header,
-                        cleanup_add_rcpt, cleanup_del_rcpt,
+                        cleanup_chg_from, cleanup_add_rcpt,
+                        cleanup_add_rcpt_par, cleanup_del_rcpt,
                         cleanup_repl_body, (void *) state);
 }
 
@@ -1399,7 +1507,7 @@ static const char *cleanup_milter_apply(CLEANUP_STATE *state, const char *event,
     switch (resp[0]) {
     case 'H':
        /* XXX Should log the reason here. */
-       if (state->flags & CLEANUP_FLAG_HOLD) 
+       if (state->flags & CLEANUP_FLAG_HOLD)
            return (0);
        state->flags |= CLEANUP_FLAG_HOLD;
        action = "milter-hold";
@@ -1538,7 +1646,8 @@ void    cleanup_milter_emul_mail(CLEANUP_STATE *state,
     milter_edit_callback(milters,
                         cleanup_add_header, cleanup_upd_header,
                         cleanup_ins_header, cleanup_del_header,
-                        cleanup_add_rcpt, cleanup_del_rcpt,
+                        cleanup_chg_from, cleanup_add_rcpt,
+                        cleanup_add_rcpt_par, cleanup_del_rcpt,
                         cleanup_repl_body, (void *) state);
     if (state->client_name == 0)
        cleanup_milter_client_init(state);
@@ -1768,6 +1877,14 @@ static void open_queue_file(CLEANUP_STATE *state, const char *path)
                              cleanup_path, STR(buf));
                state->data_offset = data_offset;
                state->xtra_offset = data_offset + msg_seg_len;
+           } else if (rec_type == REC_TYPE_FROM) {
+               state->sender_pt_offset = curr_offset;
+               if (LEN(buf) < REC_TYPE_PTR_PAYL_SIZE
+                   && rec_get_raw(state->dst, buf, 0, REC_FLAG_NONE) != REC_TYPE_PTR)
+                   msg_fatal("file %s: missing PTR record after short sender",
+                             cleanup_path);
+               if ((state->sender_pt_target = vstream_ftell(state->dst)) < 0)
+                   msg_fatal("file %s: missing END record", cleanup_path);
            } else if (rec_type == REC_TYPE_PTR) {
                if (state->data_offset < 0)
                    msg_fatal("file %s: missing SIZE record", cleanup_path);
@@ -1826,6 +1943,8 @@ int     main(int unused_argc, char **argv)
     int     istty = isatty(vstream_fileno(VSTREAM_IN));
     CLEANUP_STATE *state = cleanup_state_alloc((VSTREAM *) 0);
 
+    state->queue_id = mystrdup("NOQUEUE");
+
     msg_vstream_init(argv[0], VSTREAM_ERR);
     var_line_limit = DEF_LINE_LIMIT;
     var_header_limit = DEF_HEADER_LIMIT;
@@ -1910,12 +2029,24 @@ int     main(int unused_argc, char **argv)
            } else {
                cleanup_del_header(state, index, argv->argv[2]);
            }
+       } else if (strcmp(argv->argv[0], "chg_from") == 0) {
+           if (argv->argc != 3) {
+               msg_warn("bad chg_from argument count: %d", argv->argc);
+           } else {
+               cleanup_chg_from(state, argv->argv[1], argv->argv[2]);
+           }
        } else if (strcmp(argv->argv[0], "add_rcpt") == 0) {
            if (argv->argc != 2) {
                msg_warn("bad add_rcpt argument count: %d", argv->argc);
            } else {
                cleanup_add_rcpt(state, argv->argv[1]);
            }
+       } else if (strcmp(argv->argv[0], "add_rcpt_par") == 0) {
+           if (argv->argc != 3) {
+               msg_warn("bad add_rcpt_par argument count: %d", argv->argc);
+           } else {
+               cleanup_add_rcpt_par(state, argv->argv[1], argv->argv[2]);
+           }
        } else if (strcmp(argv->argv[0], "del_rcpt") == 0) {
            if (argv->argc != 2) {
                msg_warn("bad del_rcpt argument count: %d", argv->argc);
diff --git a/postfix/src/cleanup/cleanup_milter.in13a b/postfix/src/cleanup/cleanup_milter.in13a
new file mode 100644 (file)
index 0000000..ab0f531
--- /dev/null
@@ -0,0 +1,22 @@
+#verbose on
+open test-queue-file13a.tmp
+
+# Add a recipient to a message that was received with "sendmail -t"
+# so that all the recipients are in the extracted queue file segment.
+
+add_rcpt_par me@porcupine.org esmtpstuff
+
+# Delete the recipient added above.
+
+del_rcpt me@porcupine.org
+
+# Add a new recipient, using a different address than above, so that
+# the duplicate filter won't suppress it.
+
+add_rcpt_par em@porcupine.org esmtpstuff
+
+# Delete the recipient.
+
+del_rcpt em@porcupine.org
+
+close
diff --git a/postfix/src/cleanup/cleanup_milter.in13b b/postfix/src/cleanup/cleanup_milter.in13b
new file mode 100644 (file)
index 0000000..04ef9e2
--- /dev/null
@@ -0,0 +1,8 @@
+#verbose on
+open test-queue-file13b.tmp
+
+# Change the sender.
+
+chg_from m@porcupine.org esmtpstuff
+
+close
diff --git a/postfix/src/cleanup/cleanup_milter.in13c b/postfix/src/cleanup/cleanup_milter.in13c
new file mode 100644 (file)
index 0000000..8bfa292
--- /dev/null
@@ -0,0 +1,9 @@
+#verbose on
+open test-queue-file13c.tmp
+
+# Change the sender.
+
+chg_from m@porcupine.org esmtpstuff
+chg_from n@porcupine.org esmtpstuff
+
+close
diff --git a/postfix/src/cleanup/cleanup_milter.in13d b/postfix/src/cleanup/cleanup_milter.in13d
new file mode 100644 (file)
index 0000000..da673fe
--- /dev/null
@@ -0,0 +1,9 @@
+#verbose on
+open test-queue-file13d.tmp
+
+# Change the null sender, to test correct padding of short sender records. 
+
+chg_from m@porcupine.org esmtpstuff
+chg_from n@porcupine.org esmtpstuff
+
+close
index 7eba2f3ceecbf046dba7c20918e9223de51b79b3..f8be5d4f8437e0e572e303d21a64e25a4e0dc9bd 100644 (file)
@@ -1,60 +1,66 @@
 *** ENVELOPE RECORDS test-queue-file11.tmp ***
-        0 message_size:             358             480               1               0             358
-       81 message_arrival_time: Thu Jan 18 15:15:42 2007
-      100 create_time: Thu Jan 18 15:15:48 2007
+        0 message_size:             366             605               1               0             366
+       81 message_arrival_time: Mon Apr 27 20:41:30 2009
+      100 create_time: Mon Apr 27 20:41:41 2009
       124 named_attribute: rewrite_context=local
       147 sender: 
-      149 named_attribute: log_client_name=localhost
-      176 named_attribute: log_client_address=127.0.0.1
-      206 named_attribute: log_message_origin=localhost[127.0.0.1]
-      247 named_attribute: log_protocol_name=SMTP
-      271 named_attribute: client_name=localhost
-      294 named_attribute: reverse_client_name=localhost
-      325 named_attribute: client_address=127.0.0.1
-      351 named_attribute: client_address_type=2
-      374 named_attribute: dsn_orig_rcpt=rfc822;wietse@localhost
-      413 original_recipient: wietse@localhost
-      431 recipient: wietse@localhost.example.com
-      461 pointer_record:               0
-      478 *** MESSAGE CONTENTS test-queue-file11.tmp ***
-      480 regular_text: Received: from localhost (localhost [127.0.0.1])
-      530 regular_text:        by foo.example.com (Postfix) with SMTP id 2ADF9290403
-      586 regular_text:        for <wietse@localhost>; Thu, 18 Jan 2007 15:15:42 -0500 (EST)
-      650 regular_text: Message-Id: <20070118201548.2ADF9290403@foo.example.com>
-      708 regular_text: Date: Thu, 18 Jan 2007 15:15:42 -0500 (EST)
-      753 regular_text: From: MAILER-DAEMON
-      774 regular_text: To: undisclosed-recipients:;
-      804 pointer_record:             821
-      821 pointer_record:             842
-      842 regular_text: 
-      844 regular_text: Sed ut perspiciatis unde omnis iste natus error sit voluptatem\r
-      909 regular_text: accusantium doloremque laudantium, totam rem aperiam, eaque ipsa\r
-      976 regular_text: quae ab illo inventore veritatis et quasi architecto beatae vitae\r
-     1044 regular_text: dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit\r
-     1113 regular_text: aspernatur aut odit aut fugit, sed quia consequuntur magni dolores\r
-     1182 regular_text: eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam\r
-     1248 regular_text: est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci\r
-     1316 regular_text: velit, sed quia non numquam eius modi tempora incidunt ut labore\r
-     1383 regular_text: et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima\r
-     1448 regular_text: veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam,\r
-     1522 regular_text: nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure\r
-     1591 regular_text: reprehenderit qui in ea voluptate velit esse quam nihil molestiae\r
-     1659 regular_text: consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla\r
-     1726 regular_text: pariatur?\r
-     1738 regular_text: \r
-     1741 regular_text: At vero eos et accusamus et iusto odio dignissimos ducimus qui\r
-     1806 regular_text: blanditiis praesentium voluptatum deleniti atque corrupti quos\r
-     1871 regular_text: dolores et quas molestias excepturi sint occaecati cupiditate non\r
-     1939 regular_text: provident, similique sunt in culpa qui officia deserunt mollitia\r
-     2006 regular_text: animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis\r
-     2077 regular_text: est et expedita distinctio. Nam libero tempore, cum soluta nobis\r
-     2144 regular_text: est eligendi optio cumque nihil impedit quo minus id quod maxime\r
-     2211 regular_text: placeat facere possimus, omnis voluptas assumenda est, omnis dolor\r
-     2280 regular_text: repellendus. Temporibus autem quibusdam et aut officiis debitis aut\r
-     2350 regular_text: rerum necessitatibus saepe eveniet ut et voluptates repudiandae\r
-     2416 regular_text: sint et molestiae non recusandae. Itaque earum rerum hic tenetur a\r
-     2485 regular_text: sapiente delectus, ut aut reiciendis voluptatibus maiores alias\r
-     2551 regular_text: consequatur aut perferendis doloribus asperiores repellat.\r
-     2612 pointer_record:             838
-      838 *** HEADER EXTRACTED test-queue-file11.tmp ***
-      840 *** MESSAGE FILE END test-queue-file11.tmp ***
+      149 pointer_record:             0
+      164 named_attribute: log_client_name=localhost
+      191 named_attribute: log_client_address=127.0.0.1
+      221 named_attribute: log_client_port=51286
+      244 named_attribute: log_message_origin=localhost[127.0.0.1]
+      285 named_attribute: log_helo_name=localhost
+      310 named_attribute: log_protocol_name=SMTP
+      334 named_attribute: client_name=localhost
+      357 named_attribute: reverse_client_name=localhost
+      388 named_attribute: client_address=127.0.0.1
+      414 named_attribute: client_port=51286
+      433 named_attribute: helo_name=localhost
+      454 named_attribute: protocol_name=SMTP
+      474 named_attribute: client_address_type=2
+      497 named_attribute: dsn_orig_rcpt=rfc822;wietse@localhost
+      536 original_recipient: wietse@localhost
+      554 recipient: wietse@localhost.porcupine.org
+      586 pointer_record:               0
+      603 *** MESSAGE CONTENTS test-queue-file11.tmp ***
+      605 regular_text: Received: from localhost (localhost [127.0.0.1])
+      655 regular_text:        by hades.porcupine.org (Postfix) with SMTP id 382B12B3292
+      715 regular_text:        for <wietse@localhost>; Mon, 27 Apr 2009 20:41:30 -0400 (EDT)
+      779 regular_text: Message-Id: <20090428004141.382B12B3292@hades.porcupine.org>
+      841 regular_text: Date: Mon, 27 Apr 2009 20:41:30 -0400 (EDT)
+      886 regular_text: From: MAILER-DAEMON
+      907 regular_text: To: undisclosed-recipients:;
+      937 pointer_record:             954
+      954 pointer_record:             975
+      975 regular_text: 
+      977 regular_text: Sed ut perspiciatis unde omnis iste natus error sit voluptatem\r
+     1042 regular_text: accusantium doloremque laudantium, totam rem aperiam, eaque ipsa\r
+     1109 regular_text: quae ab illo inventore veritatis et quasi architecto beatae vitae\r
+     1177 regular_text: dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit\r
+     1246 regular_text: aspernatur aut odit aut fugit, sed quia consequuntur magni dolores\r
+     1315 regular_text: eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam\r
+     1381 regular_text: est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci\r
+     1449 regular_text: velit, sed quia non numquam eius modi tempora incidunt ut labore\r
+     1516 regular_text: et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima\r
+     1581 regular_text: veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam,\r
+     1655 regular_text: nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure\r
+     1724 regular_text: reprehenderit qui in ea voluptate velit esse quam nihil molestiae\r
+     1792 regular_text: consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla\r
+     1859 regular_text: pariatur?\r
+     1871 regular_text: \r
+     1874 regular_text: At vero eos et accusamus et iusto odio dignissimos ducimus qui\r
+     1939 regular_text: blanditiis praesentium voluptatum deleniti atque corrupti quos\r
+     2004 regular_text: dolores et quas molestias excepturi sint occaecati cupiditate non\r
+     2072 regular_text: provident, similique sunt in culpa qui officia deserunt mollitia\r
+     2139 regular_text: animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis\r
+     2210 regular_text: est et expedita distinctio. Nam libero tempore, cum soluta nobis\r
+     2277 regular_text: est eligendi optio cumque nihil impedit quo minus id quod maxime\r
+     2344 regular_text: placeat facere possimus, omnis voluptas assumenda est, omnis dolor\r
+     2413 regular_text: repellendus. Temporibus autem quibusdam et aut officiis debitis aut\r
+     2483 regular_text: rerum necessitatibus saepe eveniet ut et voluptates repudiandae\r
+     2549 regular_text: sint et molestiae non recusandae. Itaque earum rerum hic tenetur a\r
+     2618 regular_text: sapiente delectus, ut aut reiciendis voluptatibus maiores alias\r
+     2684 regular_text: consequatur aut perferendis doloribus asperiores repellat.\r
+     2745 pointer_record:             971
+      971 *** HEADER EXTRACTED test-queue-file11.tmp ***
+      973 *** MESSAGE FILE END test-queue-file11.tmp ***
diff --git a/postfix/src/cleanup/cleanup_milter.ref13a b/postfix/src/cleanup/cleanup_milter.ref13a
new file mode 100644 (file)
index 0000000..8a1d610
--- /dev/null
@@ -0,0 +1,33 @@
+*** ENVELOPE RECORDS test-queue-file13a.tmp ***
+        0 message_size:             332             182               1               0             332
+       81 message_arrival_time: Sun Jan 21 13:32:59 2007
+      100 create_time: Sun Jan 21 13:33:08 2007
+      124 named_attribute: rewrite_context=local
+      147 sender_fullname: Wietse Venema
+      162 sender: me@porcupine.org
+      180 *** MESSAGE CONTENTS test-queue-file13a.tmp ***
+      182 regular_text: Received: by hades.porcupine.org (Postfix, from userid 1001)
+      244 regular_text:        id DE040290405; Sun, 21 Jan 2007 13:33:08 -0500 (EST)
+      300 regular_text: From: me@porcupine.org
+      324 regular_text: To: you@porcupine.org
+      347 regular_text: Message-Id: <20060725192735.5EC2D29013F@hades.porcupine.org>
+      409 regular_text: Date: Tue, 25 Jul 2006 15:27:19 -0400 (EDT)
+      454 regular_text: Subject: hey!
+      469 padding: 0
+      472 pointer_record:               0
+      489 regular_text: 
+      491 regular_text: text
+      497 pointer_record:               0
+      514 *** HEADER EXTRACTED test-queue-file13a.tmp ***
+      516 original_recipient: you@porcupine.org
+      535 recipient: you@porcupine.org
+      554 pointer_record:             573
+      573 named_attribute: notify_flags=1
+      589 original_recipient: me@porcupine.org
+      607 canceled_recipient: me@porcupine.org
+      625 pointer_record:             642
+      642 named_attribute: notify_flags=1
+      658 original_recipient: em@porcupine.org
+      676 canceled_recipient: em@porcupine.org
+      694 pointer_record:             571
+      571 *** MESSAGE FILE END test-queue-file13a.tmp ***
diff --git a/postfix/src/cleanup/cleanup_milter.ref13b b/postfix/src/cleanup/cleanup_milter.ref13b
new file mode 100644 (file)
index 0000000..bb55fb6
--- /dev/null
@@ -0,0 +1,27 @@
+*** ENVELOPE RECORDS test-queue-file13b.tmp ***
+        0 message_size:             332             182               1               0             332
+       81 message_arrival_time: Sun Jan 21 13:32:59 2007
+      100 create_time: Sun Jan 21 13:33:08 2007
+      124 named_attribute: rewrite_context=local
+      147 sender_fullname: Wietse Venema
+      162 pointer_record:             573
+      573 sender: m@porcupine.org
+      590 pointer_record:             180
+      180 *** MESSAGE CONTENTS test-queue-file13b.tmp ***
+      182 regular_text: Received: by hades.porcupine.org (Postfix, from userid 1001)
+      244 regular_text:        id DE040290405; Sun, 21 Jan 2007 13:33:08 -0500 (EST)
+      300 regular_text: From: me@porcupine.org
+      324 regular_text: To: you@porcupine.org
+      347 regular_text: Message-Id: <20060725192735.5EC2D29013F@hades.porcupine.org>
+      409 regular_text: Date: Tue, 25 Jul 2006 15:27:19 -0400 (EDT)
+      454 regular_text: Subject: hey!
+      469 padding: 0
+      472 pointer_record:               0
+      489 regular_text: 
+      491 regular_text: text
+      497 pointer_record:               0
+      514 *** HEADER EXTRACTED test-queue-file13b.tmp ***
+      516 original_recipient: you@porcupine.org
+      535 recipient: you@porcupine.org
+      554 pointer_record:               0
+      571 *** MESSAGE FILE END test-queue-file13b.tmp ***
diff --git a/postfix/src/cleanup/cleanup_milter.ref13c b/postfix/src/cleanup/cleanup_milter.ref13c
new file mode 100644 (file)
index 0000000..17df1b8
--- /dev/null
@@ -0,0 +1,27 @@
+*** ENVELOPE RECORDS test-queue-file13c.tmp ***
+        0 message_size:             332             182               1               0             332
+       81 message_arrival_time: Sun Jan 21 13:32:59 2007
+      100 create_time: Sun Jan 21 13:33:08 2007
+      124 named_attribute: rewrite_context=local
+      147 sender_fullname: Wietse Venema
+      162 pointer_record:             607
+      607 sender: n@porcupine.org
+      624 pointer_record:             180
+      180 *** MESSAGE CONTENTS test-queue-file13c.tmp ***
+      182 regular_text: Received: by hades.porcupine.org (Postfix, from userid 1001)
+      244 regular_text:        id DE040290405; Sun, 21 Jan 2007 13:33:08 -0500 (EST)
+      300 regular_text: From: me@porcupine.org
+      324 regular_text: To: you@porcupine.org
+      347 regular_text: Message-Id: <20060725192735.5EC2D29013F@hades.porcupine.org>
+      409 regular_text: Date: Tue, 25 Jul 2006 15:27:19 -0400 (EDT)
+      454 regular_text: Subject: hey!
+      469 padding: 0
+      472 pointer_record:               0
+      489 regular_text: 
+      491 regular_text: text
+      497 pointer_record:               0
+      514 *** HEADER EXTRACTED test-queue-file13c.tmp ***
+      516 original_recipient: you@porcupine.org
+      535 recipient: you@porcupine.org
+      554 pointer_record:               0
+      571 *** MESSAGE FILE END test-queue-file13c.tmp ***
diff --git a/postfix/src/cleanup/cleanup_milter.ref13d b/postfix/src/cleanup/cleanup_milter.ref13d
new file mode 100644 (file)
index 0000000..9820162
--- /dev/null
@@ -0,0 +1,37 @@
+*** ENVELOPE RECORDS test-queue-file13d.tmp ***
+        0 message_size:             366             605               1               0             366
+       81 message_arrival_time: Mon Apr 27 20:41:30 2009
+      100 create_time: Mon Apr 27 20:41:41 2009
+      124 named_attribute: rewrite_context=local
+      147 pointer_record:            1009
+     1009 sender: n@porcupine.org
+     1026 pointer_record:             164
+      164 named_attribute: log_client_name=localhost
+      191 named_attribute: log_client_address=127.0.0.1
+      221 named_attribute: log_client_port=51286
+      244 named_attribute: log_message_origin=localhost[127.0.0.1]
+      285 named_attribute: log_helo_name=localhost
+      310 named_attribute: log_protocol_name=SMTP
+      334 named_attribute: client_name=localhost
+      357 named_attribute: reverse_client_name=localhost
+      388 named_attribute: client_address=127.0.0.1
+      414 named_attribute: client_port=51286
+      433 named_attribute: helo_name=localhost
+      454 named_attribute: protocol_name=SMTP
+      474 named_attribute: client_address_type=2
+      497 named_attribute: dsn_orig_rcpt=rfc822;wietse@localhost
+      536 original_recipient: wietse@localhost
+      554 recipient: wietse@localhost.porcupine.org
+      586 pointer_record:               0
+      603 *** MESSAGE CONTENTS test-queue-file13d.tmp ***
+      605 regular_text: Received: from localhost (localhost [127.0.0.1])
+      655 regular_text:        by hades.porcupine.org (Postfix) with SMTP id 382B12B3292
+      715 regular_text:        for <wietse@localhost>; Mon, 27 Apr 2009 20:41:30 -0400 (EDT)
+      779 regular_text: Message-Id: <20090428004141.382B12B3292@hades.porcupine.org>
+      841 regular_text: Date: Mon, 27 Apr 2009 20:41:30 -0400 (EDT)
+      886 regular_text: From: MAILER-DAEMON
+      907 regular_text: To: undisclosed-recipients:;
+      937 pointer_record:               0
+      954 pointer_record:               0
+      971 *** HEADER EXTRACTED test-queue-file13d.tmp ***
+      973 *** MESSAGE FILE END test-queue-file13d.tmp ***
index ea8b13b1199faaecbb2e0d70f68de4e743d49e21..7ce732cd2724a82d340f358f69904f860d9af58c 100644 (file)
@@ -91,6 +91,8 @@ CLEANUP_STATE *cleanup_state_alloc(VSTREAM *src)
     state->body_offset = -1;
     state->xtra_offset = -1;
     state->cont_length = 0;
+    state->sender_pt_offset = -1;
+    state->sender_pt_target = -1;
     state->append_rcpt_pt_offset = -1;
     state->append_rcpt_pt_target = -1;
     state->append_hdr_pt_offset = -1;
index 440f31640a3c62d51358ca6d8dda7512582bc29e..745dc90aedb3da000dc2ba276a96c3a6903ae1e9 100644 (file)
Binary files a/postfix/src/cleanup/test-queue-file11 and b/postfix/src/cleanup/test-queue-file11 differ
diff --git a/postfix/src/cleanup/test-queue-file13a b/postfix/src/cleanup/test-queue-file13a
new file mode 100644 (file)
index 0000000..4979c1d
Binary files /dev/null and b/postfix/src/cleanup/test-queue-file13a differ
diff --git a/postfix/src/cleanup/test-queue-file13b b/postfix/src/cleanup/test-queue-file13b
new file mode 100644 (file)
index 0000000..4979c1d
Binary files /dev/null and b/postfix/src/cleanup/test-queue-file13b differ
diff --git a/postfix/src/cleanup/test-queue-file13c b/postfix/src/cleanup/test-queue-file13c
new file mode 100644 (file)
index 0000000..4979c1d
Binary files /dev/null and b/postfix/src/cleanup/test-queue-file13c differ
diff --git a/postfix/src/cleanup/test-queue-file13d b/postfix/src/cleanup/test-queue-file13d
new file mode 100644 (file)
index 0000000..745dc90
Binary files /dev/null and b/postfix/src/cleanup/test-queue-file13d differ
index 528824170a8d4f1c23d2736c0dee152edabeb347..a93a3e69872b260c98bc02c6fe9bed439e03e4fc 100644 (file)
 /*     the internal_mail_filter_classes configuration parameter.
 /*
 /*     Specify one of the following:
-/* .IP INT_FILT_NONE
+/* .IP INT_FILT_MASK_NONE
 /*     Mail that must be excluded from inspection (address probes, etc.).
-/* .IP INT_FILT_NOTIFY
+/* .IP INT_FILT_MASK_NOTIFY
 /*     Postmaster notifications from the smtpd(8) and smtp(8)
 /*     protocol adapters.
-/* .IP INT_FILT_BOUNCE
+/* .IP INT_FILT_MASK_BOUNCE
 /*     Delivery status notifications from the bounce(8) server.
 /* DIAGNOSTICS
 /*     Fatal: invalid mail category name.
@@ -54,8 +54,8 @@
 int     int_filt_flags(int class)
 {
     static const NAME_MASK table[] = {
-       "notify", INT_FILT_NOTIFY,
-       "bounce", INT_FILT_BOUNCE,
+       INT_FILT_CLASS_NOTIFY, INT_FILT_MASK_NOTIFY,
+       INT_FILT_CLASS_BOUNCE, INT_FILT_MASK_BOUNCE,
        0,
     };
     int     filtered_classes = 0;
index 932fe3c3b7711c5673d0a5ba5dc95f87596eaa6f..a85d62d41606e49d71d087c1a2ba5d3ca0479c36 100644 (file)
@@ -14,9 +14,9 @@
  /*
   * External interface.
   */
-#define INT_FILT_NONE          (0)
-#define INT_FILT_NOTIFY                (1<<1)
-#define INT_FILT_BOUNCE                (1<<2)
+#define INT_FILT_MASK_NONE             (0)
+#define INT_FILT_MASK_NOTIFY           (1<<1)
+#define INT_FILT_MASK_BOUNCE           (1<<2)
 
 extern int int_filt_flags(int);
 
index 6ab988d57af1fbbe2421177b0596d8aa62d24364..e2498fef35162a6d7ea8f59cd5444159bf8f31cd 100644 (file)
@@ -2967,7 +2967,7 @@ extern int var_milt_cmd_time;
 extern int var_milt_msg_time;
 
 #define VAR_MILT_PROTOCOL              "milter_protocol"
-#define DEF_MILT_PROTOCOL              "2"
+#define DEF_MILT_PROTOCOL              "6"
 extern char *var_milt_protocol;
 
 #define VAR_MILT_DEF_ACTION            "milter_default_action"
@@ -2986,8 +2986,12 @@ extern char *var_milt_v;
   * What internal mail do we inspect/stamp/etc.? This is not yet safe enough
   * to enable world-wide.
   */
+#define INT_FILT_CLASS_NONE            ""
+#define INT_FILT_CLASS_NOTIFY          "notify"
+#define INT_FILT_CLASS_BOUNCE          "bounce"
+
 #define VAR_INT_FILT_CLASSES           "internal_mail_filter_classes"
-#define DEF_INT_FILT_CLASSES           ""
+#define DEF_INT_FILT_CLASSES           INT_FILT_CLASS_NONE
 extern char *var_int_filt_classes;
 
  /*
index f0cc339ff9a1a3a1a050ff1c55ea6fe60b42b5e5..bde7920174368ba7b4c93dd2b5f50686d1839bf5 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      "20090427"
+#define MAIL_RELEASE_DATE      "20090428"
 #define MAIL_VERSION_NUMBER    "2.7"
 
 #ifdef SNAPSHOT
index ebbf47d38e7bebfeeb82c0d53ecbe78b59f90928..fecd182934bd8009cb51393c4e9039f81c2e9f6a 100644 (file)
 /*     ~\fIname\fR/.\fBforward\fR+\fIfoo\fR or in ~\fIname\fR/.\fBforward\fR,
 /*     to the mailbox owned by the user \fIname\fR, or it is sent back as
 /*     undeliverable.
-/*
-/*     In all cases the \fBlocal\fR(8) daemon prepends an optional
-/*     `\fBDelivered-To:\fR header line with the final recipient
-/*     address.
 /* DELIVERY RIGHTS
 /* .ad
 /* .fi
index afd227e12fb45873dc7d8758e63222475808b46e..5ec67324883282628a804dd15879c2df9087a186 100644 (file)
 /*     void    *mac_context;
 /*
 /*     void    milter_edit_callback(milters, add_header, upd_header,
-/*                                     ins_header, del_header, add_rcpt,
-/*                                     del_rcpt, repl_body, context)
+/*                                     ins_header, del_header, chg_from,
+/*                                     add_rcpt, add_rcpt_par, del_rcpt,
+/*                                     repl_body, context)
 /*     MILTERS *milters;
 /*     MILTER_ADD_HEADER_FN add_header;
 /*     MILTER_EDIT_HEADER_FN upd_header;
 /*     MILTER_EDIT_HEADER_FN ins_header;
 /*     MILTER_DEL_HEADER_FN del_header;
+/*     MILTER_EDIT_FROM_FN chg_from;
 /*     MILTER_EDIT_RCPT_FN add_rcpt;
+/*     MILTER_EDIT_RCPT_PAR_FN add_rcpt_par;
 /*     MILTER_EDIT_RCPT_FN del_rcpt;
 /*     MILTER_EDIT_BODY_FN repl_body;
 /*     void    *context;
 /*
 /*     The functions that inspect content or envelope commands
 /*     return either an SMTP reply ([45]XX followed by enhanced
-/*     status code and text), "D" (discard), "H" (quarantine), 
+/*     status code and text), "D" (discard), "H" (quarantine),
 /*     "S" (shutdown connection), or a null pointer, which means
 /*     "no news is good news".
 /*
@@ -294,7 +297,9 @@ void    milter_edit_callback(MILTERS *milters,
                                     MILTER_EDIT_HEADER_FN upd_header,
                                     MILTER_EDIT_HEADER_FN ins_header,
                                     MILTER_DEL_HEADER_FN del_header,
+                                    MILTER_EDIT_FROM_FN chg_from,
                                     MILTER_EDIT_RCPT_FN add_rcpt,
+                                    MILTER_EDIT_RCPT_PAR_FN add_rcpt_par,
                                     MILTER_EDIT_RCPT_FN del_rcpt,
                                     MILTER_EDIT_BODY_FN repl_body,
                                     void *chg_context)
@@ -303,7 +308,9 @@ void    milter_edit_callback(MILTERS *milters,
     milters->upd_header = upd_header;
     milters->ins_header = ins_header;
     milters->del_header = del_header;
+    milters->chg_from = chg_from;
     milters->add_rcpt = add_rcpt;
+    milters->add_rcpt_par = add_rcpt_par;
     milters->del_rcpt = del_rcpt;
     milters->repl_body = repl_body;
     milters->chg_context = chg_context;
index e2cf65ce5b7276afe1508e60b72c7fcd9e5fd9b2..17d163dc42a3d0c42bea40736e5c087b6b0d56d5 100644 (file)
@@ -91,7 +91,9 @@ typedef const char *(*MILTER_MAC_LOOKUP_FN) (const char *, void *);
 typedef const char *(*MILTER_ADD_HEADER_FN) (void *, const char *, const char *, const char *);
 typedef const char *(*MILTER_EDIT_HEADER_FN) (void *, ssize_t, const char *, const char *, const char *);
 typedef const char *(*MILTER_DEL_HEADER_FN) (void *, ssize_t, const char *);
+typedef const char *(*MILTER_EDIT_FROM_FN) (void *, const char *, const char *);
 typedef const char *(*MILTER_EDIT_RCPT_FN) (void *, const char *);
+typedef const char *(*MILTER_EDIT_RCPT_PAR_FN) (void *, const char *, const char *);
 typedef const char *(*MILTER_EDIT_BODY_FN) (void *, int, VSTRING *);
 
 typedef struct MILTERS {
@@ -104,7 +106,9 @@ typedef struct MILTERS {
     MILTER_EDIT_HEADER_FN upd_header;
     MILTER_DEL_HEADER_FN del_header;
     MILTER_EDIT_HEADER_FN ins_header;
+    MILTER_EDIT_FROM_FN chg_from;
     MILTER_EDIT_RCPT_FN add_rcpt;
+    MILTER_EDIT_RCPT_PAR_FN add_rcpt_par;
     MILTER_EDIT_RCPT_FN del_rcpt;
     MILTER_EDIT_BODY_FN repl_body;
 } MILTERS;
@@ -123,7 +127,8 @@ extern MILTERS *milter_new(const char *, int, int, int, const char *,
 extern void milter_macro_callback(MILTERS *, MILTER_MAC_LOOKUP_FN, void *);
 extern void milter_edit_callback(MILTERS *milters, MILTER_ADD_HEADER_FN,
                               MILTER_EDIT_HEADER_FN, MILTER_EDIT_HEADER_FN,
-                                 MILTER_DEL_HEADER_FN, MILTER_EDIT_RCPT_FN,
+                                 MILTER_DEL_HEADER_FN, MILTER_EDIT_FROM_FN,
+                              MILTER_EDIT_RCPT_FN, MILTER_EDIT_RCPT_PAR_FN,
                                   MILTER_EDIT_RCPT_FN, MILTER_EDIT_BODY_FN,
                                         void *);
 extern const char *milter_conn_event(MILTERS *, const char *, const char *, const char *, unsigned);
index 9c8d44663abfe01baa7262bfe7ed05d0fcb7ca53..1c437e8c7dcc604b5770999cec1a2f1edd375ce3 100644 (file)
@@ -1412,6 +1412,30 @@ static const char *milter8_event(MILTER8 *milter, int event,
                                                   STR(milter->body));
                    continue;
 
+                   /*
+                    * Modification request: replace sender, with optional
+                    * ESMTP args.
+                    */
+               case SMFIR_CHGFROM:
+                   if (milter8_read_data(milter, &data_size,
+                                         MILTER8_DATA_STRING, milter->buf,
+                                         MILTER8_DATA_MORE) != 0)
+                       MILTER8_EVENT_BREAK(milter->def_reply);
+                   if (data_size > 0) {
+                       if (milter8_read_data(milter, &data_size,
+                                         MILTER8_DATA_STRING, milter->body,
+                                             MILTER8_DATA_END) != 0)
+                           MILTER8_EVENT_BREAK(milter->def_reply);
+                   } else
+                       STR(milter->body)[0] = 0;
+                   /* Skip to the next request after previous edit error. */
+                   if (edit_resp)
+                       continue;
+                   edit_resp = parent->chg_from(parent->chg_context,
+                                                STR(milter->buf),
+                                                STR(milter->body));
+                   continue;
+
                    /*
                     * Modification request: append recipient.
                     */
@@ -1427,6 +1451,30 @@ static const char *milter8_event(MILTER8 *milter, int event,
                                                 STR(milter->buf));
                    continue;
 
+                   /*
+                    * Modification request: append recipient, with optional
+                    * ESMTP args.
+                    */
+               case SMFIR_ADDRCPT_PAR:
+                   if (milter8_read_data(milter, &data_size,
+                                         MILTER8_DATA_STRING, milter->buf,
+                                         MILTER8_DATA_MORE) != 0)
+                       MILTER8_EVENT_BREAK(milter->def_reply);
+                   if (data_size > 0) {
+                       if (milter8_read_data(milter, &data_size,
+                                         MILTER8_DATA_STRING, milter->body,
+                                             MILTER8_DATA_END) != 0)
+                           MILTER8_EVENT_BREAK(milter->def_reply);
+                   } else
+                       STR(milter->body)[0] = 0;
+                   /* Skip to the next request after previous edit error. */
+                   if (edit_resp)
+                       continue;
+                   edit_resp = parent->add_rcpt_par(parent->chg_context,
+                                                    STR(milter->buf),
+                                                    STR(milter->body));
+                   continue;
+
                    /*
                     * Modification request: delete (expansion of) recipient.
                     */
@@ -1542,10 +1590,8 @@ static void milter8_connect(MILTER8 *milter)
                                    | SMFIF_DELRCPT | SMFIF_CHGHDRS
                                    | SMFIF_CHGBODY
                                    | SMFIF_QUARANTINE
-#if 0
                                    | SMFIF_CHGFROM
                                    | SMFIF_ADDRCPT_PAR
-#endif
                                    | SMFIF_SETSYMLIST
     );
     UINT32_TYPE my_version = 0;
index 442a69cce90fba7084ef63bbf71ec0dc8ebdbdb5..9e50729946a4e5660819ead56ce725b73473865e 100644 (file)
 /* .IP "\fB-c connect|helo|mail|rcpt|data|header|eoh|body|eom|unknown|close|abort\fR"
 /*     When to send the non-default reply specified with \fB-a\fR.
 /*     The default protocol stage is \fBconnect\fR.
-/* .IP "\fB-d\fI level\fR"
-/*     Enable libmilter debugging at the specified level.
 /* .IP "\fB-C\fI count\fR"
 /*     Terminate after \fIcount\fR connections.
+/* .IP "\fB-d\fI level\fR"
+/*     Enable libmilter debugging at the specified level.
+/* .IP "\fB-f \fIsender\fR
+/*     Replace the sender by the specified address.
 /* .IP "\fB-h \fI'index header-label header-value'\fR"
 /*     Replace the message header at the specified position.
 /* .IP "\fB-i \fI'index header-label header-value'\fR"
@@ -132,6 +134,11 @@ static char *reply_code;
 static char *reply_dsn;
 static char *reply_message;
 
+#ifdef SMFIR_CHGFROM
+static char *chg_from;
+
+#endif
+
 #ifdef SMFIR_INSHEADER
 static char *ins_hdr;
 static int ins_idx;
@@ -194,7 +201,7 @@ static int test_reply(SMFICTX *ctx, int code)
     for (cpp = macro_names; *cpp; cpp++)
        if ((symval = smfi_getsymval(ctx, (char *) *cpp)) != 0)
            printf("macro: %s=\"%s\"\n", *cpp, symval);
-    (void) fflush(stdout);             /* In case output redirected. */
+    (void) fflush(stdout);                     /* In case output redirected. */
 
     if (code == SMFIR_REPLYCODE) {
        if (smfi_setmlreply(ctx, reply_code, reply_dsn, reply_message, reply_message, (char *) 0) == MI_FAILURE)
@@ -332,6 +339,12 @@ static sfsistat test_eom(SMFICTX *ctx)
        }
     }
 #endif
+#ifdef SMFIR_CHGFROM
+    if (chg_from != 0 && smfi_chgfrom(ctx, chg_from, "whatever") == MI_FAILURE)
+       fprintf(stderr, "smfi_chgfrom failed\n");
+    else
+       printf("smfi_chgfrom OK\n");
+#endif
 #ifdef SMFIR_INSHEADER
     if (ins_hdr && smfi_insheader(ctx, ins_idx, ins_hdr, ins_val) == MI_FAILURE)
        fprintf(stderr, "smfi_insheader failed\n");
@@ -395,7 +408,7 @@ static struct smfiDesc smfilter =
 {
     "test-milter",
     SMFI_VERSION,
-    SMFIF_ADDRCPT | SMFIF_DELRCPT | SMFIF_ADDHDRS | SMFIF_CHGHDRS | SMFIF_CHGBODY,
+    SMFIF_ADDRCPT | SMFIF_DELRCPT | SMFIF_ADDHDRS | SMFIF_CHGHDRS | SMFIF_CHGBODY | SMFIF_CHGFROM,
     test_connect,
     test_helo,
     test_mail,
@@ -517,7 +530,7 @@ int     main(int argc, char **argv)
     char   *noreply = 0;
     const struct noproto_map *np;
 
-    while ((ch = getopt(argc, argv, "a:A:b:c:C:d:h:i:lm:M:n:N:p:rv")) > 0) {
+    while ((ch = getopt(argc, argv, "a:A:b:c:C:d:f:h:i:lm:M:n:N:p:rv")) > 0) {
        switch (ch) {
        case 'a':
            action = optarg;
@@ -549,6 +562,18 @@ int     main(int argc, char **argv)
                exit(1);
            }
            break;
+       case 'f':
+#ifdef SMFIR_CHGFROM
+           if (chg_from) {
+               fprintf(stderr, "too many -f options\n");
+               exit(1);
+           }
+           chg_from = optarg;
+#else
+           fprintf(stderr, "no libmilter support to change sender\n");
+           exit(1);
+#endif
+           break;
        case 'h':
 #ifdef SMFIR_CHGHEADER
            if (chg_hdr) {
@@ -662,7 +687,7 @@ int     main(int argc, char **argv)
                    "\t[-n events]              don't receive these events\n"
                  "\t[-N events]                don't reply to these events\n"
                    "\t-p port                  milter application\n"
-                   "\t-r                       request rejected recipients\n"
+                 "\t-r                       request rejected recipients\n"
                    "\t[-C conn_count]          when to exit\n",
                    argv[0]);
            exit(1);
index 9bb4aca405739fd48a0f548f0d0e7675fa7e2fa0..e13b54568a3e1ea3408664dffda7cc5766ecda7e 100644 (file)
@@ -407,7 +407,7 @@ void    smtp_chat_notify(SMTP_SESSION *session)
 
     notice = post_mail_fopen_nowait(mail_addr_double_bounce(),
                                    var_error_rcpt,
-                                   INT_FILT_NOTIFY,
+                                   INT_FILT_MASK_NOTIFY,
                                    NULL_TRACE_FLAGS, NO_QUEUE_ID);
     if (notice == 0) {
        msg_warn("postmaster notify: %m");
index 86a3d5a8e91fe81d97c95ac07ae257999290b059..c74b5fbce035cbe925641521f535c7bdd9642eeb 100644 (file)
@@ -1753,12 +1753,15 @@ static int smtp_loop(SMTP_STATE *state, NOCLOBBER int send_state,
                 * XXX Don't downgrade just because generic_maps is turned
                 * on.
                 */
-               if (downgrading || smtp_generic_maps || smtp_header_checks
-                   || smtp_body_checks)
+#define SMTP_ANY_CHECKS (smtp_header_checks || smtp_body_checks)
+
+               if (downgrading || smtp_generic_maps || SMTP_ANY_CHECKS)
                    session->mime_state = mime_state_alloc(downgrading ?
                                                           MIME_OPT_DOWNGRADE
                                                 | MIME_OPT_REPORT_NESTING :
-                                                     MIME_OPT_DISABLE_MIME,
+                                                     SMTP_ANY_CHECKS == 0 ?
+                                                    MIME_OPT_DISABLE_MIME :
+                                                          0,
                                                           smtp_generic_maps
                                                     || smtp_header_checks ?
                                                       smtp_header_rewrite :
index 6078d84ea4d76eee4775d5731099e49ad6b9f781..33c6b927ad33b377f446de8da2829282c20ded95 100644 (file)
 /* .IP "\fBsmtpd_milters (empty)\fR"
 /*     A list of Milter (mail filter) applications for new mail that
 /*     arrives via the Postfix \fBsmtpd\fR(8) server.
-/* .IP "\fBmilter_protocol (2)\fR"
+/* .IP "\fBmilter_protocol (6)\fR"
 /*     The mail filter protocol version and optional protocol extensions
-/*     for communication with a Milter (mail filter) application.
+/*     for communication with a Milter application; prior to Postfix 2.6
+/*     the default protocol is 2.
 /* .IP "\fBmilter_default_action (tempfail)\fR"
 /*     The default action when a Milter (mail filter) application is
 /*     unavailable or mis-configured.
index e78f5936df3aab42420cc92653fd2120887c522c..fac66d3d6fd9dc1289a9faf9e42dc1328c8a4f25 100644 (file)
@@ -246,7 +246,7 @@ void    smtpd_chat_notify(SMTPD_STATE *state)
 
     notice = post_mail_fopen_nowait(mail_addr_double_bounce(),
                                    var_error_rcpt,
-                                   INT_FILT_NOTIFY,
+                                   INT_FILT_MASK_NOTIFY,
                                    NULL_TRACE_FLAGS, NO_QUEUE_ID);
     if (notice == 0) {
        msg_warn("postmaster notify: %m");
index 80399842883bcd4fbb93fd79c89d24e30fb4367f..6b04c8f00beb39371b8e5e721431c2d2411a9d3d 100644 (file)
@@ -471,7 +471,7 @@ static void verify_query_service(VSTREAM *client_stream)
                         STR(addr), addr_status, now, updated);
            post_mail_fopen_async(strcmp(var_verify_sender, "<>") == 0 ?
                                  "" : var_verify_sender, STR(addr),
-                                 INT_FILT_NONE,
+                                 INT_FILT_MASK_NONE,
                                  DEL_REQ_FLAG_MTA_VRFY,
                                  (VSTRING *) 0,
                                  verify_post_mail_action,