]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-2.7-20090426
authorWietse Venema <wietse@porcupine.org>
Sun, 26 Apr 2009 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <viktor@dukhovni.org>
Tue, 5 Feb 2013 06:35:18 +0000 (06:35 +0000)
36 files changed:
postfix/HISTORY
postfix/README_FILES/FILTER_README
postfix/README_FILES/MILTER_README
postfix/README_FILES/TLS_README
postfix/html/FILTER_README.html
postfix/html/MILTER_README.html
postfix/html/TLS_README.html
postfix/html/lmtp.8.html
postfix/html/postconf.5.html
postfix/html/smtp.8.html
postfix/html/smtpd.8.html
postfix/man/man5/postconf.5
postfix/man/man8/smtp.8
postfix/man/man8/smtpd.8
postfix/mantools/postlink
postfix/proto/FILTER_README.html
postfix/proto/MILTER_README.html
postfix/proto/TLS_README.html
postfix/proto/postconf.proto
postfix/src/cleanup/cleanup_milter.c
postfix/src/global/deliver_request.c
postfix/src/global/mail_params.h
postfix/src/global/mail_version.h
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.c
postfix/src/smtpd/Makefile.in
postfix/src/smtpd/smtpd.c
postfix/src/smtpd/smtpd.h
postfix/src/smtpd/smtpd_check.c
postfix/src/smtpd/smtpd_milter.c
postfix/src/smtpd/smtpd_resolve.c [new file with mode: 0644]
postfix/src/smtpd/smtpd_resolve.h [new file with mode: 0644]
postfix/src/xsasl/xsasl_dovecot_server.c

index 3e37c9612edcdec5ee56145160a47eb859d0ac86..c31a01698ee2248ca7068bdceb50b03529780b94 100644 (file)
@@ -15144,3 +15144,35 @@ Apologies for any names omitted.
 
        Robustness: don't re-enable SIGTERM if it is ignored in the
        parent. Files: postsuper/postsuper.c, postdrop/postdrop.c.
+
+20090422
+
+       Undo delivery agent change 20090415. The queue manager never
+       locks a queue file to read additional recipients into memory,
+       so if a delivery agent runs into a locked file, then something
+       is seriously wrong. File: global/deliver_request.c.
+
+20090424
+
+       Compatibility: the Postfix SMTP client no longer uses the
+       obsolete SSLv2 by default for opportunistic encryption.
+       This has nothing to do with security (we're willing to send
+       plaintext over an unauthenticated connection) but with the
+       loss of advanced options that give better performance.
+       Victor Duchovni. Files: proto/postconf.proto, global/mail_params.h.
+
+20090426
+
+       Feature: more accurate support for Milter macros {mail_addr}
+       and {rcpt_addr}, and new support for Milter macros {mail_host},
+       {mail_mailer}, {rcpt_host}, and {rcpt_mailer}.  Files:
+       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
+       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.
index 192ed2a48d6ae89039856f67c507fa28e5d032ca..a06923e60055a69f6392a70e5f64bbdb80f253ac 100644 (file)
@@ -184,7 +184,8 @@ Once you're satisfied with the content filtering script:
     store its temporary files.
 
   * Configure Postfix to deliver mail to the content filter with the pipe(8)
-    delivery agent.
+    delivery agent (see the pipe(8) manpage for a description of the command
+    syntax below).
 
     /etc/postfix/master.cf:
       # =============================================================
@@ -192,13 +193,15 @@ Once you're satisfied with the content filtering script:
       #               (yes)   (yes)   (yes)   (never) (100)
       # =============================================================
       filter    unix  -       n       n       -       10      pipe
-        flags=Rq user=filter argv=/path/to/script -f ${sender} -- ${recipient}
+        flags=Rq user=filter null_sender=
+        argv=/path/to/script -f ${sender} -- ${recipient}
 
     This runs up to 10 content filters in parallel. Instead of a limit of 10
     concurrent processes, use whatever process limit is feasible for your
     machine. Content inspection software can gobble up a lot of system
     resources, so you don't want to have too much of it running at the same
-    time.
+    time. The empty null_sender feature is both necessary and available with
+    Postfix 2.3 and later.
 
   * To turn on content filtering for mail arriving via SMTP only, append "-
     o content_filter=filter:dummy" to the master.cf entry that defines the
index 469144924dd803b15734b156a802f610df7a128d..fc99ce8134e5a30e14f537d35d79d33ce60ae5ad 100644 (file)
@@ -365,8 +365,21 @@ 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 |
     |{mail_addr}         |MAIL                     |Sender address            |
     |_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b |
+    |{mail_host}         |MAIL (Postfix >= 2.6)    |Sender next-hop           |
+    |                    |                         |destination               |
+    |_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b |
+    |{mail_mailer}       |MAIL (Postfix >= 2.6)    |Sender mail delivery      |
+    |                    |                         |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         |
     |_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\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               |
+    |_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\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.       |
+    |_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b |
     |{tls_version}       |HELO, MAIL, DATA, EOH,   |TLS protocol version      |
     |                    |EOM                      |                          |
     |_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b |
index a408a86c5fa1947a695910969db27e4265c120a7..9102c6a4892fe5a706ffdac6cc56e17bfba88fab 100644 (file)
@@ -1692,7 +1692,7 @@ Example:
         smtp_tls_mandatory_protocols = !SSLv2
         # Also available with Postfix >= 2.6:
         smtp_tls_ciphers = export
-        smtp_tls_protocols =
+        smtp_tls_protocols = !SSLv2
 
 C\bCl\bli\bie\ben\bnt\bt-\b-s\bsi\bid\bde\be S\bSM\bMT\bTP\bPS\bS s\bsu\bup\bpp\bpo\bor\brt\bt
 
index 0bb4332d08c79b8ed58bf65d4ce1207dc6508239..5cc68299c77977b55ac5d170ed0a8568ca8c49cc 100644 (file)
@@ -356,7 +356,8 @@ to the "filter" user. This is where the content filtering script
 is supposed to store its temporary files. </p>
 
 <li> <p> Configure Postfix to deliver mail to the content filter
-with the <a href="pipe.8.html">pipe(8)</a> delivery agent. </p>
+with the <a href="pipe.8.html">pipe(8)</a> delivery agent (see the <a href="pipe.8.html">pipe(8)</a> manpage for a
+description of the command syntax below). </p>
 
 <pre>
 /etc/postfix/<a href="master.5.html">master.cf</a>:
@@ -365,14 +366,16 @@ with the <a href="pipe.8.html">pipe(8)</a> delivery agent. </p>
   #               (yes)   (yes)   (yes)   (never) (100)
   # =============================================================
   filter    unix  -       n       n       -       10      pipe
-    flags=Rq user=filter argv=/path/to/script -f ${sender} -- ${recipient}
+    flags=Rq user=filter null_sender=
+    argv=/path/to/script -f ${sender} -- ${recipient}
 </pre>
 
 <p> This runs up to 10 content filters in parallel. Instead of a
 limit of 10 concurrent processes, use whatever process limit is
 feasible for your machine.  Content inspection software can gobble
 up a lot of system resources, so you don't want to have too much
-of it running at the same time. </p>
+of it running at the same time. The empty null_sender feature is
+both necessary and available with Postfix 2.3 and later. </p>
 
 <li> <p> To turn on content filtering for mail arriving via SMTP
 only, append "-o <a href="postconf.5.html#content_filter">content_filter</a>=filter:dummy" to the <a href="master.5.html">master.cf</a>
index c8539c523e3f79078c08a1c3b19cb77fbb0054e9..9909e85f265bc0d161449ab04045186a6ce4f20c 100644 (file)
@@ -580,11 +580,24 @@ cipher </td> </tr>
 <tr> <td> {mail_addr} </td> <td> MAIL </td> <td> Sender address
 </td> </tr>
 
+<tr> <td> {mail_host} </td> <td> MAIL (Postfix &ge; 2.6) </td> <td>
+Sender next-hop destination </td> </tr>
+
+<tr> <td> {mail_mailer} </td> <td> MAIL (Postfix &ge; 2.6) </td>
+<td> Sender mail delivery transport </td> </tr>
+
 <tr> <td> {rcpt_addr} </td> <td> RCPT </td> <td> Recipient address
 </td> </tr>
 
-<tr> <td> {tls_version} </td> <td> HELO, MAIL, DATA, EOH, EOM </td> <td>
-TLS protocol version </td> </tr>
+<tr> <td> {rcpt_host} </td> <td> RCPT (Postfix &ge; 2.6) </td> <td>
+Recipient next-hop destination </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>
+
+<tr> <td> {tls_version} </td> <td> HELO, MAIL, DATA, EOH, EOM </td>
+<td> TLS protocol version </td> </tr>
 
 <tr> <td> v </td> <td> Always </td> <td> value of <a href="postconf.5.html#milter_macro_v">milter_macro_v</a>
 </td> </tr>
index f056f12db89711d675ac5413a1a43f7181d6dc35..fa657194047ec59712653b5ceb610f3b662cf655 100644 (file)
@@ -2277,7 +2277,7 @@ the SSL/TLS protocols used with opportunistic TLS. </p>
     <a href="postconf.5.html#smtp_tls_mandatory_protocols">smtp_tls_mandatory_protocols</a> = !SSLv2
     # Also available with Postfix &ge; 2.6:
     <a href="postconf.5.html#smtp_tls_ciphers">smtp_tls_ciphers</a> = export
-    <a href="postconf.5.html#smtp_tls_protocols">smtp_tls_protocols</a> =
+    <a href="postconf.5.html#smtp_tls_protocols">smtp_tls_protocols</a> = !SSLv2
 </pre>
 </blockquote>
 
index f435276cbf00ffc48022b01515967f54c587a5b5..f6e9232a99ff079936a4a2c3fe33775555ca74d9 100644 (file)
@@ -517,7 +517,7 @@ SMTP(8)                                                                SMTP(8)
 
        Available in Postfix version 2.6 and later:
 
-       <b><a href="postconf.5.html#smtp_tls_protocols">smtp_tls_protocols</a> (empty)</b>
+       <b><a href="postconf.5.html#smtp_tls_protocols">smtp_tls_protocols</a> (!SSLv2)</b>
               List of TLS protocols that the Postfix SMTP  client
               will  exclude  or  include  with  opportunistic TLS
               encryption.
index 9ba2d0d9fe28862d46a1f2bacc913d82fbe25085..1777b278746c2f5ed9a6215acfda33eeb92b6d29 100644 (file)
@@ -9533,8 +9533,8 @@ introduced in Postfix 2.3. Starting with Postfix 2.3, and independently
 of how the policy is specified, the <a href="postconf.5.html#smtp_tls_mandatory_ciphers">smtp_tls_mandatory_ciphers</a> and
 <a href="postconf.5.html#smtp_tls_mandatory_protocols">smtp_tls_mandatory_protocols</a> parameters apply when TLS encryption
 is mandatory. Connections for which encryption is optional typically
-enable all "export" grade and better ciphers and all SSL/TLS protocols
-(see <a href="postconf.5.html#smtp_tls_ciphers">smtp_tls_ciphers</a> and <a href="postconf.5.html#smtp_tls_protocols">smtp_tls_protocols</a>). </p>
+enable all "export" grade and better ciphers (see <a href="postconf.5.html#smtp_tls_ciphers">smtp_tls_ciphers</a>
+and <a href="postconf.5.html#smtp_tls_protocols">smtp_tls_protocols</a>). </p>
 
 <p> As long as no secure DNS lookup mechanism is available, false
 hostnames in MX or CNAME responses can change the server hostname
@@ -9689,12 +9689,12 @@ configurations in environments where DNS security is not assured. </p>
 </DD>
 
 <DT><b><a name="smtp_tls_protocols">smtp_tls_protocols</a>
-(default: empty)</b></DT><DD>
+(default: !SSLv2)</b></DT><DD>
 
-<p> List of TLS protocols that the Postfix SMTP client will exclude
-or include with opportunistic TLS encryption. This parameter SHOULD be
-left at its default empty value, allowing all protocols to be used with
-opportunistic TLS. </p>
+<p> List of TLS protocols that the Postfix SMTP client will exclude or
+include with opportunistic TLS encryption. Starting with Postfix 2.6,
+the Postfix SMTP client will by default only use SSLv3 and TLSv1, the
+SSLv2 protocol is insecure and obsolete. </p>
 
 <p> In <a href="postconf.5.html">main.cf</a> the values are separated by whitespace, commas or
 colons. In the policy table (see <a href="postconf.5.html#smtp_tls_policy_maps">smtp_tls_policy_maps</a>) the only valid
@@ -9713,7 +9713,8 @@ they cannot be excluded using either syntax. </p>
 
 <p> Example: </p>
 <pre>
-<a href="postconf.5.html#smtp_tls_protocols">smtp_tls_protocols</a> = !SSLv2
+# TLSv1 only!
+<a href="postconf.5.html#smtp_tls_protocols">smtp_tls_protocols</a> = !SSLv2, !SSLv3
 </pre>
 
 <p> This feature is available in Postfix 2.6 and later. </p>
@@ -9867,12 +9868,12 @@ Examples:
 # Opportunistic TLS.
 <a href="postconf.5.html#smtp_tls_security_level">smtp_tls_security_level</a> = may
 # Postfix &ge; 2.6:
-# Do not tweak opportunistic ciphers or protocols unless it is essential
+# Do not tweak opportunistic ciphers unless it is essential
 # to do so (if a security vulnerability is found in the SSL library that
 # can be mitigated by disabling a particular protocol or raising the
 # cipher grade from "export" to "low" or "medium").
 <a href="postconf.5.html#smtp_tls_ciphers">smtp_tls_ciphers</a> = export
-<a href="postconf.5.html#smtp_tls_protocols">smtp_tls_protocols</a> =
+<a href="postconf.5.html#smtp_tls_protocols">smtp_tls_protocols</a> = !SSLv2
 </pre>
 
 <pre>
index f435276cbf00ffc48022b01515967f54c587a5b5..f6e9232a99ff079936a4a2c3fe33775555ca74d9 100644 (file)
@@ -517,7 +517,7 @@ SMTP(8)                                                                SMTP(8)
 
        Available in Postfix version 2.6 and later:
 
-       <b><a href="postconf.5.html#smtp_tls_protocols">smtp_tls_protocols</a> (empty)</b>
+       <b><a href="postconf.5.html#smtp_tls_protocols">smtp_tls_protocols</a> (!SSLv2)</b>
               List of TLS protocols that the Postfix SMTP  client
               will  exclude  or  include  with  opportunistic TLS
               encryption.
index 84256e0634fa0d63c367078b150b5fbe168bc8ba..1cb2827673f80af0bcc6b790fce9e70fb7fb2e1b 100644 (file)
@@ -386,30 +386,31 @@ SMTPD(8)                                                              SMTPD(8)
               root  CAs trusted to sign either remote SMTP client
               certificates or intermediate CA certificates.
 
-       <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
-              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-
+              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>
@@ -417,56 +418,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>
@@ -474,14 +475,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>
@@ -493,7 +494,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>
@@ -501,26 +502,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
@@ -531,7 +532,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.
 
@@ -544,18 +545,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>
@@ -563,64 +564,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>
@@ -630,22 +631,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>
@@ -656,7 +657,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>
@@ -665,146 +666,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:
@@ -815,52 +816,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>
@@ -868,150 +869,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>
@@ -1025,7 +1026,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>
@@ -1035,7 +1036,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>
@@ -1043,18 +1044,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>
@@ -1062,53 +1063,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.
 
@@ -1119,38 +1120,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>
@@ -1171,37 +1172,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>
@@ -1209,28 +1210,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>
@@ -1260,7 +1261,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 6ad3b76fee25a1607ff13e55adf19a58c77d54a9..290b269a963997885efd3442eb2849dc661bc761 100644 (file)
@@ -5617,8 +5617,8 @@ introduced in Postfix 2.3. Starting with Postfix 2.3, and independently
 of how the policy is specified, the smtp_tls_mandatory_ciphers and
 smtp_tls_mandatory_protocols parameters apply when TLS encryption
 is mandatory. Connections for which encryption is optional typically
-enable all "export" grade and better ciphers and all SSL/TLS protocols
-(see smtp_tls_ciphers and smtp_tls_protocols).
+enable all "export" grade and better ciphers (see smtp_tls_ciphers
+and smtp_tls_protocols).
 .PP
 As long as no secure DNS lookup mechanism is available, false
 hostnames in MX or CNAME responses can change the server hostname
@@ -5761,11 +5761,11 @@ DNS forgery. Do not use the \fBhostname\fR strategy for secure-channel
 configurations in environments where DNS security is not assured.
 .PP
 This feature is available in Postfix 2.3 and later.
-.SH smtp_tls_protocols (default: empty)
-List of TLS protocols that the Postfix SMTP client will exclude
-or include with opportunistic TLS encryption. This parameter SHOULD be
-left at its default empty value, allowing all protocols to be used with
-opportunistic TLS.
+.SH smtp_tls_protocols (default: !SSLv2)
+List of TLS protocols that the Postfix SMTP client will exclude or
+include with opportunistic TLS encryption. Starting with Postfix 2.6,
+the Postfix SMTP client will by default only use SSLv3 and TLSv1, the
+SSLv2 protocol is insecure and obsolete.
 .PP
 In main.cf the values are separated by whitespace, commas or
 colons. In the policy table (see smtp_tls_policy_maps) the only valid
@@ -5786,7 +5786,8 @@ Example:
 .nf
 .na
 .ft C
-smtp_tls_protocols = !SSLv2
+# TLSv1 only!
+smtp_tls_protocols = !SSLv2, !SSLv3
 .fi
 .ad
 .ft R
@@ -5926,12 +5927,12 @@ smtp_tls_security_level = none
 # Opportunistic TLS.
 smtp_tls_security_level = may
 # Postfix >= 2.6:
-# Do not tweak opportunistic ciphers or protocols unless it is essential
+# Do not tweak opportunistic ciphers unless it is essential
 # to do so (if a security vulnerability is found in the SSL library that
 # can be mitigated by disabling a particular protocol or raising the
 # cipher grade from "export" to "low" or "medium").
 smtp_tls_ciphers = export
-smtp_tls_protocols =
+smtp_tls_protocols = !SSLv2
 .fi
 .ad
 .ft R
index c3baf168ba01ab8745714e9122dc859d647fb56a..4fc471b79c350b35da195e42291d213f461eba13 100644 (file)
@@ -420,9 +420,9 @@ The message digest algorithm used to construct remote SMTP server
 certificate fingerprints.
 .PP
 Available in Postfix version 2.6 and later:
-.IP "\fBsmtp_tls_protocols (empty)\fR"
-List of TLS protocols that the Postfix SMTP client will exclude
-or include with opportunistic TLS encryption.
+.IP "\fBsmtp_tls_protocols (!SSLv2)\fR"
+List of TLS protocols that the Postfix SMTP client will exclude or
+include with opportunistic TLS encryption.
 .IP "\fBsmtp_tls_ciphers (export)\fR"
 The minimum TLS cipher grade that the Postfix SMTP client
 will use with opportunistic TLS encryption.
index 9439ff6e68f716e63c13648aeef465b95d01f275..36525066d6a231ca9107eaeb5e27dd020f69c1b2 100644 (file)
@@ -340,9 +340,9 @@ during TLS startup and shutdown handshake procedures.
 A file containing (PEM format) CA certificates of root CAs trusted
 to sign either remote SMTP client certificates or intermediate CA
 certificates.
-.IP "\fBsmtpd_tls_CAfile (empty)\fR"
-A file containing (PEM format) CA certificates of root CAs trusted
-to sign either remote SMTP client certificates or intermediate CA
+.IP "\fBsmtpd_tls_CApath (empty)\fR"
+A directory containing (PEM format) CA certificates of root CAs
+trusted to sign either remote SMTP client certificates or intermediate CA
 certificates.
 .IP "\fBsmtpd_tls_always_issue_session_ids (yes)\fR"
 Force the Postfix SMTP server to issue a TLS session id, even
index 7d4d59e5255ef268e0ede5ec1f01d9ec2ea008a5..3d01af7c540138611b669fee606e571e148d2802 100755 (executable)
@@ -667,6 +667,7 @@ while (<>) {
     s;\btls_eecdh_ultra_curve\b;<a href="postconf.5.html#tls_eecdh_ultra_curve">$&</a>;g;
  
     s;\bfrozen_delivered_to\b;<a href="postconf.5.html#frozen_delivered_to">$&</a>;g;
+    s;\bfrozen_owner_alias\b;<a href="postconf.5.html#frozen_owner_alias">$&</a>;g;
 
     # Transport-dependent magical parameters.
 
index 9f036b1cb9a4d8f04c2493388638a596fdd566cd..7ee33f665ee382ba29a3e355b76e6e6bab561f22 100644 (file)
@@ -356,7 +356,8 @@ to the "filter" user. This is where the content filtering script
 is supposed to store its temporary files. </p>
 
 <li> <p> Configure Postfix to deliver mail to the content filter
-with the pipe(8) delivery agent. </p>
+with the pipe(8) delivery agent (see the pipe(8) manpage for a
+description of the command syntax below). </p>
 
 <pre>
 /etc/postfix/master.cf:
@@ -365,14 +366,16 @@ with the pipe(8) delivery agent. </p>
   #               (yes)   (yes)   (yes)   (never) (100)
   # =============================================================
   filter    unix  -       n       n       -       10      pipe
-    flags=Rq user=filter argv=/path/to/script -f ${sender} -- ${recipient}
+    flags=Rq user=filter null_sender=
+    argv=/path/to/script -f ${sender} -- ${recipient}
 </pre>
 
 <p> This runs up to 10 content filters in parallel. Instead of a
 limit of 10 concurrent processes, use whatever process limit is
 feasible for your machine.  Content inspection software can gobble
 up a lot of system resources, so you don't want to have too much
-of it running at the same time. </p>
+of it running at the same time. The empty null_sender feature is
+both necessary and available with Postfix 2.3 and later. </p>
 
 <li> <p> To turn on content filtering for mail arriving via SMTP
 only, append "-o content_filter=filter:dummy" to the master.cf
index b88a884937f6a2313520438e7082525117ddcbc1..34fd0791b050b240da9f3184f89df78202dbb356 100644 (file)
@@ -580,11 +580,24 @@ milter_macro_daemon_name </td> </tr>
 <tr> <td> {mail_addr} </td> <td> MAIL </td> <td> Sender address
 </td> </tr>
 
+<tr> <td> {mail_host} </td> <td> MAIL (Postfix &ge; 2.6) </td> <td>
+Sender next-hop destination </td> </tr>
+
+<tr> <td> {mail_mailer} </td> <td> MAIL (Postfix &ge; 2.6) </td>
+<td> Sender mail delivery transport </td> </tr>
+
 <tr> <td> {rcpt_addr} </td> <td> RCPT </td> <td> Recipient address
 </td> </tr>
 
-<tr> <td> {tls_version} </td> <td> HELO, MAIL, DATA, EOH, EOM </td> <td>
-TLS protocol version </td> </tr>
+<tr> <td> {rcpt_host} </td> <td> RCPT (Postfix &ge; 2.6) </td> <td>
+Recipient next-hop destination </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>
+
+<tr> <td> {tls_version} </td> <td> HELO, MAIL, DATA, EOH, EOM </td>
+<td> TLS protocol version </td> </tr>
 
 <tr> <td> v </td> <td> Always </td> <td> value of milter_macro_v
 </td> </tr>
index c2d999b5023ac6132c97499031df649235607359..f42bee9c66fe9ef1ffb4c53cc841a2c4d808d07f 100644 (file)
@@ -2277,7 +2277,7 @@ the SSL/TLS protocols used with opportunistic TLS. </p>
     smtp_tls_mandatory_protocols = !SSLv2
     # Also available with Postfix &ge; 2.6:
     smtp_tls_ciphers = export
-    smtp_tls_protocols =
+    smtp_tls_protocols = !SSLv2
 </pre>
 </blockquote>
 
index 1848dd3b330284a735b6f1ad3e54d69e8b631659..f46e246cc56f6fa3a28dced9fc9b1106dba1001f 100644 (file)
@@ -9121,8 +9121,8 @@ introduced in Postfix 2.3. Starting with Postfix 2.3, and independently
 of how the policy is specified, the smtp_tls_mandatory_ciphers and
 smtp_tls_mandatory_protocols parameters apply when TLS encryption
 is mandatory. Connections for which encryption is optional typically
-enable all "export" grade and better ciphers and all SSL/TLS protocols
-(see smtp_tls_ciphers and smtp_tls_protocols). </p>
+enable all "export" grade and better ciphers (see smtp_tls_ciphers
+and smtp_tls_protocols). </p>
 
 <p> As long as no secure DNS lookup mechanism is available, false
 hostnames in MX or CNAME responses can change the server hostname
@@ -10389,12 +10389,12 @@ smtp_tls_security_level = none
 # Opportunistic TLS.
 smtp_tls_security_level = may
 # Postfix &ge; 2.6:
-# Do not tweak opportunistic ciphers or protocols unless it is essential
+# Do not tweak opportunistic ciphers unless it is essential
 # to do so (if a security vulnerability is found in the SSL library that
 # can be mitigated by disabling a particular protocol or raising the
 # cipher grade from "export" to "low" or "medium").
 smtp_tls_ciphers = export
-smtp_tls_protocols =
+smtp_tls_protocols = !SSLv2
 </pre>
 
 <pre>
@@ -11284,12 +11284,12 @@ the hostname and IP address. The logging format is "host[address]:port".
 
 <p> This feature is available in Postfix 2.5 and later. </p>
 
-%PARAM smtp_tls_protocols
+%PARAM smtp_tls_protocols !SSLv2
 
-<p> List of TLS protocols that the Postfix SMTP client will exclude
-or include with opportunistic TLS encryption. This parameter SHOULD be
-left at its default empty value, allowing all protocols to be used with
-opportunistic TLS. </p>
+<p> List of TLS protocols that the Postfix SMTP client will exclude or
+include with opportunistic TLS encryption. Starting with Postfix 2.6,
+the Postfix SMTP client will by default only use SSLv3 and TLSv1, the
+SSLv2 protocol is insecure and obsolete. </p>
 
 <p> In main.cf the values are separated by whitespace, commas or
 colons. In the policy table (see smtp_tls_policy_maps) the only valid
@@ -11308,7 +11308,8 @@ they cannot be excluded using either syntax. </p>
 
 <p> Example: </p>
 <pre>
-smtp_tls_protocols = !SSLv2
+# TLSv1 only!
+smtp_tls_protocols = !SSLv2, !SSLv3
 </pre>
 
 <p> This feature is available in Postfix 2.6 and later. </p>
index def810f14661caf9832726b91f96eb9504cf672c..b80d530204a7afc89c7d0f0822b6575f6bd13a61 100644 (file)
@@ -1608,7 +1608,7 @@ void    cleanup_milter_emul_rcpt(CLEANUP_STATE *state,
        vstring_strcpy(state->milter_ext_rcpt, addr);
     argv[0] = STR(state->milter_ext_rcpt);
     argv[1] = 0;
-    if ((resp = milter_rcpt_event(milters, argv)) != 0
+    if ((resp = milter_rcpt_event(milters, MILTER_FLAG_NONE, argv)) != 0
        && cleanup_milter_apply(state, "RCPT", resp) != 0) {
        msg_warn("%s: milter configuration error: can't reject recipient "
                 "in non-smtpd(8) submission", state->queue_id);
index 05c074380a77067e70dd8471caa60522308642f4..060c04f900069c3d570571cd279bbc40a136701f 100644 (file)
@@ -207,7 +207,6 @@ static int deliver_request_get(VSTREAM *stream, DELIVER_REQUEST *request)
     static RCPT_BUF *rcpt_buf;
     int     rcpt_count;
     int     dsn_ret;
-    int     lock_tries;
 
     /*
      * Initialize. For some reason I wanted to allow for multiple instances
@@ -319,6 +318,14 @@ static int deliver_request_get(VSTREAM *stream, DELIVER_REQUEST *request)
      * duplicate deliveries when the queue is flushed immediately after queue
      * manager restart.
      * 
+     * The queue manager locks the file exclusively when it enters the active
+     * queue, and releases the lock before starting deliveries from that
+     * file. The queue manager does not lock the file again when reading more
+     * recipients into memory. When the queue manager is restarted, the new
+     * process moves files from the active queue to the incoming queue to cool
+     * off for a while. Delivery agents should therefore never try to open a
+     * file that is locked by a queue manager process.
+     * 
      * Opening the queue file can fail for a variety of reasons, such as the
      * system running out of resources. Instead of throwing away mail, we're
      * raising a fatal error which forces the mail system to back off, and
@@ -336,21 +343,8 @@ static int deliver_request_get(VSTREAM *stream, DELIVER_REQUEST *request)
     }
     if (msg_verbose)
        msg_info("%s: file %s", myname, VSTREAM_PATH(request->fp));
-
-    /*
-     * XXX Originally, the queue manager would read new recipients AFTER all
-     * the in-memory recipients were processed. either the queue manager held
-     * an exclusive lock or delivery agents held a shared lock. Now we try a
-     * few times.
-     */
-    for (lock_tries = 0; /* see below */; lock_tries++) {
-       if (myflock(vstream_fileno(request->fp), INTERNAL_LOCK, DELIVER_LOCK_MODE) == 0)
-           break;
-       if (lock_tries < 5)
-           sleep(1);
-       else
-           msg_fatal("shared lock %s: %m", VSTREAM_PATH(request->fp));
-    }
+    if (myflock(vstream_fileno(request->fp), INTERNAL_LOCK, DELIVER_LOCK_MODE) < 0)
+       msg_fatal("shared lock %s: %m", VSTREAM_PATH(request->fp));
     close_on_exec(vstream_fileno(request->fp), CLOSE_ON_EXEC);
 
     return (0);
index d2b4c20f8d414b6b477281b9841387b1dc1f8bd2..6ab988d57af1fbbe2421177b0596d8aa62d24364 100644 (file)
@@ -1428,9 +1428,9 @@ extern int var_lmtp_tls_scache_timeout;
 extern char *var_smtp_tls_policy;
 
 #define VAR_SMTP_TLS_PROTO     "smtp_tls_protocols"
-#define DEF_SMTP_TLS_PROTO     ""
+#define DEF_SMTP_TLS_PROTO     "!SSLv2"
 #define VAR_LMTP_TLS_PROTO     "lmtp_tls_protocols"
-#define DEF_LMTP_TLS_PROTO     ""
+#define DEF_LMTP_TLS_PROTO     "!SSLv2"
 extern char *var_smtp_tls_proto;
 
 #define VAR_SMTP_TLS_MAND_PROTO        "smtp_tls_mandatory_protocols"
@@ -2929,11 +2929,13 @@ extern char *var_milt_helo_macros;
 
 #define VAR_MILT_MAIL_MACROS           "milter_mail_macros"
 #define DEF_MILT_MAIL_MACROS           "i {auth_type} {auth_authen}" \
-                                       " {auth_author} {mail_addr}"
+                                       " {auth_author} {mail_addr}" \
+                                       " {mail_host} {mail_mailer}"
 extern char *var_milt_mail_macros;
 
 #define VAR_MILT_RCPT_MACROS           "milter_rcpt_macros"
-#define DEF_MILT_RCPT_MACROS           "i {rcpt_addr}"
+#define DEF_MILT_RCPT_MACROS           "i {rcpt_addr} {rcpt_host}" \
+                                       " {rcpt_mailer}"
 extern char *var_milt_rcpt_macros;
 
 #define VAR_MILT_DATA_MACROS           "milter_data_macros"
index 7a9b37f195ad2930080adc629bb957d2fc85604c..80c6d4906d08ba47aaea315b2e6f58550123abd0 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      "20090419"
+#define MAIL_RELEASE_DATE      "20090426"
 #define MAIL_VERSION_NUMBER    "2.7"
 
 #ifdef SNAPSHOT
index 6854b358c7bbd404dc262f48da78be6c436c21e6..718940445e2f1c3050de8ab8483a8a695c0656ac 100644 (file)
@@ -67,8 +67,9 @@
 /*     MILTERS *milters;
 /*     const char **argv;
 /*
-/*     const char *milter_rcpt_event(milters, argv)
+/*     const char *milter_rcpt_event(milters, flags, argv)
 /*     MILTERS *milters;
+/*     int     flags;
 /*     const char **argv;
 /*
 /*     const char *milter_data_event(milters)
 /*
 /*     milter_rcpt_event() reports an RCPT TO event to the specified
 /*     milter instances, after sending the macros that were specified
-/*     with the milter_create() rcpt_macros argument.
-/*
+/*     with the milter_create() rcpt_macros argument. When the flags
+/*     argument is non-zero, it selects only milter instances that
+/*     have at least one of the specificed flags. Known flags are:
+/* .IP MILTER_FLAG_WANT_RCPT_REJ
+/*     This milter expects to receive rejected recipients with the
+/*     {rcpt_mailer} macro set to "error".
+/* .PP
 /*     milter_data_event() reports a DATA event to the specified
 /*     milter instances, after sending the macros that were specified
 /*     with the milter_create() data_macros argument.
@@ -382,7 +388,7 @@ const char *milter_mail_event(MILTERS *milters, const char **argv)
 
 /* milter_rcpt_event - report rcpt to event */
 
-const char *milter_rcpt_event(MILTERS *milters, const char **argv)
+const char *milter_rcpt_event(MILTERS *milters, int flags, const char **argv)
 {
     const char *resp;
     MILTER *m;
@@ -390,12 +396,16 @@ const char *milter_rcpt_event(MILTERS *milters, const char **argv)
     ARGV   *any_macros;
 
     if (msg_verbose)
-       msg_info("report recipient to all milters");
+       msg_info("report recipient to all milters (flags=0x%x)", flags);
     for (resp = 0, m = milters->milter_list; resp == 0 && m != 0; m = m->next) {
-       any_macros = MILTER_MACRO_EVAL(global_macros, m, milters, rcpt_macros);
-       resp = m->rcpt_event(m, argv, any_macros);
-       if (any_macros != global_macros)
-           argv_free(any_macros);
+       if ((flags & MILTER_FLAG_WANT_RCPT_REJ) == 0
+           || (m->flags & MILTER_FLAG_WANT_RCPT_REJ) != 0) {
+           any_macros =
+               MILTER_MACRO_EVAL(global_macros, m, milters, rcpt_macros);
+           resp = m->rcpt_event(m, argv, any_macros);
+           if (any_macros != global_macros)
+               argv_free(any_macros);
+       }
     }
     if (global_macros)
        argv_free(global_macros);
index f27c047d8c83383557c88abfd7305aaa5b3c657b..e2cf65ce5b7276afe1508e60b72c7fcd9e5fd9b2 100644 (file)
@@ -31,6 +31,7 @@
   */
 typedef struct MILTER {
     char   *name;                      /* full name including transport */
+    int     flags;                     /* see below */
     struct MILTER *next;               /* linkage */
     struct MILTERS *parent;            /* parent information */
     struct MILTER_MACROS *macros;      /* private macros */
@@ -49,6 +50,9 @@ typedef struct MILTER {
     void    (*free) (struct MILTER *);
 } MILTER;
 
+#define MILTER_FLAG_NONE               (0)
+#define MILTER_FLAG_WANT_RCPT_REJ      (1<<0)  /* see S8_RCPT_MAILER_ERROR */
+
 extern MILTER *milter8_create(const char *, int, int, int, const char *, const char *, struct MILTERS *);
 extern MILTER *milter8_receive(VSTREAM *, struct MILTERS *);
 
@@ -125,7 +129,7 @@ extern void milter_edit_callback(MILTERS *milters, MILTER_ADD_HEADER_FN,
 extern const char *milter_conn_event(MILTERS *, const char *, const char *, const char *, unsigned);
 extern const char *milter_helo_event(MILTERS *, const char *, int);
 extern const char *milter_mail_event(MILTERS *, const char **);
-extern const char *milter_rcpt_event(MILTERS *, const char **);
+extern const char *milter_rcpt_event(MILTERS *, int, const char **);
 extern const char *milter_data_event(MILTERS *);
 extern const char *milter_message(MILTERS *, VSTREAM *, off_t);
 extern const char *milter_unknown_event(MILTERS *, const char *);
@@ -181,6 +185,8 @@ extern void milter_free(MILTERS *);
 #define S8_MAC_RCPT_HOST       "{rcpt_host}"   /* recip nexthop */
 #define S8_MAC_RCPT_ADDR       "{rcpt_addr}"   /* recip address */
 
+#define S8_RCPT_MAILER_ERROR   "error" /* see MILTER_FLAG_WANT_RCPT_REJ */
+
 /* LICENSE
 /* .ad
 /* .fi
index 3d660a4b5c42f521fde7dd1559a623d9f5e947ea..9c8d44663abfe01baa7262bfe7ed05d0fcb7ca53 100644 (file)
@@ -430,7 +430,7 @@ typedef struct {
 #define MILTER8_V3_PROTO_MASK  (MILTER8_V2_PROTO_MASK | SMFIP_NOUNKNOWN)
 #define MILTER8_V4_PROTO_MASK  (MILTER8_V3_PROTO_MASK | SMFIP_NODATA)
 #define MILTER8_V6_PROTO_MASK \
-       (MILTER8_V4_PROTO_MASK | SMFIP_SKIP /* | SMFIP_RCPT_REJ */ \
+       (MILTER8_V4_PROTO_MASK | SMFIP_SKIP | SMFIP_RCPT_REJ \
        | SMFIP_NOREPLY_MASK | SMFIP_HDR_LEADSPC)
 
  /*
@@ -1720,6 +1720,8 @@ static void milter8_connect(MILTER8 *milter)
        (void) milter8_comm_error(milter);
        return;
     }
+    if (milter->ev_mask & SMFIP_RCPT_REJ)
+       milter->m.flags |= MILTER_FLAG_WANT_RCPT_REJ;
 
     /*
      * Initial negotiations completed.
@@ -2703,6 +2705,7 @@ static MILTER8 *milter8_alloc(const char *name, int conn_timeout,
      */
     milter = (MILTER8 *) mymalloc(sizeof(*milter));
     milter->m.name = mystrdup(name);
+    milter->m.flags = 0;
     milter->m.next = 0;
     milter->m.parent = parent;
     milter->m.macros = 0;
index 8980f416e27813791efffeb21e8faa07801ac2b4..442a69cce90fba7084ef63bbf71ec0dc8ebdbdb5 100644 (file)
 /* .IP "\fB-A address\fR"
 /*     Add the specified recipient address. Multiple -A options
 /*     are supported.
-/* .IP "\fB-d\fI level\fR"
-/*     Enable libmilter debugging at the specified level.
+/* .IP "\fB-b pathname
+/*     Replace the message body by the content of the specified 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-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"
 /*     Insert header at specified position.
 /* .IP "\fB-l\fR"
 /*     The event for which the filter will not reply.
 /* .IP "\fB-p inet:\fIport\fB@\fIhost\fB|unix:\fIpathname\fR"
 /*     The mail filter listen endpoint.
-/* .IP "\fB-r \fI'index header-label header-value'\fR"
-/*     Replace the message header at the specified position.
-/* .IP "\fB-R pathname
-/*     Replace the message body by the content of the specified file.
+/* .IP "\fB-r\fR"
+/*     Request rejected recipients from the MTA.
 /* .IP "\fB-v\fR"
 /*     Make the program more verbose.
 /* LICENSE
@@ -153,8 +155,45 @@ static char *body_file;
 int     rcpt_count = 0;
 char   *rcpt_addr[MAX_RCPT];
 
+static const char *macro_names[] = {
+    "_",
+    "i",
+    "j",
+    "v",
+    "{auth_authen}",
+    "{auth_author}",
+    "{auth_type}",
+    "{cert_issuer}",
+    "{cert_subject}",
+    "{cipher}",
+    "{cipher_bits}",
+    "{client_addr}",
+    "{client_connections}",
+    "{client_name}",
+    "{client_port}",
+    "{client_ptr}",
+    "{client_resolve}",
+    "{daemon_name}",
+    "{if_addr}",
+    "{if_name}",
+    "{mail_addr}",
+    "{mail_host}",
+    "{mail_mailer}",
+    "{rcpt_addr}",
+    "{rcpt_host}",
+    "{rcpt_mailer}",
+    "{tls_version}",
+    0,
+};
+
 static int test_reply(SMFICTX *ctx, int code)
 {
+    const char **cpp;
+    const char *symval;
+
+    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. */
 
     if (code == SMFIR_REPLYCODE) {
@@ -478,7 +517,7 @@ int     main(int argc, char **argv)
     char   *noreply = 0;
     const struct noproto_map *np;
 
-    while ((ch = getopt(argc, argv, "a:A:c:C:d:i:lm:M:n:N:p:r:R:v")) > 0) {
+    while ((ch = getopt(argc, argv, "a:A:b:c:C:d:h:i:lm:M:n:N:p:rv")) > 0) {
        switch (ch) {
        case 'a':
            action = optarg;
@@ -490,6 +529,17 @@ int     main(int argc, char **argv)
            }
            rcpt_addr[rcpt_count++] = optarg;
            break;
+       case 'b':
+#ifdef SMFIR_REPLBODY
+           if (body_file) {
+               fprintf(stderr, "too many -b options\n");
+               exit(1);
+           }
+           body_file = optarg;
+#else
+           fprintf(stderr, "no libmilter support to replace body\n");
+#endif
+           break;
        case 'c':
            command = optarg;
            break;
@@ -499,6 +549,18 @@ int     main(int argc, char **argv)
                exit(1);
            }
            break;
+       case 'h':
+#ifdef SMFIR_CHGHEADER
+           if (chg_hdr) {
+               fprintf(stderr, "too many -h options\n");
+               exit(1);
+           }
+           parse_hdr_info(optarg, &chg_idx, &chg_hdr, &chg_val);
+#else
+           fprintf(stderr, "no libmilter support to change header\n");
+           exit(1);
+#endif
+           break;
        case 'i':
 #ifdef SMFIR_INSHEADER
            if (ins_hdr) {
@@ -575,15 +637,10 @@ int     main(int argc, char **argv)
            }
            break;
        case 'r':
-#ifdef SMFIR_CHGHEADER
-           if (chg_hdr) {
-               fprintf(stderr, "too many -r options\n");
-               exit(1);
-           }
-           parse_hdr_info(optarg, &chg_idx, &chg_hdr, &chg_val);
+#ifdef SMFIP_RCPT_REJ
+           misc_mask |= SMFIP_RCPT_REJ;
 #else
-           fprintf(stderr, "no libmilter support to change header\n");
-           exit(1);
+           fprintf(stderr, "no libmilter support for rejected recipients\n");
 #endif
            break;
        case 'v':
@@ -592,29 +649,21 @@ int     main(int argc, char **argv)
        case 'C':
            conn_count = atoi(optarg);
            break;
-#ifdef SMFIR_REPLBODY
-       case 'R':
-           if (body_file) {
-               fprintf(stderr, "too many -R options\n");
-               exit(1);
-           }
-           body_file = optarg;
-#endif
-           break;
        default:
            fprintf(stderr,
                    "usage: %s [-dv] \n"
                    "\t[-a action]              non-default action\n"
+                   "\t[-b body_text]           replace body\n",
                    "\t[-c command]             non-default action trigger\n"
+                   "\t[-h 'index label value'] replace header\n"
                    "\t[-i 'index label value'] insert header\n"
                    "\t[-m macro_state]         non-default macro state\n"
                    "\t[-M macro_list]          non-default macro list\n"
                    "\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 'index label value'] replace header\n"
+                   "\t-r                       request rejected recipients\n"
                    "\t[-C conn_count]          when to exit\n",
-                   "\t[-R body_text]           replace body\n",
                    argv[0]);
            exit(1);
        }
index c0f9f553b67bffb0375bcdfebed45c66ed6ec077..d436254349e9177de1afe7ee2dbf7ccab48528d8 100644 (file)
 /*     certificate fingerprints.
 /* .PP
 /*     Available in Postfix version 2.6 and later:
-/* .IP "\fBsmtp_tls_protocols (empty)\fR"
-/*     List of TLS protocols that the Postfix SMTP client will exclude
-/*     or include with opportunistic TLS encryption.
+/* .IP "\fBsmtp_tls_protocols (!SSLv2)\fR"
+/*     List of TLS protocols that the Postfix SMTP client will exclude or
+/*     include with opportunistic TLS encryption.
 /* .IP "\fBsmtp_tls_ciphers (export)\fR"
 /*     The minimum TLS cipher grade that the Postfix SMTP client
 /*     will use with opportunistic TLS encryption.
index 7139248f5d60c2d2faad0864d61051cb9ca6a9ad..91a274b683f824cc9c4ba23441fd018ac12c1e9f 100644 (file)
@@ -1,12 +1,13 @@
 SHELL  = /bin/sh
 SRCS   = smtpd.c smtpd_token.c smtpd_check.c smtpd_chat.c smtpd_state.c \
        smtpd_peer.c smtpd_sasl_proto.c smtpd_sasl_glue.c smtpd_proxy.c \
-       smtpd_xforward.c smtpd_dsn_fix.c smtpd_milter.c
+       smtpd_xforward.c smtpd_dsn_fix.c smtpd_milter.c smtpd_resolve.c
 OBJS   = smtpd.o smtpd_token.o smtpd_check.o smtpd_chat.o smtpd_state.o \
        smtpd_peer.o smtpd_sasl_proto.o smtpd_sasl_glue.o smtpd_proxy.o \
-       smtpd_xforward.o smtpd_dsn_fix.o smtpd_milter.o
+       smtpd_xforward.o smtpd_dsn_fix.o smtpd_milter.o smtpd_resolve.o
 HDRS   = smtpd_token.h smtpd_check.h smtpd_chat.h smtpd_sasl_proto.h \
-       smtpd_sasl_glue.h smtpd_proxy.h smtpd_dsn_fix.h smtpd_milter.h
+       smtpd_sasl_glue.h smtpd_proxy.h smtpd_dsn_fix.h smtpd_milter.h \
+       smtpd_resolve.h
 TESTSRC        = smtpd_token_test.c
 DEFS   = -I. -I$(INC_DIR) -D$(SYSTYPE)
 CFLAGS = $(DEBUG) $(OPT) $(DEFS)
@@ -34,7 +35,8 @@ update: ../../libexec/$(PROG)
 ../../libexec/$(PROG): $(PROG)
        cp $(PROG) ../../libexec
 
-SMTPD_CHECK_OBJ = smtpd_state.o smtpd_peer.o smtpd_xforward.o smtpd_dsn_fix.o
+SMTPD_CHECK_OBJ = smtpd_state.o smtpd_peer.o smtpd_xforward.o smtpd_dsn_fix.o \
+       smtpd_resolve.o
 
 smtpd_token: smtpd_token.c $(LIBS)
        $(CC) $(CFLAGS) -DTEST -o $@ $@.c $(LIBS) $(SYSLIBS)
@@ -170,6 +172,7 @@ smtpd.o: ../../include/off_cvt.h
 smtpd.o: ../../include/quote_822_local.h
 smtpd.o: ../../include/quote_flags.h
 smtpd.o: ../../include/rec_type.h
+smtpd.o: ../../include/recipient_list.h
 smtpd.o: ../../include/record.h
 smtpd.o: ../../include/resolve_clnt.h
 smtpd.o: ../../include/smtp_stream.h
@@ -292,6 +295,7 @@ smtpd_check.o: smtpd.h
 smtpd_check.o: smtpd_check.c
 smtpd_check.o: smtpd_check.h
 smtpd_check.o: smtpd_dsn_fix.h
+smtpd_check.o: smtpd_resolve.h
 smtpd_check.o: smtpd_sasl_glue.h
 smtpd_dsn_fix.o: ../../include/msg.h
 smtpd_dsn_fix.o: ../../include/sys_defs.h
@@ -307,6 +311,7 @@ smtpd_milter.o: ../../include/name_code.h
 smtpd_milter.o: ../../include/name_mask.h
 smtpd_milter.o: ../../include/quote_821_local.h
 smtpd_milter.o: ../../include/quote_flags.h
+smtpd_milter.o: ../../include/resolve_clnt.h
 smtpd_milter.o: ../../include/sys_defs.h
 smtpd_milter.o: ../../include/tls.h
 smtpd_milter.o: ../../include/vbuf.h
@@ -315,6 +320,7 @@ smtpd_milter.o: ../../include/vstring.h
 smtpd_milter.o: smtpd.h
 smtpd_milter.o: smtpd_milter.c
 smtpd_milter.o: smtpd_milter.h
+smtpd_milter.o: smtpd_resolve.h
 smtpd_milter.o: smtpd_sasl_glue.h
 smtpd_peer.o: ../../include/argv.h
 smtpd_peer.o: ../../include/attr.h
@@ -366,6 +372,21 @@ smtpd_proxy.o: ../../include/xtext.h
 smtpd_proxy.o: smtpd.h
 smtpd_proxy.o: smtpd_proxy.c
 smtpd_proxy.o: smtpd_proxy.h
+smtpd_resolve.o: ../../include/attr.h
+smtpd_resolve.o: ../../include/ctable.h
+smtpd_resolve.o: ../../include/iostuff.h
+smtpd_resolve.o: ../../include/mail_proto.h
+smtpd_resolve.o: ../../include/msg.h
+smtpd_resolve.o: ../../include/mymalloc.h
+smtpd_resolve.o: ../../include/resolve_clnt.h
+smtpd_resolve.o: ../../include/rewrite_clnt.h
+smtpd_resolve.o: ../../include/stringops.h
+smtpd_resolve.o: ../../include/sys_defs.h
+smtpd_resolve.o: ../../include/vbuf.h
+smtpd_resolve.o: ../../include/vstream.h
+smtpd_resolve.o: ../../include/vstring.h
+smtpd_resolve.o: smtpd_resolve.c
+smtpd_resolve.o: smtpd_resolve.h
 smtpd_sasl_glue.o: ../../include/argv.h
 smtpd_sasl_glue.o: ../../include/attr.h
 smtpd_sasl_glue.o: ../../include/mail_params.h
index da68506bab1d8b1f5b6ae3f46b1abb8ff858a983..6078d84ea4d76eee4775d5731099e49ad6b9f781 100644 (file)
 /*     A file containing (PEM format) CA certificates of root CAs trusted
 /*     to sign either remote SMTP client certificates or intermediate CA
 /*     certificates.
-/* .IP "\fBsmtpd_tls_CAfile (empty)\fR"
-/*     A file containing (PEM format) CA certificates of root CAs trusted
-/*     to sign either remote SMTP client certificates or intermediate CA
+/* .IP "\fBsmtpd_tls_CApath (empty)\fR"
+/*     A directory containing (PEM format) CA certificates of root CAs
+/*     trusted to sign either remote SMTP client certificates or intermediate CA
 /*     certificates.
 /* .IP "\fBsmtpd_tls_always_issue_session_ids (yes)\fR"
 /*     Force the Postfix SMTP server to issue a TLS session id, even
@@ -2341,6 +2341,7 @@ static int rcpt_cmd(SMTPD_STATE *state, int argc, SMTPD_TOKEN *argv)
     const char *dsn_orcpt_type = 0;
     int     dsn_notify = 0;
     const char *coded_addr;
+    const char *milter_err;
 
     /*
      * Sanity checks.
@@ -2441,24 +2442,24 @@ static int rcpt_cmd(SMTPD_STATE *state, int argc, SMTPD_TOKEN *argv)
        return (-1);
     }
     if (SMTPD_STAND_ALONE(state) == 0) {
-       if ((err = smtpd_check_rcpt(state, STR(state->addr_buf))) != 0) {
-           smtpd_chat_reply(state, "%s", err);
-           return (-1);
-       }
+       err = smtpd_check_rcpt(state, STR(state->addr_buf));
        if (smtpd_milters != 0
            && (state->saved_flags & MILTER_SKIP_FLAGS) == 0) {
            PUSH_STRING(saved_rcpt, state->recipient, STR(state->addr_buf));
-           err = milter_rcpt_event(smtpd_milters,
+           state->milter_reject_text = err;
+           milter_err = milter_rcpt_event(smtpd_milters,
+                                          err == 0 ? MILTER_FLAG_NONE :
+                                          MILTER_FLAG_WANT_RCPT_REJ,
                                    milter_argv(state, argc - 2, argv + 2));
-           if (err != 0) {
+           if (err == 0 && milter_err != 0) {
                /* Log reject etc. with correct recipient information. */
-               err = check_milter_reply(state, err);
+               err = check_milter_reply(state, milter_err);
            }
            POP_STRING(saved_rcpt, state->recipient);
-           if (err != 0) {
-               smtpd_chat_reply(state, "%s", err);
-               return (-1);
-           }
+       }
+       if (err != 0) {
+           smtpd_chat_reply(state, "%s", err);
+           return (-1);
        }
     }
 
index fc7ac56ed4716158fbe227ccb885153a16d19430..3f921bcbd368e6b0468b87db5c193859374b4b9a 100644 (file)
@@ -176,8 +176,9 @@ typedef struct SMTPD_STATE {
     /*
      * Milter support.
      */
-    const char **milter_argv;
-    ssize_t milter_argc;
+    const char **milter_argv;          /* SMTP command vector */
+    ssize_t milter_argc;               /* SMTP command vector */
+    const char *milter_reject_text;    /* input to call-back from Milter */
 } SMTPD_STATE;
 
 #define SMTPD_FLAG_HANGUP         (1<<0)       /* 421/521 disconnect */
index cbe8c69edfa1587c6763c8b04f29ac5d1449550f..1a18f92e3c797b3768cd77028d13939a0abf2531 100644 (file)
 #include "smtpd_sasl_glue.h"
 #include "smtpd_check.h"
 #include "smtpd_dsn_fix.h"
+#include "smtpd_resolve.h"
 
 #define RESTRICTION_SEPARATORS ", \t\r\n"
 
@@ -264,7 +265,6 @@ static jmp_buf smtpd_check_buf;
   * memory manager routines.
   */
 static VSTRING *error_text;
-static CTABLE *smtpd_resolve_cache;
 static CTABLE *smtpd_rbl_cache;
 
  /*
@@ -435,48 +435,6 @@ typedef struct {
     const char *txt;                   /* randomly selected trimmed TXT rr */
 } SMTPD_RBL_EXPAND_CONTEXT;
 
-/* resolve_pagein - page in an address resolver result */
-
-static void *resolve_pagein(const char *addr, void *unused_context)
-{
-    static VSTRING *query;
-    RESOLVE_REPLY *reply;
-
-    /*
-     * Initialize on the fly.
-     */
-    if (query == 0)
-       query = vstring_alloc(10);
-
-    /*
-     * Initialize.
-     */
-    reply = (RESOLVE_REPLY *) mymalloc(sizeof(*reply));
-    resolve_clnt_init(reply);
-
-    /*
-     * Resolve the address.
-     */
-    rewrite_clnt_internal(MAIL_ATTR_RWR_LOCAL, addr, query);
-    resolve_clnt_query(STR(query), reply);
-    lowercase(STR(reply->recipient));
-
-    /*
-     * Save the result.
-     */
-    return ((void *) reply);
-}
-
-/* resolve_pageout - page out an address resolver result */
-
-static void resolve_pageout(void *data, void *unused_context)
-{
-    RESOLVE_REPLY *reply = (RESOLVE_REPLY *) data;
-
-    resolve_clnt_free(reply);
-    myfree((void *) reply);
-}
-
 /* policy_client_register - register policy service endpoint */
 
 static void policy_client_register(const char *name)
@@ -668,8 +626,7 @@ void    smtpd_check_init(void)
      * Initialize the resolved address cache. Note: the cache persists across
      * SMTP sessions so we cannot make it dependent on session state.
      */
-    smtpd_resolve_cache = ctable_create(100, resolve_pagein,
-                                       resolve_pageout, (void *) 0);
+    smtpd_resolve_init(100);
 
     /*
      * Initialize the RBL lookup cache. Note: the cache persists across SMTP
@@ -1351,8 +1308,7 @@ static int permit_auth_destination(SMTPD_STATE *state, char *recipient)
     /*
      * Resolve the address.
      */
-    reply = (const RESOLVE_REPLY *)
-       ctable_locate(smtpd_resolve_cache, recipient);
+    reply = smtpd_resolve_addr(recipient);
     if (reply->flags & RESOLVE_FLAG_FAIL)
        reject_dict_retry(state, recipient);
 
@@ -1625,8 +1581,7 @@ static int permit_mx_backup(SMTPD_STATE *state, const char *recipient,
     /*
      * Resolve the address.
      */
-    reply = (const RESOLVE_REPLY *)
-       ctable_locate(smtpd_resolve_cache, recipient);
+    reply = smtpd_resolve_addr(recipient);
     if (reply->flags & RESOLVE_FLAG_FAIL)
        reject_dict_retry(state, recipient);
 
@@ -1794,7 +1749,7 @@ static int reject_unknown_address(SMTPD_STATE *state, const char *addr,
     /*
      * Resolve the address.
      */
-    reply = (const RESOLVE_REPLY *) ctable_locate(smtpd_resolve_cache, addr);
+    reply = smtpd_resolve_addr(addr);
     if (reply->flags & RESOLVE_FLAG_FAIL)
        reject_dict_retry(state, addr);
 
@@ -2733,7 +2688,7 @@ static int check_mail_access(SMTPD_STATE *state, const char *table,
     /*
      * Resolve the address.
      */
-    reply = (const RESOLVE_REPLY *) ctable_locate(smtpd_resolve_cache, addr);
+    reply = smtpd_resolve_addr(addr);
     if (reply->flags & RESOLVE_FLAG_FAIL)
        reject_dict_retry(state, addr);
 
@@ -3327,7 +3282,7 @@ static int reject_auth_sender_login_mismatch(SMTPD_STATE *state, const char *sen
      * Reject if the client is logged in and does not own the sender address.
      */
     if (smtpd_sasl_is_active(state) && state->sasl_username != 0) {
-       reply = (const RESOLVE_REPLY *) ctable_locate(smtpd_resolve_cache, sender);
+       reply = smtpd_resolve_addr(sender);
        if (reply->flags & RESOLVE_FLAG_FAIL)
            reject_dict_retry(state, sender);
        if ((owners = check_mail_addr_find(state, sender, smtpd_sender_login_maps,
@@ -3360,7 +3315,7 @@ static int reject_unauth_sender_login_mismatch(SMTPD_STATE *state, const char *s
      * owner.
      */
     if (smtpd_sasl_is_active(state) && state->sasl_username == 0) {
-       reply = (const RESOLVE_REPLY *) ctable_locate(smtpd_resolve_cache, sender);
+       reply = smtpd_resolve_addr(sender);
        if (reply->flags & RESOLVE_FLAG_FAIL)
            reject_dict_retry(state, sender);
        if (check_mail_addr_find(state, sender, smtpd_sender_login_maps,
@@ -4004,8 +3959,7 @@ int     smtpd_check_addr(const char *addr)
      */
     if (addr == 0 || *addr == 0)
        return (0);
-    resolve_reply = (const RESOLVE_REPLY *)
-       ctable_locate(smtpd_resolve_cache, addr);
+    resolve_reply = smtpd_resolve_addr(addr);
     if (resolve_reply->flags & RESOLVE_FLAG_ERROR)
        return (-1);
     return (0);
@@ -4430,8 +4384,7 @@ static int check_rcpt_maps(SMTPD_STATE *state, const char *recipient,
     /*
      * Resolve the address.
      */
-    reply = (const RESOLVE_REPLY *)
-       ctable_locate(smtpd_resolve_cache, recipient);
+    reply = smtpd_resolve_addr(recipient);
     if (reply->flags & RESOLVE_FLAG_FAIL)
        reject_dict_retry(state, recipient);
 
index 763e38e2bd0681d98989c77014953cea334f0a7b..b129f352a45087f77149f6a7b174866a9254e9a6 100644 (file)
@@ -33,6 +33,8 @@
 
 /* Utility library. */
 
+#include <split_at.h>
+
 /* Global library. */
 
 #include <mail_params.h>
@@ -46,6 +48,7 @@
 
 #include <smtpd.h>
 #include <smtpd_sasl_glue.h>
+#include <smtpd_resolve.h>
 #include <smtpd_milter.h>
 
  /*
 const char *smtpd_milter_eval(const char *name, void *ptr)
 {
     SMTPD_STATE *state = (SMTPD_STATE *) ptr;
+    const RESOLVE_REPLY *reply;
+    char   *cp;
+
+    /*
+     * On-the-fly initialization.
+     */
+    if (state->expand_buf == 0)
+       state->expand_buf = vstring_alloc(10);
 
     /*
      * Canonicalize the name.
      */
     if (*name != '{') {                                /* } */
-       if (state->expand_buf == 0)
-           state->expand_buf = vstring_alloc(10);
        vstring_sprintf(state->expand_buf, "{%s}", name);
        name = STR(state->expand_buf);
     }
@@ -81,8 +90,6 @@ const char *smtpd_milter_eval(const char *name, void *ptr)
      * Connect macros.
      */
     if (strcmp(name, S8_MAC__) == 0) {
-       if (state->expand_buf == 0)
-           state->expand_buf = vstring_alloc(10);
        vstring_sprintf(state->expand_buf, "%s [%s]",
                        state->reverse_name, state->addr);
        if (strcasecmp(state->name, state->reverse_name) != 0)
@@ -96,8 +103,6 @@ const char *smtpd_milter_eval(const char *name, void *ptr)
     if (strcmp(name, S8_MAC_CLIENT_PORT) == 0)
        return (strcmp(state->port, CLIENT_PORT_UNKNOWN) ? state->port : "0");
     if (strcmp(name, S8_MAC_CLIENT_CONN) == 0) {
-       if (state->expand_buf == 0)
-           state->expand_buf = vstring_alloc(10);
        vstring_sprintf(state->expand_buf, "%d", state->conn_count);
        return (STR(state->expand_buf));
     }
@@ -124,8 +129,6 @@ const char *smtpd_milter_eval(const char *name, void *ptr)
     if (strcmp(name, S8_MAC_CIPHER_BITS) == 0) {
        if (state->tls_context == 0)
            return (0);
-       if (state->expand_buf == 0)
-           state->expand_buf = vstring_alloc(10);
        vstring_sprintf(state->expand_buf, "%d",
                        IF_ENCRYPTED(state->tls_context->cipher_usebits));
        return (STR(state->expand_buf));
@@ -154,15 +157,28 @@ const char *smtpd_milter_eval(const char *name, void *ptr)
     if (strcmp(name, S8_MAC_MAIL_ADDR) == 0) {
        if (state->sender == 0)
            return (0);
-       if (state->expand_buf == 0)
-           state->expand_buf = vstring_alloc(10);
+       if (state->sender[0] == 0)
+           return ("");
+       reply = smtpd_resolve_addr(state->sender);
        /* Sendmail 8.13 does not externalize the null string. */
-       if (state->sender[0])
-           quote_821_local(state->expand_buf, state->sender);
+       if (STR(reply->recipient)[0])
+           quote_821_local(state->expand_buf, STR(reply->recipient));
        else
-           vstring_strcpy(state->expand_buf, state->sender);
+           vstring_strcpy(state->expand_buf, STR(reply->recipient));
        return (STR(state->expand_buf));
     }
+    if (strcmp(name, S8_MAC_MAIL_HOST) == 0) {
+       if (state->sender == 0)
+           return (0);
+       reply = smtpd_resolve_addr(state->sender);
+       return (STR(reply->nexthop));
+    }
+    if (strcmp(name, S8_MAC_MAIL_MAILER) == 0) {
+       if (state->sender == 0)
+           return (0);
+       reply = smtpd_resolve_addr(state->sender);
+       return (STR(reply->transport));
+    }
 
     /*
      * RCPT TO macros.
@@ -170,14 +186,39 @@ const char *smtpd_milter_eval(const char *name, void *ptr)
     if (strcmp(name, S8_MAC_RCPT_ADDR) == 0) {
        if (state->recipient == 0)
            return (0);
-       if (state->expand_buf == 0)
-           state->expand_buf = vstring_alloc(10);
+       if (state->recipient[0] == 0)
+           return ("");
+       if (state->milter_reject_text) {
+           vstring_strcpy(state->expand_buf, state->milter_reject_text + 4);
+           cp = split_at(STR(state->expand_buf), ' ');
+           return (cp ? split_at(cp, ' ') : cp);
+       }
+       reply = smtpd_resolve_addr(state->recipient);
        /* Sendmail 8.13 does not externalize the null string. */
-       if (state->recipient[0])
-           quote_821_local(state->expand_buf, state->recipient);
+       if (STR(reply->recipient)[0])
+           quote_821_local(state->expand_buf, STR(reply->recipient));
        else
-           vstring_strcpy(state->expand_buf, state->recipient);
+           vstring_strcpy(state->expand_buf, STR(reply->recipient));
        return (STR(state->expand_buf));
     }
+    if (strcmp(name, S8_MAC_RCPT_HOST) == 0) {
+       if (state->recipient == 0)
+           return (0);
+       if (state->milter_reject_text) {
+           vstring_strcpy(state->expand_buf, state->milter_reject_text + 4);
+           (void) split_at(STR(state->expand_buf), ' ');
+           return (STR(state->expand_buf));
+       }
+       reply = smtpd_resolve_addr(state->recipient);
+       return (STR(reply->nexthop));
+    }
+    if (strcmp(name, S8_MAC_RCPT_MAILER) == 0) {
+       if (state->recipient == 0)
+           return (0);
+       if (state->milter_reject_text)
+           return (S8_RCPT_MAILER_ERROR);
+       reply = smtpd_resolve_addr(state->recipient);
+       return (STR(reply->transport));
+    }
     return (0);
 }
diff --git a/postfix/src/smtpd/smtpd_resolve.c b/postfix/src/smtpd/smtpd_resolve.c
new file mode 100644 (file)
index 0000000..2166ebb
--- /dev/null
@@ -0,0 +1,149 @@
+/*++
+/* NAME
+/*     smtpd_resolve 3
+/* SUMMARY
+/*     caching resolve client
+/* SYNOPSIS
+/*     #include <smtpd_resolve.h>
+/*
+/*     void    smtpd_resolve_init(cache_size)
+/*     int     cache_size;
+/*
+/*     const RESOLVE_REPLY *smtpd_resolve_addr(addr)
+/*     const char *addr;
+/* DESCRIPTION
+/*     This module maintains a resolve client cache that persists
+/*     across SMTP sessions (not process life times). Addresses
+/*     are always resolved in local rewriting context.
+/*
+/*     smtpd_resolve_init() initializes the cache and must
+/*     called once before the cache can be used.
+/*
+/*     smtpd_resolve_addr() resolves one address or returns
+/*     a known result from cache.
+/*
+/*     Arguments:
+/* .IP cache_size
+/*     The requested cache size.
+/* .IP addr
+/*     The address to resolve.
+/* DIAGNOSTICS
+/*     All errors are fatal.
+/* BUGS
+/*     The recipient address is always case folded to lowercase.
+/*     Changing this requires great care, since the address is used
+/*     for policy lookups.
+/* LICENSE
+/* .ad
+/* .fi
+/*     The Secure Mailer license must be distributed with this software.
+/* AUTHOR(S)
+/*     Wietse Venema
+/*     IBM T.J. Watson Research
+/*     P.O. Box 704
+/*     Yorktown Heights, NY 10598, USA
+/*--*/
+
+/* System library. */
+
+#include <sys_defs.h>
+
+/* Utility library. */
+
+#include <msg.h>
+#include <mymalloc.h>
+#include <vstring.h>
+#include <ctable.h>
+#include <stringops.h>
+
+/* Global library. */
+
+#include <rewrite_clnt.h>
+#include <resolve_clnt.h>
+#include <mail_proto.h>
+
+/* Application-specific. */
+
+#include <smtpd_resolve.h>
+
+static CTABLE *smtpd_resolve_cache;
+
+#define STR(x) vstring_str(x)
+
+/* resolve_pagein - page in an address resolver result */
+
+static void *resolve_pagein(const char *addr, void *unused_context)
+{
+    static VSTRING *query;
+    RESOLVE_REPLY *reply;
+
+    /*
+     * Initialize on the fly.
+     */
+    if (query == 0)
+       query = vstring_alloc(10);
+
+    /*
+     * Initialize.
+     */
+    reply = (RESOLVE_REPLY *) mymalloc(sizeof(*reply));
+    resolve_clnt_init(reply);
+
+    /*
+     * Resolve the address.
+     */
+    rewrite_clnt_internal(MAIL_ATTR_RWR_LOCAL, addr, query);
+    resolve_clnt_query(STR(query), reply);
+    lowercase(STR(reply->recipient));          /* XXX */
+
+    /*
+     * Save the result.
+     */
+    return ((void *) reply);
+}
+
+/* resolve_pageout - page out an address resolver result */
+
+static void resolve_pageout(void *data, void *unused_context)
+{
+    RESOLVE_REPLY *reply = (RESOLVE_REPLY *) data;
+
+    resolve_clnt_free(reply);
+    myfree((void *) reply);
+}
+
+/* smtpd_resolve_init - set up global cache */
+
+void    smtpd_resolve_init(int cache_size)
+{
+
+    /*
+     * Sanity check.
+     */
+    if (smtpd_resolve_cache)
+       msg_panic("smtpd_resolve_init: multiple initialization");
+
+    /*
+     * Initialize the resolved address cache. Note: the cache persists across
+     * SMTP sessions so we cannot make it dependent on session state.
+     */
+    smtpd_resolve_cache = ctable_create(cache_size, resolve_pagein,
+                                       resolve_pageout, (void *) 0);
+}
+
+/* smtpd_resolve_addr - resolve cached addres */
+
+const RESOLVE_REPLY *smtpd_resolve_addr(const char *addr)
+{
+
+    /*
+     * Sanity check.
+     */
+    if (smtpd_resolve_cache == 0)
+       msg_panic("smtpd_resolve_addr: missing initialization");
+
+    /*
+     * Reply from the read-through cache.
+     */
+    return (const RESOLVE_REPLY *) ctable_locate(smtpd_resolve_cache, addr);
+}
diff --git a/postfix/src/smtpd/smtpd_resolve.h b/postfix/src/smtpd/smtpd_resolve.h
new file mode 100644 (file)
index 0000000..bfbc494
--- /dev/null
@@ -0,0 +1,38 @@
+/*++
+/* NAME
+/*     smtpd_resolve 3h
+/* SUMMARY
+/*     caching resolve client
+/* SYNOPSIS
+/*     include <smtpd_resolve.h>
+/* DESCRIPTION
+/* .nf
+
+ /*
+  * Global library.
+  */
+#include <resolve_clnt.h>
+
+ /*
+  * External interface.
+  */
+extern void smtpd_resolve_init(int);
+extern const RESOLVE_REPLY *smtpd_resolve_addr(const char *);
+
+/* LICENSE
+/* .ad
+/* .fi
+/*     The Secure Mailer license must be distributed with this software.
+/* AUTHOR(S)
+/*     Wietse Venema
+/*     IBM T.J. Watson Research
+/*     P.O. Box 704
+/*     Yorktown Heights, NY 10598, USA
+/*
+/*     TLS support originally by:
+/*     Lutz Jaenicke
+/*     BTU Cottbus
+/*     Allgemeine Elektrotechnik
+/*     Universitaetsplatz 3-4
+/*     D-03044 Cottbus, Germany
+/*--*/
index 4883d097e8dcaaa6960740fab993ed60c26ccb84..3ad1c74b5eb098bae47c8c834786e0b0c5c8df66 100644 (file)
@@ -282,6 +282,7 @@ static int xsasl_dovecot_server_connect(XSASL_DOVECOT_SERVER_IMPL *xp)
                    VSTREAM_CTL_TIMEOUT, AUTH_TIMEOUT,
                    VSTREAM_CTL_END);
 
+       /* XXX Encapsulate for logging. */
     vstream_fprintf(sasl_stream,
                    "VERSION\t%u\t%u\n"
                    "CPID\t%u\n",
@@ -294,6 +295,7 @@ static int xsasl_dovecot_server_connect(XSASL_DOVECOT_SERVER_IMPL *xp)
     }
     success = 0;
     line_str = vstring_alloc(256);
+       /* XXX Encapsulate for logging. */
     while (vstring_get_nonl(line_str, sasl_stream) != VSTREAM_EOF) {
        line = vstring_str(line_str);
 
@@ -543,6 +545,7 @@ static int xsasl_dovecot_handle_reply(XSASL_DOVECOT_SERVER *server,
     const char *myname = "xsasl_dovecot_handle_reply";
     char   *line, *cmd;
 
+       /* XXX Encapsulate for logging. */
     while (vstring_get_nonl(server->sasl_line,
                            server->impl->sasl_stream) != VSTREAM_EOF) {
        line = vstring_str(server->sasl_line);
@@ -637,12 +640,14 @@ int     xsasl_dovecot_server_first(XSASL_SERVER *xp, const char *sasl_method,
        }
        /* send the request */
        server->last_request_id = ++server->impl->request_id_counter;
+       /* XXX Encapsulate for logging. */
        vstream_fprintf(server->impl->sasl_stream,
                        "AUTH\t%u\t%s\tservice=%s\tnologin\tlip=%s\trip=%s",
                        server->last_request_id, sasl_method,
                        server->service, server->server_addr,
                        server->client_addr);
        if (server->tls_flag)
+       /* XXX Encapsulate for logging. */
            vstream_fputs("\tsecured", server->impl->sasl_stream);
        if (init_response) {
 
@@ -650,9 +655,11 @@ int     xsasl_dovecot_server_first(XSASL_SERVER *xp, const char *sasl_method,
             * initial response is already base64 encoded, so we can send it
             * directly.
             */
+       /* XXX Encapsulate for logging. */
            vstream_fprintf(server->impl->sasl_stream,
                            "\tresp=%s", init_response);
        }
+       /* XXX Encapsulate for logging. */
        VSTREAM_PUTC('\n', server->impl->sasl_stream);
 
        if (vstream_fflush(server->impl->sasl_stream) != VSTREAM_EOF)
@@ -683,6 +690,7 @@ static int xsasl_dovecot_server_next(XSASL_SERVER *xp, const char *request,
        vstring_strcpy(reply, "Invalid base64 data in continued response");
        return XSASL_AUTH_FAIL;
     }
+       /* XXX Encapsulate for logging. */
     vstream_fprintf(server->impl->sasl_stream,
                    "CONT\t%u\t%s\n", server->last_request_id, request);
     if (vstream_fflush(server->impl->sasl_stream) == VSTREAM_EOF) {