]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-2.10-20121007
authorWietse Venema <wietse@porcupine.org>
Sun, 7 Oct 2012 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <viktor@dukhovni.org>
Tue, 5 Feb 2013 06:38:18 +0000 (06:38 +0000)
59 files changed:
postfix/HISTORY
postfix/README_FILES/ADDRESS_VERIFICATION_README
postfix/README_FILES/FILTER_README
postfix/README_FILES/LINUX_README
postfix/README_FILES/MULTI_INSTANCE_README
postfix/README_FILES/POSTSCREEN_README
postfix/README_FILES/RESTRICTION_CLASS_README
postfix/README_FILES/SASL_README
postfix/README_FILES/SMTPD_ACCESS_README
postfix/README_FILES/SMTPD_POLICY_README
postfix/README_FILES/SMTPD_PROXY_README
postfix/README_FILES/STANDARD_CONFIGURATION_README
postfix/README_FILES/TLS_README
postfix/README_FILES/VERP_README
postfix/RELEASE_NOTES
postfix/WISHLIST
postfix/conf/post-install
postfix/html/ADDRESS_VERIFICATION_README.html
postfix/html/FILTER_README.html
postfix/html/LINUX_README.html
postfix/html/MULTI_INSTANCE_README.html
postfix/html/POSTSCREEN_README.html
postfix/html/RESTRICTION_CLASS_README.html
postfix/html/SASL_README.html
postfix/html/SMTPD_ACCESS_README.html
postfix/html/SMTPD_POLICY_README.html
postfix/html/SMTPD_PROXY_README.html
postfix/html/STANDARD_CONFIGURATION_README.html
postfix/html/TLS_README.html
postfix/html/VERP_README.html
postfix/html/postconf.5.html
postfix/html/smtpd.8.html
postfix/man/man5/postconf.5
postfix/man/man8/smtpd.8
postfix/mantools/postconf2man
postfix/mantools/postlink
postfix/proto/ADDRESS_VERIFICATION_README.html
postfix/proto/FILTER_README.html
postfix/proto/LINUX_README.html
postfix/proto/MULTI_INSTANCE_README.html
postfix/proto/POSTSCREEN_README.html
postfix/proto/RESTRICTION_CLASS_README.html
postfix/proto/SASL_README.html
postfix/proto/SMTPD_ACCESS_README.html
postfix/proto/SMTPD_POLICY_README.html
postfix/proto/SMTPD_PROXY_README.html
postfix/proto/STANDARD_CONFIGURATION_README.html
postfix/proto/TLS_README.html
postfix/proto/VERP_README.html
postfix/proto/postconf.proto
postfix/src/global/mail_params.h
postfix/src/global/mail_version.h
postfix/src/global/server_acl.c
postfix/src/smtpd/smtpd.c
postfix/src/smtpd/smtpd_check.c
postfix/src/trivial-rewrite/resolve.c
postfix/src/util/dict.h
postfix/src/util/dict_alloc.c
postfix/src/util/dict_open.c

index c26b330539ca0283d5dc5d539e0efcc3af82538b..e9dff859d497e265e656bc7b22513a4649bf70fb 100644 (file)
@@ -17978,3 +17978,37 @@ Apologies for any names omitted.
 
        Laptop-friendliness: avoid disk spin-up on idle systems by
        s/fifo/unix/ in master.cf.  Files: conf/master.cf.
+
+20120928-30
+
+       Feature: smtpd_relay_restrictions, proposed long ago by
+       Victor. The idea is to separate the mail relay policy from
+       the spam blocking policy, so that a permissive spam blocking
+       policy under smtpd_recipient_restrictions will no longer
+       unexpectedly result in a permissive mail relay policy.
+
+       This involves a change in default settings.  Similar to the
+       way that local_recipient_maps was introduced, there is a
+       safety net that prevents unexpected mail bounces when a
+       site upgrades to Postfix 2.10 or later, and there is no
+       change in documented smtpd_recipient_restrictions behavior.
+       See the RELEASE_NOTES file for details.  Files:
+       global/mail_params.h, smtpd/smtpd.c, smtpd/smtpd_check.c,
+       proto/postconf.proto, proto/SMTPD_ACCESS_README.html,
+       mantools/postlink, conf/post-install, RELEASE_NOTES.
+
+20120931-1001
+
+       Documentation: updated the remainder of the README files
+       and manual pages that discuss smtpd_recipient_restrictions.
+
+20121001
+
+       Cleanup: prepend 5.1.1 status code to "User unknown in
+       virtual alias table". File: trivial-rewrite/resolve.c.
+
+20121003
+
+       Bugfix: the postscreen_access_list feature was case-sensitive
+       in the first character of permit, reject, etc. Reported by
+       Francis Picabia. File: global/server_acl.c.
index 8a19731b792f17b7eebc49c051d281efedb6876b..1241d875bf1a60fe152882f07a3558b008c17c9f 100644 (file)
@@ -152,6 +152,9 @@ same address repeatedly.
     /etc/postfix/main.cf:
         smtpd_recipient_restrictions =
             permit_mynetworks
+            # reject_unauth_destination is not needed here if the mail
+            # relay policy is specified under smtpd_relay_restrictions
+            # (available with Postfix 2.10 and later).
             reject_unauth_destination
             ...
             reject_unknown_recipient_domain
@@ -273,7 +276,7 @@ probe fails with some temporary error. Specify a valid 2xx or 4xx code.
 
 The unverified_sender_reject_reason parameter (default: empty) specifies fixed
 text that Postfix will send to remote SMTP clients, instead of sending actual
-addres verification details. Do not specify the SMTP status code or enhanced
+address verification details. Do not specify the SMTP status code or enhanced
 status code.
 
 The unverified_sender_tempfail_action parameter (default: defer_if_permit)
index abee2a52691e23273ae86ee635b18ec75298c87e..bbe2adba11efdfc7f9a6e78f247be656a7d00753 100644 (file)
@@ -442,6 +442,8 @@ without sending `.' on the connection that injects mail back into Postfix.
             -o smtpd_helo_restrictions=
             -o smtpd_client_restrictions=
             -o smtpd_sender_restrictions=
+            # Postfix 2.10 and later: specify empty smtpd_relay_restrictions.
+            -o smtpd_relay_restrictions=
             -o smtpd_recipient_restrictions=permit_mynetworks,reject
             -o mynetworks=127.0.0.0/8
             -o smtpd_authorized_xforward_hosts=127.0.0.0/8
index 432accbd0cf10ca6037c124bf33d9a42241e3ad6..dd9a81373bab85ee0669ae677738c33ba7654949 100644 (file)
@@ -2,6 +2,20 @@ P\bPo\bos\bst\btf\bfi\bix\bx a\ban\bnd\bd L\bLi\bin\bnu\bux\bx
 
 -------------------------------------------------------------------------------
 
+H\bHo\bos\bst\bt l\blo\boo\bok\bku\bup\bp i\bis\bss\bsu\bue\bes\bs
+
+By default Linux /etc/hosts lookups do not support multiple IP address per
+hostname. This causes warnings from the Postfix SMTP server that "hostname XXX
+does not resolve to address YYY", and is especially a problem with hosts that
+have both IPv4 and IPv6 addresses. To fix, turn on support for multiple IP
+addresses:
+
+    /etc/host.conf:
+        ...
+        # We have machines with multiple IP addresses.
+        multi on
+        ...
+
 B\bBe\ber\brk\bke\bel\ble\bey\by D\bDB\bB i\bis\bss\bsu\bue\bes\bs
 
 If you can't compile Postfix because the file "db.h" isn't found, then you MUST
index b6e15d2e33a9fbe9df812eb24180cc8b4b0a9c4c..6186d59cbbe95dc25c636bacd259ccdbe5de45e8 100644 (file)
@@ -290,6 +290,8 @@ injection SMTP service. Typical additions include:
         # With multiple instances, rarely need "-o param=value" overrides
         # in master.cf, each instance gets its own main.cf file.
         #
+        # Postfix 2.10 and later: specify empty smtpd_relay_restrictions.
+        smtpd_relay_restrictions =
         smtpd_recipient_restrictions = permit_mynetworks, reject
 
         # Tolerate occasional high latency in the  content filter.
index 4931e1adcfc8ac39dfbed40954748e5e4f69cde0..4a1d66498523b99c096482a2d8bab8bf4c879d52 100644 (file)
@@ -772,8 +772,8 @@ for sites that require TLS support. The implementation introduces the tlsproxy
 SMTP clients.
 
 The tlsproxy(8) implementation led to the discovery of a "new" class of
-vulnerability (CVE-2011-0411) that affected multiple implementations of TLS
-over SMTP, POP, IMAP, NNTP, and FTP.
+vulnerability (CVE-2011-0411) that affected multiple implementations of SMTP,
+POP, IMAP, NNTP, and FTP over TLS.
 
 postscreen(8) was officially released as part of the Postfix 2.8 stable release
 in January 2011.
index 884c7112f87988aabdc7565182eb981acbf72827..109c3d40b391b580e6af74bfceef135ec749f363 100644 (file)
@@ -29,13 +29,17 @@ Example:
         permissive = permit
 
         smtpd_recipient_restrictions =
-       permit_mynetworks
-       reject_unauth_destination
-       check_recipient_access hash:/etc/postfix/recipient_access
+            permit_mynetworks
+       # reject_unauth_destination is not needed here if the mail
+       # relay policy is specified with smtpd_relay_restrictions
+       # (available with Postfix 2.10 and later).
+            reject_unauth_destination
+            check_recipient_access hash:/etc/postfix/recipient_access
+            ...
 
     /etc/postfix/recipient_access:
-        joe@my.domain  permissive
-        jane@my.domain restrictive
+        joe@my.domain       permissive
+        jane@my.domain      restrictive
 
 With this in place, you can use "restrictive" or "permissive" on the right-hand
 side of your per-client, helo, sender, or recipient SMTPD access tables.
@@ -63,6 +67,7 @@ SMTP client IP address, and therefore is subject to IP spoofing.
 
     /etc/postfix/main.cf:
         smtpd_recipient_restrictions =
+            ...
             check_recipient_access hash:/etc/postfix/access
             ...the usual stuff...
 
@@ -88,6 +93,7 @@ subject to SMTP sender spoofing.
 
     /etc/postfix/main.cf:
         smtpd_recipient_restrictions =
+            ...
             check_recipient_access hash:/etc/postfix/protected_destinations
             ...the usual stuff...
 
@@ -131,6 +137,7 @@ The example assumes DB/DBM files, but this could also be done with LDAP or SQL.
 
     /etc/postfix/main.cf:
         smtpd_recipient_restrictions =
+            ...
             check_sender_access hash:/etc/postfix/restricted_senders
             ...other stuff...
 
index 282edc1d494cfc3d6c1d8d917077020c084b1b69..5d8bbaa6beab6e47ff8d45a3f3ca7f6dc692820f 100644 (file)
@@ -832,17 +832,26 @@ These permissions are not enabled by default.
 
 M\bMa\bai\bil\bl r\bre\bel\bla\bay\by a\bau\but\bth\bho\bor\bri\biz\bza\bat\bti\bio\bon\bn
 
-The permit_sasl_authenticated restriction allows SASL-authenticated SMTP
-clients to send mail to remote destinations. Add it to the list of
-smtpd_recipient_restrictions as follows:
+With permit_sasl_authenticated the Postfix SMTP server can allow SASL-
+authenticated SMTP clients to send mail to remote destinations. Examples:
 
+    # With Postfix 2.10 and later, the mail relay policy is
+    # preferably specified under smtpd_relay_restrictions.
+    /etc/postfix/main.cf:
+        smtpd_relay_restrictions =
+       permit_mynetworks
+       p\bpe\ber\brm\bmi\bit\bt_\b_s\bsa\bas\bsl\bl_\b_a\bau\but\bth\bhe\ben\bnt\bti\bic\bca\bat\bte\bed\bd
+       reject_unauth_destination
+
+    # Older configurations combine relay control and spam control under
+    # smtpd_recipient_restrictions. To use this example with Postfix >=
+    # 2.10 specify "smtpd_relay_restrictions=".
     /etc/postfix/main.cf:
         smtpd_recipient_restrictions =
-        ...
-        permit_mynetworks
-        p\bpe\ber\brm\bmi\bit\bt_\b_s\bsa\bas\bsl\bl_\b_a\bau\but\bth\bhe\ben\bnt\bti\bic\bca\bat\bte\bed\bd
-        reject_unauth_destination
-        ...
+       permit_mynetworks
+       p\bpe\ber\brm\bmi\bit\bt_\b_s\bsa\bas\bsl\bl_\b_a\bau\but\bth\bhe\ben\bnt\bti\bic\bca\bat\bte\bed\bd
+       reject_unauth_destination
+       ...other rules...
 
 E\bEn\bnv\bve\bel\blo\bop\bpe\be s\bse\ben\bnd\bde\ber\br a\bad\bdd\bdr\bre\bes\bss\bs a\bau\but\bth\bho\bor\bri\biz\bza\bat\bti\bio\bon\bn
 
@@ -862,9 +871,7 @@ authenticated client is allowed to use a particular envelope sender address:
         smtpd_recipient_restrictions =
             ...
             r\bre\bej\bje\bec\bct\bt_\b_s\bse\ben\bnd\bde\ber\br_\b_l\blo\bog\bgi\bin\bn_\b_m\bmi\bis\bsm\bma\bat\btc\bch\bh
-            permit_sasl_authenticated
-            permit_mynetworks
-            reject_unauth_destination
+       permit_sasl_authenticated
             ...
 
 The controlled_envelope_senders table specifies the binding between a sender
@@ -1209,7 +1216,7 @@ example. Information sent by the client (that is, you) is shown in b\bbo\bol\bld\bd
     250-STARTTLS
     ...
 
-Instead of port 25 (smtp), specify port 587 (submission) where appriopriate.
+Instead of port 25 (smtp), specify port 587 (submission) where appropriate.
 
 E\bEn\bnc\bcr\bry\byp\bpt\bte\bed\bd S\bSM\bMT\bTP\bP s\bse\bes\bss\bsi\bio\bon\bn (\b(T\bTL\bLS\bS)\b)
 
index cbe958ed1eb48cfbfeb754adc4073890bfb3f52d..f7547237aacaa983203a8b0d339bed1d4c2152de 100644 (file)
@@ -27,10 +27,18 @@ abused systems end up on anti-spammer blacklists. See, for example, the
 information on http://www.mail-abuse.org/ and other websites.
 
 By default, Postfix has a moderately restrictive approach to mail relaying.
-Postfix forwards mail only from clients in trusted networks, or to domains that
-are configured as authorized relay destinations. For a description of the
-default policy, see the smtpd_recipient_restrictions parameter in the postconf
-(5) manual page, and the information that is referenced from there.
+Postfix forwards mail only from clients in trusted networks, from clients that
+have authenticated with SASL, or to domains that are configured as authorized
+relay destinations. For a description of the default mail relay policy, see the
+smtpd_relay_restrictions parameter in the postconf(5) manual page, and the
+information that is referenced from there.
+
+    NOTE: Postfix versions before 2.10 did not have smtpd_relay_restrictions.
+    They combined the mail relay and spam blocking policies, under
+    smtpd_recipient_restrictions. This could lead to unexpected results. For
+    example, a permissive spam blocking policy could unexpectedly result in a
+    permissive mail relay policy. An example of this is documented under
+    "Dangerous use of smtpd_recipient_restrictions".
 
 Most of the Postfix SMTP server access controls are targeted at stopping junk
 email.
@@ -123,8 +131,23 @@ Examples of simple restriction lists are:
     # Don't accept mail from domains that don't exist.
     smtpd_sender_restrictions = reject_unknown_sender_domain
 
-    # Whitelisting: local clients may specify any destination domain.
-    smtpd_recipient_restrictions = permit_mynetworks, reject_unauth_destination
+    # Relay control (Postfix 2.10 and later): local clients and
+    # authenticated clients may specify any destination domain.
+    smtpd_relay_restrictions = permit_mynetworks,
+       permit_sasl_authenticated,
+       reject_unauth_destination
+
+    # Spam control: exclude local clients and authenticated clients
+    # from DNSBL lookups.
+    smtpd_recipient_restrictions = permit_mynetworks,
+       permit_sasl_authenticated,
+       # reject_unauth_destination is not needed here if the mail
+       # relay policy is specified under smtpd_relay_restrictions
+       # (available with Postfix 2.10 and later).
+       reject_unauth_destination
+       reject_rbl_client zen.spamhaus.org,
+       reject_rhsbl_helo dbl.spamhaus.org,
+       reject_rhsbl_sender dbl.spamhaus.org
 
     # Block clients that speak too early.
     smtpd_data_restrictions = reject_unauth_pipelining
@@ -143,23 +166,52 @@ The table below summarizes the purpose of each SMTP access restriction list.
 All lists use the exact same syntax; they differ only in the time of evaluation
 and in the effect of a REJECT or DEFER result.
 
-     _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b 
-    |R\bRe\bes\bst\btr\bri\bic\bct\bti\bio\bon\bn l\bli\bis\bst\bt n\bna\bam\bme\be         |S\bSt\bta\bat\btu\bus\bs  |E\bEf\bff\bfe\bec\bct\bt o\bof\bf R\bRE\bEJ\bJE\bEC\bCT\bT o\bor\br D\bDE\bEF\bFE\bER\bR r\bre\bes\bsu\bul\blt\bt|
-    |_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b |
-    |smtpd_client_restrictions     |Optional|Reject all client commands      |
-    |_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b |
-    |smtpd_helo_restrictions       |Optional|Reject HELO/EHLO information    |
-    |_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b |
-    |smtpd_sender_restrictions     |Optional|Reject MAIL FROM information    |
-    |_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b |
-    |smtpd_recipient_restrictions  |Required|Reject RCPT TO information      |
-    |_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b |
-    |smtpd_data_restrictions       |Optional|Reject DATA command             |
-    |_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b |
-    |smtpd_end_of_data_restrictions|Optional|Reject END-OF-DATA command      |
-    |_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b |
-    |smtpd_etrn_restrictions       |Optional|Reject ETRN command             |
-    |_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b |
+     _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b 
+    |                              |       |                            |E\bEf\bff\bfe\bec\bct\bt o\bof\bf  |
+    |R\bRe\bes\bst\btr\bri\bic\bct\bti\bio\bon\bn l\bli\bis\bst\bt n\bna\bam\bme\be         |V\bVe\ber\brs\bsi\bio\bon\bn|S\bSt\bta\bat\btu\bus\bs                      |R\bRE\bEJ\bJE\bEC\bCT\bT o\bor\br  |
+    |                              |       |                            |D\bDE\bEF\bFE\bER\bR      |
+    |                              |       |                            |r\bre\bes\bsu\bul\blt\bt     |
+    |_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b |
+    |                              |       |                            |Reject all |
+    |smtpd_client_restrictions     |All    |Optional                    |client     |
+    |                              |       |                            |commands   |
+    |_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b |
+    |                              |       |                            |Reject     |
+    |smtpd_helo_restrictions       |All    |Optional                    |HELO/EHLO  |
+    |                              |       |                            |information|
+    |_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b |
+    |                              |       |                            |Reject MAIL|
+    |smtpd_sender_restrictions     |All    |Optional                    |FROM       |
+    |                              |       |                            |information|
+    |_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b |
+    |                              |       |Required if                 |           |
+    |                              |>= 2.10|smtpd_recipient_restrictions|           |
+    |                              |       |does not enforce relay      |Reject RCPT|
+    |smtpd_relay_restrictions      |       |policy                      |TO         |
+    |                              |_\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b |information|
+    |                              |       |                            |           |
+    |                              |< 2.10 |Not available               |           |
+    |                              |       |                            |           |
+    |_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b |
+    |                              |       |Required if                 |           |
+    |                              |>= 2.10|smtpd_relay_restrictions    |           |
+    |                              |       |does not enforce relay      |Reject RCPT|
+    |smtpd_recipient_restrictions  |       |policy                      |TO         |
+    |                              |_\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b |information|
+    |                              |       |                            |           |
+    |                              |< 2.10 |Required                    |           |
+    |                              |       |                            |           |
+    |_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b |
+    |smtpd_data_restrictions       |>= 2.0 |Optional                    |Reject DATA|
+    |                              |       |                            |command    |
+    |_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b |
+    |                              |       |                            |Reject END-|
+    |smtpd_end_of_data_restrictions|>= 2.2 |Optional                    |OF-DATA    |
+    |                              |       |                            |command    |
+    |_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b |
+    |smtpd_etrn_restrictions       |All    |Optional                    |Reject ETRN|
+    |                              |       |                            |command    |
+    |_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b |
 
 D\bDe\bel\bla\bay\bye\bed\bd e\bev\bva\bal\blu\bua\bat\bti\bio\bon\bn o\bof\bf S\bSM\bMT\bTP\bP a\bac\bcc\bce\bes\bss\bs r\bre\bes\bst\btr\bri\bic\bct\bti\bio\bon\bn l\bli\bis\bst\bts\bs
 
@@ -174,9 +226,9 @@ Current Postfix versions postpone the evaluation of client, helo and sender
 restriction lists until the RCPT TO or ETRN command. This behavior is
 controlled by the smtpd_delay_reject parameter. Restriction lists are still
 evaluated in the proper order of (client, helo, etrn) or (client, helo, sender,
-recipient, data, or end-of-data) restrictions. When a restriction list
-(example: client) evaluates to REJECT or DEFER the other restriction lists
-(example: helo, sender, etc.) are skipped.
+relay, recipient, data, or end-of-data) restrictions. When a restriction list
+(example: client) evaluates to REJECT or DEFER the restriction lists that
+follow (example: helo, sender, etc.) are skipped.
 
 Around the time that smtpd_delay_reject was introduced, Postfix was also
 changed to support mixed restriction lists that combine information about the
@@ -215,6 +267,12 @@ REJECT or DEFER, the recipient address is rejected; no surprises here. If the
 result is PERMIT, then the recipient address is accepted. And this is where
 surprises can happen.
 
+The problem is that Postfix versions before 2.10 did not have
+smtpd_relay_restrictions. They combined the mail relay and spam blocking
+policies, under smtpd_recipient_restrictions. The result is that a permissive
+spam blocking policy could unexpectedly result in a permissive mail relay
+policy.
+
 Here is an example that shows when a PERMIT result can result in too much
 access permission:
 
@@ -223,7 +281,7 @@ access permission:
 3         permit_mynetworks
 4         check_helo_access hash:/etc/postfix/helo_access
 5         reject_unknown_helo_hostname
-6         reject_unauth_destination
+6         r\bre\bej\bje\bec\bct\bt_\b_u\bun\bna\bau\but\bth\bh_\b_d\bde\bes\bst\bti\bin\bna\bat\bti\bio\bon\bn
 7
 8 /etc/postfix/helo_access:
 9     localhost.localdomain PERMIT
@@ -237,12 +295,26 @@ The problem with this configuration is that smtpd_recipient_restrictions
 evaluates to PERMIT for EVERY host that announces itself as
 "localhost.localdomain", making Postfix an open relay for all such hosts.
 
-In order to avoid surprises like these with smtpd_recipient_restrictions, you
-should place non-recipient restrictions AFTER the reject_unauth_destination
-restriction, not before. In the above example, the HELO based restrictions
-should be placed AFTER reject_unauth_destination, or better, the HELO based
-restrictions should be placed under smtpd_helo_restrictions where they can do
-no harm.
+With Postfix before version 2.10 you should place non-recipient restrictions
+AFTER the reject_unauth_destination restriction, not before. In the above
+example, the HELO based restrictions should be placed AFTER
+reject_unauth_destination, or better, the HELO based restrictions should be
+placed under smtpd_helo_restrictions where they can do no harm.
+
+1 /etc/postfix/main.cf:
+2     smtpd_recipient_restrictions =
+3         permit_mynetworks
+4         r\bre\bej\bje\bec\bct\bt_\b_u\bun\bna\bau\but\bth\bh_\b_d\bde\bes\bst\bti\bin\bna\bat\bti\bio\bon\bn
+5         check_helo_access hash:/etc/postfix/helo_access
+6         reject_unknown_helo_hostname
+7
+8 /etc/postfix/helo_access:
+9     localhost.localdomain PERMIT
+
+The above mistake will not happen with Postfix 2.10 and later, when the relay
+policy is specified under smtpd_relay_restrictions, and the spam blocking
+policy under smtpd_recipient_restrictions. Then, a permissive spam blocking
+policy will not result in a permissive mail relay policy.
 
 S\bSM\bMT\bTP\bP a\bac\bcc\bce\bes\bss\bs r\bru\bul\ble\be t\bte\bes\bst\bti\bin\bng\bg
 
index 5dd3210212d915a0f8839422f4ce05c33bc147c4..70c6bd0a60a302534e3ce05ef4fcc909e388c392 100644 (file)
@@ -206,6 +206,10 @@ NOTES:
     "connection refused" and other problems when you increase the smtpd process
     limit.
 
+  * Line 8: reject_unauth_destination is not needed here if the mail relay
+    policy is specified with smtpd_relay_restrictions (available with Postfix
+    2.10 and later).
+
   * Lines 8, 9: always specify "check_policy_service" AFTER
     "reject_unauth_destination" or else your system could become an open relay.
 
@@ -221,7 +225,8 @@ NOTES:
         (in the above example, "policy") and a built-in suffix (in the above
         example: "_time_limit").
 
-  * Solaris UNIX-domain sockets do not work reliably. Use TCP sockets instead:
+  * With Solaris < 9, or Postfix < 2.10 on any Solaris version, use TCP sockets
+    instead of UNIX-domain sockets:
 
      1 /etc/postfix/master.cf:
      2     127.0.0.1:9998  inet  n       n       n       -       0       spawn
@@ -323,14 +328,19 @@ Notes:
     it. See the spawn(8) manpage for more information about the
     transport_time_limit parameter.
 
+  * Line 9: reject_unauth_destination is not needed here if the mail relay
+    policy is specified with smtpd_relay_restrictions (available with Postfix
+    2.10 and later).
+
         Note: the "greylist_time_limit" parameter will not show up in
         "postconf" command output before Postfix version 2.9. This limitation
         applies to many parameters whose name is a combination of a master.cf
         service name (in the above example, "greylist") and a built-in suffix
         (in the above example: "_time_limit").
 
-On Solaris you must use inet: style sockets instead of unix: style, as detailed
-in the "Policy client/server configuration" section above.
+With Solaris < 9, or Postfix < 2.10 on any Solaris version, use inet: style
+sockets instead of unix: style, as detailed in the "Policy client/server
+configuration" section above.
 
      1 /etc/postfix/master.cf:
      2     127.0.0.1:9998  inet  n       n       n       -       0       spawn
@@ -369,8 +379,13 @@ filtering/sender-domain-validate.in.
 
 NOTES:
 
-  * Line 9: On Solaris you must use inet: style sockets instead of unix: style,
-    as detailed in the "Example: greylist policy server" section above.
+  * Line 9: On Solaris < 9, or Postfix < 2.10 on any Solaris version, use inet:
+    style sockets instead of unix: style, as detailed in the "Example: greylist
+    policy server" section above.
+
+  * Line 5: reject_unauth_destination is not needed here if the mail relay
+    policy is specified with smtpd_relay_restrictions (available with Postfix
+    2.10 and later).
 
   * Line 6: Be sure to specify "check_sender_access" AFTER
     "reject_unauth_destination" or else your system could become an open mail
@@ -407,8 +422,13 @@ avoids most of the delays and most of the database pollution problem.
 
 NOTES:
 
-  * Line 7: On Solaris you must use inet: style sockets instead of unix: style,
-    as detailed in the "Example: greylist policy server" section above.
+  * Line 7: On Solaris < 9, or Postfix < 2.10 on any Solaris version, use inet:
+    style sockets instead of unix: style, as detailed in the "Example: greylist
+    policy server" section above.
+
+  * Line 5: reject_unauth_destination is not needed here if the mail relay
+    policy is specified with smtpd_relay_restrictions (available with Postfix
+    2.10 and later).
 
   * Lines 6-7: Be sure to specify check_sender_access and check_policy_service
     AFTER reject_unauth_destination or else your system could become an open
index 8aadb4a9aa7e239c2509459d8af9cc142eea00e1..c26b5a850b50bfb33567b72926139496b066c02b 100644 (file)
@@ -125,8 +125,8 @@ This is configured by editing the master.cf file:
         smtp      inet  n       -       n       -       20      smtpd
             -o smtpd_proxy_filter=127.0.0.1:10025
             -o smtpd_client_connection_count_limit=10
-       # Postfix 2.7 and later performance feature.
-       # -o smtpd_proxy_options=speed_adjust
+            # Postfix 2.7 and later performance feature.
+            # -o smtpd_proxy_options=speed_adjust
         #
         # After-filter SMTP server. Receive mail from the content filter
         # on localhost port 10026.
@@ -136,6 +136,8 @@ This is configured by editing the master.cf file:
             -o smtpd_client_restrictions=
             -o smtpd_helo_restrictions=
             -o smtpd_sender_restrictions=
+            # Postfix 2.10 and later: specify empty smtpd_relay_restrictions.
+            -o smtpd_relay_restrictions=
             -o smtpd_recipient_restrictions=permit_mynetworks,reject
             -o smtpd_data_restrictions=
             -o mynetworks=127.0.0.0/8
index e347c8828cd3a1a7260cb77ae50d9b547243b9a0..ee823aaaffec1a3ca8e6182515dec02be1690242 100644 (file)
@@ -242,34 +242,44 @@ purpose of the firewall email function.
      3     relay_domains = example.com
      4     parent_domain_matches_subdomains =
      5         debug_peer_list smtpd_access_maps
-     6     smtpd_recipient_restrictions =
-     7         permit_mynetworks reject_unauth_destination
-     8
-     9     relay_recipient_maps = hash:/etc/postfix/relay_recipients
-    10     transport_maps = hash:/etc/postfix/transport
-    11
-    12 /etc/postfix/relay_recipients:
-    13     user1@example.com   x
-    14     user2@example.com   x
-    15      . . .
-    16
-    17 /etc/postfix/transport:
-    18     example.com   smtp:[inside-gateway.example.com]
+
+     6a    # Postfix 2.10 and later support separate relay control and
+     7a    # spam control.
+     8a    smtpd_relay_restrictions =
+     9a        permit_mynetworks reject_unauth_destination
+    10a    smtpd_recipient_restrictions = ...spam blocking rules....
+
+     6b    # Older configurations combine relay control and spam control. To
+     7b    # use this with Postfix >= 2.10 specify "smtpd_relay_restrictions=".
+     8b    smtpd_recipient_restrictions =
+     9b        permit_mynetworks reject_unauth_destination
+    10b        ...spam blocking rules....
+
+    11     relay_recipient_maps = hash:/etc/postfix/relay_recipients
+    12     transport_maps = hash:/etc/postfix/transport
+    13
+    14 /etc/postfix/relay_recipients:
+    15     user1@example.com   x
+    16     user2@example.com   x
+    17      . . .
+    18
+    19 /etc/postfix/transport:
+    20     example.com   smtp:[inside-gateway.example.com]
 
 Translation:
 
-  * Lines 1-7: Accept mail from local systems in $mynetworks, and accept mail
+  * Lines 1-10: Accept mail from local systems in $mynetworks, and accept mail
     from outside for "user@example.com" but not for
     "user@anything.example.com". The magic is in lines 4-5.
 
-  * Lines 9, 12-14: Define the list of valid addresses in the "example.com"
+  * Lines 11, 13-16: Define the list of valid addresses in the "example.com"
     domain that can receive mail from the Internet. This prevents the mail
     queue from filling up with undeliverable MAILER-DAEMON messages. If you
     can't maintain a list of valid recipients then you must specify
     "relay_recipient_maps =" (that is, an empty value), or you must specify an
     "@example.com x" wild-card in the relay_recipients table.
 
-  * Lines 10, 17-18: Route mail for "example.com" to the inside gateway
+  * Lines 12, 19-20: Route mail for "example.com" to the inside gateway
     machine. The [] forces Postfix to do no MX lookup.
 
 Specify d\bdb\bbm\bm instead of h\bha\bas\bsh\bh if your system uses d\bdb\bbm\bm files instead of d\bdb\bb files.
@@ -379,26 +389,36 @@ When your system is SECONDARY MX host for a remote site this is all you need:
      3
      4 /etc/postfix/main.cf:
      5     relay_domains = . . . the.backed-up.domain.tld
-     6     smtpd_recipient_restrictions =
-     7         permit_mynetworks reject_unauth_destination
-     8
-     9     # You must specify your NAT/proxy external address.
-    10     #proxy_interfaces = 1.2.3.4
-    11
-    12     relay_recipient_maps = hash:/etc/postfix/relay_recipients
+
+     6a    # Postfix 2.10 and later support separate relay control and
+     7a    # spam control.
+     8a    smtpd_relay_restrictions =
+     9a        permit_mynetworks reject_unauth_destination
+    10a    smtpd_recipient_restrictions = ...spam blocking rules....
+
+     6b    # Older configurations combine relay control and spam control. To
+     7b    # use this with Postfix >= 2.10 specify "smtpd_relay_restrictions=".
+     8b    smtpd_recipient_restrictions =
+     9b        permit_mynetworks reject_unauth_destination
+    10b        ...spam blocking rules....
+
+    11     # You must specify your NAT/proxy external address.
+    12     #proxy_interfaces = 1.2.3.4
     13
-    14 /etc/postfix/relay_recipients:
-    15     user1@the.backed-up.domain.tld   x
-    16     user2@the.backed-up.domain.tld   x
-    17      . . .
+    14     relay_recipient_maps = hash:/etc/postfix/relay_recipients
+    15
+    16 /etc/postfix/relay_recipients:
+    17     user1@the.backed-up.domain.tld   x
+    18     user2@the.backed-up.domain.tld   x
+    19      . . .
 
 When your system is PRIMARY MX host for a remote site you need the above, plus:
 
-    18 /etc/postfix/main.cf:
-    19     transport_maps = hash:/etc/postfix/transport
-    20
-    21 /etc/postfix/transport:
-    22     the.backed-up.domain.tld       relay:[their.mail.host.tld]
+    20 /etc/postfix/main.cf:
+    21     transport_maps = hash:/etc/postfix/transport
+    22
+    23 /etc/postfix/transport:
+    24     the.backed-up.domain.tld       relay:[their.mail.host.tld]
 
 Important notes:
 
@@ -408,20 +428,20 @@ Important notes:
 
   * Do not list the.backed-up.domain.tld in virtual_mailbox_domains.
 
-  * Lines 1-7: Forward mail from the Internet for "the.backed-up.domain.tld" to
+  * Lines 1-9: Forward mail from the Internet for "the.backed-up.domain.tld" to
     the primary MX host for that domain.
 
-  * Line 10: This is a must if Postfix receives mail via a NAT relay or proxy
+  * Line 12: This is a must if Postfix receives mail via a NAT relay or proxy
     that presents a different IP address to the world than the local machine.
 
-  * Lines 12-16: Define the list of valid addresses in the "the.backed-
+  * Lines 14-18: Define the list of valid addresses in the "the.backed-
     up.domain.tld" domain. This prevents your mail queue from filling up with
     undeliverable MAILER-DAEMON messages. If you can't maintain a list of valid
     recipients then you must specify "relay_recipient_maps =" (that is, an
     empty value), or you must specify an "@the.backed-up.domain.tld x" wild-
     card in the relay_recipients table.
 
-  * Line 22: The [] forces Postfix to do no MX lookup.
+  * Line 24: The [] forces Postfix to do no MX lookup.
 
 Specify d\bdb\bbm\bm instead of h\bha\bas\bsh\bh if your system uses d\bdb\bbm\bm files instead of d\bdb\bb files.
 To find out what lookup tables Postfix supports, use the command "p\bpo\bos\bst\btc\bco\bon\bnf\bf -\b-m\bm".
index d48c89d0c5dbbd61a19274eeb91cc4a276c98dba..c716989eac841ec04436fe279c49c784ef3c1872 100644 (file)
@@ -445,12 +445,23 @@ employee leaving).
 
 Example:
 
+    # With Postfix 2.10 and later, the mail relay policy is
+    # preferably specified under smtpd_relay_restrictions.
+    /etc/postfix/main.cf:
+        smtpd_relay_restrictions =
+            permit_mynetworks
+            permit_tls_clientcerts
+            reject_unauth_destination
+
+    # Older configurations combine relay control and spam control under
+    # smtpd_recipient_restrictions. To use this example with Postfix >=
+    # 2.10 specify "smtpd_relay_restrictions=".
     /etc/postfix/main.cf:
         smtpd_recipient_restrictions =
-            ...
+            permit_mynetworks
             permit_tls_clientcerts
             reject_unauth_destination
-            ...
+            ...other rules...
 
 Example: Postfix lookup tables are in the form of (key, value) pairs. Since we
 only need the key, the value can be chosen freely, e.g. the name of the user or
@@ -551,7 +562,7 @@ By default, the OpenSSL server selects the client's most preferred cipher that
 the server supports. With SSLv3 and later, the server may choose its own most
 preferred cipher that is supported (offered) by the client. Setting
 "tls_preempt_cipherlist = yes" enables server cipher preferences. The default
-OpenSSL behaviour applies with "tls_preempt_cipherlist = no".
+OpenSSL behavior applies with "tls_preempt_cipherlist = no".
 
 While server cipher selection may in some cases lead to a more secure or
 performant cipher choice, there is some risk of interoperability issues. In the
index 5a5a1c2b1233d35fbafac6168aa59ecf93e4e51f..a721ececafa46c6f103686499ce957da1a5ea2d1 100644 (file)
@@ -138,7 +138,7 @@ The first form uses the default main.cf VERP delimiters, the second form
 overrides them explicitly. The values shown are the recommended ones.
 
 You can use the smtpd_command_filter feature to append XVERP to SMTP commands
-from legacy sofware. This requires Postfix 2.7 or later.
+from legacy software. This requires Postfix 2.7 or later.
 
     /etc/postfix/main.cf:
         smtpd_command_filter = pcre:/etc/postfix/append_verp.pcre
index 0fb18079ceca2f0c530b1128e78293637db1e4c4..117af91e99d896e1308c6910032573dd85603e68 100644 (file)
@@ -14,6 +14,116 @@ specifies the release date of a stable release or snapshot release.
 If you upgrade from Postfix 2.8 or earlier, read RELEASE_NOTES-2.9
 before proceeding.
 
+Incompatible changes with snapshot 20121007
+===========================================
+
+As part of a forward compatibility safety net, the Postfix installation
+procedure adds the following smtpd_relay_restrictions entry to
+main.cf when there is none:
+
+    smtpd_relay_restrictions = 
+       permit_mynetworks 
+       permit_sasl_authenticated 
+       defer_unauth_destination
+
+If your site has a complex mail relay policy configured under
+smtpd_recipient_restrictions, this safety net will defer mail that
+the built-in smtpd_relay_restrictions setting would bounce. 
+
+To eliminate this safety net, take one of the following three
+actions:
+
+- Set smtpd_relay_restrictions empty, and keep using the existing
+  mail relay authorization policy in smtpd_recipient_restrictions.
+
+- Copy the existing mail relay authorization policy from
+  smtpd_recipient_restrictions to smtpd_relay_restrictions.
+
+- Set smtpd_relay_restrictions by hand to the new built-in
+  policy: permit_mynetworks reject_unauth_destination.
+
+There is no need to change the value of smtpd_recipient_restrictions.
+
+
+Major changes with snapshot 20121007
+====================================
+
+This version introduces the smtpd_relay_restrictions feature
+for mail relay control. The new built-in default settings are:
+
+    smtpd_relay_restrictions = 
+       permit_mynetworks 
+       reject_unauth_destination
+
+    smtpd_recipient_restrictions =
+       ( optional spam blocking rules would go here )
+
+For comparison, this is the Postfix before 2.10 default:
+
+    smtpd_recipient_restrictions =
+       permit_mynetworks 
+       reject_unauth_destination
+       ( optional spam blocking rules would go here )
+
+With Postfix versions before 2.10, the mail relay policy and spam
+blocking policy were combined under smtpd_recipient_restrictions,
+resulting in error-prone configuration.
+
+As of Postfix 2.10, the mail relay policy is preferably implemented
+with smtpd_relay_restrictions, so that a permissive spam blocking
+policy under smtpd_recipient_restrictions will not unexpectedly
+result in a permissive mail relay policy.
+
+As usual, this new feature is introduced with safety nets to prevent
+surprises when a site upgrades from an earlier Postfix release.
+
+1 - FORWARD COMPATIBILITY SAFETY NET: the Postfix installation
+    procedure adds the following smtpd_relay_restrictions entry to
+    main.cf when there is none:
+
+    smtpd_relay_restrictions = 
+       permit_mynetworks 
+       permit_sasl_authenticated 
+       defer_unauth_destination
+
+    If your site has a complex mail relay policy configured under
+    smtpd_recipient_restrictions, this safety net will defer mail
+    that the built-in smtpd_relay_restrictions setting would bounce.
+
+    To eliminate this safety net, take one of the following three
+    actions:
+
+    - Set smtpd_relay_restrictions empty, and keep using the existing
+      mail relay authorization policy in smtpd_recipient_restrictions.
+
+    - Copy the existing mail relay authorization policy from
+      smtpd_recipient_restrictions to smtpd_relay_restrictions.
+
+    - Set smtpd_relay_restrictions by hand to the new built-in
+      policy: permit_mynetworks reject_unauth_destination.
+
+    There is no need to change the value of smtpd_recipient_restrictions.
+
+2 - BACKWARDS COMPATIBILITY SAFETY NET: sites that migrate from
+    Postfix versions before 2.10 can set smtpd_relay_restrictions
+    to the empty value, and use smtpd_recipient_restrictions exactly
+    as they used it before.
+
+Incompatible changes with snapshot 20120924
+===========================================
+
+Postfix no longer uses FIFOs to emulate UNIX-domain sockets on
+Solaris 9 (Vintage 2002!) and later. If you install Postfix for
+the first time on an older Solaris system, edit the master.cf file
+and replace "unix" with "fifo" for the pickup and qmgr services.
+
+Major changes with snapshot 20120924
+====================================
+
+Laptop-friendliness: the default master.cf file now uses "unix"
+instead of "fifo" for the pickup and qmgr services. This avoids
+periodic disk drive spin-up.
+
 Incompatible changes with snapshot 20120625
 ===========================================
 
@@ -32,7 +142,9 @@ following:
     postscreen_upstream_proxy_protocol = haproxy
     smtpd_upstream_proxy_protocol = haproxy
 
-Note 1: smtpd_upstream_proxy_protocol can't be used behind postscreen.
+Note 1: smtpd_upstream_proxy_protocol can't be used in smtpd processes
+that are behind postscreen. Configure postscreen_upstream_proxy_protocol
+instead.
 
 Note 2: To use the nginx proxy with smtpd(8), enable the XCLIENT
 protocol with smtpd_authorized_xclient_hosts. This supports SASL
index 077258562f17c45502019b559baea51ea98b5f7c..8a53994128470528446dc601b568931691f3caaa 100644 (file)
@@ -6,23 +6,14 @@ Wish list:
 
        Things to do after the stable release:
 
+       Spellcheck and double-word check.
+
        Don't forget Apple's code donation for fetching mail from
        IMAP server.
 
        Make "rename" the default when postmapping a DB file
        (later: use copy+rename for postmap -i, postmap -d).
 
-       On most systems, switching the qmgr and pickup services
-       from "fifo" to "unix" endpoints can avoid disk spin-up due
-       to mtime changes.  However, Postfix on Solaris emulates
-       UNIX-domain sockets by sending a file handle through a FIFO.
-       Either we need to a) find out if a Solaris FIFO is a "unix"
-       or "fifo" endpoint (parsing master.cf is not an option for
-       chrooted daemons), or b) silently implement a Solaris "fifo"
-       endpoint as if master.cf says "unix", so that all Solaris
-       FIFOs are emulated UNIX-domain endpoints. Or, we bite the
-       bullet and stop emulating UNIX-domain onver FIFOs.
-
        Service-name parameters aren't documented in daemon manpages.
 
        When faking up the DSN ORCPT, don't send bare usernames
index 63ad8a0bd3bbc37cbd67f50d7fb83c00539addc2..a6a4aeba00830ccd70acd557253d5205a3539495 100644 (file)
@@ -800,11 +800,34 @@ EOF
 
     test "`$POSTCONF -dh inet_protocols`" = "ipv4" ||
        test -n "`$POSTCONF -c $config_directory -nh inet_protocols`" || {
-       echo COMPATIBILITY: editing main.cf, setting inet_protocols=ipv4.
-       echo Specify inet_protocols explicitly if you want to enable IPv6.
-       echo In a future release IPv6 will be enabled by default.
+       cat <<EOF | ${FMT}
+    COMPATIBILITY: editing $config_directory/main.cf, setting
+    inet_protocols=ipv4.  Specify inet_protocols explicitly if you
+    want to enable IPv6.
+    In a future release IPv6 will be enabled by default.
+EOF
        $POSTCONF -c $config_directory inet_protocols=ipv4 || exit 1
     }
+
+    # Postfix 2.10.
+    # Safety net for incompatible changes due to the introduction
+    # of the smtpd_relay_restrictions feature to separate the
+    # mail relay policy from the spam blocking policy.
+    # PLEASE DO NOT REMOVE THIS CODE. ITS PURPOSE IS TO PREVENT
+    # INBOUND MAIL FROM UNEXPECTEDLY BOUNCING AFTER UPGRADING FROM
+    # POSTFIX BEFORE 2.10.
+    test -n "`$POSTCONF -c $config_directory -nh smtpd_relay_restrictions`" || {
+       cat <<EOF | ${FMT}
+    COMPATIBILITY: editing $config_directory/main.cf, overriding
+    smtpd_relay_restrictions to prevent inbound mail from
+    unexpectedly bouncing.
+    Specify an empty smtpd_relay_restrictions value to keep using 
+    smtpd_recipient_restrictions as before.
+EOF
+       $POSTCONF -c $config_directory "smtpd_relay_restrictions = \
+           permit_mynetworks permit_sasl_authenticated \
+           defer_unauth_destination" || exit 1
+    }
 }
 
 # A reminder if this is the first time Postfix is being installed.
index 209459303437dc767bc64826d305752e5869598d..1aac0635736ead1709f929361a44902c908f8c6e 100644 (file)
@@ -95,14 +95,14 @@ always discarded.  </p>
     <td rowspan="3" align="center" valign="bottom"> <tt> -&gt; </tt>
     </td>
 
-       <td rowspan="3" align="center" valign="middle"> probe<br>
-       message </td>
+        <td rowspan="3" align="center" valign="middle"> probe<br>
+        message </td>
 
     <td rowspan="3" align="center" valign="middle"> <tt> -&gt; </tt>
     </td>
 
-       <td rowspan="3" bgcolor="#f0f0ff" align="center" valign="middle">
-       Postfix<br> mail<br> queue </td>
+        <td rowspan="3" bgcolor="#f0f0ff" align="center" valign="middle">
+        Postfix<br> mail<br> queue </td>
 
 </tr>
 
@@ -115,15 +115,15 @@ always discarded.  </p>
     <td rowspan="3" align="center" valign="middle"> <tt> -&gt; </tt>
     </td>
 
-       <td rowspan="3" bgcolor="#f0f0ff" align="center" valign="middle">
-       <a href="smtpd.8.html">Postfix<br> SMTP<br> server</a> </td>
+        <td rowspan="3" bgcolor="#f0f0ff" align="center" valign="middle">
+        <a href="smtpd.8.html">Postfix<br> SMTP<br> server</a> </td>
 
     <td rowspan="3" align="center" valign="middle"> <tt> &lt;-&gt;
     </tt> </td>
 
-       <td rowspan="3" bgcolor="#f0f0ff" align="center" valign="middle">
-       <a href="verify.8.html">Postfix<br> verify<br> server</a>
-       </td>
+        <td rowspan="3" bgcolor="#f0f0ff" align="center" valign="middle">
+        <a href="verify.8.html">Postfix<br> verify<br> server</a>
+        </td>
 
 </tr>
 
@@ -141,14 +141,14 @@ always discarded.  </p>
     <td rowspan="3" align="center" valign="top"> <tt> &lt;- </tt>
     </td>
 
-       <td rowspan="3" align="center" valign="middle"> probe<br>
-       status </td>
+        <td rowspan="3" align="center" valign="middle"> probe<br>
+        status </td>
 
     <td rowspan="3" align="center" valign="middle"> <tt> &lt;- </tt>
     </td>
 
-       <td rowspan="3" bgcolor="#f0f0ff" align="center" valign="middle">
-       Postfix<br> delivery<br> agents </td>
+        <td rowspan="3" bgcolor="#f0f0ff" align="center" valign="middle">
+        Postfix<br> delivery<br> agents </td>
 
     <td rowspan="3" align="left" valign="middle"> <tt>-&gt;</tt>
     Local<br> <tt>-&gt;</tt> Remote</td>
@@ -160,8 +160,8 @@ always discarded.  </p>
     <td rowspan="3" colspan="4" align="center" valign="middle">
     &nbsp; </td>
 
-       <td rowspan="3" align="center" valign="middle"> <tt>
-       ^</tt><br> <tt> |</tt><br> <tt> v</tt> </td>
+        <td rowspan="3" align="center" valign="middle"> <tt>
+        ^</tt><br> <tt> |</tt><br> <tt> v</tt> </td>
 
 </tr>
 
@@ -173,8 +173,8 @@ always discarded.  </p>
 
     <td colspan="4" align="center" valign="middle"> &nbsp; </td>
 
-       <td bgcolor="#f0f0ff" align="center" valign="middle">
-       Address<br> verification<br> database </td>
+        <td bgcolor="#f0f0ff" align="center" valign="middle">
+        Address<br> verification<br> database </td>
 
 </tr>
 
@@ -282,6 +282,9 @@ the same address repeatedly.  </p>
 /etc/postfix/<a href="postconf.5.html">main.cf</a>:
     <a href="postconf.5.html#smtpd_recipient_restrictions">smtpd_recipient_restrictions</a> = 
         <a href="postconf.5.html#permit_mynetworks">permit_mynetworks</a>
+        # <a href="postconf.5.html#reject_unauth_destination">reject_unauth_destination</a> is not needed here if the mail
+        # relay policy is specified under <a href="postconf.5.html#smtpd_relay_restrictions">smtpd_relay_restrictions</a>
+        # (available with Postfix 2.10 and later).
         <a href="postconf.5.html#reject_unauth_destination">reject_unauth_destination</a>
         ...
         <a href="postconf.5.html#reject_unknown_recipient_domain">reject_unknown_recipient_domain</a>
@@ -431,7 +434,7 @@ verification probe fails with some temporary error. Specify a valid
 
 <p> The <a href="postconf.5.html#unverified_sender_reject_reason">unverified_sender_reject_reason</a> parameter (default:
 empty) specifies fixed text that Postfix will send to remote SMTP
-clients, instead of sending actual addres verification details.
+clients, instead of sending actual address verification details.
 Do not specify the SMTP status code or enhanced status code.  </p>
 
 <p> The <a href="postconf.5.html#unverified_sender_tempfail_action">unverified_sender_tempfail_action</a> parameter (default:
index 85ca1f8885050fc90ad87f4999ccffb8ab5aa0b3..5910669ae24bf96f5dd0d19d5a486c10f72cf95b 100644 (file)
@@ -218,24 +218,24 @@ document for an introduction to the Postfix architecture. </p>
 
    <td colspan="2"> </td>
 
-       <td bgcolor="#f0f0ff" align="center" valign="middle">
-       <a href="QSHAPE_README.html#maildrop_queue"> maildrop <br>
-       queue </a> </td>
+        <td bgcolor="#f0f0ff" align="center" valign="middle">
+        <a href="QSHAPE_README.html#maildrop_queue"> maildrop <br>
+        queue </a> </td>
 
    <td align="center" valign="middle"> <tt> &lt;- </tt> </td>
 
-       <td bgcolor="#f0f0ff" align="center" valign="middle">Postfix<br>
-       <a href="postdrop.1.html">postdrop(1)</a> </td>
+        <td bgcolor="#f0f0ff" align="center" valign="middle">Postfix<br>
+        <a href="postdrop.1.html">postdrop(1)</a> </td>
 
    <td align="center" valign="middle"> <tt> &lt;- </tt> </td>
 
-       <td bgcolor="#f0f0ff" align="center" valign="middle">Postfix<br>
-       <a href="sendmail.1.html">sendmail(1)</a> </td>
+        <td bgcolor="#f0f0ff" align="center" valign="middle">Postfix<br>
+        <a href="sendmail.1.html">sendmail(1)</a> </td>
 
    <td align="center" valign="middle"> <tt> &lt;- </tt> </td>
 
-       <td bgcolor="#f0f0ff" align="center" valign="middle">Content
-       <br> filter </td>
+        <td bgcolor="#f0f0ff" align="center" valign="middle">Content
+        <br> filter </td>
 
    <td colspan="2"> </td>
 
@@ -750,6 +750,8 @@ that injects mail back into Postfix. </p>
         -o <a href="postconf.5.html#smtpd_helo_restrictions">smtpd_helo_restrictions</a>=
         -o <a href="postconf.5.html#smtpd_client_restrictions">smtpd_client_restrictions</a>=
         -o <a href="postconf.5.html#smtpd_sender_restrictions">smtpd_sender_restrictions</a>=
+        # Postfix 2.10 and later: specify empty <a href="postconf.5.html#smtpd_relay_restrictions">smtpd_relay_restrictions</a>.
+        -o <a href="postconf.5.html#smtpd_relay_restrictions">smtpd_relay_restrictions</a>=
         -o <a href="postconf.5.html#smtpd_recipient_restrictions">smtpd_recipient_restrictions</a>=<a href="postconf.5.html#permit_mynetworks">permit_mynetworks</a>,reject
         -o <a href="postconf.5.html#mynetworks">mynetworks</a>=127.0.0.0/8
         -o <a href="postconf.5.html#smtpd_authorized_xforward_hosts">smtpd_authorized_xforward_hosts</a>=127.0.0.0/8
index 507cc7c3b3f4bd99ab3549cbf538fa71dbc0f680..f6f7bbef6d1e5d6387ab23f8c893db19a730a238 100644 (file)
 
 <hr>
 
+<h2> Host lookup issues </h2>
+
+<p> By default Linux /etc/hosts lookups do not support multiple IP
+address per hostname. This causes warnings from the Postfix SMTP
+server that "hostname XXX does not resolve to address YYY", and is
+especially a problem with hosts that have both IPv4 and IPv6
+addresses.  To fix, turn on support for multiple IP addresses: </p>
+
+<blockquote>
+<pre>
+/etc/host.conf:
+    ...
+    # We have machines with multiple IP addresses.
+    multi on
+    ...
+</pre>
+</blockquote>
+
 <h2>Berkeley DB issues</h2>
 
 <p> If you can't compile Postfix because the file "db.h"
index f224338747b45c6054fe75efae6d00c78f02963d..37a708577ae982532b2b4025c20e1830761ce260 100644 (file)
@@ -374,6 +374,8 @@ post-filter re-injection SMTP service. Typical additions include: </p>
     # With multiple instances, rarely need "-o param=value" overrides
     # in <a href="master.5.html">master.cf</a>, each instance gets its own <a href="postconf.5.html">main.cf</a> file.
     #
+    # Postfix 2.10 and later: specify empty <a href="postconf.5.html#smtpd_relay_restrictions">smtpd_relay_restrictions</a>.
+    <a href="postconf.5.html#smtpd_relay_restrictions">smtpd_relay_restrictions</a> =
     <a href="postconf.5.html#smtpd_recipient_restrictions">smtpd_recipient_restrictions</a> = <a href="postconf.5.html#permit_mynetworks">permit_mynetworks</a>, reject
 
     # Tolerate occasional high latency in the  content filter.
index 06b8dce5009bec519bec30c81cc50784e222299e..f2ded3c7c975cc09eef997eaa891ddd2faa6b4a1 100644 (file)
@@ -1071,8 +1071,8 @@ that decrypts/encrypts the sessions for multiple SMTP clients. </p>
 <p> The <a href="tlsproxy.8.html">tlsproxy(8)</a> implementation led to the discovery of a "new"
 class of vulnerability (<a
 href="http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2011-0411"
->CVE-2011-0411</a>) that affected multiple implementations of TLS
-over SMTP, POP, IMAP, NNTP, and FTP. </p>
+>CVE-2011-0411</a>) that affected multiple implementations of SMTP,
+POP, IMAP, NNTP, and FTP over TLS. </p>
 
 <p> <a href="postscreen.8.html">postscreen(8)</a> was officially released as part of the Postfix
 2.8 stable release in January 2011.</p>
index 4035994eccba796a711d8f52abc23f3e8c7afffd..6b85f8d8f7f41ebabc885155ce6a448d3a4733e4 100644 (file)
@@ -48,13 +48,17 @@ care about these low-level details. </p>
     permissive = permit
 
     <a href="postconf.5.html#smtpd_recipient_restrictions">smtpd_recipient_restrictions</a> = 
-       <a href="postconf.5.html#permit_mynetworks">permit_mynetworks</a>
-       <a href="postconf.5.html#reject_unauth_destination">reject_unauth_destination</a>
-       <a href="postconf.5.html#check_recipient_access">check_recipient_access</a> hash:/etc/postfix/recipient_access
+        <a href="postconf.5.html#permit_mynetworks">permit_mynetworks</a>
+       # <a href="postconf.5.html#reject_unauth_destination">reject_unauth_destination</a> is not needed here if the mail
+       # relay policy is specified with <a href="postconf.5.html#smtpd_relay_restrictions">smtpd_relay_restrictions</a>
+       # (available with Postfix 2.10 and later).
+        <a href="postconf.5.html#reject_unauth_destination">reject_unauth_destination</a>
+        <a href="postconf.5.html#check_recipient_access">check_recipient_access</a> hash:/etc/postfix/recipient_access
+        ...
 
 /etc/postfix/recipient_access:
-    joe@my.domain      permissive
-    jane@my.domain     restrictive
+    joe@my.domain       permissive
+    jane@my.domain      restrictive
 </pre>
 </blockquote>
 
@@ -102,6 +106,7 @@ to IP spoofing. </p>
 <pre>
 /etc/postfix/<a href="postconf.5.html">main.cf</a>:
     <a href="postconf.5.html#smtpd_recipient_restrictions">smtpd_recipient_restrictions</a> =
+        ...
         <a href="postconf.5.html#check_recipient_access">check_recipient_access</a> hash:/etc/postfix/access
         <i>...the usual stuff...</i>
 
@@ -133,6 +138,7 @@ therefore is subject to SMTP sender spoofing. </p>
 <pre>
 /etc/postfix/<a href="postconf.5.html">main.cf</a>:
     <a href="postconf.5.html#smtpd_recipient_restrictions">smtpd_recipient_restrictions</a> =
+        ...
         <a href="postconf.5.html#check_recipient_access">check_recipient_access</a> hash:/etc/postfix/protected_destinations
         <i>...the usual stuff...</i>
 
@@ -193,6 +199,7 @@ with LDAP or SQL. </p>
 <pre>
 /etc/postfix/<a href="postconf.5.html">main.cf</a>:
     <a href="postconf.5.html#smtpd_recipient_restrictions">smtpd_recipient_restrictions</a> =
+        ...
         <a href="postconf.5.html#check_sender_access">check_sender_access</a> hash:/etc/postfix/restricted_senders
         <i>...other stuff...</i>
 
index f76ca860f0dbadadf5069dbfb7afced09d16de43..18ed0cf013a014f23db5fec5462ce7af6c4455e6 100644 (file)
@@ -1367,20 +1367,33 @@ for. Examples of possible SMTP clients authorizations are: </p>
 
 <h4><a name="server_sasl_authz_relay">Mail relay authorization</a></h4>
 
-<p> The <code><a href="postconf.5.html#permit_sasl_authenticated">permit_sasl_authenticated</a></code> restriction allows
+<p> With <code><a href="postconf.5.html#permit_sasl_authenticated">permit_sasl_authenticated</a></code> the Postfix SMTP
+server can allow
 SASL-authenticated SMTP clients to send mail to remote destinations.
-Add it to the list of <code><a href="postconf.5.html#smtpd_recipient_restrictions">smtpd_recipient_restrictions</a></code> as
-follows: </p>
+Examples:
+</p>
 
 <blockquote>
 <pre>
+# With Postfix 2.10 and later, the mail relay policy is
+# preferably specified under <a href="postconf.5.html#smtpd_relay_restrictions">smtpd_relay_restrictions</a>.
+/etc/postfix/<a href="postconf.5.html">main.cf</a>:
+    <a href="postconf.5.html#smtpd_relay_restrictions">smtpd_relay_restrictions</a> =
+       <a href="postconf.5.html#permit_mynetworks">permit_mynetworks</a>
+       <strong><a href="postconf.5.html#permit_sasl_authenticated">permit_sasl_authenticated</a></strong>
+       <a href="postconf.5.html#reject_unauth_destination">reject_unauth_destination</a>
+</pre>
+
+<pre>
+# Older configurations combine relay control and spam control under
+# <a href="postconf.5.html#smtpd_recipient_restrictions">smtpd_recipient_restrictions</a>. To use this example with Postfix &ge;
+# 2.10 specify "<a href="postconf.5.html#smtpd_relay_restrictions">smtpd_relay_restrictions</a>=".
 /etc/postfix/<a href="postconf.5.html">main.cf</a>:
     <a href="postconf.5.html#smtpd_recipient_restrictions">smtpd_recipient_restrictions</a> =
-    ...
-    <a href="postconf.5.html#permit_mynetworks">permit_mynetworks</a>
-    <strong><a href="postconf.5.html#permit_sasl_authenticated">permit_sasl_authenticated</a></strong>
-    <a href="postconf.5.html#reject_unauth_destination">reject_unauth_destination</a>
-    ...
+       <a href="postconf.5.html#permit_mynetworks">permit_mynetworks</a>
+       <strong><a href="postconf.5.html#permit_sasl_authenticated">permit_sasl_authenticated</a></strong>
+       <a href="postconf.5.html#reject_unauth_destination">reject_unauth_destination</a>
+       ...other rules...
 </pre>
 </blockquote>
 
@@ -1406,9 +1419,7 @@ use a particular envelope sender address: </p>
     <a href="postconf.5.html#smtpd_recipient_restrictions">smtpd_recipient_restrictions</a> =
         ...
         <strong><a href="postconf.5.html#reject_sender_login_mismatch">reject_sender_login_mismatch</a></strong>
-        <a href="postconf.5.html#permit_sasl_authenticated">permit_sasl_authenticated</a>
-        <a href="postconf.5.html#permit_mynetworks">permit_mynetworks</a>
-        <a href="postconf.5.html#reject_unauth_destination">reject_unauth_destination</a>
+       <a href="postconf.5.html#permit_sasl_authenticated">permit_sasl_authenticated</a>
         ...
 </pre>
 </blockquote>
@@ -1926,7 +1937,7 @@ font.  </p>
 </blockquote>
 
 <p> Instead of port 25 (smtp), specify port 587 (submission) where
-appriopriate. </p>
+appropriate. </p>
 
 <h4>Encrypted SMTP session (TLS)</h4>
 
index 5560a3727c574a9ccea7d3ec10fce08527adc6a6..6d8a81a52e5223241d23028901fc89e0b8660d9a 100644 (file)
@@ -60,10 +60,19 @@ anti-spammer blacklists.  See, for example, the information on
 
 <p> By default, Postfix has a moderately restrictive approach to
 mail relaying. Postfix forwards mail only from clients in trusted
-networks, or to domains that are configured as authorized relay
-destinations. For a description of the default policy, see the
-<a href="postconf.5.html#smtpd_recipient_restrictions">smtpd_recipient_restrictions</a> parameter in the <a href="postconf.5.html">postconf(5)</a> manual
-page, and the information that is referenced from there.  </p>
+networks, from clients that have authenticated with SASL, or to
+domains that are configured as authorized relay
+destinations. For a description of the default mail relay policy,
+see the <a href="postconf.5.html#smtpd_relay_restrictions">smtpd_relay_restrictions</a> parameter in the <a href="postconf.5.html">postconf(5)</a> manual
+page, and the information that is referenced from there. </p>
+
+<blockquote> <p> NOTE: Postfix versions before 2.10 did not have
+<a href="postconf.5.html#smtpd_relay_restrictions">smtpd_relay_restrictions</a>. They combined the mail relay and spam
+blocking policies, under <a href="postconf.5.html#smtpd_recipient_restrictions">smtpd_recipient_restrictions</a>.  This could
+lead to unexpected results.  For example, a permissive spam blocking
+policy could unexpectedly result in a permissive mail relay policy.
+An example of this is documented under "<a href="#danger">Dangerous
+use of smtpd_recipient_restrictions</a>".  </p> </blockquote>
 
 <p> Most of the Postfix SMTP server access controls are targeted
 at stopping junk email. </p>
@@ -178,8 +187,23 @@ described in the <a href="postconf.5.html">postconf(5)</a> manual page. </p>
     # Don't accept mail from domains that don't exist.
     <a href="postconf.5.html#smtpd_sender_restrictions">smtpd_sender_restrictions</a> = <a href="postconf.5.html#reject_unknown_sender_domain">reject_unknown_sender_domain</a>
 
-    # Whitelisting: local clients may specify any destination domain.
-    <a href="postconf.5.html#smtpd_recipient_restrictions">smtpd_recipient_restrictions</a> = <a href="postconf.5.html#permit_mynetworks">permit_mynetworks</a>, <a href="postconf.5.html#reject_unauth_destination">reject_unauth_destination</a>
+    # Relay control (Postfix 2.10 and later): local clients and
+    # authenticated clients may specify any destination domain.
+    <a href="postconf.5.html#smtpd_relay_restrictions">smtpd_relay_restrictions</a> = <a href="postconf.5.html#permit_mynetworks">permit_mynetworks</a>, 
+       <a href="postconf.5.html#permit_sasl_authenticated">permit_sasl_authenticated</a>,
+       <a href="postconf.5.html#reject_unauth_destination">reject_unauth_destination</a>
+
+    # Spam control: exclude local clients and authenticated clients
+    # from DNSBL lookups.
+    <a href="postconf.5.html#smtpd_recipient_restrictions">smtpd_recipient_restrictions</a> = <a href="postconf.5.html#permit_mynetworks">permit_mynetworks</a>, 
+       <a href="postconf.5.html#permit_sasl_authenticated">permit_sasl_authenticated</a>,
+       # <a href="postconf.5.html#reject_unauth_destination">reject_unauth_destination</a> is not needed here if the mail
+       # relay policy is specified under <a href="postconf.5.html#smtpd_relay_restrictions">smtpd_relay_restrictions</a>
+       # (available with Postfix 2.10 and later).
+       <a href="postconf.5.html#reject_unauth_destination">reject_unauth_destination</a>
+       <a href="postconf.5.html#reject_rbl_client">reject_rbl_client</a> zen.spamhaus.org,
+       <a href="postconf.5.html#reject_rhsbl_helo">reject_rhsbl_helo</a> dbl.spamhaus.org,
+       <a href="postconf.5.html#reject_rhsbl_sender">reject_rhsbl_sender</a> dbl.spamhaus.org
 
     # Block clients that speak too early.
     <a href="postconf.5.html#smtpd_data_restrictions">smtpd_data_restrictions</a> = <a href="postconf.5.html#reject_unauth_pipelining">reject_unauth_pipelining</a>
@@ -205,28 +229,47 @@ DEFER result. </p>
 
 <table border="1">
 
-<tr> <th> Restriction list name </th> <th> Status </th> <th> Effect
+<tr> <th> Restriction list name </th> <th> Version </th> <th> Status
+</th> <th> Effect
 of REJECT or DEFER result </th> </tr>
 
-<tr> <td> <a href="postconf.5.html#smtpd_client_restrictions">smtpd_client_restrictions</a> </td> <td> Optional </td> <td>
+<tr> <td> <a href="postconf.5.html#smtpd_client_restrictions">smtpd_client_restrictions</a> </td> <td> All </td> <td>
+Optional </td> <td>
 Reject all client commands </td> </tr>
 
-<tr> <td> <a href="postconf.5.html#smtpd_helo_restrictions">smtpd_helo_restrictions</a> </td> <td> Optional </td> <td>
+<tr> <td> <a href="postconf.5.html#smtpd_helo_restrictions">smtpd_helo_restrictions</a> </td> <td> All </td> <td> Optional
+</td> <td>
 Reject HELO/EHLO information </td> </tr>
 
-<tr> <td> <a href="postconf.5.html#smtpd_sender_restrictions">smtpd_sender_restrictions</a> </td> <td> Optional </td> <td>
+<tr> <td> <a href="postconf.5.html#smtpd_sender_restrictions">smtpd_sender_restrictions</a> </td> <td> All </td> <td>
+Optional </td> <td>
 Reject MAIL FROM information </td> </tr>
 
-<tr> <td> <a href="postconf.5.html#smtpd_recipient_restrictions">smtpd_recipient_restrictions</a> </td> <td> Required </td>
-<td> Reject RCPT TO information </td> </tr>
+<tr> <td rowspan="2"> <a href="postconf.5.html#smtpd_relay_restrictions">smtpd_relay_restrictions</a> </td> <td> &ge; 2.10
+</td> <td> Required if <a href="postconf.5.html#smtpd_recipient_restrictions">smtpd_recipient_restrictions</a> does not enforce
+relay policy</td>
+<td rowspan="2"> Reject RCPT TO information </td> </tr>
 
-<tr> <td> <a href="postconf.5.html#smtpd_data_restrictions">smtpd_data_restrictions</a> </td> <td> Optional </td> <td>
+<tr> <td> &lt 2.10</td> <td> Not available </td> 
+</tr>
+
+<tr> <td rowspan="2"> <a href="postconf.5.html#smtpd_recipient_restrictions">smtpd_recipient_restrictions</a> </td> <td> &ge;
+2.10 </td> <td> Required if <a href="postconf.5.html#smtpd_relay_restrictions">smtpd_relay_restrictions</a> does not enforce
+relay policy</td>
+<td rowspan="2"> Reject RCPT TO information </td> </tr>
+
+<tr> <td> &lt 2.10</td> <td> Required </td> </tr>
+
+<tr> <td> <a href="postconf.5.html#smtpd_data_restrictions">smtpd_data_restrictions</a> </td> <td> &ge; 2.0 </td> <td>
+Optional </td> <td>
 Reject DATA command </td> </tr>
 
-<tr> <td> <a href="postconf.5.html#smtpd_end_of_data_restrictions">smtpd_end_of_data_restrictions</a> </td> <td> Optional </td> <td>
+<tr> <td> <a href="postconf.5.html#smtpd_end_of_data_restrictions">smtpd_end_of_data_restrictions</a> </td> <td> &ge; 2.2 </td>
+<td> Optional </td> <td>
 Reject END-OF-DATA command </td> </tr>
 
-<tr> <td> <a href="postconf.5.html#smtpd_etrn_restrictions">smtpd_etrn_restrictions</a> </td> <td> Optional </td> <td>
+<tr> <td> <a href="postconf.5.html#smtpd_etrn_restrictions">smtpd_etrn_restrictions</a> </td> <td> All </td> <td> Optional
+</td> <td>
 Reject ETRN command </td> </tr>
 
 </table>
@@ -248,10 +291,10 @@ and so on. This approach turned out to be difficult to use. </p>
 helo and sender restriction lists until the RCPT TO or ETRN command.
 This behavior is controlled by the <a href="postconf.5.html#smtpd_delay_reject">smtpd_delay_reject</a> parameter.
 Restriction lists are still evaluated in the proper order of (client,
-helo, etrn) or (client, helo, sender, recipient, data, or end-of-data)
-restrictions.
+helo, etrn) or (client, helo, sender, relay, recipient, data, or
+end-of-data) restrictions.
 When a restriction list (example: client) evaluates to REJECT or
-DEFER the other restriction lists (example: helo, sender, etc.)
+DEFER the restriction lists that follow (example: helo, sender, etc.)
 are skipped.  </p>
 
 <p> Around the time that <a href="postconf.5.html#smtpd_delay_reject">smtpd_delay_reject</a> was introduced, Postfix
@@ -300,6 +343,12 @@ list evaluates to REJECT or DEFER, the recipient address is rejected;
 no surprises here. If the result is PERMIT, then the recipient
 address is accepted. And this is where surprises can happen.  </p>
 
+<p> The problem is that Postfix versions before 2.10 did not have
+<a href="postconf.5.html#smtpd_relay_restrictions">smtpd_relay_restrictions</a>. They combined the mail relay and spam
+blocking policies, under <a href="postconf.5.html#smtpd_recipient_restrictions">smtpd_recipient_restrictions</a>.  The result
+is that a permissive spam blocking policy could unexpectedly result
+in a permissive mail relay policy. </p>
+
 <p> Here is an example that shows when a PERMIT result can result
 in too much access permission: </p>
 
@@ -309,7 +358,7 @@ in too much access permission: </p>
 3         <a href="postconf.5.html#permit_mynetworks">permit_mynetworks</a>
 4         <a href="postconf.5.html#check_helo_access">check_helo_access</a> hash:/etc/postfix/helo_access
 5         <a href="postconf.5.html#reject_unknown_helo_hostname">reject_unknown_helo_hostname</a>
-6         <a href="postconf.5.html#reject_unauth_destination">reject_unauth_destination</a>
+6         <b><a href="postconf.5.html#reject_unauth_destination">reject_unauth_destination</a></b>
 7 
 8 /etc/postfix/helo_access:
 9     localhost.localdomain PERMIT
@@ -326,14 +375,31 @@ localhost.localdomain".  </p>
 that announces itself as "localhost.localdomain", making Postfix
 an open relay for all such hosts. </p>
 
-<p> In order to avoid surprises like these with
-<a href="postconf.5.html#smtpd_recipient_restrictions">smtpd_recipient_restrictions</a>, you should place non-recipient
+<p> With Postfix before version 2.10 you should place non-recipient
 restrictions AFTER the <a href="postconf.5.html#reject_unauth_destination">reject_unauth_destination</a> restriction, not
 before. In the above example, the HELO based restrictions should
 be placed AFTER <a href="postconf.5.html#reject_unauth_destination">reject_unauth_destination</a>, or better, the HELO
 based restrictions should be placed under <a href="postconf.5.html#smtpd_helo_restrictions">smtpd_helo_restrictions</a>
 where they can do no harm. </p>
 
+<pre>
+1 /etc/postfix/<a href="postconf.5.html">main.cf</a>:
+2     <a href="postconf.5.html#smtpd_recipient_restrictions">smtpd_recipient_restrictions</a> = 
+3         <a href="postconf.5.html#permit_mynetworks">permit_mynetworks</a>
+4         <b><a href="postconf.5.html#reject_unauth_destination">reject_unauth_destination</a></b>
+5         <a href="postconf.5.html#check_helo_access">check_helo_access</a> hash:/etc/postfix/helo_access
+6         <a href="postconf.5.html#reject_unknown_helo_hostname">reject_unknown_helo_hostname</a>
+7 
+8 /etc/postfix/helo_access:
+9     localhost.localdomain PERMIT
+</pre>
+
+<p> The above mistake will not happen with Postfix 2.10 and later,
+when the relay policy is specified under <a href="postconf.5.html#smtpd_relay_restrictions">smtpd_relay_restrictions</a>,
+and the spam blocking policy under <a href="postconf.5.html#smtpd_recipient_restrictions">smtpd_recipient_restrictions</a>.
+Then, a permissive spam blocking policy will not result in a
+permissive mail relay policy. </p>
+
 <h2> <a name="testing"> SMTP access rule testing </a> </h2>
 
 <p> Postfix has several features that aid in SMTP access rule
index bfe3859f471411e549e2e5a7ef0944c913cf51b9..3bdd4305a7eb3a30a5c85057cacf7da04795b2c4 100644 (file)
@@ -281,6 +281,10 @@ specified with the <b>user</b> attribute. </p>
 "-", to avoid "connection refused" and other problems when you
 increase the smtpd process limit. </p>
 
+<li> <p> Line 8: <a href="postconf.5.html#reject_unauth_destination">reject_unauth_destination</a> is not needed here if
+the mail relay policy is specified with <a href="postconf.5.html#smtpd_relay_restrictions">smtpd_relay_restrictions</a>
+(available with Postfix 2.10 and later). </p>
+
 <li> <p> Lines 8, 9: always specify "<a href="postconf.5.html#check_policy_service">check_policy_service</a>" AFTER
 "<a href="postconf.5.html#reject_unauth_destination">reject_unauth_destination</a>" or else your system could become an
 open relay. </p>
@@ -299,8 +303,8 @@ of a <a href="master.5.html">master.cf</a> service name (in the above example, "
 built-in suffix (in the above example: "_time_limit").  </p>
 </blockquote>
 
-<li> <p> Solaris UNIX-domain sockets do not work reliably. Use
-TCP sockets instead: </p>
+<li> <p> With Solaris &lt; 9, or Postfix &lt; 2.10 on any Solaris
+version, use TCP sockets instead of UNIX-domain sockets: </p>
 
 </ul>
 
@@ -436,6 +440,10 @@ SMTP server process that talks to it.
 See the <a href="spawn.8.html">spawn(8)</a> manpage for more information about the
 <a href="postconf.5.html#transport_time_limit"><i>transport</i>_time_limit</a> parameter.  </p>
 
+<li> <p> Line 9: <a href="postconf.5.html#reject_unauth_destination">reject_unauth_destination</a> is not needed here if
+the mail relay policy is specified with <a href="postconf.5.html#smtpd_relay_restrictions">smtpd_relay_restrictions</a>
+(available with Postfix 2.10 and later). </p>
+
 <blockquote> <p> Note: the "<a href="postconf.5.html#transport_time_limit">greylist_time_limit</a>" parameter will not
 show up in "postconf" command output before Postfix version 2.9.
 This limitation applies to many parameters whose name is a combination
@@ -445,7 +453,8 @@ a built-in suffix (in the above example: "_time_limit").  </p>
 
 </ul>
 
-<p> On Solaris you must use inet: style sockets instead of unix:
+<p> With Solaris &lt; 9, or Postfix &lt; 2.10 on any Solaris
+version, use inet: style sockets instead of unix:
 style, as detailed in the "<a href="#client_config">Policy
 client/server configuration</a>" section above.  </p>
 
@@ -497,10 +506,15 @@ forged MAIL FROM domains could be found at
 
 <ul>
 
-<li> <p> Line 9: On Solaris you must use inet: style sockets
+<li> <p> Line 9: On Solaris &lt; 9, or Postfix &lt; 2.10 on any
+Solaris version, use inet: style sockets
 instead of unix: style, as detailed in the "<a href="#greylist">Example:
 greylist policy server</a>" section above.  </p>
 
+<li> <p> Line 5: <a href="postconf.5.html#reject_unauth_destination">reject_unauth_destination</a> is not needed here if
+the mail relay policy is specified with <a href="postconf.5.html#smtpd_relay_restrictions">smtpd_relay_restrictions</a>
+(available with Postfix 2.10 and later). </p>
+
 <li> <p> Line 6: Be sure to specify "<a href="postconf.5.html#check_sender_access">check_sender_access</a>" AFTER
 "<a href="postconf.5.html#reject_unauth_destination">reject_unauth_destination</a>" or else your system could become an
 open mail relay. </p>
@@ -547,10 +561,15 @@ most of the delays and most of the database pollution problem. </p>
 
 <ul>
 
-<li> <p> Line 7: On Solaris you must use inet: style sockets
+<li> <p> Line 7: On Solaris &lt; 9, or Postfix &lt; 2.10 on any
+Solaris version, use inet: style sockets
 instead of unix: style, as detailed in the "<a href="#greylist">Example:
 greylist policy server</a>" section above.  </p>
 
+<li> <p> Line 5: <a href="postconf.5.html#reject_unauth_destination">reject_unauth_destination</a> is not needed here if
+the mail relay policy is specified with <a href="postconf.5.html#smtpd_relay_restrictions">smtpd_relay_restrictions</a>
+(available with Postfix 2.10 and later). </p>
+
 <li> <p> Lines 6-7: Be sure to specify <a href="postconf.5.html#check_sender_access">check_sender_access</a> and
 <a href="postconf.5.html#check_policy_service">check_policy_service</a> AFTER <a href="postconf.5.html#reject_unauth_destination">reject_unauth_destination</a> or else your
 system could become an open mail relay. </p>
index 52702112e9d4c6ead5f5f908a910289550fbb220..06bfcaa29d89328b2e64006444a5bae8cd26caac 100644 (file)
@@ -40,43 +40,43 @@ except that the latter uses a dedicated protocol instead of SMTP.
 
 <tr>
 
-       <td bgcolor="#f0f0ff" align="center" valign="middle"
-       width="10%"> Internet </td>
+        <td bgcolor="#f0f0ff" align="center" valign="middle"
+        width="10%"> Internet </td>
 
     <td align="center" valign="middle" width="5%"> <tt> -&gt; </tt> </td>
 
-       <td bgcolor="#f0f0ff" align="center" valign="middle"
-       width="10%"> <a href="smtpd.8.html">Postfix SMTP server</a>
-       </td>
+        <td bgcolor="#f0f0ff" align="center" valign="middle"
+        width="10%"> <a href="smtpd.8.html">Postfix SMTP server</a>
+        </td>
 
     <td align="center" valign="middle" width="5%"> <tt> -&gt; </tt> </td>
 
-       <td bgcolor="#f0f0ff" align="center" valign="middle"
-       width="10%"> <b>Before</b> <b>queue</b> <b>filter</b> </td>
+        <td bgcolor="#f0f0ff" align="center" valign="middle"
+        width="10%"> <b>Before</b> <b>queue</b> <b>filter</b> </td>
 
     <td align="center" valign="middle" width="5%"> <tt> -&gt; </tt> </td>
 
-       <td bgcolor="#f0f0ff" align="center" valign="middle"
-       width="10%"> <a href="smtpd.8.html">Postfix SMTP server</a>
-       </td>
+        <td bgcolor="#f0f0ff" align="center" valign="middle"
+        width="10%"> <a href="smtpd.8.html">Postfix SMTP server</a>
+        </td>
 
     <td align="center" valign="middle" width="5%"> <tt> -&gt; </tt> </td>
 
-       <td bgcolor="#f0f0ff" align="center" valign="middle"
-       width="10%"> <a href="cleanup.8.html">Postfix cleanup
-       server</a> </td>
+        <td bgcolor="#f0f0ff" align="center" valign="middle"
+        width="10%"> <a href="cleanup.8.html">Postfix cleanup
+        server</a> </td>
 
     <td align="center" valign="middle" width="5%"> <tt> -&gt; </tt> </td>
 
-       <td bgcolor="#f0f0ff" align="center" valign="middle"
-       width="10%"> Postfix queue </td>
+        <td bgcolor="#f0f0ff" align="center" valign="middle"
+        width="10%"> Postfix queue </td>
 
     <td align="center" valign="middle" width="5%"> <tt> -&lt; </tt> </td>
 
-       <td bgcolor="#f0f0ff" align="center" valign="middle"
-       width="10%"> <a href="smtp.8.html">smtp</a><br> <a
-       href="local.8.html">local</a><br> <a
-       href="virtual.8.html">virtual</a> </td>
+        <td bgcolor="#f0f0ff" align="center" valign="middle"
+        width="10%"> <a href="smtp.8.html">smtp</a><br> <a
+        href="local.8.html">local</a><br> <a
+        href="virtual.8.html">virtual</a> </td>
 
 </tr>
 
@@ -213,26 +213,26 @@ PERL/SMTP content filtering framework. See:
 
     <td align="center" valign="middle" width="5%"> <tt> -&gt; </tt> </td>
 
-       <td bgcolor="#f0f0ff" align="center" valign="middle"
-       width="10%"> <a href="smtpd.8.html">Postfix SMTP server on
-       port 25</a> </td>
+        <td bgcolor="#f0f0ff" align="center" valign="middle"
+        width="10%"> <a href="smtpd.8.html">Postfix SMTP server on
+        port 25</a> </td>
 
     <td align="center" valign="middle" width="5%"> <tt> -&gt; </tt> </td>
 
-       <td bgcolor="#f0f0ff" align="center" valign="middle"
-       width="10%"> filter on localhost port 10025 </td>
+        <td bgcolor="#f0f0ff" align="center" valign="middle"
+        width="10%"> filter on localhost port 10025 </td>
 
     <td align="center" valign="middle" width="5%"> <tt> -&gt; </tt> </td>
 
-       <td bgcolor="#f0f0ff" align="center" valign="middle"
-       width="10%"> <a href="smtpd.8.html">Postfix SMTP server on
-       localhost port 10026</a> </td>
+        <td bgcolor="#f0f0ff" align="center" valign="middle"
+        width="10%"> <a href="smtpd.8.html">Postfix SMTP server on
+        localhost port 10026</a> </td>
 
     <td align="center" valign="middle" width="5%"> <tt> -&gt; </tt> </td>
 
-       <td bgcolor="#f0f0ff" align="center" valign="middle"
-       width="10%"> <a href="cleanup.8.html">Postfix cleanup
-       server</a> </td>
+        <td bgcolor="#f0f0ff" align="center" valign="middle"
+        width="10%"> <a href="cleanup.8.html">Postfix cleanup
+        server</a> </td>
 
     <td align="center" valign="middle" width="5%"> <tt> -&gt; </tt> </td>
 
@@ -261,8 +261,8 @@ PERL/SMTP content filtering framework. See:
     smtp      inet  n       -       n       -       20      smtpd
         -o <a href="postconf.5.html#smtpd_proxy_filter">smtpd_proxy_filter</a>=127.0.0.1:10025
         -o <a href="postconf.5.html#smtpd_client_connection_count_limit">smtpd_client_connection_count_limit</a>=10
-       # Postfix 2.7 and later performance feature.
-       # -o <a href="postconf.5.html#smtpd_proxy_options">smtpd_proxy_options</a>=speed_adjust
+        # Postfix 2.7 and later performance feature.
+        # -o <a href="postconf.5.html#smtpd_proxy_options">smtpd_proxy_options</a>=speed_adjust
     #
     # After-filter SMTP server. Receive mail from the content filter
     # on localhost port 10026.
@@ -272,6 +272,8 @@ PERL/SMTP content filtering framework. See:
         -o <a href="postconf.5.html#smtpd_client_restrictions">smtpd_client_restrictions</a>=
         -o <a href="postconf.5.html#smtpd_helo_restrictions">smtpd_helo_restrictions</a>=
         -o <a href="postconf.5.html#smtpd_sender_restrictions">smtpd_sender_restrictions</a>=
+        # Postfix 2.10 and later: specify empty <a href="postconf.5.html#smtpd_relay_restrictions">smtpd_relay_restrictions</a>.
+        -o <a href="postconf.5.html#smtpd_relay_restrictions">smtpd_relay_restrictions</a>=
         -o <a href="postconf.5.html#smtpd_recipient_restrictions">smtpd_recipient_restrictions</a>=<a href="postconf.5.html#permit_mynetworks">permit_mynetworks</a>,reject
         -o <a href="postconf.5.html#smtpd_data_restrictions">smtpd_data_restrictions</a>=
         -o <a href="postconf.5.html#mynetworks">mynetworks</a>=127.0.0.0/8
index 9e92837f83f97e0b3c01e7c15c8c915baf4b7c5d..304df649de3d04f88da71ec6a419a45aca1503fe 100644 (file)
@@ -347,31 +347,41 @@ is the real purpose of the firewall email function. </p>
  3     <a href="postconf.5.html#relay_domains">relay_domains</a> = example.com
  4     <a href="postconf.5.html#parent_domain_matches_subdomains">parent_domain_matches_subdomains</a> = 
  5         <a href="postconf.5.html#debug_peer_list">debug_peer_list</a> smtpd_access_maps
- 6     <a href="postconf.5.html#smtpd_recipient_restrictions">smtpd_recipient_restrictions</a> =
- 7         <a href="postconf.5.html#permit_mynetworks">permit_mynetworks</a> <a href="postconf.5.html#reject_unauth_destination">reject_unauth_destination</a>
- 8 
- 9     <a href="postconf.5.html#relay_recipient_maps">relay_recipient_maps</a> = hash:/etc/postfix/relay_recipients
-10     <a href="postconf.5.html#transport_maps">transport_maps</a> = hash:/etc/postfix/transport
-11 
-12 /etc/postfix/relay_recipients:
-13     user1@example.com   x
-14     user2@example.com   x
-15      . . .
-16 
-17 /etc/postfix/transport:
-18     example.com   <a href="smtp.8.html">smtp</a>:[inside-gateway.example.com]
+<br>
+ 6a    # Postfix 2.10 and later support separate relay control and
+ 7a    # spam control.
+ 8a    <a href="postconf.5.html#smtpd_relay_restrictions">smtpd_relay_restrictions</a> =
+ 9a        <a href="postconf.5.html#permit_mynetworks">permit_mynetworks</a> <a href="postconf.5.html#reject_unauth_destination">reject_unauth_destination</a>
+10a    <a href="postconf.5.html#smtpd_recipient_restrictions">smtpd_recipient_restrictions</a> = ...spam blocking rules....
+<br>
+ 6b    # Older configurations combine relay control and spam control. To
+ 7b    # use this with Postfix &ge; 2.10 specify "<a href="postconf.5.html#smtpd_relay_restrictions">smtpd_relay_restrictions</a>=".
+ 8b    <a href="postconf.5.html#smtpd_recipient_restrictions">smtpd_recipient_restrictions</a> =
+ 9b        <a href="postconf.5.html#permit_mynetworks">permit_mynetworks</a> <a href="postconf.5.html#reject_unauth_destination">reject_unauth_destination</a>
+10b        ...spam blocking rules....
+<br>
+11     <a href="postconf.5.html#relay_recipient_maps">relay_recipient_maps</a> = hash:/etc/postfix/relay_recipients
+12     <a href="postconf.5.html#transport_maps">transport_maps</a> = hash:/etc/postfix/transport
+13 
+14 /etc/postfix/relay_recipients:
+15     user1@example.com   x
+16     user2@example.com   x
+17      . . .
+18 
+19 /etc/postfix/transport:
+20     example.com   <a href="smtp.8.html">smtp</a>:[inside-gateway.example.com]
 </pre>
 </blockquote>
 
 <p> Translation: </p>
 
 <ul>
-
-<li><p> Lines 1-7: Accept mail from local systems in $<a href="postconf.5.html#mynetworks">mynetworks</a>,
+<li><p> Lines 1-10: Accept mail from local systems in $<a href="postconf.5.html#mynetworks">mynetworks</a>,
 and accept mail from outside for "user@example.com" but not for
 "user@anything.example.com". The magic is in lines 4-5. </p>
 
-<li> <p> Lines 9, 12-14: Define the list of valid addresses in the
+<li> <p> Lines 11, 13-16: Define the list of valid addresses in the
 "example.com" domain that can receive mail from the Internet. This
 prevents the mail queue from filling up with undeliverable
 MAILER-DAEMON messages. If you can't maintain a list of valid
@@ -379,7 +389,7 @@ recipients then you must specify "<a href="postconf.5.html#relay_recipient_maps"
 is, an empty value), or you must specify an "@example.com  x"
 wild-card in the relay_recipients table. </p>
 
-<li> <p> Lines 10, 17-18: Route mail for "example.com" to the inside
+<li> <p> Lines 12, 19-20: Route mail for "example.com" to the inside
 gateway machine. The <tt>[]</tt> forces Postfix to do no MX lookup.
 </p>
 
@@ -521,18 +531,28 @@ is all you need: </p>
  3 
  4 /etc/postfix/<a href="postconf.5.html">main.cf</a>:
  5     <a href="postconf.5.html#relay_domains">relay_domains</a> = . . . the.backed-up.domain.tld
- 6     <a href="postconf.5.html#smtpd_recipient_restrictions">smtpd_recipient_restrictions</a> = 
- 7         <a href="postconf.5.html#permit_mynetworks">permit_mynetworks</a> <a href="postconf.5.html#reject_unauth_destination">reject_unauth_destination</a>
- 8 
- 9     # You must specify your NAT/proxy external address.
-10     #<a href="postconf.5.html#proxy_interfaces">proxy_interfaces</a> = 1.2.3.4
-11 
-12     <a href="postconf.5.html#relay_recipient_maps">relay_recipient_maps</a> = hash:/etc/postfix/relay_recipients
+<br>
+ 6a    # Postfix 2.10 and later support separate relay control and
+ 7a    # spam control.
+ 8a    <a href="postconf.5.html#smtpd_relay_restrictions">smtpd_relay_restrictions</a> =
+ 9a        <a href="postconf.5.html#permit_mynetworks">permit_mynetworks</a> <a href="postconf.5.html#reject_unauth_destination">reject_unauth_destination</a>
+10a    <a href="postconf.5.html#smtpd_recipient_restrictions">smtpd_recipient_restrictions</a> = ...spam blocking rules....
+<br>
+ 6b    # Older configurations combine relay control and spam control. To
+ 7b    # use this with Postfix &ge; 2.10 specify "<a href="postconf.5.html#smtpd_relay_restrictions">smtpd_relay_restrictions</a>=".
+ 8b    <a href="postconf.5.html#smtpd_recipient_restrictions">smtpd_recipient_restrictions</a> =
+ 9b        <a href="postconf.5.html#permit_mynetworks">permit_mynetworks</a> <a href="postconf.5.html#reject_unauth_destination">reject_unauth_destination</a>
+10b        ...spam blocking rules....
+<br>
+11     # You must specify your NAT/proxy external address.
+12     #<a href="postconf.5.html#proxy_interfaces">proxy_interfaces</a> = 1.2.3.4
 13 
-14 /etc/postfix/relay_recipients:
-15     user1@the.backed-up.domain.tld   x
-16     user2@the.backed-up.domain.tld   x
-17      . . .
+14     <a href="postconf.5.html#relay_recipient_maps">relay_recipient_maps</a> = hash:/etc/postfix/relay_recipients
+15 
+16 /etc/postfix/relay_recipients:
+17     user1@the.backed-up.domain.tld   x
+18     user2@the.backed-up.domain.tld   x
+19      . . .
 </pre>
 </blockquote>
 
@@ -541,11 +561,11 @@ need the above, plus: </p>
 
 <blockquote>
 <pre>
-18 /etc/postfix/<a href="postconf.5.html">main.cf</a>:
-19     <a href="postconf.5.html#transport_maps">transport_maps</a> = hash:/etc/postfix/transport
-20 
-21 /etc/postfix/transport:
-22     the.backed-up.domain.tld       relay:[their.mail.host.tld]
+20 /etc/postfix/<a href="postconf.5.html">main.cf</a>:
+21     <a href="postconf.5.html#transport_maps">transport_maps</a> = hash:/etc/postfix/transport
+22 
+23 /etc/postfix/transport:
+24     the.backed-up.domain.tld       relay:[their.mail.host.tld]
 </pre>
 </blockquote>
 
@@ -559,15 +579,15 @@ need the above, plus: </p>
 
 <li><p>Do not list the.backed-up.domain.tld in <a href="postconf.5.html#virtual_mailbox_domains">virtual_mailbox_domains</a>.</p>
 
-<li> <p> Lines 1-7: Forward mail from the Internet for
+<li> <p> Lines 1-9: Forward mail from the Internet for
 "the.backed-up.domain.tld" to the primary MX host for that domain.
 </p>
 
-<li> <p> Line 10: This is a must if Postfix receives mail via a
+<li> <p> Line 12: This is a must if Postfix receives mail via a
 NAT relay or proxy that presents a different IP address to the
 world than the local machine. </p>
 
-<li> <p> Lines 12-16: Define the list of valid addresses in the
+<li> <p> Lines 14-18: Define the list of valid addresses in the
 "the.backed-up.domain.tld" domain.  This prevents your mail queue
 from filling up with undeliverable MAILER-DAEMON messages. If you
 can't maintain a list of valid recipients then you must specify
@@ -575,7 +595,7 @@ can't maintain a list of valid recipients then you must specify
 specify an "@the.backed-up.domain.tld  x" wild-card in the
 relay_recipients table. </p>
 
-<li> <p> Line 22: The <tt>[]</tt> forces Postfix to do no MX lookup. </p>
+<li> <p> Line 24: The <tt>[]</tt> forces Postfix to do no MX lookup. </p>
 
 </ul>
 
index fad43a337ca38989ca5b8b4bba314bcf77055499..8459dc3180b25f9e551fd54ce0479947a2a2750e 100644 (file)
@@ -654,12 +654,25 @@ certificate must no longer be used (e.g. an employee leaving). </p>
  
 <blockquote>
 <pre>
+# With Postfix 2.10 and later, the mail relay policy is
+# preferably specified under <a href="postconf.5.html#smtpd_relay_restrictions">smtpd_relay_restrictions</a>.
+/etc/postfix/<a href="postconf.5.html">main.cf</a>:
+    <a href="postconf.5.html#smtpd_relay_restrictions">smtpd_relay_restrictions</a> = 
+        <a href="postconf.5.html#permit_mynetworks">permit_mynetworks</a>
+        <a href="postconf.5.html#permit_tls_clientcerts">permit_tls_clientcerts</a> 
+        <a href="postconf.5.html#reject_unauth_destination">reject_unauth_destination</a>
+</pre>
+
+<pre>
+# Older configurations combine relay control and spam control under
+# <a href="postconf.5.html#smtpd_recipient_restrictions">smtpd_recipient_restrictions</a>. To use this example with Postfix &ge;
+# 2.10 specify "<a href="postconf.5.html#smtpd_relay_restrictions">smtpd_relay_restrictions</a>=".
 /etc/postfix/<a href="postconf.5.html">main.cf</a>:
     <a href="postconf.5.html#smtpd_recipient_restrictions">smtpd_recipient_restrictions</a> = 
-        ... 
+        <a href="postconf.5.html#permit_mynetworks">permit_mynetworks</a>
         <a href="postconf.5.html#permit_tls_clientcerts">permit_tls_clientcerts</a> 
         <a href="postconf.5.html#reject_unauth_destination">reject_unauth_destination</a>
-        ...
+        ...other rules...
 </pre>
 </blockquote>
 
@@ -787,7 +800,7 @@ chooses the cipher from a list supplied by the server. </p>
 cipher that the server supports. With SSLv3 and later, the server
 may choose its own most preferred cipher that is supported (offered)
 by the client. Setting "<a href="postconf.5.html#tls_preempt_cipherlist">tls_preempt_cipherlist</a> = yes" enables server
-cipher preferences. The default OpenSSL behaviour applies with
+cipher preferences. The default OpenSSL behavior applies with
 "<a href="postconf.5.html#tls_preempt_cipherlist">tls_preempt_cipherlist</a> = no". </p>
 
 <p> While server cipher selection may in some cases lead to a more secure
index 3ae4ab161962c470d5c49f43a9460411b1f3c334..61f34e7723a452b438b463d7f9ff078eb9b25ccf 100644 (file)
@@ -218,7 +218,7 @@ second form overrides them explicitly. The values shown are the
 recommended ones. </p>
 
 <p> You can use the <a href="postconf.5.html#smtpd_command_filter">smtpd_command_filter</a> feature to append XVERP
-to SMTP commands from legacy sofware. This requires Postfix 2.7
+to SMTP commands from legacy software. This requires Postfix 2.7
 or later. </p>
 
 <blockquote>
index 52a5f474934e3d8446625d96e93bcc02ec6c54a4..62b7fe703fd27ee2cd4e5d104b1083b31443e5d2 100644 (file)
@@ -2688,7 +2688,7 @@ Example:
 <DT><b><a name="dnsblog_reply_delay">dnsblog_reply_delay</a>
 (default: 0s)</b></DT><DD>
 
-<p> A debugging aid to artifically delay DNS responses. </p>
+<p> A debugging aid to artificially delay DNS responses. </p>
 
 <p> This feature is available in Postfix 2.8.  </p>
 
@@ -3776,7 +3776,7 @@ configuration parameter.  See there for details. </p>
 the
 server performs final delivery, and send "delivered" delivery status
 notifications instead of "relayed". The default setting is backwards
-compatible to avoid the infinetisimal possibility of breaking
+compatible to avoid the infinitesimal possibility of breaking
 existing LMTP-based content filters. </p>
 
 
@@ -6532,7 +6532,7 @@ The list of "trusted" remote SMTP clients that have more privileges than
 
 <p>
 In particular, "trusted" SMTP clients are allowed to relay mail
-through Postfix.  See the <a href="postconf.5.html#smtpd_recipient_restrictions">smtpd_recipient_restrictions</a> parameter
+through Postfix.  See the <a href="postconf.5.html#smtpd_relay_restrictions">smtpd_relay_restrictions</a> parameter
 description in the <a href="postconf.5.html">postconf(5)</a> manual.
 </p>
 
@@ -7632,7 +7632,7 @@ one-letter suffix that specifies the time unit).  Time units: s
 <p> The number of clients that can be waiting for service from a
 real Postfix SMTP server process. When this queue is full, all
 clients will
-receive a 421 reponse. </p>
+receive a 421 response. </p>
 
 <p> This feature is available in Postfix 2.8. </p>
 
@@ -7646,7 +7646,7 @@ receive a 421 reponse. </p>
 a decision whether they will receive service from a real Postfix
 SMTP server
 process. When this queue is full, all non-whitelisted clients will
-receive a 421 reponse. </p>
+receive a 421 response. </p>
 
 <p> This feature is available in Postfix 2.8. </p>
 
@@ -11168,7 +11168,7 @@ protocol exclusions. One can now explicitly exclude SSLv2 by setting
 SSLv3 set "<a href="postconf.5.html#smtp_tls_mandatory_protocols">smtp_tls_mandatory_protocols</a> = !SSLv2, !SSLv3". Listing
 the protocols to include, rather than protocols to exclude, is
 supported, but not recommended. The exclusion form more closely
-matches the behaviour when the OpenSSL library is newer than Postfix.
+matches the behavior when the OpenSSL library is newer than Postfix.
 </p>
 
 <p> Since SSL version 2 has known protocol weaknesses and is now
@@ -11452,7 +11452,7 @@ with a "!" character. To exclude SSLv2 even for opportunistic TLS set
 "<a href="postconf.5.html#smtp_tls_protocols">smtp_tls_protocols</a> = !SSLv2". To exclude both "SSLv2" and "SSLv3" set
 "<a href="postconf.5.html#smtp_tls_protocols">smtp_tls_protocols</a> = !SSLv2, !SSLv3". Explicitly listing the protocols to
 include, rather than protocols to exclude, is supported, but not
-recommended.  The exclusion form more closely matches the behaviour
+recommended.  The exclusion form more closely matches the behavior
 when the OpenSSL library is newer than Postfix.  </p>
 
 <p> Example: </p>
@@ -12196,8 +12196,8 @@ Example:
 (default: empty)</b></DT><DD>
 
 <p>
-Optional Postfix SMTP server access restrictions in the context of
-a remote SMTP client connection request.
+Optional restrictions that the Postfix SMTP server applies in the
+context of a client connection request.
 See <a href="SMTPD_ACCESS_README.html">SMTPD_ACCESS_README</a>, section "Delayed evaluation of SMTP access
 restriction lists" for a discussion of evaluation context and time.
 </p>
@@ -12832,8 +12832,8 @@ mail. </p>
 (default: empty)</b></DT><DD>
 
 <p>
-Optional SMTP server access restrictions in the context of a client
-ETRN request.
+Optional restrictions that the Postfix SMTP server applies in the
+context of a client ETRN command.
 See <a href="SMTPD_ACCESS_README.html">SMTPD_ACCESS_README</a>, section "Delayed evaluation of SMTP access
 restriction lists" for a discussion of evaluation context and time.
 </p>
@@ -12969,7 +12969,7 @@ Example:
 
 <p>
 Optional restrictions that the Postfix SMTP server applies in the
-context of the SMTP HELO command.
+context of a client HELO command.
 See <a href="SMTPD_ACCESS_README.html">SMTPD_ACCESS_README</a>, section "Delayed evaluation of SMTP access
 restriction lists" for a discussion of evaluation context and time.
 </p>
@@ -13407,42 +13407,43 @@ for each excess recipient.  </p>
 </DD>
 
 <DT><b><a name="smtpd_recipient_restrictions">smtpd_recipient_restrictions</a>
-(default: <a href="postconf.5.html#permit_mynetworks">permit_mynetworks</a>, <a href="postconf.5.html#reject_unauth_destination">reject_unauth_destination</a>)</b></DT><DD>
+(default: see "postconf -d" output)</b></DT><DD>
 
 <p>
-The access restrictions that the Postfix SMTP server applies in
-the context of the RCPT TO command.
+Optional restrictions that the Postfix SMTP server applies in the
+context of a client RCPT TO command, after <a href="postconf.5.html#smtpd_relay_restrictions">smtpd_relay_restrictions</a>.
 See <a href="SMTPD_ACCESS_README.html">SMTPD_ACCESS_README</a>, section "Delayed evaluation of SMTP access
 restriction lists" for a discussion of evaluation context and time.
 </p>
 
-<p>
-By default, the Postfix SMTP server accepts:
-</p>
+<p> With Postfix versions before 2.10, the rules for relay permission
+and spam blocking were combined under <a href="postconf.5.html#smtpd_recipient_restrictions">smtpd_recipient_restrictions</a>,
+resulting in error-prone configuration.  As of Postfix 2.10, relay
+permission rules are preferably implemented with <a href="postconf.5.html#smtpd_relay_restrictions">smtpd_relay_restrictions</a>,
+so that a permissive spam blocking policy under
+<a href="postconf.5.html#smtpd_recipient_restrictions">smtpd_recipient_restrictions</a> will no longer result in a permissive
+mail relay policy.  </p>
 
-<ul>
-
-<li> Mail from clients whose IP address matches $<a href="postconf.5.html#mynetworks">mynetworks</a>, or:
-
-<li> Mail to remote destinations that match $<a href="postconf.5.html#relay_domains">relay_domains</a>, except
-for addresses that contain sender-specified routing
-(user@elsewhere@domain), or:
-
-<li> Mail to local destinations that match $<a href="postconf.5.html#inet_interfaces">inet_interfaces</a>
-or $<a href="postconf.5.html#proxy_interfaces">proxy_interfaces</a>, $<a href="postconf.5.html#mydestination">mydestination</a>, $<a href="postconf.5.html#virtual_alias_domains">virtual_alias_domains</a>, or
-$<a href="postconf.5.html#virtual_mailbox_domains">virtual_mailbox_domains</a>.
-
-</ul>
+<p> For backwards compatibility, sites that migrate from Postfix
+versions before 2.10 can set <a href="postconf.5.html#smtpd_relay_restrictions">smtpd_relay_restrictions</a> to the empty
+value, and use <a href="postconf.5.html#smtpd_recipient_restrictions">smtpd_recipient_restrictions</a> exactly as before. </p>
 
 <p>
-IMPORTANT: If you change this parameter setting, you must specify
+IMPORTANT: Either the <a href="postconf.5.html#smtpd_relay_restrictions">smtpd_relay_restrictions</a> or the
+<a href="postconf.5.html#smtpd_recipient_restrictions">smtpd_recipient_restrictions</a> parameter must specify
 at least one of the following restrictions. Otherwise Postfix will
 refuse to receive mail:
 </p>
 
 <blockquote>
 <pre>
-reject, defer, <a href="postconf.5.html#defer_if_permit">defer_if_permit</a>, <a href="postconf.5.html#reject_unauth_destination">reject_unauth_destination</a>
+reject, <a href="postconf.5.html#reject_unauth_destination">reject_unauth_destination</a>
+</pre>
+</blockquote>
+
+<blockquote>
+<pre>
+defer, <a href="postconf.5.html#defer_if_permit">defer_if_permit</a>, <a href="postconf.5.html#defer_unauth_destination">defer_unauth_destination</a>
 </pre>
 </blockquote>
 
@@ -13562,9 +13563,15 @@ matches $<a href="postconf.5.html#mydestination">mydestination</a>, $<a href="po
 $<a href="postconf.5.html#virtual_alias_domains">virtual_alias_domains</a>, or $<a href="postconf.5.html#virtual_mailbox_domains">virtual_mailbox_domains</a>, and contains
 no sender-specified routing (user@elsewhere@domain).
 
-</ul> The <a href="postconf.5.html#relay_domains_reject_code">relay_domains_reject_code</a> parameter specifies the response
+</ul>The <a href="postconf.5.html#relay_domains_reject_code">relay_domains_reject_code</a> parameter specifies the response
 code for rejected requests (default: 554). </dd>
 
+<dt><b><a name="defer_unauth_destination">defer_unauth_destination</a></b></dt>
+
+<dd> Reject the same requests as <a href="postconf.5.html#reject_unauth_destination">reject_unauth_destination</a>, with a
+non-permanent error code.  This feature is available in Postfix
+2.10 and later.</dd>
+
 <dt><b><a name="reject_unknown_recipient_domain">reject_unknown_recipient_domain</a></b></dt>
 
 <dd>Reject the request when Postfix is not final destination for
@@ -13623,6 +13630,8 @@ Example:
 </p>
 
 <pre>
+# The Postfix before 2.10 default mail relay policy. Later Postfix
+# versions implement this preferably with <a href="postconf.5.html#smtpd_relay_restrictions">smtpd_relay_restrictions</a>.
 <a href="postconf.5.html#smtpd_recipient_restrictions">smtpd_recipient_restrictions</a> = <a href="postconf.5.html#permit_mynetworks">permit_mynetworks</a>, <a href="postconf.5.html#reject_unauth_destination">reject_unauth_destination</a>
 </pre>
 
@@ -13792,6 +13801,77 @@ This feature is available in Postfix 2.1 and later.
 </p>
 
 
+</DD>
+
+<DT><b><a name="smtpd_relay_restrictions">smtpd_relay_restrictions</a>
+(default: <a href="postconf.5.html#permit_mynetworks">permit_mynetworks</a>, <a href="postconf.5.html#reject_unauth_destination">reject_unauth_destination</a>)</b></DT><DD>
+
+<p> Access restrictions for mail relay control that the Postfix
+SMTP server applies in the context of the RCPT TO command, before
+<a href="postconf.5.html#smtpd_recipient_restrictions">smtpd_recipient_restrictions</a>.
+See <a href="SMTPD_ACCESS_README.html">SMTPD_ACCESS_README</a>, section "Delayed evaluation of SMTP access
+restriction lists" for a discussion of evaluation context and time.
+</p>
+
+<p> With Postfix versions before 2.10, the rules for relay permission
+and spam blocking were combined under <a href="postconf.5.html#smtpd_recipient_restrictions">smtpd_recipient_restrictions</a>,
+resulting in error-prone configuration.  As of Postfix 2.10, relay
+permission rules are preferably implemented with <a href="postconf.5.html#smtpd_relay_restrictions">smtpd_relay_restrictions</a>,
+so that a permissive spam blocking policy under
+<a href="postconf.5.html#smtpd_recipient_restrictions">smtpd_recipient_restrictions</a> will no longer result in a permissive
+mail relay policy.  </p>
+
+<p> For backwards compatibility, sites that migrate from Postfix
+versions before 2.10 can set <a href="postconf.5.html#smtpd_relay_restrictions">smtpd_relay_restrictions</a> to the empty
+value, and use <a href="postconf.5.html#smtpd_recipient_restrictions">smtpd_recipient_restrictions</a> exactly as before. </p>
+
+<p>
+By default, the Postfix SMTP server accepts:
+</p>
+
+<ul>
+
+<li> Mail from clients whose IP address matches $<a href="postconf.5.html#mynetworks">mynetworks</a>, or:
+
+<li> Mail to remote destinations that match $<a href="postconf.5.html#relay_domains">relay_domains</a>, except
+for addresses that contain sender-specified routing
+(user@elsewhere@domain), or:
+
+<li> Mail to local destinations that match $<a href="postconf.5.html#inet_interfaces">inet_interfaces</a>
+or $<a href="postconf.5.html#proxy_interfaces">proxy_interfaces</a>, $<a href="postconf.5.html#mydestination">mydestination</a>, $<a href="postconf.5.html#virtual_alias_domains">virtual_alias_domains</a>, or
+$<a href="postconf.5.html#virtual_mailbox_domains">virtual_mailbox_domains</a>.
+
+</ul>
+
+<p>
+IMPORTANT: Either the <a href="postconf.5.html#smtpd_relay_restrictions">smtpd_relay_restrictions</a> or the
+<a href="postconf.5.html#smtpd_recipient_restrictions">smtpd_recipient_restrictions</a> parameter must specify
+at least one of the following restrictions. Otherwise Postfix will
+refuse to receive mail:
+</p>
+
+<blockquote>
+<pre>
+reject, <a href="postconf.5.html#reject_unauth_destination">reject_unauth_destination</a>
+</pre>
+</blockquote>
+
+<blockquote>
+<pre>
+defer, <a href="postconf.5.html#defer_if_permit">defer_if_permit</a>, <a href="postconf.5.html#defer_unauth_destination">defer_unauth_destination</a>
+</pre>
+</blockquote>
+
+<p>
+Specify a list of restrictions, separated by commas and/or whitespace.
+Continue long lines by starting the next line with whitespace.
+The same restrictions are available as documented under
+<a href="postconf.5.html#smtpd_recipient_restrictions">smtpd_recipient_restrictions</a>.
+</p>
+
+<p> This feature is available in Postix 2.10 and later. </p>
+
+
 </DD>
 
 <DT><b><a name="smtpd_restriction_classes">smtpd_restriction_classes</a>
@@ -13845,6 +13925,15 @@ access restriction can be used to permit relay access, like this:
 
 <blockquote>
 <pre>
+# With Postfix 2.10 and later, the mail relay policy is
+# preferably specified under <a href="postconf.5.html#smtpd_relay_restrictions">smtpd_relay_restrictions</a>.
+<a href="postconf.5.html#smtpd_relay_restrictions">smtpd_relay_restrictions</a> =
+    <a href="postconf.5.html#permit_mynetworks">permit_mynetworks</a>, <a href="postconf.5.html#permit_sasl_authenticated">permit_sasl_authenticated</a>, ...
+</pre>
+
+<pre>
+# With Postfix before 2.10, the relay policy can be
+# specified only under <a href="postconf.5.html#smtpd_recipient_restrictions">smtpd_recipient_restrictions</a>.
 <a href="postconf.5.html#smtpd_recipient_restrictions">smtpd_recipient_restrictions</a> =
     <a href="postconf.5.html#permit_mynetworks">permit_mynetworks</a>, <a href="postconf.5.html#permit_sasl_authenticated">permit_sasl_authenticated</a>, ...
 </pre>
@@ -14109,7 +14198,7 @@ or a list of SASL login names separated by comma and/or whitespace.
 
 <p>
 Optional restrictions that the Postfix SMTP server applies in the
-context of the MAIL FROM command.
+context of a client MAIL FROM command.
 See <a href="SMTPD_ACCESS_README.html">SMTPD_ACCESS_README</a>, section "Delayed evaluation of SMTP access
 restriction lists" for a discussion of evaluation context and time.
 </p>
@@ -15031,7 +15120,7 @@ protocol exclusions. One can now explicitly exclude SSLv2 by setting
 SSLv3 set "<a href="postconf.5.html#smtpd_tls_mandatory_protocols">smtpd_tls_mandatory_protocols</a> = !SSLv2, !SSLv3". Listing
 the protocols to include, rather than protocols to exclude, is
 supported, but not recommended. The exclusion form more closely
-matches the behaviour when the OpenSSL library is newer than Postfix.
+matches the behavior when the OpenSSL library is newer than Postfix.
 </p>
 
 <p> Since SSL version 2 has known protocol weaknesses and is now
@@ -15076,7 +15165,7 @@ with a "!" character. To exclude SSLv2 even for opportunistic TLS set
 "<a href="postconf.5.html#smtpd_tls_protocols">smtpd_tls_protocols</a> = !SSLv2". To exclude both "SSLv2" and "SSLv3" set
 "<a href="postconf.5.html#smtpd_tls_protocols">smtpd_tls_protocols</a> = !SSLv2, !SSLv3". Explicitly listing the protocols to
 include, rather than protocols to exclude, is supported, but not
-recommended.  The exclusion form more closely matches the behaviour
+recommended.  The exclusion form more closely matches the behavior
 when the OpenSSL library is newer than Postfix.  </p>
 
 <p> Example: </p>
index 788cfec5f0d4e1f7e34ef428ed8d08b5747f58b4..1bde6223ce24d1ff2279800c63e1ed123b9b81b9 100644 (file)
@@ -958,8 +958,8 @@ SMTPD(8)                                                              SMTPD(8)
               explicit ".domain.tld" pattern.
 
        <b><a href="postconf.5.html#smtpd_client_restrictions">smtpd_client_restrictions</a> (empty)</b>
-              Optional Postfix SMTP server access restrictions in
-              the  context  of  a  remote  SMTP client connection
+              Optional restrictions that the Postfix SMTP  server
+              applies  in  the  context  of  a  client connection
               request.
 
        <b><a href="postconf.5.html#smtpd_helo_required">smtpd_helo_required</a> (no)</b>
@@ -970,72 +970,81 @@ SMTPD(8)                                                              SMTPD(8)
 
        <b><a href="postconf.5.html#smtpd_helo_restrictions">smtpd_helo_restrictions</a> (empty)</b>
               Optional  restrictions that the Postfix SMTP server
-              applies in the context of the SMTP HELO command.
+              applies in the context of a client HELO command.
 
        <b><a href="postconf.5.html#smtpd_sender_restrictions">smtpd_sender_restrictions</a> (empty)</b>
               Optional restrictions that the Postfix SMTP  server
-              applies in 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-
+              applies  in  the context of a client MAIL FROM com-
               mand.
 
+       <b><a href="postconf.5.html#smtpd_recipient_restrictions">smtpd_recipient_restrictions</a> (see 'postconf -d' output)</b>
+              Optional restrictions that the Postfix SMTP  server
+              applies in the context of a client RCPT TO command,
+              after <a href="postconf.5.html#smtpd_relay_restrictions">smtpd_relay_restrictions</a>.
+
        <b><a href="postconf.5.html#smtpd_etrn_restrictions">smtpd_etrn_restrictions</a> (empty)</b>
-              Optional  SMTP  server  access  restrictions in the
-              context of a client ETRN request.
+              Optional restrictions that the Postfix SMTP  server
+              applies in the context of a client ETRN command.
 
        <b><a href="postconf.5.html#allow_untrusted_routing">allow_untrusted_routing</a> (no)</b>
-              Forward   mail   with   sender-specified    routing
-              (user[@%!]remote[@%!]site)  from  untrusted clients
+              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.
 
+       Available in Postfix version 2.10 and later:
+
+       <b><a href="postconf.5.html#smtpd_relay_restrictions">smtpd_relay_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>
+              Access restrictions for mail relay control that the
+              Postfix  SMTP  server applies in the context of the
+              RCPT TO  command,  before  <a href="postconf.5.html#smtpd_recipient_restrictions">smtpd_recipient_restric</a>-
+              <a href="postconf.5.html#smtpd_recipient_restrictions">tions</a>.
+
 <b>SENDER AND RECIPIENT ADDRESS VERIFICATION CONTROLS</b>
        Postfix   version  2.1  introduces  sender  and  recipient
        address verification.   This  feature  is  implemented  by
index 67797c874766e74af8f31f94043eeba43c6f8e4e..0bc50986fdaca44423759d4214f34d8d1f68c334 100644 (file)
@@ -395,6 +395,7 @@ $local_header_rewrite_clients,
 .IP \(bu
 The message is received from the network, and the
 remote_header_rewrite_domain parameter specifies a non-empty value.
+.br
 .PP
 To get the behavior before Postfix version 2.2, specify
 "local_header_rewrite_clients = static:all".
@@ -483,6 +484,7 @@ $local_header_rewrite_clients,
 .IP \(bu
 The message is received from the network, and the
 remote_header_rewrite_domain parameter specifies a non-empty value.
+.br
 .PP
 To get the behavior before Postfix version 2.2, specify
 "local_header_rewrite_clients = static:all".
@@ -506,6 +508,7 @@ $local_header_rewrite_clients,
 .IP \(bu
 The message is received from the network, and the
 remote_header_rewrite_domain parameter specifies a non-empty value.
+.br
 .PP
 To get the behavior before Postfix version 2.2, specify
 "local_header_rewrite_clients = static:all".
@@ -715,6 +718,7 @@ mime_nesting_limit value proportionally.
 Be careful when making changes.  Excessively large values
 will result in the loss of non-delivery notifications, when a bounce
 message size exceeds a local or remote MTA's message size limit.
+.br
 .SH bounce_template_file (default: empty)
 Pathname of a configuration file with bounce message templates.
 These override the built-in templates of delivery status notification
@@ -771,6 +775,7 @@ $local_header_rewrite_clients,
 .IP \(bu
 The message is received from the network, and the
 remote_header_rewrite_domain parameter specifies a non-empty value.
+.br
 .PP
 To get the behavior before Postfix version 2.2, specify
 "local_header_rewrite_clients = static:all".
@@ -805,24 +810,35 @@ with the character set that is specified with the
 execution_directory_expansion_filter parameter.
 .IP "\fB$user\fR"
 The recipient's username.
+.br
 .IP "\fB$shell\fR"
 The recipient's login shell pathname.
+.br
 .IP "\fB$home\fR"
 The recipient's home directory.
+.br
 .IP "\fB$recipient\fR"
 The full recipient address.
+.br
 .IP "\fB$extension\fR"
 The optional recipient address extension.
+.br
 .IP "\fB$domain\fR"
 The recipient domain.
+.br
 .IP "\fB$local\fR"
 The entire recipient localpart.
+.br
 .IP "\fB$recipient_delimiter\fR"
 The system-wide recipient address extension delimiter.
+.br
 .IP "\fB${name?value}\fR"
 Expands to \fIvalue\fR when \fI$name\fR is non-empty.
+.br
 .IP "\fB${name:value}\fR"
 Expands to \fIvalue\fR when \fI$name\fR is empty.
+.br
+.br
 .PP
 Instead of $name you can also specify ${name} or $(name).
 .PP
@@ -848,6 +864,7 @@ The MAIL_CONFIG environment variable (daemon processes
 and commands).
 .IP \(bu
 The "-c" command-line option (commands only).
+.br
 .PP
 With Postfix command that run with set-gid privileges, a
 config_directory override requires either root privileges, or it
@@ -895,6 +912,7 @@ domain; earlier versions will use $myhostname.  Specify
 "default_filter_nexthop = $myhostname" for compatibility with Postfix
 2.6 or earlier, or specify a content_filter value with an explicit
 next-hop \fIdestination\fR.
+.br
 .SH cyrus_sasl_config_path (default: empty)
 Search path for Cyrus SASL application configuration files,
 currently used only to locate the $smtpd_sasl_path.conf file.
@@ -921,12 +939,15 @@ When
 the notify_classes parameter value contains the "data" class, the
 Postfix SMTP server and client will report transcripts of sessions
 with an error because a table is unavailable.
+.br
 .IP "\fB yes \fR (historical behavior)"
 Immediate
 termination: a daemon process logs a type "fatal" message and
 terminates immediately.  This option reduces the number of possible
 code paths through Postfix, and may therefore be slightly more
 secure than the default.
+.br
+.br
 .PP
 For the sake of sanity, the number of type "error" messages is
 limited to 13 over the lifetime of a daemon process.
@@ -1129,11 +1150,14 @@ The default setting of "1" is compatible with Postfix versions
 before 2.5, where a destination's delivery concurrency is throttled
 down to zero (and further delivery suspended) after a single failed
 pseudo-cohort.
+.br
 .IP "\fB\fInumber\fR / concurrency \fR"
 Variable feedback of "\fInumber\fR / (delivery concurrency)".
 The \fInumber\fR must be in the range 0..1 inclusive. With
 \fInumber\fR equal to "1", a destination's delivery concurrency
 is decremented by 1 after each failed pseudo-cohort.
+.br
+.br
 .PP
 A pseudo-cohort is the number of deliveries equal to a destination's
 delivery concurrency.
@@ -1162,11 +1186,14 @@ Constant feedback.  The value must be in the range 0..1
 inclusive. The default setting of "1" is compatible with Postfix
 versions before 2.5, where a destination's delivery concurrency
 doubles after each successful pseudo-cohort.
+.br
 .IP "\fB\fInumber\fR / concurrency \fR"
 Variable feedback of "\fInumber\fR / (delivery concurrency)".
 The \fInumber\fR must be in the range 0..1 inclusive. With
 \fInumber\fR equal to "1", a destination's delivery concurrency
 is incremented by 1 after each successful pseudo-cohort.
+.br
+.br
 .PP
 A pseudo-cohort is the number of deliveries equal to a destination's
 delivery concurrency.
@@ -1190,6 +1217,7 @@ With a corresponding per-destination recipient limit equal
 to 1, the rate delay specifies the time between deliveries to the
 \fIsame recipient\fR. Different recipients are delivered in
 parallel, subject to the process limits specified in master.cf.
+.br
 .PP
 To enable the delay, specify a non-zero time value (an integral
 value plus an optional one-letter suffix that specifies the time
@@ -1236,6 +1264,7 @@ It changes the meaning of other corresponding per-destination
 settings in a similar manner, from settings for delivery to the
 \fIsame domain\fR into settings for delivery to the \fIsame
 recipient\fR.
+.br
 .PP
 Use \fItransport\fR_destination_recipient_limit to specify a
 transport-specific override, where \fItransport\fR is the master.cf
@@ -1289,48 +1318,67 @@ This feature is available in Postfix 2.0 and later.
 The template is subject to exactly one level of $name substitution:
 .IP "\fB$client\fR"
 The client hostname and IP address, formatted as name[address].
+.br
 .IP "\fB$client_address\fR"
 The client IP address.
+.br
 .IP "\fB$client_name\fR"
 The client hostname or "unknown". See reject_unknown_client_hostname
 for more details.
+.br
 .IP "\fB$reverse_client_name\fR"
 The client hostname from address->name lookup, or "unknown".
 See reject_unknown_reverse_client_hostname for more details.
+.br
 .IP "\fB$helo_name\fR"
 The hostname given in HELO or EHLO command or empty string.
+.br
 .IP "\fB$rbl_class\fR"
 The blacklisted entity type: Client host, Helo command, Sender
 address, or Recipient address.
+.br
 .IP "\fB$rbl_code\fR"
 The numerical SMTP response code, as specified with the
 maps_rbl_reject_code configuration parameter. Note: The numerical
 SMTP response code is required, and must appear at the start of the
 reply. With Postfix version 2.3 and later this information may be followed
 by an RFC 3463 enhanced status code.
+.br
 .IP "\fB$rbl_domain\fR"
 The RBL domain where $rbl_what is blacklisted.
+.br
 .IP "\fB$rbl_reason\fR"
 The reason why $rbl_what is blacklisted, or an empty string.
+.br
 .IP "\fB$rbl_what\fR"
 The entity that is blacklisted (an IP address, a hostname, a domain
 name, or an email address whose domain was blacklisted).
+.br
 .IP "\fB$recipient\fR"
 The recipient address or <> in case of the null address.
+.br
 .IP "\fB$recipient_domain\fR"
 The recipient domain or empty string.
+.br
 .IP "\fB$recipient_name\fR"
 The recipient address localpart or <> in case of null address.
+.br
 .IP "\fB$sender\fR"
 The sender address or <> in case of the null address.
+.br
 .IP "\fB$sender_domain\fR"
 The sender domain or empty string.
+.br
 .IP "\fB$sender_name\fR"
 The sender address localpart or <> in case of the null address.
+.br
 .IP "\fB${name?text}\fR"
 Expands to `text' if $name is not empty.
+.br
 .IP "\fB${name:text}\fR"
 Expands to `text' if $name is empty.
+.br
+.br
 .PP
 Instead of $name you can also specify ${name} or $(name).
 .PP
@@ -1347,6 +1395,7 @@ When rejecting non-address information (such as the HELO
 command argument or the client hostname/address), the Postfix SMTP
 server will transform a sender or recipient DSN status into a generic
 non-address DSN status (e.g., 4.0.0).
+.br
 .SH default_recipient_limit (default: 20000)
 The default per-transport upper limit on the number of in-memory
 recipients.  These limits take priority over the global
@@ -1459,6 +1508,7 @@ b = time from last active queue entry to connection setup
 c = time in connection setup, including DNS, EHLO and STARTTLS
 .IP \(bu
 d = time in message transmission
+.br
 .PP
 This feature is available in Postfix 2.3 and later.
 .SH delay_notice_recipient (default: postmaster)
@@ -1539,7 +1589,7 @@ disable_vrfy_command = no
 .ad
 .ft R
 .SH dnsblog_reply_delay (default: 0s)
-A debugging aid to artifically delay DNS responses.
+A debugging aid to artificially delay DNS responses.
 .PP
 This feature is available in Postfix 2.8.
 .SH dnsblog_service_name (default: dnsblog)
@@ -1615,6 +1665,7 @@ of the queue file creation time in microseconds, after conversion
 into hexadecimal representation. This produces the same queue hashing
 behavior as if the queue file name was created with "enable_long_queue_ids
 = no".
+.br
 .PP
 Changing the parameter value to "no" has the following effects:
 .IP \(bu
@@ -1637,6 +1688,7 @@ with Postfix <= 2.8.
 The hash_queue_depth algorithm uses the first characters
 of the queue file name, with the hexadecimal representation of the
 file creation time in microseconds.
+.br
 .PP
 Before migration to Postfix <= 2.8, the following commands
 are required to convert long queue file names into short names:
@@ -1742,6 +1794,7 @@ the end of the relay entry.
 .IP \(bu
 In transport maps, specify "relay:\fInexthop...\fR"
 as the right-hand side for backup or primary MX domain entries.
+.br
 .PP
 Postfix version 2.2 and later will not use the fallback_relay feature
 for destinations that it is MX host for.
@@ -1833,24 +1886,35 @@ filtered with the character set that is specified with the
 forward_expansion_filter parameter.
 .IP "\fB$user\fR"
 The recipient's username.
+.br
 .IP "\fB$shell\fR"
 The recipient's login shell pathname.
+.br
 .IP "\fB$home\fR"
 The recipient's home directory.
+.br
 .IP "\fB$recipient\fR"
 The full recipient address.
+.br
 .IP "\fB$extension\fR"
 The optional recipient address extension.
+.br
 .IP "\fB$domain\fR"
 The recipient domain.
+.br
 .IP "\fB$local\fR"
 The entire recipient localpart.
+.br
 .IP "\fB$recipient_delimiter\fR"
 The system-wide recipient address extension delimiter.
+.br
 .IP "\fB${name?value}\fR"
 Expands to \fIvalue\fR when \fI$name\fR is non-empty.
+.br
 .IP "\fB${name:value}\fR"
 Expands to \fIvalue\fR when \fI$name\fR is empty.
+.br
+.br
 .PP
 Instead of $name you can also specify ${name} or $(name).
 .PP
@@ -1965,12 +2029,17 @@ import from a non-Postfix parent process. Examples of relevant
 parameters:
 .IP "\fBTZ\fR"
 Needed for sane time keeping on most System-V-ish systems.
+.br
 .IP "\fBDISPLAY\fR"
 Needed for debugging Postfix daemons with an X-windows debugger.
+.br
 .IP "\fBXAUTHORITY\fR"
 Needed for debugging Postfix daemons with an X-windows debugger.
+.br
 .IP "\fBMAIL_CONFIG\fR"
 Needed to make "\fBpostfix -c\fR" work.
+.br
+.br
 .PP
 Specify a list of names and/or name=value pairs, separated by
 whitespace or comma. The name=value form is supported with
@@ -2107,9 +2176,12 @@ by whitespace or comma.
 .IP "\fBbounce\fR"
 Inspect the content of delivery
 status notifications.
+.br
 .IP "\fBnotify\fR"
 Inspect the content of postmaster
 notifications by the \fBsmtp\fR(8) and \fBsmtpd\fR(8) processes.
+.br
+.br
 .PP
 NOTE: It's generally not safe to enable content inspection of
 Postfix-generated email messages. The user is warned.
@@ -2163,7 +2235,7 @@ When a remote LMTP server announces no DSN support, assume that
 the
 server performs final delivery, and send "delivered" delivery status
 notifications instead of "relayed". The default setting is backwards
-compatible to avoid the infinetisimal possibility of breaking
+compatible to avoid the infinitesimal possibility of breaking
 existing LMTP-based content filters.
 .SH lmtp_bind_address (default: empty)
 The LMTP-specific version of the smtp_bind_address configuration
@@ -2207,6 +2279,7 @@ configuration parameter.
 Upon the onset of another delivery request, the remote LMTP server
 associated with the current session does not respond to the RSET
 command.
+.br
 .PP
 Most of these limitations have been with the Postfix
 a connection cache that is shared among multiple LMTP client
@@ -2322,6 +2395,7 @@ this action from being logged.
 .IP \(bu
 Use the lmtp_discard_lhlo_keyword_address_maps feature to
 discard LHLO keywords selectively.
+.br
 .SH lmtp_dns_resolver_options (default: empty)
 The LMTP-specific version of the smtp_dns_resolver_options
 configuration parameter.  See there for details.
@@ -2510,14 +2584,19 @@ The following security features are defined for the \fBcyrus\fR
 client SASL implementation:
 .IP "\fBnoplaintext\fR"
 Disallow authentication methods that use plaintext passwords.
+.br
 .IP "\fBnoactive\fR"
 Disallow authentication methods that are vulnerable to non-dictionary
 active attacks.
+.br
 .IP "\fBnodictionary\fR"
 Disallow authentication methods that are vulnerable to passive
 dictionary attack.
+.br
 .IP "\fBnoanonymous\fR"
 Disallow anonymous logins.
+.br
+.br
 .PP
 Example:
 .PP
@@ -2799,16 +2878,19 @@ Specify a list of zero or more of the following:
 Append the domain name in $myorigin or $mydomain when the
 client IP address matches $inet_interfaces. This is enabled by
 default.
+.br
 .IP "\fBpermit_mynetworks\fR"
 Append the domain name in $myorigin or $mydomain when the
 client IP address matches any network or network address listed in
 $mynetworks. This setting will not prevent remote mail header
 address rewriting when mail from a remote client is forwarded by
 a neighboring system.
+.br
 .IP "\fBpermit_sasl_authenticated \fR"
 Append the domain name in $myorigin or $mydomain when the
 client is successfully authenticated via the RFC 4954 (AUTH)
 protocol.
+.br
 .IP "\fBpermit_tls_clientcerts \fR"
 Append the domain name in $myorigin or $mydomain when the
 remote SMTP client TLS certificate fingerprint or public key fingerprint
@@ -2816,17 +2898,21 @@ remote SMTP client TLS certificate fingerprint or public key fingerprint
 The fingerprint digest algorithm is configurable via the
 smtpd_tls_fingerprint_digest parameter (hard-coded as md5 prior to
 Postfix version 2.5).
+.br
 .IP "\fBpermit_tls_all_clientcerts \fR"
 Append the domain name in $myorigin or $mydomain when the
 remote SMTP client TLS certificate is successfully verified, regardless of
 whether it is listed on the server, and regardless of the certifying
 authority.
+.br
 .IP "\fBcheck_address_map \fItype:table\fR \fR"
 .IP "\fB\fItype:table\fR \fR"
 Append the domain name in $myorigin or $mydomain when the
 client IP address matches the specified lookup table.
 The lookup result is ignored, and no subnet lookup is done. This
 is suitable for, e.g., pop-before-smtp lookup tables.
+.br
+.br
 .PP
 Examples:
 .PP
@@ -2901,6 +2987,7 @@ You redefine the "local_transport" setting in main.cf.
 .IP \(bu
 You use the "luser_relay", "mailbox_transport", or "fallback_transport"
 feature of the Postfix \fBlocal\fR(8) delivery agent.
+.br
 .PP
 Details are described in the LOCAL_RECIPIENT_README file.
 .PP
@@ -2944,24 +3031,35 @@ as undeliverable.
 The following $name expansions are done on luser_relay:
 .IP "\fB$domain\fR"
 The recipient domain.
+.br
 .IP "\fB$extension\fR"
 The recipient address extension.
+.br
 .IP "\fB$home\fR"
 The recipient's home directory.
+.br
 .IP "\fB$local\fR"
 The entire recipient address localpart.
+.br
 .IP "\fB$recipient\fR"
 The full recipient address.
+.br
 .IP "\fB$recipient_delimiter\fR"
 The system-wide recipient address extension delimiter.
+.br
 .IP "\fB$shell\fR"
 The recipient's login shell.
+.br
 .IP "\fB$user\fR"
 The recipient username.
+.br
 .IP "\fB${name?value}\fR"
 Expands to \fIvalue\fR when \fI$name\fR has a non-empty value.
+.br
 .IP "\fB${name:value}\fR"
 Expands to \fIvalue\fR when \fI$name\fR has an empty value.
+.br
+.br
 .PP
 Instead of $name you can also specify ${name} or $(name).
 .PP
@@ -3036,43 +3134,61 @@ The following environment variables are exported to the command:
 .IP "\fBCLIENT_ADDRESS\fR"
 Remote client network address. Available in Postfix version 2.2 and
 later.
+.br
 .IP "\fBCLIENT_HELO\fR"
 Remote client EHLO command parameter. Available in Postfix version 2.2
 and later.
+.br
 .IP "\fBCLIENT_HOSTNAME\fR"
 Remote client hostname. Available in Postfix version 2.2 and later.
+.br
 .IP "\fBCLIENT_PROTOCOL\fR"
 Remote client protocol. Available in Postfix version 2.2 and later.
+.br
 .IP "\fBDOMAIN\fR"
 The domain part of the recipient address.
+.br
 .IP "\fBEXTENSION\fR"
 The optional address extension.
+.br
 .IP "\fBHOME\fR"
 The recipient home directory.
+.br
 .IP "\fBLOCAL\fR"
 The recipient address localpart.
+.br
 .IP "\fBLOGNAME\fR"
 The recipient's username.
+.br
 .IP "\fBORIGINAL_RECIPIENT\fR"
 The entire recipient address, before any address rewriting or
 aliasing.
+.br
 .IP "\fBRECIPIENT\fR"
 The full recipient address.
+.br
 .IP "\fBSASL_METHOD\fR"
 SASL authentication method specified in the remote client AUTH
 command. Available in Postfix version 2.2 and later.
+.br
 .IP "\fBSASL_SENDER\fR"
 SASL sender address specified in the remote client MAIL FROM
 command. Available in Postfix version 2.2 and later.
+.br
 .IP "\fBSASL_USER\fR"
 SASL username specified in the remote client AUTH command.
 Available in Postfix version 2.2 and later.
+.br
 .IP "\fBSENDER\fR"
 The full sender address.
+.br
 .IP "\fBSHELL\fR"
 The recipient's login shell.
+.br
 .IP "\fBUSER\fR"
 The recipient username.
+.br
+.br
 .PP
 Unlike other Postfix configuration parameters, the mailbox_command
 parameter is not subjected to $name substitutions. This is to make
@@ -3226,6 +3342,7 @@ $local_header_rewrite_clients,
 .IP \(bu
 The message is received from the network, and the
 remote_header_rewrite_domain parameter specifies a non-empty value.
+.br
 .PP
 To get the behavior before Postfix version 2.2, specify
 "local_header_rewrite_clients = static:all".
@@ -3431,15 +3548,20 @@ The default action when a Milter (mail filter) application is
 unavailable or mis-configured. Specify one of the following:
 .IP "accept"
 Proceed as if the mail filter was not present.
+.br
 .IP "reject"
 Reject all further commands in this session
 with a permanent status code.
+.br
 .IP "tempfail"
 Reject all further commands in this session
 with a temporary status code.
+.br
 .IP "quarantine"
 Like "accept", but freeze the message in
 the "hold" queue. Available with Postfix 2.6 and later.
+.br
+.br
 .PP
 This feature is available in Postfix 2.3 and later.
 .SH milter_end_of_data_macros (default: see "postconf -d" output)
@@ -3524,18 +3646,25 @@ Protocol versions:
 Use Sendmail 8 mail filter protocol version 2 (default
 with Sendmail version 8.11 .. 8.13 and Postfix version 2.3 ..
 2.5).
+.br
 .IP "3"
 Use Sendmail 8 mail filter protocol version 3.
+.br
 .IP "4"
 Use Sendmail 8 mail filter protocol version 4.
+.br
 .IP "6"
 Use Sendmail 8 mail filter protocol version 6 (default
 with Sendmail version 8.14 and Postfix version 2.6).
+.br
+.br
 .PP
 Protocol extensions:
 .IP "no_header_reply"
 Specify this when the Milter application
 will not reply for each individual message header.
+.br
+.br
 .PP
 This feature is available in Postfix 2.3 and later.
 .SH milter_rcpt_macros (default: see "postconf -d" output)
@@ -3670,6 +3799,7 @@ By default, the Postfix SMTP server rejects mail for recipients
 not listed with the local_recipient_maps parameter.  See the
 \fBpostconf\fR(5) manual for a description of the local_recipient_maps
 and unknown_local_recipient_reject_code parameters.
+.br
 .PP
 Specify a list of host or domain names, "/file/name" or "type:table"
 patterns, separated by commas and/or whitespace. A "/file/name"
@@ -3724,7 +3854,7 @@ The list of "trusted" remote SMTP clients that have more privileges than
 "strangers".
 .PP
 In particular, "trusted" SMTP clients are allowed to relay mail
-through Postfix.  See the smtpd_recipient_restrictions parameter
+through Postfix.  See the smtpd_relay_restrictions parameter
 description in the \fBpostconf\fR(5) manual.
 .PP
 You can specify the list of "trusted" network addresses by hand
@@ -3786,6 +3916,7 @@ local machine.  Don't do this with a dialup site - it would cause
 Postfix to "trust" your entire provider's network.  Instead, specify
 an explicit mynetworks list by hand, as described with the mynetworks
 configuration parameter.
+.br
 .SH myorigin (default: $myhostname)
 The domain name that locally-posted mail appears to come
 from, and that locally posted mail is delivered to. The default,
@@ -3842,10 +3973,12 @@ Send the postmaster copies of the headers of bounced mail, and
 send transcripts of SMTP sessions when Postfix rejects mail. The
 notification is sent to the address specified with the
 bounce_notice_recipient configuration parameter (default: postmaster).
+.br
 .IP "\fB2bounce\fR"
 Send undeliverable bounced mail to the postmaster. The notification
 is sent to the address specified with the 2bounce_notice_recipient
 configuration parameter (default: postmaster).
+.br
 .IP "\fBdata\fR"
 Send the postmaster a transcript of the SMTP session with an
 error because a critical data file was unavailable. The notification
@@ -3854,30 +3987,37 @@ configuration parameter (default: postmaster).
 .br
 This feature
 is available in Postfix 2.9 and later.
+.br
 .IP "\fBdelay\fR"
 Send the postmaster copies of the headers of delayed mail. The
 notification is sent to the address specified with the
 delay_notice_recipient configuration parameter (default: postmaster).
+.br
 .IP "\fBpolicy\fR"
 Send the postmaster a transcript of the SMTP session when a
 client request was rejected because of (UCE) policy. The notification
 is sent to the address specified with the error_notice_recipient
 configuration parameter (default: postmaster).
+.br
 .IP "\fBprotocol\fR"
 Send the postmaster a transcript of the SMTP session in case
 of client or server protocol errors. The notification is sent to
 the address specified with the error_notice_recipient configuration
 parameter (default: postmaster).
+.br
 .IP "\fBresource\fR"
 Inform the postmaster of mail not delivered due to resource
 problems.  The notification is sent to the address specified with
 the error_notice_recipient configuration parameter (default:
 postmaster).
+.br
 .IP "\fBsoftware\fR"
 Inform the postmaster of mail not delivered due to software
 problems.  The notification is sent to the address specified with
 the error_notice_recipient configuration parameter (default:
 postmaster).
+.br
+.br
 .PP
 Examples:
 .PP
@@ -3945,6 +4085,7 @@ Whitelist the client and
 terminate the search if the client IP address matches $mynetworks.
 Do not subject the client to any before/after 220 greeting tests.
 Pass the connection immediately to a Postfix SMTP server process.
+.br
 .IP "\fB type:table \fR"
 Query the specified lookup
 table. Each table lookup result is an access list, except that
@@ -3953,15 +4094,18 @@ access lists inside a table cannot specify type:table entries.
 To discourage the use of hash, btree, etc. tables, there is no
 support for substring matching like \fBsmtpd\fR(8). Use CIDR tables
 instead.
+.br
 .IP "\fB permit \fR"
 Whitelist the client and terminate
 the search. Do not subject the client to any before/after 220
 greeting tests. Pass the connection immediately to a Postfix SMTP
 server process.
+.br
 .IP "\fB reject \fR"
 Blacklist the client and terminate
 the search. Subject the client to the action configured with the
 postscreen_blacklist_action configuration parameter.
+.br
 .IP "\fB dunno \fR"
 All \fBpostscreen\fR(8) access lists
 implicitly have this command at the end.
@@ -3973,6 +4117,8 @@ evaluate the next command.
 When \fB dunno \fR is executed
 outside a lookup table, terminate the search, and subject the client
 to the configured before/after 220 greeting tests.
+.br
+.br
 .PP
 Example:
 .PP
@@ -4010,13 +4156,17 @@ Do \fInot\fR repeat this test before some the result from some
 other test expires.
 This option is useful for testing and collecting statistics
 without blocking mail permanently.
+.br
 .IP "\fBenforce\fR"
 Allow other tests to complete. Reject attempts to deliver mail
 with a 550 SMTP reply, and log the helo/sender/recipient information.
 Repeat this test the next time the client connects.
+.br
 .IP "\fBdrop\fR"
 Drop the connection immediately with a 521 SMTP reply. Repeat
 this test the next time the client connects.
+.br
+.br
 .PP
 This feature is available in Postfix 2.8.
 .SH postscreen_bare_newline_enable (default: no)
@@ -4048,13 +4198,17 @@ Ignore  this result. Allow other tests to complete.  Repeat
 this test the next time the client connects.
 This option is useful for testing and collecting statistics
 without blocking mail.
+.br
 .IP "\fBenforce\fR"
 Allow other tests to complete. Reject attempts to deliver mail
 with a 550 SMTP reply, and log the helo/sender/recipient information.
 Repeat this test the next time the client connects.
+.br
 .IP "\fBdrop\fR"
 Drop the connection immediately with a 521 SMTP reply. Repeat
 this test the next time the client connects.
+.br
+.br
 .PP
 This feature is available in Postfix 2.8.
 .SH postscreen_cache_cleanup_interval (default: 12h)
@@ -4153,13 +4307,17 @@ Ignore the failure of this test. Allow other tests to complete.
 Repeat this test the next time the client connects.
 This option is useful for testing and collecting statistics
 without blocking mail.
+.br
 .IP "\fBenforce\fR"
 Allow other tests to complete. Reject attempts to deliver mail
 with a 550 SMTP reply, and log the helo/sender/recipient information.
 Repeat this test the next time the client connects.
+.br
 .IP "\fBdrop\fR"
 Drop the connection immediately with a 521 SMTP reply. Repeat
 this test the next time the client connects.
+.br
+.br
 .PP
 This feature is available in Postfix 2.8.
 .SH postscreen_dnsbl_reply_map (default: empty)
@@ -4227,6 +4385,7 @@ whitelisting.
 .IP \(bu
 When one postscreen_dnsbl_sites entry produces multiple
 DNSBL responses, \fBpostscreen\fR(8) applies the weight at most once.
+.br
 .PP
 Examples:
 .PP
@@ -4298,13 +4457,17 @@ Ignore the failure of this test. Allow other tests to complete.
 Repeat this test the next time the client connects.
 This option is useful for testing and collecting statistics
 without blocking mail.
+.br
 .IP "\fBenforce\fR"
 Allow other tests to complete. Reject attempts to deliver mail
 with a 550 SMTP reply, and log the helo/sender/recipient information.
 Repeat this test the next time the client connects.
+.br
 .IP "\fBdrop\fR"
 Drop the connection immediately with a 521 SMTP reply. Repeat
 this test the next time the client connects.
+.br
+.br
 .PP
 In either case, \fBpostscreen\fR(8) will not whitelist the remote SMTP client
 IP address.
@@ -4358,15 +4521,19 @@ Do \fInot\fR repeat this test before some the result from some
 other test expires.
 This option is useful for testing and collecting statistics
 without blocking mail permanently.
+.br
 .IP "\fBenforce\fR"
 Allow other tests to complete. Reject attempts to deliver mail
 with a 550 SMTP reply, and log the helo/sender/recipient information.
 Repeat this test the next time the client connects.
+.br
 .IP "\fBdrop\fR"
 Drop the connection immediately with a 521 SMTP reply. Repeat
 this test the next time the client connects. This action is the
 same as with the Postfix SMTP server's smtpd_forbidden_commands
 feature.
+.br
+.br
 .PP
 This feature is available in Postfix 2.8.
 .SH postscreen_non_smtp_command_enable (default: no)
@@ -4398,13 +4565,17 @@ Do \fInot\fR repeat this test before some the result from some
 other test expires.
 This option is useful for testing and collecting statistics
 without blocking mail permanently.
+.br
 .IP "\fBenforce\fR"
 Allow other tests to complete. Reject attempts to deliver mail
 with a 550 SMTP reply, and log the helo/sender/recipient information.
 Repeat this test the next time the client connects.
+.br
 .IP "\fBdrop\fR"
 Drop the connection immediately with a 521 SMTP reply. Repeat
 this test the next time the client connects.
+.br
+.br
 .PP
 This feature is available in Postfix 2.8.
 .SH postscreen_pipelining_enable (default: no)
@@ -4430,7 +4601,7 @@ This feature is available in Postfix 2.8.
 The number of clients that can be waiting for service from a
 real Postfix SMTP server process. When this queue is full, all
 clients will
-receive a 421 reponse.
+receive a 421 response.
 .PP
 This feature is available in Postfix 2.8.
 .SH postscreen_pre_queue_limit (default: $default_process_limit)
@@ -4438,7 +4609,7 @@ The number of non-whitelisted clients that can be waiting for
 a decision whether they will receive service from a real Postfix
 SMTP server
 process. When this queue is full, all non-whitelisted clients will
-receive a 421 reponse.
+receive a 421 response.
 .PP
 This feature is available in Postfix 2.8.
 .SH postscreen_reject_footer (default: $smtpd_reject_footer)
@@ -4789,17 +4960,22 @@ cleanup server.
 .IP "\fBno_unknown_recipient_checks\fR"
 Do not try to reject unknown recipients (SMTP server only).
 This is typically specified AFTER an external content filter.
+.br
 .IP "\fBno_address_mappings\fR"
 Disable canonical address mapping, virtual alias map expansion,
 address masquerading, and automatic BCC (blind carbon-copy)
 recipients. This is typically specified BEFORE an external content
 filter.
+.br
 .IP "\fBno_header_body_checks\fR"
 Disable header/body_checks. This is typically specified AFTER
 an external content filter.
+.br
 .IP "\fBno_milters\fR"
 Disable Milter (mail filter) applications. This is typically
 specified AFTER an external content filter.
+.br
+.br
 .PP
 Note: when the "BEFORE content filter" receive_override_options
 setting is specified in the main.cf file, specify the "AFTER content
@@ -4842,6 +5018,7 @@ Look up the "user" address local part when the recipient domain
 equals $myorigin, $mydestination, $inet_interfaces or $proxy_interfaces.
 .IP \(bu
 Look up the "@domain.tld" part.
+.br
 .PP
 Specify the types and names of databases to use.  After change,
 run "\fBpostmap /etc/postfix/recipient_bcc\fR".
@@ -5258,6 +5435,7 @@ Look up the "user" address local part when the sender domain
 equals $myorigin, $mydestination, $inet_interfaces or $proxy_interfaces.
 .IP \(bu
 Look up the "@domain.tld" part.
+.br
 .PP
 Specify the types and names of databases to use.  After change,
 run "\fBpostmap /etc/postfix/sender_bcc\fR".
@@ -5344,14 +5522,18 @@ line endings from <CR><LF> into UNIX format (<LF>).
 Always convert message lines ending
 in <CR><LF>. This setting is the default with Postfix
 2.9 and later.
+.br
 .IP "\fBstrict\fR"
 Convert message lines ending in
 <CR><LF> only if the first input line ends in
 <CR><LF>. This setting is backwards-compatible with
 Postfix 2.8 and earlier.
+.br
 .IP "\fBnever\fR"
 Never convert message lines ending in
 <CR><LF>. This setting exists for completeness only.
+.br
+.br
 .PP
 This feature is available in Postfix 2.9 and later.
 .SH sendmail_path (default: see "postconf -d" output)
@@ -5507,6 +5689,7 @@ defined above,
 a "type:table" with domain names and/or relay host names on
 the left-hand side.  The right-hand side result from "type:table"
 lookups is ignored.
+.br
 .PP
 This feature is available in Postfix 2.2 and later.
 .SH smtp_connection_cache_on_demand (default: yes)
@@ -5647,6 +5830,7 @@ this action from being logged.
 .IP \(bu
 Use the smtp_discard_ehlo_keyword_address_maps feature to
 discard EHLO keywords selectively.
+.br
 .SH smtp_dns_resolver_options (default: empty)
 DNS Resolver options for the Postfix SMTP client.  Specify zero
 or more of the following options, separated by comma or whitespace.
@@ -5656,10 +5840,13 @@ that are specified in the file /etc/resolv.conf or equivalent.
 Append the current domain name to single-component names (those
 that do not contain a "." character). This can produce incorrect
 results, and is the hard-coded behavior prior to Postfix 2.8.
+.br
 .IP "\fBres_dnsrch\fR"
 Search for host names in the current domain and in parent
 domains. This can produce incorrect results and is therefore not
 recommended.
+.br
+.br
 .PP
 This feature is available in Postfix 2.8 and later.
 .SH smtp_enforce_tls (default: no)
@@ -5759,11 +5946,15 @@ address.  This parameter is ignored when DNS lookups are disabled
 Specify one of the following:
 .IP "\fBdns\fR"
 Hosts can be found in the DNS (preferred).
+.br
 .IP "\fBnative\fR"
 Use the native naming service only (nsswitch.conf, or equivalent
 mechanism).
+.br
 .IP "\fBdns, native\fR"
 Use the native service for hosts not found in the DNS.
+.br
+.br
 .PP
 This feature is available in Postfix 2.1 and later.
 .SH smtp_line_length_limit (default: 998)
@@ -5871,9 +6062,12 @@ Insert a delay before sending
 ".<CR><LF>" after the end of the message content.  The
 delay is subject to the smtp_pix_workaround_delay_time and
 smtp_pix_workaround_threshold_time parameter settings.
+.br
 .IP "\fBdisable_esmtp\fR
 Disable all extended SMTP commands:
 send HELO instead of EHLO.
+.br
+.br
 .PP
 This feature is available in Postfix 2.4 and later. The default
 settings are backwards compatible with earlier Postfix versions.
@@ -5934,6 +6128,7 @@ the enhanced status code (X.Y.Z).  When the enhanced status code
 initial digit differs from the SMTP reply code initial digit, or
 when no enhanced status code is present, the Postfix SMTP client
 uses a generic enhanced status code (X.0.0) instead.
+.br
 .PP
 Specify the name of a "type:table" lookup table. The search
 string is a single SMTP reply line as received from the remote SMTP
@@ -6110,15 +6305,21 @@ client SASL implementation:
 Specify zero or more of the following:
 .IP "\fBnoplaintext\fR"
 Disallow methods that use plaintext passwords.
+.br
 .IP "\fBnoactive\fR"
 Disallow methods subject to active (non-dictionary) attack.
+.br
 .IP "\fBnodictionary\fR"
 Disallow methods subject to passive (dictionary) attack.
+.br
 .IP "\fBnoanonymous\fR"
 Disallow methods that allow anonymous authentication.
+.br
 .IP "\fBmutual_auth\fR"
 Only allow methods that provide mutual authentication (not
 available with SASL version 1).
+.br
+.br
 .PP
 Example:
 .PP
@@ -6644,18 +6845,24 @@ a lower logging level.
 &mdash; no logging of remote SMTP server certificate trust-chain
 verification errors if server certificate verification is not required.
 With Postfix 2.8 and earlier, disable logging of TLS activity.
+.br
 .IP ""
 1 Also log remote SMTP server trust-chain verification
 errors and peer certificate summary information. With Postfix 2.8
 and earlier, log TLS handshake and certificate information.
+.br
 .IP ""
 2 Also log levels during TLS negotiation.
+.br
 .IP ""
 3 Also log hexadecimal and ASCII dump of TLS negotiation
 process.
+.br
 .IP ""
 4 Also log hexadecimal and ASCII dump of complete
 transmission after STARTTLS.
+.br
+.br
 .PP
 Do not use "smtp_tls_loglevel = 2" or higher except in case of
 problems. Use of loglevel 4 is strongly discouraged.
@@ -6678,15 +6885,18 @@ not recommended for mandatory encryption unless you must enforce TLS
 with "crippled" peers. The underlying cipherlist is specified via the
 tls_export_cipherlist configuration parameter, which you are strongly
 encouraged to not change.
+.br
 .IP "\fBlow\fR"
 Enable "LOW" grade or better OpenSSL ciphers.  This
 setting is only appropriate for internal mail servers.  The underlying
 cipherlist is specified via the tls_low_cipherlist configuration
 parameter, which you are strongly encouraged to not change.
+.br
 .IP "\fBmedium\fR"
 Enable "MEDIUM" grade or better OpenSSL ciphers.
 The underlying cipherlist is specified via the tls_medium_cipherlist
 configuration parameter, which you are strongly encouraged to not change.
+.br
 .IP "\fBhigh\fR"
 Enable only "HIGH" grade OpenSSL ciphers.  This setting may
 be appropriate when all mandatory TLS destinations (e.g. when all
@@ -6694,6 +6904,7 @@ mail is routed to a suitably capable relayhost) support at least one
 "HIGH" grade cipher. The underlying cipherlist is specified via the
 tls_high_cipherlist configuration parameter, which you are strongly
 encouraged to not change.
+.br
 .IP "\fBnull\fR"
 Enable only the "NULL" OpenSSL ciphers, these provide authentication
 without encryption.  This setting is only appropriate in the rare case
@@ -6703,6 +6914,8 @@ UNIX-domain socket that is configured to support "NULL" ciphers. The
 underlying cipherlist is specified via the tls_null_cipherlist
 configuration parameter, which you are strongly encouraged to not
 change.
+.br
+.br
 .PP
 The underlying cipherlists for grades other than "null" include
 anonymous ciphers, but these are automatically filtered out if the
@@ -6745,7 +6958,7 @@ protocol exclusions. One can now explicitly exclude SSLv2 by setting
 SSLv3 set "smtp_tls_mandatory_protocols = !SSLv2, !SSLv3". Listing
 the protocols to include, rather than protocols to exclude, is
 supported, but not recommended. The exclusion form more closely
-matches the behaviour when the OpenSSL library is newer than Postfix.
+matches the behavior when the OpenSSL library is newer than Postfix.
 .PP
 Since SSL version 2 has known protocol weaknesses and is now
 deprecated, the default setting excludes "SSLv2".  This means that by
@@ -6809,6 +7022,7 @@ Don't use TLS at all. This overrides a less
 specific \fBMAY\fR lookup result from the alternate host or next-hop
 lookup key, and overrides the global smtp_use_tls, smtp_enforce_tls,
 and smtp_tls_enforce_peername settings.
+.br
 .IP "MAY"
 Try to use TLS if the server announces support,
 otherwise use the unencrypted connection. This has less precedence
@@ -6816,6 +7030,7 @@ than a more specific result (including \fBNONE\fR) from the alternate
 host or next-hop lookup key, and has less precedence than the more
 specific global "smtp_enforce_tls = yes" or "smtp_tls_enforce_peername
 = yes".
+.br
 .IP "MUST_NOPEERMATCH"
 Require TLS encryption, but do not
 require that the remote SMTP server hostname matches the information
@@ -6824,6 +7039,7 @@ was issued by a trusted CA. This overrides a less secure \fBNONE\fR
 or a less specific \fBMAY\fR lookup result from the alternate host
 or next-hop lookup key, and overrides the global smtp_use_tls,
 smtp_enforce_tls and smtp_tls_enforce_peername settings.
+.br
 .IP "MUST"
 Require TLS encryption, require that the remote
 SMTP server hostname matches the information in the remote SMTP
@@ -6833,6 +7049,8 @@ and \fBMUST_NOPEERMATCH\fR or a less specific \fBMAY\fR lookup
 result from the alternate host or next-hop lookup key, and overrides
 the global smtp_use_tls, smtp_enforce_tls and smtp_tls_enforce_peername
 settings.
+.br
+.br
 .PP
 The above keywords correspond to the "none", "may", "encrypt" and
 "verify" security levels for the new smtp_tls_security_level parameter
@@ -6885,6 +7103,7 @@ related main.cf settings. The TLS security levels in order of increasing
 security are:
 .IP "\fBnone\fR"
 No TLS. No additional attributes are supported at this level.
+.br
 .IP "\fBmay\fR"
 Opportunistic TLS. Since sending in the clear is acceptable,
 demanding stronger than default TLS security merely reduces
@@ -6895,6 +7114,7 @@ override the "smtp_tls_ciphers", "smtp_tls_exclude_ciphers" and
 handshakes fail, Postfix retries the connection with TLS disabled.
 This allows mail delivery to sites with non-interoperable TLS
 implementations.
+.br
 .IP "\fBencrypt\fR"
 Mandatory TLS encryption. At this level
 and higher, the optional "protocols" attribute overrides the main.cf
@@ -6904,6 +7124,7 @@ optional "exclude" attribute (Postfix >= 2.6) overrides the main.cf
 smtp_tls_mandatory_exclude_ciphers parameter. In the policy table,
 multiple protocols or excluded ciphers must be separated by colons,
 as attribute values may not contain whitespace or commas.
+.br
 .IP "\fBfingerprint\fR"
 Certificate fingerprint
 verification. Available with Postfix 2.5 and later. At this security
@@ -6919,6 +7140,7 @@ be combined with a "|" delimiter in a single match attribute, or multiple
 match attributes can be employed. The ":" character is not used as a
 delimiter as it occurs between each pair of fingerprint (hexadecimal)
 digits.
+.br
 .IP "\fBverify\fR"
 Mandatory TLS verification.  At this security
 level, DNS MX lookups are trusted to be secure enough, and the name
@@ -6928,6 +7150,7 @@ the main.cf smtp_tls_verify_cert_match parameter. In the policy table,
 multiple match patterns and strategies must be separated by colons.
 In practice explicit control over matching is more common with the
 "secure" policy, described below.
+.br
 .IP "\fBsecure\fR"
 Secure-channel TLS. At this security level, DNS
 MX lookups, though potentially used to determine the candidate next-hop
@@ -6945,6 +7168,8 @@ verification, they risk delivery to the wrong destination when domains
 change hands or are re-assigned to new gateways. With the "match"
 attribute approach, routing is not perturbed, and mail is deferred if
 verification of a new MX host fails.
+.br
+.br
 .PP
 Example:
 .PP
@@ -7007,7 +7232,7 @@ with a "!" character. To exclude SSLv2 even for opportunistic TLS set
 "smtp_tls_protocols = !SSLv2". To exclude both "SSLv2" and "SSLv3" set
 "smtp_tls_protocols = !SSLv2, !SSLv3". Explicitly listing the protocols to
 include, rather than protocols to exclude, is supported, but not
-recommended.  The exclusion form more closely matches the behaviour
+recommended.  The exclusion form more closely matches the behavior
 when the OpenSSL library is newer than Postfix.
 .PP
 Example:
@@ -7088,6 +7313,7 @@ Specify one of the following security levels:
 .IP "\fBnone\fR"
 TLS will not be used unless enabled for specific
 destinations via smtp_tls_policy_maps.
+.br
 .IP "\fBmay\fR"
 Opportunistic TLS. Use TLS if this is supported by the remote
 SMTP server, otherwise use plaintext. Since
@@ -7101,6 +7327,7 @@ are disabled.
 When TLS handshakes fail, the connection is retried with TLS disabled.
 This allows mail delivery to sites with non-interoperable TLS
 implementations.
+.br
 .IP "\fBencrypt\fR"
 Mandatory TLS encryption. Since a minimum
 level of security is intended, it is reasonable to be specific about
@@ -7110,6 +7337,7 @@ smtp_tls_mandatory_ciphers specify the TLS protocols and minimum
 cipher grade which the administrator considers secure enough for
 mandatory encrypted sessions. This security level is not an appropriate
 default for systems delivering mail to the Internet.
+.br
 .IP "\fBfingerprint\fR"
 Certificate fingerprint
 verification. Available with Postfix 2.5 and later. At this security
@@ -7120,6 +7348,7 @@ fingerprint or public key fingerprint (Postfix 2.9 and later) of
 the valid server certificate. The digest
 algorithm used to calculate the fingerprint is selected by the
 \fBsmtp_tls_fingerprint_digest\fR parameter.
+.br
 .IP "\fBverify\fR"
 Mandatory TLS verification. At this security
 level, DNS MX lookups are trusted to be secure enough, and the name
@@ -7129,6 +7358,7 @@ parameter controls how the server name is verified. In practice explicit
 control over matching is more common at the "secure" level, described
 below. This security level is not an appropriate default for systems
 delivering mail to the Internet.
+.br
 .IP "\fBsecure\fR"
 Secure-channel TLS.  At this security level,
 DNS MX lookups, though potentially used to determine the candidate
@@ -7139,6 +7369,8 @@ in the smtp_tls_secure_cert_match configuration parameter. The default
 matching rule is that a server certificate matches when its name is equal
 to or is a sub-domain of the nexthop domain. This security level is not
 an appropriate default for systems delivering mail to the Internet.
+.br
+.br
 .PP
 Examples:
 .PP
@@ -7279,11 +7511,14 @@ Patterns specify domain names, or domain name suffixes:
 Match the \fIexample.com\fR domain,
 i.e. one of the names the server certificate must be \fIexample.com\fR,
 upper and lower case distinctions are ignored.
+.br
 .IP "\fI.example.com\fR"
 Match subdomains of the \fIexample.com\fR domain, i.e. match
 a name in the server certificate that consists of a non-zero number of
 labels followed by a \fI.example.com\fR suffix. Case distinctions are
 ignored.
+.br
+.br
 .PP
 Strategies specify a transformation from the next-hop domain
 to the expected name in the server certificate:
@@ -7296,9 +7531,11 @@ domain prior to the MX lookup, not the result of the MX lookup. For
 LMTP delivery via UNIX-domain sockets, the verified next-hop name is
 $myhostname.  This strategy is suitable for use with the "secure"
 policy. Case is ignored.
+.br
 .IP "dot-nexthop"
 As above, but match server certificate names that are subdomains
 of the next-hop domain. Case is ignored.
+.br
 .IP "hostname"
 Match against the hostname of the server, often
 obtained via an unauthenticated DNS MX lookup. For LMTP delivery via
@@ -7308,6 +7545,8 @@ smtp_tls_per_site table, and is suitable for use with the "verify"
 security level. When the next-hop name is enclosed in square brackets
 to suppress MX lookups, the "hostname" strategy is the same as the
 "nexthop" strategy. Case is ignored.
+.br
+.br
 .PP
 Sample main.cf setting:
 .PP
@@ -7582,8 +7821,8 @@ smtpd_client_recipient_rate_limit = 1000
 .ad
 .ft R
 .SH smtpd_client_restrictions (default: empty)
-Optional Postfix SMTP server access restrictions in the context of
-a remote SMTP client connection request.
+Optional restrictions that the Postfix SMTP server applies in the
+context of a client connection request.
 See SMTPD_ACCESS_README, section "Delayed evaluation of SMTP access
 restriction lists" for a discussion of evaluation context and time.
 .PP
@@ -7605,22 +7844,26 @@ The fingerprint digest algorithm is configurable via the
 smtpd_tls_fingerprint_digest parameter (hard-coded as md5 prior to
 Postfix version 2.5).  This feature is available with Postfix version
 2.2 and later.
+.br
 .IP "\fBcheck_client_access \fItype:table\fR\fR"
 Search the specified access database for the client hostname,
 parent domains, client IP address, or networks obtained by stripping
 least significant octets. See the \fBaccess\fR(5) manual page for details.
+.br
 .IP "\fBcheck_client_mx_access \fItype:table\fR\fR"
 Search the specified \fBaccess\fR(5) database for the MX hosts for the
 client hostname, and execute the corresponding action.  Note: a result
 of "OK" is not allowed for safety reasons. Instead, use DUNNO in order
 to exclude specific hosts from blacklists.  This feature is available
 in Postfix 2.7 and later.
+.br
 .IP "\fBcheck_client_ns_access \fItype:table\fR\fR"
 Search the specified \fBaccess\fR(5) database for the DNS servers for
 the client hostname, and execute the corresponding action.  Note: a
 result of "OK" is not allowed for safety reasons. Instead, use DUNNO
 in order to exclude specific hosts from blacklists.  This feature is
 available in Postfix 2.7 and later.
+.br
 .IP "\fBcheck_reverse_client_hostname_access \fItype:table\fR\fR"
 Search the specified access database for the unverified reverse
 client hostname, parent domains, client IP address, or networks
@@ -7629,27 +7872,33 @@ manual page for details.  Note: a result of "OK" is not allowed for
 safety reasons.  Instead, use DUNNO in order to exclude specific
 hosts from blacklists.  This feature is available in Postfix 2.6
 and later.
+.br
 .IP "\fBcheck_reverse_client_hostname_mx_access \fItype:table\fR\fR"
 Search the specified \fBaccess\fR(5) database for the MX hosts for the
 unverified reverse client hostname, and execute the corresponding
 action.  Note: a result of "OK" is not allowed for safety reasons.
 Instead, use DUNNO in order to exclude specific hosts from blacklists.
 This feature is available in Postfix 2.7 and later.
+.br
 .IP "\fBcheck_reverse_client_hostname_ns_access \fItype:table\fR\fR"
 Search the specified \fBaccess\fR(5) database for the DNS servers for
 the unverified reverse client hostname, and execute the corresponding
 action.  Note: a result of "OK" is not allowed for safety reasons.
 Instead, use DUNNO in order to exclude specific hosts from blacklists.
 This feature is available in Postfix 2.7 and later.
+.br
 .IP "\fBpermit_inet_interfaces\fR"
 Permit the request when the client IP address matches
 $inet_interfaces.
+.br
 .IP "\fBpermit_mynetworks\fR"
 Permit the request when the client IP address matches any
 network or network address listed in  $mynetworks.
+.br
 .IP "\fBpermit_sasl_authenticated\fR"
 Permit the request when the client is successfully
 authenticated via the RFC 4954 (AUTH) protocol.
+.br
 .IP "\fBpermit_tls_all_clientcerts\fR"
 Permit the request when the remote SMTP client certificate is
 verified successfully.  This option must be used only if a special
@@ -7659,6 +7908,7 @@ be allowed to relay.  Specify "tls_append_default_CA = no" when the
 trusted CA is specified with smtpd_tls_CAfile or smtpd_tls_CApath,
 to prevent Postfix from appending the system-supplied default CAs.
 This feature is available with Postfix version 2.2.
+.br
 .IP "\fBpermit_tls_clientcerts\fR"
 Permit the request when the remote SMTP client certificate
 fingerprint or public key fingerprint (Postfix 2.9 and later) is
@@ -7667,6 +7917,7 @@ The fingerprint digest algorithm is configurable via the
 smtpd_tls_fingerprint_digest parameter (hard-coded as md5 prior to
 Postfix version 2.5).  This feature is available with Postfix version
 2.2.
+.br
 .IP "\fBreject_rbl_client \fIrbl_domain=d.d.d.d\fR\fR"
 Reject the request when the reversed client network address is
 listed with the A record "\fId.d.d.d\fR" under \fIrbl_domain\fR
@@ -7682,6 +7933,7 @@ rejected requests (default:  554), the default_rbl_reply  parameter
 specifies the default server reply, and the rbl_reply_maps  parameter
 specifies tables with server replies indexed by \fIrbl_domain\fR.
 This feature is available in Postfix 2.0 and later.
+.br
 .IP "\fBpermit_dnswl_client \fIdnswl_domain=d.d.d.d\fR\fR"
 Accept the request when the reversed client network address is
 listed with the A record "\fId.d.d.d\fR" under \fIdnswl_domain\fR.
@@ -7695,6 +7947,7 @@ For safety, permit_dnswl_client is silently
 ignored when it would override reject_unauth_destination.  The
 result is DEFER_IF_REJECT when whitelist lookup fails.  This feature
 is available in Postfix 2.8 and later.
+.br
 .IP "\fBreject_rhsbl_client \fIrbl_domain=d.d.d.d\fR\fR"
 Reject the request when the client hostname is listed with the
 A record "\fId.d.d.d\fR" under \fIrbl_domain\fR (Postfix version
@@ -7708,6 +7961,7 @@ description above for additional RBL related configuration parameters.
 This feature is available in Postfix 2.0 and later; with Postfix
 version 2.8 and later, reject_rhsbl_reverse_client will usually
 produce better results.
+.br
 .IP "\fBpermit_rhswl_client \fIrhswl_domain=d.d.d.d\fR\fR"
 Accept the request when the client hostname is listed with the
 A record "\fId.d.d.d\fR" under \fIrhswl_domain\fR.  Each "\fId\fR"
@@ -7725,6 +7979,7 @@ For safety, permit_rhswl_client is silently ignored when it
 would override reject_unauth_destination.  The result is DEFER_IF_REJECT
 when whitelist lookup fails.  This feature is available in Postfix
 2.8 and later.
+.br
 .IP "\fBreject_rhsbl_reverse_client \fIrbl_domain=d.d.d.d\fR\fR"
 Reject the request when the unverified reverse client hostname
 is listed with the A record "\fId.d.d.d\fR" under \fIrbl_domain\fR.
@@ -7735,6 +7990,7 @@ unverified reverse client hostname is listed with any A record under
 \fIrbl_domain\fR. See the reject_rbl_client description above for
 additional RBL related configuration parameters.  This feature is
 available in Postfix 2.8 and later.
+.br
 .IP "\fBreject_unknown_client_hostname\fR (with Postfix < 2.3: reject_unknown_client)"
 Reject the request when 1) the client IP address->name mapping
 fails, 2) the name->address mapping fails, or 3) the name->address
@@ -7749,6 +8005,7 @@ unknown_client_reject_code parameter specifies the response code
 for rejected requests (default: 450). The reply is always 450 in
 case the address->name or name->address lookup failed due to
 a temporary problem.
+.br
 .IP "\fBreject_unknown_reverse_client_hostname\fR"
 Reject the request when the client IP address has no address->name
 mapping.
@@ -7765,6 +8022,8 @@ problem.
 .br
 This feature is available in Postfix 2.3 and
 later.
+.br
+.br
 .PP
 In addition, you can use any of the following
 generic restrictions.  These restrictions are applicable in
@@ -7773,6 +8032,7 @@ any SMTP command context.
 Query the specified policy server. See the SMTPD_POLICY_README
 document for details. This feature is available in Postfix 2.1
 and later.
+.br
 .IP "\fBdefer\fR"
 Defer the request. The client is told to try again later. This
 restriction is useful at the end of a restriction list, to make
@@ -7780,19 +8040,23 @@ the default policy explicit.
 .br
 The defer_code parameter specifies
 the SMTP server reply code (default: 450).
+.br
 .IP "\fBdefer_if_permit\fR"
 Defer the request if some later restriction would result in an
 explicit or implicit PERMIT action.  This is useful when a blacklisting
 feature fails due to a temporary problem.  This feature is available
 in Postfix version 2.1 and later.
+.br
 .IP "\fBdefer_if_reject\fR"
 Defer the request if some later restriction would result in a
 REJECT action.  This is useful when a whitelisting feature fails
 due to a temporary problem.  This feature is available in Postfix
 version 2.1 and later.
+.br
 .IP "\fBpermit\fR"
 Permit the request. This restriction is useful at the end of
 a restriction list, to make the default policy explicit.
+.br
 .IP "\fBreject_multi_recipient_bounce\fR"
 Reject the request when the envelope sender is the null address,
 and the message has multiple envelope recipients. This usage has
@@ -7809,6 +8073,7 @@ Use at the RCPT stage will only reject the second etc.  recipient.
 The multi_recipient_bounce_reject_code parameter specifies the
 response code for rejected requests (default:  550).  This feature
 is available in Postfix 2.1 and later.
+.br
 .IP "\fBreject_plaintext_session\fR"
 Reject the request when the connection is not encrypted. This
 restriction should not be used before the client has had a chance
@@ -7817,6 +8082,7 @@ to negotiate encryption with the AUTH or STARTTLS commands.
 The plaintext_reject_code parameter specifies the response
 code for rejected requests (default:  450).  This feature is available
 in Postfix 2.3 and later.
+.br
 .IP "\fBreject_unauth_pipelining\fR"
 Reject the request when the client sends SMTP commands ahead
 of time where it is not allowed, or when the client sends SMTP
@@ -7834,11 +8100,13 @@ session.
 With older Postfix versions, reject_unauth_pipelining checks
 the current status of the input read queue, and its usage is not
 recommended in contexts other than smtpd_data_restrictions.
+.br
 .IP "\fBreject\fR"
 Reject the request. This restriction is useful at the end of
 a restriction list, to make the default policy explicit.  The
 reject_code configuration parameter specifies the response code for
 rejected requests (default: 554).
+.br
 .IP "\fBsleep \fIseconds\fR\fR"
 Pause for the specified number of seconds and proceed with
 the next restriction in the list, if any. This may stop zombie
@@ -7854,6 +8122,7 @@ mail when used as:
 .ad
 .ft R
 This feature is available in Postfix 2.3.
+.br
 .IP "\fBwarn_if_reject\fR"
 A safety net for testing. When "warn_if_reject" is placed
 before a reject-type restriction, access table query, or
@@ -7863,6 +8132,8 @@ due to a temporary error, this logs a "reject_warning" message for
 any implicit "defer_if_permit" actions that would normally prevent
 mail from being accepted by some later access restriction). This
 feature has no effect on defer_if_reject restrictions.
+.br
+.br
 .PP
 Other restrictions that are valid in this context:
 .IP \(bu
@@ -7873,6 +8144,7 @@ recipient restrictions are listed under smtpd_client_restrictions,
 they have effect only with "smtpd_delay_reject = yes", so that
 $smtpd_client_restrictions is evaluated at the time of the RCPT TO
 command.
+.br
 .PP
 Example:
 .PP
@@ -7908,6 +8180,7 @@ to translate these into domain names if necessary.
 Use "strict_rfc821_envelopes = no" to accept "RCPT TO:<\fIUser
 Name <user@example.com>>\fR". Postfix will ignore the "\fIUser
 Name\fR" part and deliver to the \fI<user@example.com>\fR address.
+.br
 .PP
 Examples of problems that can be solved with the smtpd_command_filter
 feature:
@@ -7999,6 +8272,7 @@ multi-recipient mail. Acting on only one recipient would be misleading,
 because any decision will affect all recipients equally. Acting on
 all recipients would require a possibly very large amount of memory,
 and would also be misleading for the reasons mentioned before.
+.br
 .PP
 Examples:
 .PP
@@ -8061,6 +8335,7 @@ this action from being logged.
 .IP \(bu
 Use the smtpd_discard_ehlo_keyword_address_maps feature
 to discard EHLO keywords selectively.
+.br
 .SH smtpd_end_of_data_restrictions (default: empty)
 Optional access restrictions that the Postfix SMTP server
 applies in the context of the SMTP END-OF-DATA command.
@@ -8094,8 +8369,8 @@ sending a reject (4xx or 5xx) response, when the client has made
 fewer than $smtpd_soft_error_limit errors without delivering
 mail.
 .SH smtpd_etrn_restrictions (default: empty)
-Optional SMTP server access restrictions in the context of a client
-ETRN request.
+Optional restrictions that the Postfix SMTP server applies in the
+context of a client ETRN command.
 See SMTPD_ACCESS_README, section "Delayed evaluation of SMTP access
 restriction lists" for a discussion of evaluation context and time.
 .PP
@@ -8113,6 +8388,8 @@ received with the ETRN command.
 .IP "\fBcheck_etrn_access \fItype:table\fR\fR"
 Search the specified access database for the ETRN domain name
 or its parent domains. See the \fBaccess\fR(5) manual page for details.
+.br
+.br
 .PP
 Other restrictions that are valid in this context:
 .IP \(bu
@@ -8121,6 +8398,7 @@ in any SMTP command context, described under smtpd_client_restrictions.
 .IP \(bu
 SMTP command specific restrictions described under
 smtpd_client_restrictions and smtpd_helo_restrictions.
+.br
 .PP
 Example:
 .PP
@@ -8169,7 +8447,7 @@ smtpd_helo_required = yes
 .ft R
 .SH smtpd_helo_restrictions (default: empty)
 Optional restrictions that the Postfix SMTP server applies in the
-context of the SMTP HELO command.
+context of a client HELO command.
 See SMTPD_ACCESS_README, section "Delayed evaluation of SMTP access
 restriction lists" for a discussion of evaluation context and time.
 .PP
@@ -8192,6 +8470,7 @@ hostname or parent domains, and execute the corresponding action.
 Note: specify "smtpd_helo_required = yes" to fully enforce this
 restriction (without "smtpd_helo_required = yes", a client can
 simply skip check_helo_access by not sending HELO or EHLO).
+.br
 .IP "\fBcheck_helo_mx_access \fItype:table\fR\fR"
 Search the specified \fBaccess\fR(5) database for the MX hosts for
 the HELO or EHLO hostname, and execute the corresponding action.
@@ -8201,6 +8480,7 @@ use DUNNO in order to exclude specific hosts from blacklists.  Note
 restriction (without "smtpd_helo_required = yes", a client can
 simply skip check_helo_mx_access by not sending HELO or EHLO).  This
 feature is available in Postfix 2.1 and later.
+.br
 .IP "\fBcheck_helo_ns_access \fItype:table\fR\fR"
 Search the specified \fBaccess\fR(5) database for the DNS servers
 for the HELO or EHLO hostname, and execute the corresponding action.
@@ -8210,6 +8490,7 @@ use DUNNO in order to exclude specific hosts from blacklists.  Note
 restriction (without "smtpd_helo_required = yes", a client can
 simply skip check_helo_ns_access by not sending HELO or EHLO). This
 feature is available in Postfix 2.1 and later.
+.br
 .IP "\fBreject_invalid_helo_hostname\fR (with Postfix < 2.3: reject_invalid_hostname)"
 Reject the request when the HELO or EHLO hostname is malformed.
 Note: specify "smtpd_helo_required = yes" to fully enforce
@@ -8218,6 +8499,7 @@ skip reject_invalid_helo_hostname by not sending HELO or EHLO).
 .br
 The invalid_hostname_reject_code specifies the response code
 for rejected requests (default: 501).
+.br
 .IP "\fBreject_non_fqdn_helo_hostname\fR (with Postfix < 2.3: reject_non_fqdn_hostname)"
 Reject the request when the HELO or EHLO hostname is not in
 fully-qualified domain form, as required by the RFC. Note: specify
@@ -8227,6 +8509,7 @@ reject_non_fqdn_helo_hostname by not sending HELO or EHLO).
 .br
 The non_fqdn_reject_code parameter specifies the response code for
 rejected requests (default: 504).
+.br
 .IP "\fBreject_rhsbl_helo \fIrbl_domain=d.d.d.d\fR\fR"
 Reject the request when the HELO or EHLO hostname hostname is
 listed with the A record "\fId.d.d.d\fR" under \fIrbl_domain\fR
@@ -8242,6 +8525,7 @@ enforce this restriction (without "smtpd_helo_required = yes", a
 client can simply skip reject_rhsbl_helo by not sending HELO or
 EHLO). This feature is available in Postfix 2.0
 and later.
+.br
 .IP "\fBreject_unknown_helo_hostname\fR (with Postfix < 2.3: reject_unknown_hostname)"
 Reject the request when the HELO or EHLO hostname has no DNS A
 or MX record.
@@ -8256,6 +8540,8 @@ defer_if_permit). Note: specify "smtpd_helo_required = yes" to fully
 enforce this restriction (without "smtpd_helo_required = yes", a
 client can simply skip reject_unknown_helo_hostname by not sending
 HELO or EHLO).
+.br
+.br
 .PP
 Other restrictions that are valid in this context:
 .IP \(bu
@@ -8271,6 +8557,7 @@ sender or recipient restrictions are listed under smtpd_helo_restrictions,
 they have effect only with "smtpd_delay_reject = yes", so that
 $smtpd_helo_restrictions is evaluated at the time of the RCPT TO
 command.
+.br
 .PP
 Examples:
 .PP
@@ -8421,6 +8708,8 @@ is accepting all recipients.
 NOTE 2: This feature increases the minimum amount of free queue
 space by $message_size_limit. The extra space is needed to save the
 message to a temporary file.
+.br
+.br
 .PP
 This feature is available in Postfix 2.7 and later.
 .SH smtpd_proxy_timeout (default: 100s)
@@ -8441,25 +8730,26 @@ The number of recipients that a remote SMTP client can send in
 excess of the limit specified with $smtpd_recipient_limit, before
 the Postfix SMTP server increments the per-session error count
 for each excess recipient.
-.SH smtpd_recipient_restrictions (default: permit_mynetworks, reject_unauth_destination)
-The access restrictions that the Postfix SMTP server applies in
-the context of the RCPT TO command.
+.SH smtpd_recipient_restrictions (default: see "postconf -d" output)
+Optional restrictions that the Postfix SMTP server applies in the
+context of a client RCPT TO command, after smtpd_relay_restrictions.
 See SMTPD_ACCESS_README, section "Delayed evaluation of SMTP access
 restriction lists" for a discussion of evaluation context and time.
 .PP
-By default, the Postfix SMTP server accepts:
-.IP \(bu
-Mail from clients whose IP address matches $mynetworks, or:
-.IP \(bu
-Mail to remote destinations that match $relay_domains, except
-for addresses that contain sender-specified routing
-(user@elsewhere@domain), or:
-.IP \(bu
-Mail to local destinations that match $inet_interfaces
-or $proxy_interfaces, $mydestination, $virtual_alias_domains, or
-$virtual_mailbox_domains.
+With Postfix versions before 2.10, the rules for relay permission
+and spam blocking were combined under smtpd_recipient_restrictions,
+resulting in error-prone configuration.  As of Postfix 2.10, relay
+permission rules are preferably implemented with smtpd_relay_restrictions,
+so that a permissive spam blocking policy under
+smtpd_recipient_restrictions will no longer result in a permissive
+mail relay policy.
 .PP
-IMPORTANT: If you change this parameter setting, you must specify
+For backwards compatibility, sites that migrate from Postfix
+versions before 2.10 can set smtpd_relay_restrictions to the empty
+value, and use smtpd_recipient_restrictions exactly as before.
+.PP
+IMPORTANT: Either the smtpd_relay_restrictions or the
+smtpd_recipient_restrictions parameter must specify
 at least one of the following restrictions. Otherwise Postfix will
 refuse to receive mail:
 .sp
@@ -8467,7 +8757,17 @@ refuse to receive mail:
 .nf
 .na
 .ft C
-reject, defer, defer_if_permit, reject_unauth_destination
+reject, reject_unauth_destination
+.fi
+.ad
+.ft R
+.in -4
+.sp
+.in +4
+.nf
+.na
+.ft C
+defer, defer_if_permit, defer_unauth_destination
 .fi
 .ad
 .ft R
@@ -8484,18 +8784,21 @@ that is received with the RCPT TO command.
 Search the specified \fBaccess\fR(5) database for the resolved RCPT
 TO address, domain, parent domains, or localpart@, and execute the
 corresponding action.
+.br
 .IP "\fBcheck_recipient_mx_access \fItype:table\fR\fR"
 Search the specified \fBaccess\fR(5) database for the MX hosts for
 the RCPT TO domain, and execute the corresponding action.  Note:
 a result of "OK" is not allowed for safety reasons. Instead, use
 DUNNO in order to exclude specific hosts from blacklists.  This
 feature is available in Postfix 2.1 and later.
+.br
 .IP "\fBcheck_recipient_ns_access \fItype:table\fR\fR"
 Search the specified \fBaccess\fR(5) database for the DNS servers
 for the RCPT TO domain, and execute the corresponding action.
 Note: a result of "OK" is not allowed for safety reasons. Instead,
 use DUNNO in order to exclude specific hosts from blacklists.  This
 feature is available in Postfix 2.1 and later.
+.br
 .IP "\fBpermit_auth_destination\fR"
 Permit the request when one of the following is true:
 .IP \(bu
@@ -8507,6 +8810,8 @@ Postfix is the final destination: the resolved RCPT TO domain
 matches $mydestination, $inet_interfaces, $proxy_interfaces,
 $virtual_alias_domains, or $virtual_mailbox_domains, and the address
 contains no sender-specified routing (user@elsewhere@domain).
+.br
+.br
 .IP "\fBpermit_mx_backup\fR"
 Permit the request when the local mail system is backup MX for
 the RCPT TO domain, or when the domain is an authorized destination
@@ -8526,6 +8831,8 @@ for definition).
 .IP \(bu
 Limitation: mail may be rejected in case of a temporary DNS
 lookup problem with Postfix prior to version 2.0.
+.br
+.br
 .IP "\fBreject_non_fqdn_recipient\fR"
 Reject the request when the RCPT TO address is not in
 fully-qualified domain form, as required by the RFC.
@@ -8533,6 +8840,7 @@ fully-qualified domain form, as required by the RFC.
 The
 non_fqdn_reject_code parameter specifies the response code for
 rejected requests (default: 504).
+.br
 .IP "\fBreject_rhsbl_recipient \fIrbl_domain=d.d.d.d\fR\fR"
 Reject the request when the RCPT TO domain is listed with the
 A record "\fId.d.d.d\fR" under \fIrbl_domain\fR (Postfix version
@@ -8549,6 +8857,7 @@ parameter specifies the response code for rejected requests (default:
 reply; and the rbl_reply_maps parameter specifies tables with server
 replies indexed by \fIrbl_domain\fR.  This feature is available
 in Postfix version 2.0 and later.
+.br
 .IP "\fBreject_unauth_destination\fR"
 Reject the request unless one of the following is true:
 .IP \(bu
@@ -8560,8 +8869,15 @@ Postfix is the final destination: the resolved RCPT TO domain
 matches $mydestination, $inet_interfaces, $proxy_interfaces,
 $virtual_alias_domains, or $virtual_mailbox_domains, and contains
 no sender-specified routing (user@elsewhere@domain).
- The relay_domains_reject_code parameter specifies the response
+.br
+The relay_domains_reject_code parameter specifies the response
 code for rejected requests (default: 554).
+.br
+.IP "\fBdefer_unauth_destination\fR"
+Reject the same requests as reject_unauth_destination, with a
+non-permanent error code.  This feature is available in Postfix
+2.10 and later.
+.br
 .IP "\fBreject_unknown_recipient_domain\fR"
 Reject the request when Postfix is not final destination for
 the recipient domain, and the RCPT TO domain has 1) no DNS A or MX
@@ -8576,11 +8892,13 @@ is always 450 in case of a temporary DNS error.
 The
 unknown_address_tempfail_action parameter specifies the action
 after a temporary DNS error (default: defer_if_permit).
+.br
 .IP "\fBreject_unlisted_recipient\fR (with Postfix version 2.0: check_recipient_maps)"
 Reject the request when the RCPT TO address is not listed in
 the list of valid recipients for its domain class. See the
 smtpd_reject_unlisted_recipient parameter description for details.
 This feature is available in Postfix 2.1 and later.
+.br
 .IP "\fBreject_unverified_recipient\fR"
 Reject the request when mail to the RCPT TO address is known
 to bounce, or when the recipient address destination is not reachable.
@@ -8603,6 +8921,8 @@ defer_if_permit).
 .br
 This feature is available in Postfix 2.1
 and later.
+.br
+.br
 .PP
 Other restrictions that are valid in this context:
 .IP \(bu
@@ -8612,12 +8932,15 @@ in any SMTP command context, described under smtpd_client_restrictions.
 SMTP command specific restrictions described under
 smtpd_client_restrictions, smtpd_helo_restrictions and
 smtpd_sender_restrictions.
+.br
 .PP
 Example:
 .PP
 .nf
 .na
 .ft C
+# The Postfix before 2.10 default mail relay policy. Later Postfix
+# versions implement this preferably with smtpd_relay_restrictions.
 smtpd_recipient_restrictions = permit_mynetworks, reject_unauth_destination
 .fi
 .ad
@@ -8673,17 +8996,22 @@ SMTP session:
 .IP "\fBclient_address\fR"
 The Client IP address that
 is logged in the maillog file.
+.br
 .IP "\fBclient_port\fR"
 The client TCP port that is
 logged in the maillog file.
+.br
 .IP "\fBlocaltime\fR"
 The server local time (Mmm dd
 hh:mm:ss) that is logged in the maillog file.
+.br
 .IP "\fBserver_name\fR"
 The server's myhostname value.
 This attribute is made available for sites with multiple MTAs
 (perhaps behind a load-balancer), where the server name can help
 the server support team to quickly find the right log files.
+.br
+.br
 .PP
 Notes:
 .IP \(bu
@@ -8692,6 +9020,7 @@ or main.cf parameters.
 .IP \(bu
 For safety reasons, text that does not match
 $smtpd_expansion_filter is censored.
+.br
 .PP
 This feature supports the two-character sequence \en as a request
 for a line break in the footer text. Postfix automatically inserts
@@ -8727,6 +9056,7 @@ is not null.
 The recipient domain matches $relay_domains but the recipient
 is not listed in $relay_recipient_maps, and $relay_recipient_maps
 is not null.
+.br
 .PP
 This feature is available in Postfix 2.1 and later.
 .SH smtpd_reject_unlisted_sender (default: no)
@@ -8752,8 +9082,72 @@ is not null.
 The sender domain matches $relay_domains but the sender is
 not listed in $relay_recipient_maps, and $relay_recipient_maps is
 not null.
+.br
 .PP
 This feature is available in Postfix 2.1 and later.
+.SH smtpd_relay_restrictions (default: permit_mynetworks, reject_unauth_destination)
+Access restrictions for mail relay control that the Postfix
+SMTP server applies in the context of the RCPT TO command, before
+smtpd_recipient_restrictions.
+See SMTPD_ACCESS_README, section "Delayed evaluation of SMTP access
+restriction lists" for a discussion of evaluation context and time.
+.PP
+With Postfix versions before 2.10, the rules for relay permission
+and spam blocking were combined under smtpd_recipient_restrictions,
+resulting in error-prone configuration.  As of Postfix 2.10, relay
+permission rules are preferably implemented with smtpd_relay_restrictions,
+so that a permissive spam blocking policy under
+smtpd_recipient_restrictions will no longer result in a permissive
+mail relay policy.
+.PP
+For backwards compatibility, sites that migrate from Postfix
+versions before 2.10 can set smtpd_relay_restrictions to the empty
+value, and use smtpd_recipient_restrictions exactly as before.
+.PP
+By default, the Postfix SMTP server accepts:
+.IP \(bu
+Mail from clients whose IP address matches $mynetworks, or:
+.IP \(bu
+Mail to remote destinations that match $relay_domains, except
+for addresses that contain sender-specified routing
+(user@elsewhere@domain), or:
+.IP \(bu
+Mail to local destinations that match $inet_interfaces
+or $proxy_interfaces, $mydestination, $virtual_alias_domains, or
+$virtual_mailbox_domains.
+.br
+.PP
+IMPORTANT: Either the smtpd_relay_restrictions or the
+smtpd_recipient_restrictions parameter must specify
+at least one of the following restrictions. Otherwise Postfix will
+refuse to receive mail:
+.sp
+.in +4
+.nf
+.na
+.ft C
+reject, reject_unauth_destination
+.fi
+.ad
+.ft R
+.in -4
+.sp
+.in +4
+.nf
+.na
+.ft C
+defer, defer_if_permit, defer_unauth_destination
+.fi
+.ad
+.ft R
+.in -4
+.PP
+Specify a list of restrictions, separated by commas and/or whitespace.
+Continue long lines by starting the next line with whitespace.
+The same restrictions are available as documented under
+smtpd_recipient_restrictions.
+.PP
+This feature is available in Postix 2.10 and later.
 .SH smtpd_restriction_classes (default: empty)
 User-defined aliases for groups of access restrictions. The aliases
 can be specified in smtpd_recipient_restrictions etc., and on the
@@ -8781,6 +9175,19 @@ access restriction can be used to permit relay access, like this:
 .nf
 .na
 .ft C
+# With Postfix 2.10 and later, the mail relay policy is
+# preferably specified under smtpd_relay_restrictions.
+smtpd_relay_restrictions =
+    permit_mynetworks, permit_sasl_authenticated, ...
+.fi
+.ad
+.ft R
+.PP
+.nf
+.na
+.ft C
+# With Postfix before 2.10, the relay policy can be
+# specified only under smtpd_recipient_restrictions.
 smtpd_recipient_restrictions =
     permit_mynetworks, permit_sasl_authenticated, ...
 .fi
@@ -8885,17 +9292,24 @@ mechanisms is system dependent.
 Specify zero or more of the following:
 .IP "\fBnoplaintext\fR"
 Disallow methods that use plaintext passwords.
+.br
 .IP "\fBnoactive\fR"
 Disallow methods subject to active (non-dictionary) attack.
+.br
 .IP "\fBnodictionary\fR"
 Disallow methods subject to passive (dictionary) attack.
+.br
 .IP "\fBnoanonymous\fR"
 Disallow methods that allow anonymous authentication.
+.br
 .IP "\fBforward_secrecy\fR"
 Only allow methods that support forward secrecy (Dovecot only).
+.br
 .IP "\fBmutual_auth\fR"
 Only allow methods that provide mutual authentication (not available
 with Cyrus SASL version 1).
+.br
+.br
 .PP
 By default, the Postfix SMTP server accepts plaintext passwords but
 not anonymous logins.
@@ -8937,18 +9351,22 @@ NIS, LDAP or SQL, the following search operations are done with a
 sender address of \fIuser@domain\fR:
 .IP "1) \fIuser@domain\fR"
 This table lookup is always done and has the highest precedence.
+.br
 .IP "2) \fIuser\fR"
 This table lookup is done only when the \fIdomain\fR part of the
 sender address matches $myorigin, $mydestination, $inet_interfaces
 or $proxy_interfaces.
+.br
 .IP "3) \fI@domain\fR"
 This table lookup is done last and has the lowest precedence.
+.br
+.br
 .PP
 In all cases the result of table lookup must be either "not found"
 or a list of SASL login names separated by comma and/or whitespace.
 .SH smtpd_sender_restrictions (default: empty)
 Optional restrictions that the Postfix SMTP server applies in the
-context of the MAIL FROM command.
+context of a client MAIL FROM command.
 See SMTPD_ACCESS_README, section "Delayed evaluation of SMTP access
 restriction lists" for a discussion of evaluation context and time.
 .PP
@@ -8965,22 +9383,26 @@ received with the MAIL FROM command.
 Search the specified \fBaccess\fR(5) database for the MAIL FROM
 address, domain, parent domains, or localpart@, and execute the
 corresponding action.
+.br
 .IP "\fBcheck_sender_mx_access \fItype:table\fR\fR"
 Search the specified \fBaccess\fR(5) database for the MX hosts for
 the MAIL FROM address, and execute the corresponding action.  Note:
 a result of "OK" is not allowed for safety reasons. Instead, use
 DUNNO in order to exclude specific hosts from blacklists.  This
 feature is available in Postfix 2.1 and later.
+.br
 .IP "\fBcheck_sender_ns_access \fItype:table\fR\fR"
 Search the specified \fBaccess\fR(5) database for the DNS servers
 for the MAIL FROM address, and execute the corresponding action.
 Note: a result of "OK" is not allowed for safety reasons. Instead,
 use DUNNO in order to exclude specific hosts from blacklists.  This
 feature is available in Postfix 2.1 and later.
+.br
 .IP "\fBreject_authenticated_sender_login_mismatch\fR"
 Enforces the reject_sender_login_mismatch restriction for
 authenticated clients only. This feature is available in
 Postfix version 2.1 and later.
+.br
 .IP "\fBreject_non_fqdn_sender\fR"
 Reject the request when the MAIL FROM address is not in
 fully-qualified domain form, as required by the RFC.
@@ -8988,6 +9410,7 @@ fully-qualified domain form, as required by the RFC.
 The
 non_fqdn_reject_code parameter specifies the response code for
 rejected requests (default: 504).
+.br
 .IP "\fBreject_rhsbl_sender \fIrbl_domain=d.d.d.d\fR\fR"
 Reject the request when the MAIL FROM domain is listed with
 the A record "\fId.d.d.d\fR" under \fIrbl_domain\fR (Postfix
@@ -9004,16 +9427,19 @@ rejected requests (default:  554); the default_rbl_reply parameter
 specifies the default server reply; and the rbl_reply_maps parameter
 specifies tables with server replies indexed by \fIrbl_domain\fR.
 This feature is available in Postfix 2.0 and later.
+.br
 .IP "\fBreject_sender_login_mismatch\fR"
 Reject the request when $smtpd_sender_login_maps specifies an
 owner for the MAIL FROM address, but the client is not (SASL) logged
 in as that MAIL FROM address owner; or when the client is (SASL)
 logged in, but the client login name doesn't own the MAIL FROM
 address according to $smtpd_sender_login_maps.
+.br
 .IP "\fBreject_unauthenticated_sender_login_mismatch\fR"
 Enforces the reject_sender_login_mismatch restriction for
 unauthenticated clients only. This feature is available in
 Postfix version 2.1 and later.
+.br
 .IP "\fBreject_unknown_sender_domain\fR"
 Reject the request when Postfix is not final destination for
 the sender address, and the MAIL FROM domain has 1) no DNS A or MX
@@ -9028,11 +9454,13 @@ is always 450 in case of a temporary DNS error.
 The
 unknown_address_tempfail_action parameter specifies the action
 after a temporary DNS error (default: defer_if_permit).
+.br
 .IP "\fBreject_unlisted_sender\fR"
 Reject the request when the MAIL FROM address is not listed in
 the list of valid recipients for its domain class. See the
 smtpd_reject_unlisted_sender parameter description for details.
 This feature is available in Postfix 2.1 and later.
+.br
 .IP "\fBreject_unverified_sender\fR"
 Reject the request when mail to the MAIL FROM address is known to
 bounce, or when the sender address destination is not reachable.
@@ -9054,6 +9482,8 @@ problem (default: defer_if_permit).
 .br
 This feature is available
 in Postfix 2.1 and later.
+.br
+.br
 .PP
 Other restrictions that are valid in this context:
 .IP \(bu
@@ -9068,6 +9498,7 @@ smtpd_recipient_restrictions. When recipient restrictions are listed
 under smtpd_sender_restrictions, they have effect only with
 "smtpd_delay_reject = yes", so that $smtpd_sender_restrictions is
 evaluated at the time of the RCPT TO command.
+.br
 .PP
 Examples:
 .PP
@@ -9096,6 +9527,7 @@ delays all responses by $smtpd_error_sleep_time seconds.
 .IP \(bu
 With Postfix versions 2.0 and earlier, the Postfix SMTP
 server delays all responses by (number of errors) seconds.
+.br
 .SH smtpd_starttls_timeout (default: see "postconf -d" output)
 The time limit for Postfix SMTP server write and read operations
 during TLS startup and shutdown handshake procedures. The current
@@ -9463,17 +9895,21 @@ The available choices are:
 Don't use EECDH. Ciphers based on EECDH key
 exchange will be disabled. This is the default in Postfix versions
 2.6 and 2.7.
+.br
 .IP "\fBstrong\fR"
 Use EECDH with approximately 128
 bits of security at a reasonable computational cost. This is the
 current best-practice trade-off between security and computational
 efficiency. This is the default in Postfix version 2.8 and later.
+.br
 .IP "\fBultra\fR"
 Use EECDH with approximately 192 bits of
 security at computational cost that is approximately twice as high
 as 128 bit strength ECC. Barring significant progress in attacks on
 elliptic curve crypto-systems, the "strong" curve is sufficient for most
 users.
+.br
+.br
 .PP
 This feature is available in Postfix 2.6 and later, when it is
 compiled and linked with OpenSSL 1.0.0 or later.
@@ -9608,18 +10044,24 @@ a lower logging level.
 errors
 if client certificate verification is not required. With Postfix 2.8
 and earlier, disable logging of TLS activity.
+.br
 .IP ""
 1 Also log trust-chain verification errors and peer
 certificate name and issuer. With Postfix 2.8 and earlier, log TLS
 handshake and certificate information.
+.br
 .IP ""
 2 Also log levels during TLS negotiation.
+.br
 .IP ""
 3 Also log hexadecimal and ASCII dump of TLS negotiation
 process.
+.br
 .IP ""
 4 Also log hexadecimal and ASCII dump of complete
 transmission after STARTTLS.
+.br
+.br
 .PP
 Do not use "smtpd_tls_loglevel = 2" or higher except in case
 of problems. Use of loglevel 4 is strongly discouraged.
@@ -9645,22 +10087,26 @@ This is the most appropriate setting for public MX hosts, and is always
 used with opportunistic TLS encryption. The underlying cipherlist
 is specified via the tls_export_cipherlist configuration parameter,
 which you are strongly encouraged to not change.
+.br
 .IP "\fBlow\fR"
 Enable "LOW" grade or stronger OpenSSL ciphers. The
 underlying cipherlist is specified via the tls_low_cipherlist
 configuration parameter, which you are strongly encouraged to
 not change.
+.br
 .IP "\fBmedium\fR"
 Enable "MEDIUM" grade or stronger OpenSSL ciphers. These use 128-bit
 or longer symmetric bulk-encryption keys. This is the default minimum
 strength for mandatory TLS encryption. The underlying cipherlist is
 specified via the tls_medium_cipherlist configuration parameter, which
 you are strongly encouraged to not change.
+.br
 .IP "\fBhigh\fR"
 Enable only "HIGH" grade OpenSSL ciphers. The
 underlying cipherlist is specified via the tls_high_cipherlist
 configuration parameter, which you are strongly encouraged to
 not change.
+.br
 .IP "\fBnull\fR"
 Enable only the "NULL" OpenSSL ciphers, these provide authentication
 without encryption.  This setting is only appropriate in the rare
@@ -9668,6 +10114,8 @@ case that all clients are prepared to use NULL ciphers (not normally
 enabled in TLS clients). The underlying cipherlist is specified via the
 tls_null_cipherlist configuration parameter, which you are strongly
 encouraged to not change.
+.br
+.br
 .PP
 Cipher types listed in
 smtpd_tls_mandatory_exclude_ciphers or smtpd_tls_exclude_ciphers are
@@ -9712,7 +10160,7 @@ protocol exclusions. One can now explicitly exclude SSLv2 by setting
 SSLv3 set "smtpd_tls_mandatory_protocols = !SSLv2, !SSLv3". Listing
 the protocols to include, rather than protocols to exclude, is
 supported, but not recommended. The exclusion form more closely
-matches the behaviour when the OpenSSL library is newer than Postfix.
+matches the behavior when the OpenSSL library is newer than Postfix.
 .PP
 Since SSL version 2 has known protocol weaknesses and is now
 deprecated, the default setting excludes "SSLv2".  This means that
@@ -9754,7 +10202,7 @@ with a "!" character. To exclude SSLv2 even for opportunistic TLS set
 "smtpd_tls_protocols = !SSLv2". To exclude both "SSLv2" and "SSLv3" set
 "smtpd_tls_protocols = !SSLv2, !SSLv3". Explicitly listing the protocols to
 include, rather than protocols to exclude, is supported, but not
-recommended.  The exclusion form more closely matches the behaviour
+recommended.  The exclusion form more closely matches the behavior
 when the OpenSSL library is newer than Postfix.
 .PP
 Example:
@@ -9794,15 +10242,19 @@ smtpd_use_tls and smtpd_enforce_tls. This parameter is ignored with
 Specify one of the following security levels:
 .IP "\fBnone\fR"
 TLS will not be used.
+.br
 .IP "\fBmay\fR"
 Opportunistic TLS: announce STARTTLS support
 to remote SMTP clients, but do not require that clients use TLS encryption.
+.br
 .IP "\fBencrypt\fR"
 Mandatory TLS encryption: announce
 STARTTLS support to remote SMTP clients, and require that clients use TLS
 encryption. According to RFC 2487 this MUST NOT be applied in case
 of a publicly-referenced SMTP server. Instead, this option should
 be used only on dedicated servers.
+.br
+.br
 .PP
 Note 1: the "fingerprint", "verify" and "secure" levels are not
 supported here.
@@ -9999,6 +10451,7 @@ $local_header_rewrite_clients,
 .IP \(bu
 The message is received from the network, and the
 remote_header_rewrite_domain parameter specifies a non-empty value.
+.br
 .PP
 To get the behavior before Postfix version 2.2, specify
 "local_header_rewrite_clients = static:all".
@@ -10122,43 +10575,57 @@ added after your Postfix source code was last updated, in that case
 you can only disable one of these via the hexadecimal syntax above.
 .IP "\fBMICROSOFT_SESS_ID_BUG\fR"
 See SSL_CTX_\fBset_options\fR(3)
+.br
 .IP "\fBNETSCAPE_CHALLENGE_BUG\fR"
 See SSL_CTX_\fBset_options\fR(3)
+.br
 .IP "\fBLEGACY_SERVER_CONNECT\fR"
 See SSL_CTX_\fBset_options\fR(3)
+.br
 .IP "\fBNETSCAPE_REUSE_CIPHER_CHANGE_BUG\fR"
 also aliased
 as \fBCVE-2010-4180\fR. Postfix 2.8 disables this work-around by
 default with OpenSSL versions that may predate the fix. Fixed in
 OpenSSL 0.9.8q and OpenSSL 1.0.0c.
+.br
 .IP "\fBSSLREF2_REUSE_CERT_TYPE_BUG\fR"
 See
 SSL_CTX_\fBset_options\fR(3)
+.br
 .IP "\fBMICROSOFT_BIG_SSLV3_BUFFER\fR"
 See
 SSL_CTX_\fBset_options\fR(3)
+.br
 .IP "\fBMSIE_SSLV2_RSA_PADDING\fR"
 also aliased as
 \fBCVE-2005-2969\fR. Postfix 2.8 disables this work-around by
 default with OpenSSL versions that may predate the fix. Fixed in
 OpenSSL 0.9.7h and OpenSSL 0.9.8a.
+.br
 .IP "\fBSSLEAY_080_CLIENT_DH_BUG\fR"
 See
 SSL_CTX_\fBset_options\fR(3)
+.br
 .IP "\fBTLS_D5_BUG\fR"
 See SSL_CTX_\fBset_options\fR(3)
+.br
 .IP "\fBTLS_BLOCK_PADDING_BUG\fR"
 See SSL_CTX_\fBset_options\fR(3)
+.br
 .IP "\fBTLS_ROLLBACK_BUG\fR"
 See SSL_CTX_\fBset_options\fR(3).
 This is disabled in OpenSSL 0.9.7 and later. Nobody should still
 be using 0.9.6!
+.br
 .IP "\fBDONT_INSERT_EMPTY_FRAGMENTS\fR"
 See
 SSL_CTX_\fBset_options\fR(3)
+.br
 .IP "\fBCRYPTOPRO_TLSEXT_BUG\fR"
 New with GOST support in
 OpenSSL 1.0.0.
+.br
+.br
 .PP
 This feature is available in Postfix 2.8 and later.
 .SH tls_eecdh_strong_curve (default: prime256v1)
index b57b9c9bde798854321d121b3e6d2a71a0497bcb..fc0f816559c8427eaa9dcb68e94290a065476f9f 100644 (file)
@@ -778,24 +778,24 @@ evaluating $smtpd_client_restrictions and $smtpd_helo_restrictions.
 What Postfix features match subdomains of "domain.tld" automatically,
 instead of requiring an explicit ".domain.tld" pattern.
 .IP "\fBsmtpd_client_restrictions (empty)\fR"
-Optional Postfix SMTP server access restrictions in the context of
-a remote SMTP client connection request.
+Optional restrictions that the Postfix SMTP server applies in the
+context of a client connection request.
 .IP "\fBsmtpd_helo_required (no)\fR"
 Require that a remote SMTP client introduces itself with the HELO
 or EHLO command before sending the MAIL command or other commands
 that require EHLO negotiation.
 .IP "\fBsmtpd_helo_restrictions (empty)\fR"
 Optional restrictions that the Postfix SMTP server applies in the
-context of the SMTP HELO command.
+context of a client HELO command.
 .IP "\fBsmtpd_sender_restrictions (empty)\fR"
 Optional restrictions that the Postfix SMTP server applies in the
-context of the MAIL FROM command.
-.IP "\fBsmtpd_recipient_restrictions (permit_mynetworks, reject_unauth_destination)\fR"
-The access restrictions that the Postfix SMTP server applies in
-the context of the RCPT TO command.
+context of a client MAIL FROM command.
+.IP "\fBsmtpd_recipient_restrictions (see 'postconf -d' output)\fR"
+Optional restrictions that the Postfix SMTP server applies in the
+context of a client RCPT TO command, after smtpd_relay_restrictions.
 .IP "\fBsmtpd_etrn_restrictions (empty)\fR"
-Optional SMTP server access restrictions in the context of a client
-ETRN request.
+Optional restrictions that the Postfix SMTP server applies in the
+context of a client ETRN command.
 .IP "\fBallow_untrusted_routing (no)\fR"
 Forward mail with sender-specified routing (user[@%!]remote[@%!]site)
 from untrusted clients to destinations matching $relay_domains.
@@ -830,6 +830,12 @@ Available in Postfix version 2.2 and later:
 .IP "\fBsmtpd_end_of_data_restrictions (empty)\fR"
 Optional access restrictions that the Postfix SMTP server
 applies in the context of the SMTP END-OF-DATA command.
+.PP
+Available in Postfix version 2.10 and later:
+.IP "\fBsmtpd_relay_restrictions (permit_mynetworks, reject_unauth_destination)\fR"
+Access restrictions for mail relay control that the Postfix
+SMTP server applies in the context of the RCPT TO command, before
+smtpd_recipient_restrictions.
 .SH "SENDER AND RECIPIENT ADDRESS VERIFICATION CONTROLS"
 .na
 .nf
index 29afb04a8aacc9680aef739cf147e799a6694018..71bc32480a06be3107a3d62ba79755672a264eed 100755 (executable)
@@ -60,10 +60,10 @@ while(<>) {
     $block =~ s/<ul>/\n/g;
     #$block =~ s/<\/dl>/\n.PP\n/g;
     #$block =~ s/<\/ul>/\n.PP\n/g;
-    $block =~ s/<\/dl>/\n/g;
-    $block =~ s/<\/ul>/\n/g;
+    $block =~ s/<\/dl>/\n.br\n/g;
+    $block =~ s/<\/ul>/\n.br\n/g;
     $block =~ s/<dd>\s*/\n/g;
-    $block =~ s/<\/dd>/\n/g;
+    $block =~ s/<\/dd>/\n.br\n/g;
     $block =~ s/<li>\s*/\n.IP \\(bu\n/g;
     $block =~ s/<dt>\s*/\n.IP "/g;
     $block =~ s/\s*<\/dt>/"/g;
index 2500420fb09ccc0598525f9a199a165f2d7bc726..933c2361da37f9d07c394ae645b68b514978d889 100755 (executable)
@@ -525,7 +525,8 @@ while (<>) {
     s;\bsmtpd_proxy_timeout\b;<a href="postconf.5.html#smtpd_proxy_timeout">$&</a>;g;
     s;\bsmtpd_proxy_options\b;<a href="postconf.5.html#smtpd_proxy_options">$&</a>;g;
     s;\bsmtpd_recip[-</bB>]*\n* *[<bB>]*ient_limit\b;<a href="postconf.5.html#smtpd_recipient_limit">$&</a>;g;
-    s;\bsmtpd_recip[-</bB>]*\n* *[<bB>]*ient_restrictions\b;<a href="postconf.5.html#smtpd_recipient_restrictions">$&</a>;g;
+    s;\bsmtpd_recip[-</bB>]*\n* *[<bB>]*ient_restric[-</bB>]*\n* *[<bB>]*tions\b;<a href="postconf.5.html#smtpd_recipient_restrictions">$&</a>;g;
+    s;\bsmtpd_relay_restrictions\b;<a href="postconf.5.html#smtpd_relay_restrictions">$&</a>;g;
     s;\bsmtpd_reject_unlisted_recip[-</bB>]*\n* *[<bB>]*ient\b;<a href="postconf.5.html#smtpd_reject_unlisted_recipient">$&</a>;g;
     s;\bsmtpd_reject_unlisted_sender\b;<a href="postconf.5.html#smtpd_reject_unlisted_sender">$&</a>;g;
     s;\bsmtpd_restriction_classes\b;<a href="postconf.5.html#smtpd_restriction_classes">$&</a>;g;
@@ -839,7 +840,7 @@ while (<>) {
     s;\bcheck_reverse_client_hostname_ns_access\b;<a href="postconf.5.html#check_reverse_client_hostname_ns_access">$&</a>;g;
     s;\bpermit_inet_interfaces\b;<a href="postconf.5.html#permit_inet_interfaces">$&</a>;g;
     s;\bpermit_mynetworks\b;<a href="postconf.5.html#permit_mynetworks">$&</a>;g;
-    s;\bpermit_sasl_authenticated\b;<a href="postconf.5.html#permit_sasl_authenticated">$&</a>;g;
+    s;\bper[-</bB>]*\n* *[<bB>]*mit_sasl_authenticated\b;<a href="postconf.5.html#permit_sasl_authenticated">$&</a>;g;
     s;\bpermit_tls_clientcerts\b;<a href="postconf.5.html#permit_tls_clientcerts">$&</a>;g;
     s;\bpermit_tls_all_clientcerts\b;<a href="postconf.5.html#permit_tls_all_clientcerts">$&</a>;g;
     s;\breject_unknown_client_hostname\b;<a href="postconf.5.html#reject_unknown_client_hostname">$&</a>;g;
@@ -889,6 +890,7 @@ while (<>) {
     s;\breject_non_fqdn_recip[-</bB>]*\n* *[<bB>]*ient\b;<a href="postconf.5.html#reject_non_fqdn_recipient">$&</a>;g;
     s;\breject_rhsbl_recip[-</bB>]*\n* *[<bB>]*ient\b;<a href="postconf.5.html#reject_rhsbl_recipient">$&</a>;g;
     s;\breject_unauth_destination\b;<a href="postconf.5.html#reject_unauth_destination">$&</a>;g;
+    s;\bdefer_unauth_destination\b;<a href="postconf.5.html#defer_unauth_destination">$&</a>;g;
     s;\breject_unknown_recipi[-</bB>]*\n*[ <bB>]*ent_domain\b;<a href="postconf.5.html#reject_unknown_recipient_domain">$&</a>;g;
     s;\breject_unlisted_recip[-</bB>]*\n* *[<bB>]*ient\b;<a href="postconf.5.html#reject_unlisted_recipient">$&</a>;g;
     s;\breject_unver[-</bB>]*\n*[ <bB>]*ified_recip[-</bB>]*\n* *[<bB>]*ient\b;<a href="postconf.5.html#reject_unverified_recipient">$&</a>;g;
index d39e887ab4fbaa2d79ace4ca62da5213c3172498..f79ebc672d314df58213eb7cac533f323deca2f8 100644 (file)
@@ -95,14 +95,14 @@ always discarded.  </p>
     <td rowspan="3" align="center" valign="bottom"> <tt> -&gt; </tt>
     </td>
 
-       <td rowspan="3" align="center" valign="middle"> probe<br>
-       message </td>
+        <td rowspan="3" align="center" valign="middle"> probe<br>
+        message </td>
 
     <td rowspan="3" align="center" valign="middle"> <tt> -&gt; </tt>
     </td>
 
-       <td rowspan="3" bgcolor="#f0f0ff" align="center" valign="middle">
-       Postfix<br> mail<br> queue </td>
+        <td rowspan="3" bgcolor="#f0f0ff" align="center" valign="middle">
+        Postfix<br> mail<br> queue </td>
 
 </tr>
 
@@ -115,15 +115,15 @@ always discarded.  </p>
     <td rowspan="3" align="center" valign="middle"> <tt> -&gt; </tt>
     </td>
 
-       <td rowspan="3" bgcolor="#f0f0ff" align="center" valign="middle">
-       <a href="smtpd.8.html">Postfix<br> SMTP<br> server</a> </td>
+        <td rowspan="3" bgcolor="#f0f0ff" align="center" valign="middle">
+        <a href="smtpd.8.html">Postfix<br> SMTP<br> server</a> </td>
 
     <td rowspan="3" align="center" valign="middle"> <tt> &lt;-&gt;
     </tt> </td>
 
-       <td rowspan="3" bgcolor="#f0f0ff" align="center" valign="middle">
-       <a href="verify.8.html">Postfix<br> verify<br> server</a>
-       </td>
+        <td rowspan="3" bgcolor="#f0f0ff" align="center" valign="middle">
+        <a href="verify.8.html">Postfix<br> verify<br> server</a>
+        </td>
 
 </tr>
 
@@ -141,14 +141,14 @@ always discarded.  </p>
     <td rowspan="3" align="center" valign="top"> <tt> &lt;- </tt>
     </td>
 
-       <td rowspan="3" align="center" valign="middle"> probe<br>
-       status </td>
+        <td rowspan="3" align="center" valign="middle"> probe<br>
+        status </td>
 
     <td rowspan="3" align="center" valign="middle"> <tt> &lt;- </tt>
     </td>
 
-       <td rowspan="3" bgcolor="#f0f0ff" align="center" valign="middle">
-       Postfix<br> delivery<br> agents </td>
+        <td rowspan="3" bgcolor="#f0f0ff" align="center" valign="middle">
+        Postfix<br> delivery<br> agents </td>
 
     <td rowspan="3" align="left" valign="middle"> <tt>-&gt;</tt>
     Local<br> <tt>-&gt;</tt> Remote</td>
@@ -160,8 +160,8 @@ always discarded.  </p>
     <td rowspan="3" colspan="4" align="center" valign="middle">
     &nbsp; </td>
 
-       <td rowspan="3" align="center" valign="middle"> <tt>
-       ^</tt><br> <tt> |</tt><br> <tt> v</tt> </td>
+        <td rowspan="3" align="center" valign="middle"> <tt>
+        ^</tt><br> <tt> |</tt><br> <tt> v</tt> </td>
 
 </tr>
 
@@ -173,8 +173,8 @@ always discarded.  </p>
 
     <td colspan="4" align="center" valign="middle"> &nbsp; </td>
 
-       <td bgcolor="#f0f0ff" align="center" valign="middle">
-       Address<br> verification<br> database </td>
+        <td bgcolor="#f0f0ff" align="center" valign="middle">
+        Address<br> verification<br> database </td>
 
 </tr>
 
@@ -282,6 +282,9 @@ the same address repeatedly.  </p>
 /etc/postfix/main.cf:
     smtpd_recipient_restrictions = 
         permit_mynetworks
+        # reject_unauth_destination is not needed here if the mail
+        # relay policy is specified under smtpd_relay_restrictions
+        # (available with Postfix 2.10 and later).
         reject_unauth_destination
         ...
         reject_unknown_recipient_domain
@@ -431,7 +434,7 @@ verification probe fails with some temporary error. Specify a valid
 
 <p> The unverified_sender_reject_reason parameter (default:
 empty) specifies fixed text that Postfix will send to remote SMTP
-clients, instead of sending actual addres verification details.
+clients, instead of sending actual address verification details.
 Do not specify the SMTP status code or enhanced status code.  </p>
 
 <p> The unverified_sender_tempfail_action parameter (default:
index 4635b7159aebbe787e7f90fdf25d2e55df54b764..522e728907c0bd44d01b392f2f6814e71a72b078 100644 (file)
@@ -218,24 +218,24 @@ document for an introduction to the Postfix architecture. </p>
 
    <td colspan="2"> </td>
 
-       <td bgcolor="#f0f0ff" align="center" valign="middle">
-       <a href="QSHAPE_README.html#maildrop_queue"> maildrop <br>
-       queue </a> </td>
+        <td bgcolor="#f0f0ff" align="center" valign="middle">
+        <a href="QSHAPE_README.html#maildrop_queue"> maildrop <br>
+        queue </a> </td>
 
    <td align="center" valign="middle"> <tt> &lt;- </tt> </td>
 
-       <td bgcolor="#f0f0ff" align="center" valign="middle">Postfix<br>
-       postdrop(1) </td>
+        <td bgcolor="#f0f0ff" align="center" valign="middle">Postfix<br>
+        postdrop(1) </td>
 
    <td align="center" valign="middle"> <tt> &lt;- </tt> </td>
 
-       <td bgcolor="#f0f0ff" align="center" valign="middle">Postfix<br>
-       sendmail(1) </td>
+        <td bgcolor="#f0f0ff" align="center" valign="middle">Postfix<br>
+        sendmail(1) </td>
 
    <td align="center" valign="middle"> <tt> &lt;- </tt> </td>
 
-       <td bgcolor="#f0f0ff" align="center" valign="middle">Content
-       <br> filter </td>
+        <td bgcolor="#f0f0ff" align="center" valign="middle">Content
+        <br> filter </td>
 
    <td colspan="2"> </td>
 
@@ -750,6 +750,8 @@ that injects mail back into Postfix. </p>
         -o smtpd_helo_restrictions=
         -o smtpd_client_restrictions=
         -o smtpd_sender_restrictions=
+        # Postfix 2.10 and later: specify empty smtpd_relay_restrictions.
+        -o smtpd_relay_restrictions=
         -o smtpd_recipient_restrictions=permit_mynetworks,reject
         -o mynetworks=127.0.0.0/8
         -o smtpd_authorized_xforward_hosts=127.0.0.0/8
index efcd35338259e5d508aa4c99a20a66dde63d6862..a29e4f61033d01c2a31286f5e3d8e55e2fadd2fd 100644 (file)
 
 <hr>
 
+<h2> Host lookup issues </h2>
+
+<p> By default Linux /etc/hosts lookups do not support multiple IP
+address per hostname. This causes warnings from the Postfix SMTP
+server that "hostname XXX does not resolve to address YYY", and is
+especially a problem with hosts that have both IPv4 and IPv6
+addresses.  To fix, turn on support for multiple IP addresses: </p>
+
+<blockquote>
+<pre>
+/etc/host.conf:
+    ...
+    # We have machines with multiple IP addresses.
+    multi on
+    ...
+</pre>
+</blockquote>
+
 <h2>Berkeley DB issues</h2>
 
 <p> If you can't compile Postfix because the file "db.h"
index fe6fc7c6df44813f14f19e790ed18a5717bdf8af..2b72d1b45b1376aa83c54c5a569b5387942c08e0 100644 (file)
@@ -374,6 +374,8 @@ post-filter re-injection SMTP service. Typical additions include: </p>
     # With multiple instances, rarely need "-o param=value" overrides
     # in master.cf, each instance gets its own main.cf file.
     #
+    # Postfix 2.10 and later: specify empty smtpd_relay_restrictions.
+    smtpd_relay_restrictions =
     smtpd_recipient_restrictions = permit_mynetworks, reject
 
     # Tolerate occasional high latency in the  content filter.
index b4aa01f216c2e80e6fcdb45fe2a014c77ca5881a..fb10721afd9ac9cf4643f57ed18da8f661ed8c78 100644 (file)
@@ -1071,8 +1071,8 @@ that decrypts/encrypts the sessions for multiple SMTP clients. </p>
 <p> The tlsproxy(8) implementation led to the discovery of a "new"
 class of vulnerability (<a
 href="http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2011-0411"
->CVE-2011-0411</a>) that affected multiple implementations of TLS
-over SMTP, POP, IMAP, NNTP, and FTP. </p>
+>CVE-2011-0411</a>) that affected multiple implementations of SMTP,
+POP, IMAP, NNTP, and FTP over TLS. </p>
 
 <p> postscreen(8) was officially released as part of the Postfix
 2.8 stable release in January 2011.</p>
index 705d106938f6e084686697114ccc0bfe66e8e9db..0ebce0fe8dc36188c53c7ed96a820af4515b0279 100644 (file)
@@ -48,13 +48,17 @@ care about these low-level details. </p>
     permissive = permit
 
     smtpd_recipient_restrictions = 
-       permit_mynetworks
-       reject_unauth_destination
-       check_recipient_access hash:/etc/postfix/recipient_access
+        permit_mynetworks
+       # reject_unauth_destination is not needed here if the mail
+       # relay policy is specified with smtpd_relay_restrictions
+       # (available with Postfix 2.10 and later).
+        reject_unauth_destination
+        check_recipient_access hash:/etc/postfix/recipient_access
+        ...
 
 /etc/postfix/recipient_access:
-    joe@my.domain      permissive
-    jane@my.domain     restrictive
+    joe@my.domain       permissive
+    jane@my.domain      restrictive
 </pre>
 </blockquote>
 
@@ -102,6 +106,7 @@ to IP spoofing. </p>
 <pre>
 /etc/postfix/main.cf:
     smtpd_recipient_restrictions =
+        ...
         check_recipient_access hash:/etc/postfix/access
         <i>...the usual stuff...</i>
 
@@ -133,6 +138,7 @@ therefore is subject to SMTP sender spoofing. </p>
 <pre>
 /etc/postfix/main.cf:
     smtpd_recipient_restrictions =
+        ...
         check_recipient_access hash:/etc/postfix/protected_destinations
         <i>...the usual stuff...</i>
 
@@ -193,6 +199,7 @@ with LDAP or SQL. </p>
 <pre>
 /etc/postfix/main.cf:
     smtpd_recipient_restrictions =
+        ...
         check_sender_access hash:/etc/postfix/restricted_senders
         <i>...other stuff...</i>
 
index a3320be86e6e755e6c9d16a06f330e8eb43117a3..1581b5efbd703bfaeea63f64422bc64850282aba 100644 (file)
@@ -1367,20 +1367,33 @@ for. Examples of possible SMTP clients authorizations are: </p>
 
 <h4><a name="server_sasl_authz_relay">Mail relay authorization</a></h4>
 
-<p> The <code>permit_sasl_authenticated</code> restriction allows
+<p> With <code>permit_sasl_authenticated</code> the Postfix SMTP
+server can allow
 SASL-authenticated SMTP clients to send mail to remote destinations.
-Add it to the list of <code>smtpd_recipient_restrictions</code> as
-follows: </p>
+Examples:
+</p>
 
 <blockquote>
 <pre>
+# With Postfix 2.10 and later, the mail relay policy is
+# preferably specified under smtpd_relay_restrictions.
+/etc/postfix/main.cf:
+    smtpd_relay_restrictions =
+       permit_mynetworks
+       <strong>permit_sasl_authenticated</strong>
+       reject_unauth_destination
+</pre>
+
+<pre>
+# Older configurations combine relay control and spam control under
+# smtpd_recipient_restrictions. To use this example with Postfix &ge;
+# 2.10 specify "smtpd_relay_restrictions=".
 /etc/postfix/main.cf:
     smtpd_recipient_restrictions =
-    ...
-    permit_mynetworks
-    <strong>permit_sasl_authenticated</strong>
-    reject_unauth_destination
-    ...
+       permit_mynetworks
+       <strong>permit_sasl_authenticated</strong>
+       reject_unauth_destination
+       ...other rules...
 </pre>
 </blockquote>
 
@@ -1406,9 +1419,7 @@ use a particular envelope sender address: </p>
     smtpd_recipient_restrictions =
         ...
         <strong>reject_sender_login_mismatch</strong>
-        permit_sasl_authenticated
-        permit_mynetworks
-        reject_unauth_destination
+       permit_sasl_authenticated
         ...
 </pre>
 </blockquote>
@@ -1926,7 +1937,7 @@ font.  </p>
 </blockquote>
 
 <p> Instead of port 25 (smtp), specify port 587 (submission) where
-appriopriate. </p>
+appropriate. </p>
 
 <h4>Encrypted SMTP session (TLS)</h4>
 
index 3cd23cd2f834b36a2cd800dd790e3b52f04caf55..0e68b0d5ef3c93359df6dd97f99ecfe65ee1930b 100644 (file)
@@ -60,10 +60,19 @@ http://www.mail-abuse.org/ and other websites.  </p>
 
 <p> By default, Postfix has a moderately restrictive approach to
 mail relaying. Postfix forwards mail only from clients in trusted
-networks, or to domains that are configured as authorized relay
-destinations. For a description of the default policy, see the
-smtpd_recipient_restrictions parameter in the postconf(5) manual
-page, and the information that is referenced from there.  </p>
+networks, from clients that have authenticated with SASL, or to
+domains that are configured as authorized relay
+destinations. For a description of the default mail relay policy,
+see the smtpd_relay_restrictions parameter in the postconf(5) manual
+page, and the information that is referenced from there. </p>
+
+<blockquote> <p> NOTE: Postfix versions before 2.10 did not have
+smtpd_relay_restrictions. They combined the mail relay and spam
+blocking policies, under smtpd_recipient_restrictions.  This could
+lead to unexpected results.  For example, a permissive spam blocking
+policy could unexpectedly result in a permissive mail relay policy.
+An example of this is documented under "<a href="#danger">Dangerous
+use of smtpd_recipient_restrictions</a>".  </p> </blockquote>
 
 <p> Most of the Postfix SMTP server access controls are targeted
 at stopping junk email. </p>
@@ -178,8 +187,23 @@ described in the postconf(5) manual page. </p>
     # Don't accept mail from domains that don't exist.
     smtpd_sender_restrictions = reject_unknown_sender_domain
 
-    # Whitelisting: local clients may specify any destination domain.
-    smtpd_recipient_restrictions = permit_mynetworks, reject_unauth_destination
+    # Relay control (Postfix 2.10 and later): local clients and
+    # authenticated clients may specify any destination domain.
+    smtpd_relay_restrictions = permit_mynetworks, 
+       permit_sasl_authenticated,
+       reject_unauth_destination
+
+    # Spam control: exclude local clients and authenticated clients
+    # from DNSBL lookups.
+    smtpd_recipient_restrictions = permit_mynetworks, 
+       permit_sasl_authenticated,
+       # reject_unauth_destination is not needed here if the mail
+       # relay policy is specified under smtpd_relay_restrictions
+       # (available with Postfix 2.10 and later).
+       reject_unauth_destination
+       reject_rbl_client zen.spamhaus.org,
+       reject_rhsbl_helo dbl.spamhaus.org,
+       reject_rhsbl_sender dbl.spamhaus.org
 
     # Block clients that speak too early.
     smtpd_data_restrictions = reject_unauth_pipelining
@@ -205,28 +229,47 @@ DEFER result. </p>
 
 <table border="1">
 
-<tr> <th> Restriction list name </th> <th> Status </th> <th> Effect
+<tr> <th> Restriction list name </th> <th> Version </th> <th> Status
+</th> <th> Effect
 of REJECT or DEFER result </th> </tr>
 
-<tr> <td> smtpd_client_restrictions </td> <td> Optional </td> <td>
+<tr> <td> smtpd_client_restrictions </td> <td> All </td> <td>
+Optional </td> <td>
 Reject all client commands </td> </tr>
 
-<tr> <td> smtpd_helo_restrictions </td> <td> Optional </td> <td>
+<tr> <td> smtpd_helo_restrictions </td> <td> All </td> <td> Optional
+</td> <td>
 Reject HELO/EHLO information </td> </tr>
 
-<tr> <td> smtpd_sender_restrictions </td> <td> Optional </td> <td>
+<tr> <td> smtpd_sender_restrictions </td> <td> All </td> <td>
+Optional </td> <td>
 Reject MAIL FROM information </td> </tr>
 
-<tr> <td> smtpd_recipient_restrictions </td> <td> Required </td>
-<td> Reject RCPT TO information </td> </tr>
+<tr> <td rowspan="2"> smtpd_relay_restrictions </td> <td> &ge; 2.10
+</td> <td> Required if smtpd_recipient_restrictions does not enforce
+relay policy</td>
+<td rowspan="2"> Reject RCPT TO information </td> </tr>
 
-<tr> <td> smtpd_data_restrictions </td> <td> Optional </td> <td>
+<tr> <td> &lt 2.10</td> <td> Not available </td> 
+</tr>
+
+<tr> <td rowspan="2"> smtpd_recipient_restrictions </td> <td> &ge;
+2.10 </td> <td> Required if smtpd_relay_restrictions does not enforce
+relay policy</td>
+<td rowspan="2"> Reject RCPT TO information </td> </tr>
+
+<tr> <td> &lt 2.10</td> <td> Required </td> </tr>
+
+<tr> <td> smtpd_data_restrictions </td> <td> &ge; 2.0 </td> <td>
+Optional </td> <td>
 Reject DATA command </td> </tr>
 
-<tr> <td> smtpd_end_of_data_restrictions </td> <td> Optional </td> <td>
+<tr> <td> smtpd_end_of_data_restrictions </td> <td> &ge; 2.2 </td>
+<td> Optional </td> <td>
 Reject END-OF-DATA command </td> </tr>
 
-<tr> <td> smtpd_etrn_restrictions </td> <td> Optional </td> <td>
+<tr> <td> smtpd_etrn_restrictions </td> <td> All </td> <td> Optional
+</td> <td>
 Reject ETRN command </td> </tr>
 
 </table>
@@ -248,10 +291,10 @@ and so on. This approach turned out to be difficult to use. </p>
 helo and sender restriction lists until the RCPT TO or ETRN command.
 This behavior is controlled by the smtpd_delay_reject parameter.
 Restriction lists are still evaluated in the proper order of (client,
-helo, etrn) or (client, helo, sender, recipient, data, or end-of-data)
-restrictions.
+helo, etrn) or (client, helo, sender, relay, recipient, data, or
+end-of-data) restrictions.
 When a restriction list (example: client) evaluates to REJECT or
-DEFER the other restriction lists (example: helo, sender, etc.)
+DEFER the restriction lists that follow (example: helo, sender, etc.)
 are skipped.  </p>
 
 <p> Around the time that smtpd_delay_reject was introduced, Postfix
@@ -300,6 +343,12 @@ list evaluates to REJECT or DEFER, the recipient address is rejected;
 no surprises here. If the result is PERMIT, then the recipient
 address is accepted. And this is where surprises can happen.  </p>
 
+<p> The problem is that Postfix versions before 2.10 did not have
+smtpd_relay_restrictions. They combined the mail relay and spam
+blocking policies, under smtpd_recipient_restrictions.  The result
+is that a permissive spam blocking policy could unexpectedly result
+in a permissive mail relay policy. </p>
+
 <p> Here is an example that shows when a PERMIT result can result
 in too much access permission: </p>
 
@@ -309,7 +358,7 @@ in too much access permission: </p>
 3         permit_mynetworks
 4         check_helo_access hash:/etc/postfix/helo_access
 5         reject_unknown_helo_hostname
-6         reject_unauth_destination
+6         <b>reject_unauth_destination</b>
 7 
 8 /etc/postfix/helo_access:
 9     localhost.localdomain PERMIT
@@ -326,14 +375,31 @@ smtpd_recipient_restrictions evaluates to PERMIT for EVERY host
 that announces itself as "localhost.localdomain", making Postfix
 an open relay for all such hosts. </p>
 
-<p> In order to avoid surprises like these with
-smtpd_recipient_restrictions, you should place non-recipient
+<p> With Postfix before version 2.10 you should place non-recipient
 restrictions AFTER the reject_unauth_destination restriction, not
 before. In the above example, the HELO based restrictions should
 be placed AFTER reject_unauth_destination, or better, the HELO
 based restrictions should be placed under smtpd_helo_restrictions
 where they can do no harm. </p>
 
+<pre>
+1 /etc/postfix/main.cf:
+2     smtpd_recipient_restrictions = 
+3         permit_mynetworks
+4         <b>reject_unauth_destination</b>
+5         check_helo_access hash:/etc/postfix/helo_access
+6         reject_unknown_helo_hostname
+7 
+8 /etc/postfix/helo_access:
+9     localhost.localdomain PERMIT
+</pre>
+
+<p> The above mistake will not happen with Postfix 2.10 and later,
+when the relay policy is specified under smtpd_relay_restrictions,
+and the spam blocking policy under smtpd_recipient_restrictions.
+Then, a permissive spam blocking policy will not result in a
+permissive mail relay policy. </p>
+
 <h2> <a name="testing"> SMTP access rule testing </a> </h2>
 
 <p> Postfix has several features that aid in SMTP access rule
index 678db37f386abafe3eff71e79d118e657d62bcd6..8a38c0ee161c5e8e05cd647e8d1592da5217c611 100644 (file)
@@ -281,6 +281,10 @@ specified with the <b>user</b> attribute. </p>
 "-", to avoid "connection refused" and other problems when you
 increase the smtpd process limit. </p>
 
+<li> <p> Line 8: reject_unauth_destination is not needed here if
+the mail relay policy is specified with smtpd_relay_restrictions
+(available with Postfix 2.10 and later). </p>
+
 <li> <p> Lines 8, 9: always specify "check_policy_service" AFTER
 "reject_unauth_destination" or else your system could become an
 open relay. </p>
@@ -299,8 +303,8 @@ of a master.cf service name (in the above example, "policy") and a
 built-in suffix (in the above example: "_time_limit").  </p>
 </blockquote>
 
-<li> <p> Solaris UNIX-domain sockets do not work reliably. Use
-TCP sockets instead: </p>
+<li> <p> With Solaris &lt; 9, or Postfix &lt; 2.10 on any Solaris
+version, use TCP sockets instead of UNIX-domain sockets: </p>
 
 </ul>
 
@@ -436,6 +440,10 @@ SMTP server process that talks to it.
 See the spawn(8) manpage for more information about the
 <i>transport</i>_time_limit parameter.  </p>
 
+<li> <p> Line 9: reject_unauth_destination is not needed here if
+the mail relay policy is specified with smtpd_relay_restrictions
+(available with Postfix 2.10 and later). </p>
+
 <blockquote> <p> Note: the "greylist_time_limit" parameter will not
 show up in "postconf" command output before Postfix version 2.9.
 This limitation applies to many parameters whose name is a combination
@@ -445,7 +453,8 @@ a built-in suffix (in the above example: "_time_limit").  </p>
 
 </ul>
 
-<p> On Solaris you must use inet: style sockets instead of unix:
+<p> With Solaris &lt; 9, or Postfix &lt; 2.10 on any Solaris
+version, use inet: style sockets instead of unix:
 style, as detailed in the "<a href="#client_config">Policy
 client/server configuration</a>" section above.  </p>
 
@@ -497,10 +506,15 @@ http://www.monkeys.com/anti-spam/filtering/sender-domain-validate.in.
 
 <ul>
 
-<li> <p> Line 9: On Solaris you must use inet: style sockets
+<li> <p> Line 9: On Solaris &lt; 9, or Postfix &lt; 2.10 on any
+Solaris version, use inet: style sockets
 instead of unix: style, as detailed in the "<a href="#greylist">Example:
 greylist policy server</a>" section above.  </p>
 
+<li> <p> Line 5: reject_unauth_destination is not needed here if
+the mail relay policy is specified with smtpd_relay_restrictions
+(available with Postfix 2.10 and later). </p>
+
 <li> <p> Line 6: Be sure to specify "check_sender_access" AFTER
 "reject_unauth_destination" or else your system could become an
 open mail relay. </p>
@@ -547,10 +561,15 @@ most of the delays and most of the database pollution problem. </p>
 
 <ul>
 
-<li> <p> Line 7: On Solaris you must use inet: style sockets
+<li> <p> Line 7: On Solaris &lt; 9, or Postfix &lt; 2.10 on any
+Solaris version, use inet: style sockets
 instead of unix: style, as detailed in the "<a href="#greylist">Example:
 greylist policy server</a>" section above.  </p>
 
+<li> <p> Line 5: reject_unauth_destination is not needed here if
+the mail relay policy is specified with smtpd_relay_restrictions
+(available with Postfix 2.10 and later). </p>
+
 <li> <p> Lines 6-7: Be sure to specify check_sender_access and
 check_policy_service AFTER reject_unauth_destination or else your
 system could become an open mail relay. </p>
index b76ff82e886601a020bd923dc56cd42e7c7a2230..3fa8d216ae6ba3a6c8afdda9370d152b6051b98a 100644 (file)
@@ -40,43 +40,43 @@ except that the latter uses a dedicated protocol instead of SMTP.
 
 <tr>
 
-       <td bgcolor="#f0f0ff" align="center" valign="middle"
-       width="10%"> Internet </td>
+        <td bgcolor="#f0f0ff" align="center" valign="middle"
+        width="10%"> Internet </td>
 
     <td align="center" valign="middle" width="5%"> <tt> -&gt; </tt> </td>
 
-       <td bgcolor="#f0f0ff" align="center" valign="middle"
-       width="10%"> <a href="smtpd.8.html">Postfix SMTP server</a>
-       </td>
+        <td bgcolor="#f0f0ff" align="center" valign="middle"
+        width="10%"> <a href="smtpd.8.html">Postfix SMTP server</a>
+        </td>
 
     <td align="center" valign="middle" width="5%"> <tt> -&gt; </tt> </td>
 
-       <td bgcolor="#f0f0ff" align="center" valign="middle"
-       width="10%"> <b>Before</b> <b>queue</b> <b>filter</b> </td>
+        <td bgcolor="#f0f0ff" align="center" valign="middle"
+        width="10%"> <b>Before</b> <b>queue</b> <b>filter</b> </td>
 
     <td align="center" valign="middle" width="5%"> <tt> -&gt; </tt> </td>
 
-       <td bgcolor="#f0f0ff" align="center" valign="middle"
-       width="10%"> <a href="smtpd.8.html">Postfix SMTP server</a>
-       </td>
+        <td bgcolor="#f0f0ff" align="center" valign="middle"
+        width="10%"> <a href="smtpd.8.html">Postfix SMTP server</a>
+        </td>
 
     <td align="center" valign="middle" width="5%"> <tt> -&gt; </tt> </td>
 
-       <td bgcolor="#f0f0ff" align="center" valign="middle"
-       width="10%"> <a href="cleanup.8.html">Postfix cleanup
-       server</a> </td>
+        <td bgcolor="#f0f0ff" align="center" valign="middle"
+        width="10%"> <a href="cleanup.8.html">Postfix cleanup
+        server</a> </td>
 
     <td align="center" valign="middle" width="5%"> <tt> -&gt; </tt> </td>
 
-       <td bgcolor="#f0f0ff" align="center" valign="middle"
-       width="10%"> Postfix queue </td>
+        <td bgcolor="#f0f0ff" align="center" valign="middle"
+        width="10%"> Postfix queue </td>
 
     <td align="center" valign="middle" width="5%"> <tt> -&lt; </tt> </td>
 
-       <td bgcolor="#f0f0ff" align="center" valign="middle"
-       width="10%"> <a href="smtp.8.html">smtp</a><br> <a
-       href="local.8.html">local</a><br> <a
-       href="virtual.8.html">virtual</a> </td>
+        <td bgcolor="#f0f0ff" align="center" valign="middle"
+        width="10%"> <a href="smtp.8.html">smtp</a><br> <a
+        href="local.8.html">local</a><br> <a
+        href="virtual.8.html">virtual</a> </td>
 
 </tr>
 
@@ -213,26 +213,26 @@ http://bent.latency.net/smtpprox/. </p>
 
     <td align="center" valign="middle" width="5%"> <tt> -&gt; </tt> </td>
 
-       <td bgcolor="#f0f0ff" align="center" valign="middle"
-       width="10%"> <a href="smtpd.8.html">Postfix SMTP server on
-       port 25</a> </td>
+        <td bgcolor="#f0f0ff" align="center" valign="middle"
+        width="10%"> <a href="smtpd.8.html">Postfix SMTP server on
+        port 25</a> </td>
 
     <td align="center" valign="middle" width="5%"> <tt> -&gt; </tt> </td>
 
-       <td bgcolor="#f0f0ff" align="center" valign="middle"
-       width="10%"> filter on localhost port 10025 </td>
+        <td bgcolor="#f0f0ff" align="center" valign="middle"
+        width="10%"> filter on localhost port 10025 </td>
 
     <td align="center" valign="middle" width="5%"> <tt> -&gt; </tt> </td>
 
-       <td bgcolor="#f0f0ff" align="center" valign="middle"
-       width="10%"> <a href="smtpd.8.html">Postfix SMTP server on
-       localhost port 10026</a> </td>
+        <td bgcolor="#f0f0ff" align="center" valign="middle"
+        width="10%"> <a href="smtpd.8.html">Postfix SMTP server on
+        localhost port 10026</a> </td>
 
     <td align="center" valign="middle" width="5%"> <tt> -&gt; </tt> </td>
 
-       <td bgcolor="#f0f0ff" align="center" valign="middle"
-       width="10%"> <a href="cleanup.8.html">Postfix cleanup
-       server</a> </td>
+        <td bgcolor="#f0f0ff" align="center" valign="middle"
+        width="10%"> <a href="cleanup.8.html">Postfix cleanup
+        server</a> </td>
 
     <td align="center" valign="middle" width="5%"> <tt> -&gt; </tt> </td>
 
@@ -261,8 +261,8 @@ http://bent.latency.net/smtpprox/. </p>
     smtp      inet  n       -       n       -       20      smtpd
         -o smtpd_proxy_filter=127.0.0.1:10025
         -o smtpd_client_connection_count_limit=10
-       # Postfix 2.7 and later performance feature.
-       # -o smtpd_proxy_options=speed_adjust
+        # Postfix 2.7 and later performance feature.
+        # -o smtpd_proxy_options=speed_adjust
     #
     # After-filter SMTP server. Receive mail from the content filter
     # on localhost port 10026.
@@ -272,6 +272,8 @@ http://bent.latency.net/smtpprox/. </p>
         -o smtpd_client_restrictions=
         -o smtpd_helo_restrictions=
         -o smtpd_sender_restrictions=
+        # Postfix 2.10 and later: specify empty smtpd_relay_restrictions.
+        -o smtpd_relay_restrictions=
         -o smtpd_recipient_restrictions=permit_mynetworks,reject
         -o smtpd_data_restrictions=
         -o mynetworks=127.0.0.0/8
index c3333d0eeed68cb0bc8ca825af1bfe273474f24a..e306f8d0479f810c00a2ca070c1011677e4285cf 100644 (file)
@@ -347,31 +347,41 @@ is the real purpose of the firewall email function. </p>
  3     relay_domains = example.com
  4     parent_domain_matches_subdomains = 
  5         debug_peer_list smtpd_access_maps
- 6     smtpd_recipient_restrictions =
- 7         permit_mynetworks reject_unauth_destination
- 8 
- 9     relay_recipient_maps = hash:/etc/postfix/relay_recipients
-10     transport_maps = hash:/etc/postfix/transport
-11 
-12 /etc/postfix/relay_recipients:
-13     user1@example.com   x
-14     user2@example.com   x
-15      . . .
-16 
-17 /etc/postfix/transport:
-18     example.com   smtp:[inside-gateway.example.com]
+<br>
+ 6a    # Postfix 2.10 and later support separate relay control and
+ 7a    # spam control.
+ 8a    smtpd_relay_restrictions =
+ 9a        permit_mynetworks reject_unauth_destination
+10a    smtpd_recipient_restrictions = ...spam blocking rules....
+<br>
+ 6b    # Older configurations combine relay control and spam control. To
+ 7b    # use this with Postfix &ge; 2.10 specify "smtpd_relay_restrictions=".
+ 8b    smtpd_recipient_restrictions =
+ 9b        permit_mynetworks reject_unauth_destination
+10b        ...spam blocking rules....
+<br>
+11     relay_recipient_maps = hash:/etc/postfix/relay_recipients
+12     transport_maps = hash:/etc/postfix/transport
+13 
+14 /etc/postfix/relay_recipients:
+15     user1@example.com   x
+16     user2@example.com   x
+17      . . .
+18 
+19 /etc/postfix/transport:
+20     example.com   smtp:[inside-gateway.example.com]
 </pre>
 </blockquote>
 
 <p> Translation: </p>
 
 <ul>
-
-<li><p> Lines 1-7: Accept mail from local systems in $mynetworks,
+<li><p> Lines 1-10: Accept mail from local systems in $mynetworks,
 and accept mail from outside for "user@example.com" but not for
 "user@anything.example.com". The magic is in lines 4-5. </p>
 
-<li> <p> Lines 9, 12-14: Define the list of valid addresses in the
+<li> <p> Lines 11, 13-16: Define the list of valid addresses in the
 "example.com" domain that can receive mail from the Internet. This
 prevents the mail queue from filling up with undeliverable
 MAILER-DAEMON messages. If you can't maintain a list of valid
@@ -379,7 +389,7 @@ recipients then you must specify "relay_recipient_maps =" (that
 is, an empty value), or you must specify an "@example.com  x"
 wild-card in the relay_recipients table. </p>
 
-<li> <p> Lines 10, 17-18: Route mail for "example.com" to the inside
+<li> <p> Lines 12, 19-20: Route mail for "example.com" to the inside
 gateway machine. The <tt>[]</tt> forces Postfix to do no MX lookup.
 </p>
 
@@ -521,18 +531,28 @@ is all you need: </p>
  3 
  4 /etc/postfix/main.cf:
  5     relay_domains = . . . the.backed-up.domain.tld
- 6     smtpd_recipient_restrictions = 
- 7         permit_mynetworks reject_unauth_destination
- 8 
- 9     # You must specify your NAT/proxy external address.
-10     #proxy_interfaces = 1.2.3.4
-11 
-12     relay_recipient_maps = hash:/etc/postfix/relay_recipients
+<br>
+ 6a    # Postfix 2.10 and later support separate relay control and
+ 7a    # spam control.
+ 8a    smtpd_relay_restrictions =
+ 9a        permit_mynetworks reject_unauth_destination
+10a    smtpd_recipient_restrictions = ...spam blocking rules....
+<br>
+ 6b    # Older configurations combine relay control and spam control. To
+ 7b    # use this with Postfix &ge; 2.10 specify "smtpd_relay_restrictions=".
+ 8b    smtpd_recipient_restrictions =
+ 9b        permit_mynetworks reject_unauth_destination
+10b        ...spam blocking rules....
+<br>
+11     # You must specify your NAT/proxy external address.
+12     #proxy_interfaces = 1.2.3.4
 13 
-14 /etc/postfix/relay_recipients:
-15     user1@the.backed-up.domain.tld   x
-16     user2@the.backed-up.domain.tld   x
-17      . . .
+14     relay_recipient_maps = hash:/etc/postfix/relay_recipients
+15 
+16 /etc/postfix/relay_recipients:
+17     user1@the.backed-up.domain.tld   x
+18     user2@the.backed-up.domain.tld   x
+19      . . .
 </pre>
 </blockquote>
 
@@ -541,11 +561,11 @@ need the above, plus: </p>
 
 <blockquote>
 <pre>
-18 /etc/postfix/main.cf:
-19     transport_maps = hash:/etc/postfix/transport
-20 
-21 /etc/postfix/transport:
-22     the.backed-up.domain.tld       relay:[their.mail.host.tld]
+20 /etc/postfix/main.cf:
+21     transport_maps = hash:/etc/postfix/transport
+22 
+23 /etc/postfix/transport:
+24     the.backed-up.domain.tld       relay:[their.mail.host.tld]
 </pre>
 </blockquote>
 
@@ -559,15 +579,15 @@ need the above, plus: </p>
 
 <li><p>Do not list the.backed-up.domain.tld in virtual_mailbox_domains.</p>
 
-<li> <p> Lines 1-7: Forward mail from the Internet for
+<li> <p> Lines 1-9: Forward mail from the Internet for
 "the.backed-up.domain.tld" to the primary MX host for that domain.
 </p>
 
-<li> <p> Line 10: This is a must if Postfix receives mail via a
+<li> <p> Line 12: This is a must if Postfix receives mail via a
 NAT relay or proxy that presents a different IP address to the
 world than the local machine. </p>
 
-<li> <p> Lines 12-16: Define the list of valid addresses in the
+<li> <p> Lines 14-18: Define the list of valid addresses in the
 "the.backed-up.domain.tld" domain.  This prevents your mail queue
 from filling up with undeliverable MAILER-DAEMON messages. If you
 can't maintain a list of valid recipients then you must specify
@@ -575,7 +595,7 @@ can't maintain a list of valid recipients then you must specify
 specify an "@the.backed-up.domain.tld  x" wild-card in the
 relay_recipients table. </p>
 
-<li> <p> Line 22: The <tt>[]</tt> forces Postfix to do no MX lookup. </p>
+<li> <p> Line 24: The <tt>[]</tt> forces Postfix to do no MX lookup. </p>
 
 </ul>
 
index 118db3adb449509b85b8709fdd98457ca5a3baaf..960f7d299261ab0a05c7dec517d58caa29abf465 100644 (file)
@@ -654,12 +654,25 @@ certificate must no longer be used (e.g. an employee leaving). </p>
  
 <blockquote>
 <pre>
+# With Postfix 2.10 and later, the mail relay policy is
+# preferably specified under smtpd_relay_restrictions.
+/etc/postfix/main.cf:
+    smtpd_relay_restrictions = 
+        permit_mynetworks
+        permit_tls_clientcerts 
+        reject_unauth_destination
+</pre>
+
+<pre>
+# Older configurations combine relay control and spam control under
+# smtpd_recipient_restrictions. To use this example with Postfix &ge;
+# 2.10 specify "smtpd_relay_restrictions=".
 /etc/postfix/main.cf:
     smtpd_recipient_restrictions = 
-        ... 
+        permit_mynetworks
         permit_tls_clientcerts 
         reject_unauth_destination
-        ...
+        ...other rules...
 </pre>
 </blockquote>
 
@@ -787,7 +800,7 @@ chooses the cipher from a list supplied by the server. </p>
 cipher that the server supports. With SSLv3 and later, the server
 may choose its own most preferred cipher that is supported (offered)
 by the client. Setting "tls_preempt_cipherlist = yes" enables server
-cipher preferences. The default OpenSSL behaviour applies with
+cipher preferences. The default OpenSSL behavior applies with
 "tls_preempt_cipherlist = no". </p>
 
 <p> While server cipher selection may in some cases lead to a more secure
index 8f0e248b39b73d7be229e854afb1b162b213a790..a4b1b3810fdabbcdde00e11913be0ed0ef29e8de 100644 (file)
@@ -218,7 +218,7 @@ second form overrides them explicitly. The values shown are the
 recommended ones. </p>
 
 <p> You can use the smtpd_command_filter feature to append XVERP
-to SMTP commands from legacy sofware. This requires Postfix 2.7
+to SMTP commands from legacy software. This requires Postfix 2.7
 or later. </p>
 
 <blockquote>
index 90f1be40257e342f4791385b237d909f24fddc77..f03af4909f7bab101b8994d7b9ba149a59c93a43 100644 (file)
@@ -2974,7 +2974,7 @@ The list of "trusted" remote SMTP clients that have more privileges than
 
 <p>
 In particular, "trusted" SMTP clients are allowed to relay mail
-through Postfix.  See the smtpd_recipient_restrictions parameter
+through Postfix.  See the smtpd_relay_restrictions parameter
 description in the postconf(5) manual.
 </p>
 
@@ -4830,8 +4830,8 @@ smtpd_client_new_tls_session_rate_limit = 100
 %PARAM smtpd_client_restrictions 
 
 <p>
-Optional Postfix SMTP server access restrictions in the context of
-a remote SMTP client connection request.
+Optional restrictions that the Postfix SMTP server applies in the
+context of a client connection request.
 See SMTPD_ACCESS_README, section "Delayed evaluation of SMTP access
 restriction lists" for a discussion of evaluation context and time.
 </p>
@@ -5291,8 +5291,8 @@ for each excess recipient.  </p>
 %PARAM smtpd_etrn_restrictions 
 
 <p>
-Optional SMTP server access restrictions in the context of a client
-ETRN request.
+Optional restrictions that the Postfix SMTP server applies in the
+context of a client ETRN command.
 See SMTPD_ACCESS_README, section "Delayed evaluation of SMTP access
 restriction lists" for a discussion of evaluation context and time.
 </p>
@@ -5397,7 +5397,7 @@ smtpd_helo_required = yes
 
 <p>
 Optional restrictions that the Postfix SMTP server applies in the
-context of the SMTP HELO command.
+context of a client HELO command.
 See SMTPD_ACCESS_README, section "Delayed evaluation of SMTP access
 restriction lists" for a discussion of evaluation context and time.
 </p>
@@ -5651,42 +5651,43 @@ The maximal number of recipients that the Postfix SMTP server
 accepts per message delivery request.
 </p>
 
-%PARAM smtpd_recipient_restrictions permit_mynetworks, reject_unauth_destination
+%PARAM smtpd_recipient_restrictions see "postconf -d" output
 
 <p>
-The access restrictions that the Postfix SMTP server applies in
-the context of the RCPT TO command.
+Optional restrictions that the Postfix SMTP server applies in the
+context of a client RCPT TO command, after smtpd_relay_restrictions.
 See SMTPD_ACCESS_README, section "Delayed evaluation of SMTP access
 restriction lists" for a discussion of evaluation context and time.
 </p>
 
-<p>
-By default, the Postfix SMTP server accepts:
-</p>
-
-<ul>
-
-<li> Mail from clients whose IP address matches $mynetworks, or:
+<p> With Postfix versions before 2.10, the rules for relay permission
+and spam blocking were combined under smtpd_recipient_restrictions,
+resulting in error-prone configuration.  As of Postfix 2.10, relay
+permission rules are preferably implemented with smtpd_relay_restrictions,
+so that a permissive spam blocking policy under
+smtpd_recipient_restrictions will no longer result in a permissive
+mail relay policy.  </p>
 
-<li> Mail to remote destinations that match $relay_domains, except
-for addresses that contain sender-specified routing
-(user@elsewhere@domain), or:
-
-<li> Mail to local destinations that match $inet_interfaces
-or $proxy_interfaces, $mydestination, $virtual_alias_domains, or
-$virtual_mailbox_domains.
-
-</ul>
+<p> For backwards compatibility, sites that migrate from Postfix
+versions before 2.10 can set smtpd_relay_restrictions to the empty
+value, and use smtpd_recipient_restrictions exactly as before. </p>
 
 <p>
-IMPORTANT: If you change this parameter setting, you must specify
+IMPORTANT: Either the smtpd_relay_restrictions or the
+smtpd_recipient_restrictions parameter must specify
 at least one of the following restrictions. Otherwise Postfix will
 refuse to receive mail:
 </p>
 
 <blockquote>
 <pre>
-reject, defer, defer_if_permit, reject_unauth_destination
+reject, reject_unauth_destination
+</pre>
+</blockquote>
+
+<blockquote>
+<pre>
+defer, defer_if_permit, defer_unauth_destination
 </pre>
 </blockquote>
 
@@ -5806,9 +5807,15 @@ matches $mydestination, $inet_interfaces, $proxy_interfaces,
 $virtual_alias_domains, or $virtual_mailbox_domains, and contains
 no sender-specified routing (user@elsewhere@domain).
 
-</ul> The relay_domains_reject_code parameter specifies the response
+</ul>The relay_domains_reject_code parameter specifies the response
 code for rejected requests (default: 554). </dd>
 
+<dt><b><a name="defer_unauth_destination">defer_unauth_destination</a></b></dt>
+
+<dd> Reject the same requests as reject_unauth_destination, with a
+non-permanent error code.  This feature is available in Postfix
+2.10 and later.</dd>
+
 <dt><b><a name="reject_unknown_recipient_domain">reject_unknown_recipient_domain</a></b></dt>
 
 <dd>Reject the request when Postfix is not final destination for
@@ -5867,9 +5874,78 @@ Example:
 </p>
 
 <pre>
+# The Postfix before 2.10 default mail relay policy. Later Postfix
+# versions implement this preferably with smtpd_relay_restrictions.
 smtpd_recipient_restrictions = permit_mynetworks, reject_unauth_destination
 </pre>
 
+%PARAM smtpd_relay_restrictions permit_mynetworks, reject_unauth_destination
+
+<p> Access restrictions for mail relay control that the Postfix
+SMTP server applies in the context of the RCPT TO command, before
+smtpd_recipient_restrictions.
+See SMTPD_ACCESS_README, section "Delayed evaluation of SMTP access
+restriction lists" for a discussion of evaluation context and time.
+</p>
+
+<p> With Postfix versions before 2.10, the rules for relay permission
+and spam blocking were combined under smtpd_recipient_restrictions,
+resulting in error-prone configuration.  As of Postfix 2.10, relay
+permission rules are preferably implemented with smtpd_relay_restrictions,
+so that a permissive spam blocking policy under
+smtpd_recipient_restrictions will no longer result in a permissive
+mail relay policy.  </p>
+
+<p> For backwards compatibility, sites that migrate from Postfix
+versions before 2.10 can set smtpd_relay_restrictions to the empty
+value, and use smtpd_recipient_restrictions exactly as before. </p>
+
+<p>
+By default, the Postfix SMTP server accepts:
+</p>
+
+<ul>
+
+<li> Mail from clients whose IP address matches $mynetworks, or:
+
+<li> Mail to remote destinations that match $relay_domains, except
+for addresses that contain sender-specified routing
+(user@elsewhere@domain), or:
+
+<li> Mail to local destinations that match $inet_interfaces
+or $proxy_interfaces, $mydestination, $virtual_alias_domains, or
+$virtual_mailbox_domains.
+
+</ul>
+
+<p>
+IMPORTANT: Either the smtpd_relay_restrictions or the
+smtpd_recipient_restrictions parameter must specify
+at least one of the following restrictions. Otherwise Postfix will
+refuse to receive mail:
+</p>
+
+<blockquote>
+<pre>
+reject, reject_unauth_destination
+</pre>
+</blockquote>
+<blockquote>
+<pre>
+defer, defer_if_permit, defer_unauth_destination
+</pre>
+</blockquote>
+
+<p>
+Specify a list of restrictions, separated by commas and/or whitespace.
+Continue long lines by starting the next line with whitespace.
+The same restrictions are available as documented under
+smtpd_recipient_restrictions.
+</p>
+
+<p> This feature is available in Postix 2.10 and later. </p>
+
 %CLASS sasl-auth SASL Authentication
 
 <p>
@@ -5893,6 +5969,15 @@ access restriction can be used to permit relay access, like this:
 
 <blockquote>
 <pre>
+# With Postfix 2.10 and later, the mail relay policy is
+# preferably specified under smtpd_relay_restrictions.
+smtpd_relay_restrictions =
+    permit_mynetworks, permit_sasl_authenticated, ...
+</pre>
+
+<pre>
+# With Postfix before 2.10, the relay policy can be
+# specified only under smtpd_recipient_restrictions.
 smtpd_recipient_restrictions =
     permit_mynetworks, permit_sasl_authenticated, ...
 </pre>
@@ -6095,7 +6180,7 @@ or a list of SASL login names separated by comma and/or whitespace.
 
 <p>
 Optional restrictions that the Postfix SMTP server applies in the
-context of the MAIL FROM command.
+context of a client MAIL FROM command.
 See SMTPD_ACCESS_README, section "Delayed evaluation of SMTP access
 restriction lists" for a discussion of evaluation context and time.
 </p>
@@ -10560,7 +10645,7 @@ protocol exclusions. One can now explicitly exclude SSLv2 by setting
 SSLv3 set "smtp_tls_mandatory_protocols = !SSLv2, !SSLv3". Listing
 the protocols to include, rather than protocols to exclude, is
 supported, but not recommended. The exclusion form more closely
-matches the behaviour when the OpenSSL library is newer than Postfix.
+matches the behavior when the OpenSSL library is newer than Postfix.
 </p>
 
 <p> Since SSL version 2 has known protocol weaknesses and is now
@@ -10748,7 +10833,7 @@ protocol exclusions. One can now explicitly exclude SSLv2 by setting
 SSLv3 set "smtpd_tls_mandatory_protocols = !SSLv2, !SSLv3". Listing
 the protocols to include, rather than protocols to exclude, is
 supported, but not recommended. The exclusion form more closely
-matches the behaviour when the OpenSSL library is newer than Postfix.
+matches the behavior when the OpenSSL library is newer than Postfix.
 </p>
 
 <p> Since SSL version 2 has known protocol weaknesses and is now
@@ -11786,7 +11871,7 @@ with a "!" character. To exclude SSLv2 even for opportunistic TLS set
 "smtp_tls_protocols = !SSLv2". To exclude both "SSLv2" and "SSLv3" set
 "smtp_tls_protocols = !SSLv2, !SSLv3". Explicitly listing the protocols to
 include, rather than protocols to exclude, is supported, but not
-recommended.  The exclusion form more closely matches the behaviour
+recommended.  The exclusion form more closely matches the behavior
 when the OpenSSL library is newer than Postfix.  </p>
 
 <p> Example: </p>
@@ -11820,7 +11905,7 @@ with a "!" character. To exclude SSLv2 even for opportunistic TLS set
 "smtpd_tls_protocols = !SSLv2". To exclude both "SSLv2" and "SSLv3" set
 "smtpd_tls_protocols = !SSLv2, !SSLv3". Explicitly listing the protocols to
 include, rather than protocols to exclude, is supported, but not
-recommended.  The exclusion form more closely matches the behaviour
+recommended.  The exclusion form more closely matches the behavior
 when the OpenSSL library is newer than Postfix.  </p>
 
 <p> Example: </p>
@@ -12854,7 +12939,7 @@ these commands, disabled instances are skipped. </p>
 the
 server performs final delivery, and send "delivered" delivery status
 notifications instead of "relayed". The default setting is backwards
-compatible to avoid the infinetisimal possibility of breaking
+compatible to avoid the infinitesimal possibility of breaking
 existing LMTP-based content filters. </p>
 
 %PARAM always_add_missing_headers no
@@ -12946,7 +13031,7 @@ classes of SMTP service. </p>
 <p> The number of clients that can be waiting for service from a
 real Postfix SMTP server process. When this queue is full, all
 clients will
-receive a 421 reponse. </p>
+receive a 421 response. </p>
 
 <p> This feature is available in Postfix 2.8. </p>
 
@@ -12956,7 +13041,7 @@ receive a 421 reponse. </p>
 a decision whether they will receive service from a real Postfix
 SMTP server
 process. When this queue is full, all non-whitelisted clients will
-receive a 421 reponse. </p>
+receive a 421 response. </p>
 
 <p> This feature is available in Postfix 2.8. </p>
 
@@ -13787,7 +13872,7 @@ dummy SMTP protocol engine. </p>
 
 %PARAM dnsblog_reply_delay 0s
 
-<p> A debugging aid to artifically delay DNS responses. </p>
+<p> A debugging aid to artificially delay DNS responses. </p>
 
 <p> This feature is available in Postfix 2.8.  </p>
 
index 5a3d2f899f899f00269d73f542ee6159ea67680d..57135a0f7168976454d12aa5484b9fe1d70b7248 100644 (file)
@@ -1957,8 +1957,13 @@ extern char *var_helo_checks;
 #define DEF_MAIL_CHECKS                ""
 extern char *var_mail_checks;
 
+#define VAR_RELAY_CHECKS       "smtpd_relay_restrictions"
+#define DEF_RELAY_CHECKS       PERMIT_MYNETWORKS ", " \
+                               REJECT_UNAUTH_DEST
+extern char *var_relay_checks;
+
 #define VAR_RCPT_CHECKS                "smtpd_recipient_restrictions"
-#define DEF_RCPT_CHECKS                PERMIT_MYNETWORKS ", " REJECT_UNAUTH_DEST
+#define DEF_RCPT_CHECKS                ""
 extern char *var_rcpt_checks;
 
 #define VAR_ETRN_CHECKS                "smtpd_etrn_restrictions"
@@ -2113,6 +2118,7 @@ extern int var_mul_rcpt_code;
 
 #define PERMIT_AUTH_DEST       "permit_auth_destination"
 #define REJECT_UNAUTH_DEST     "reject_unauth_destination"
+#define DEFER_UNAUTH_DEST      "defer_unauth_destination"
 #define CHECK_RELAY_DOMAINS    "check_relay_domains"
 #define PERMIT_TLS_CLIENTCERTS "permit_tls_clientcerts"
 #define PERMIT_TLS_ALL_CLIENTCERTS     "permit_tls_all_clientcerts"
index 91d8a26d07ab517cde0324041d716385ff0d5c24..4ec82995be994e65bcac9fbf6d0c4c8563576312 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      "20120924"
+#define MAIL_RELEASE_DATE      "20121007"
 #define MAIL_VERSION_NUMBER    "2.10"
 
 #ifdef SNAPSHOT
index 4ef0eec6920f3e9ea65facb1ab779ba559ce892a..3855c6fe037db4b69fcc0dd5d24aceeb38f9c940 100644 (file)
@@ -112,8 +112,8 @@ SERVER_ACL *server_acl_parse(const char *extern_acl, const char *origin)
     char   *bp = saved_acl;
     char   *acl;
 
-#define STREQ(x,y) ((*x) == (*y) && strcasecmp((x), (y)) == 0)
-#define STRNE(x,y) ((*x) != (*y) || strcasecmp((x), (y)) != 0)
+#define STREQ(x,y) (strcasecmp((x), (y)) == 0)
+#define STRNE(x,y) (strcasecmp((x), (y)) != 0)
 
     /*
      * Nested tables are not allowed. Tables are opened before entering the
index 83d1e73304ec799e885610c2312c39ea88b421c8..ce0b937bcbe0ab2d4413068b057b345a661a48d7 100644 (file)
 /*     What Postfix features match subdomains of "domain.tld" automatically,
 /*     instead of requiring an explicit ".domain.tld" pattern.
 /* .IP "\fBsmtpd_client_restrictions (empty)\fR"
-/*     Optional Postfix SMTP server access restrictions in the context of
-/*     a remote SMTP client connection request.
+/*     Optional restrictions that the Postfix SMTP server applies in the
+/*     context of a client connection request.
 /* .IP "\fBsmtpd_helo_required (no)\fR"
 /*     Require that a remote SMTP client introduces itself with the HELO
 /*     or EHLO command before sending the MAIL command or other commands
 /*     that require EHLO negotiation.
 /* .IP "\fBsmtpd_helo_restrictions (empty)\fR"
 /*     Optional restrictions that the Postfix SMTP server applies in the
-/*     context of the SMTP HELO command.
+/*     context of a client HELO command.
 /* .IP "\fBsmtpd_sender_restrictions (empty)\fR"
 /*     Optional restrictions that the Postfix SMTP server applies in the
-/*     context of the MAIL FROM command.
-/* .IP "\fBsmtpd_recipient_restrictions (permit_mynetworks, reject_unauth_destination)\fR"
-/*     The access restrictions that the Postfix SMTP server applies in
-/*     the context of the RCPT TO command.
+/*     context of a client MAIL FROM command.
+/* .IP "\fBsmtpd_recipient_restrictions (see 'postconf -d' output)\fR"
+/*     Optional restrictions that the Postfix SMTP server applies in the
+/*     context of a client RCPT TO command, after smtpd_relay_restrictions.
 /* .IP "\fBsmtpd_etrn_restrictions (empty)\fR"
-/*     Optional SMTP server access restrictions in the context of a client
-/*     ETRN request.
+/*     Optional restrictions that the Postfix SMTP server applies in the
+/*     context of a client ETRN command.
 /* .IP "\fBallow_untrusted_routing (no)\fR"
 /*     Forward mail with sender-specified routing (user[@%!]remote[@%!]site)
 /*     from untrusted clients to destinations matching $relay_domains.
 /* .IP "\fBsmtpd_end_of_data_restrictions (empty)\fR"
 /*     Optional access restrictions that the Postfix SMTP server
 /*     applies in the context of the SMTP END-OF-DATA command.
+/* .PP
+/*     Available in Postfix version 2.10 and later:
+/* .IP "\fBsmtpd_relay_restrictions (permit_mynetworks, reject_unauth_destination)\fR"
+/*     Access restrictions for mail relay control that the Postfix
+/*     SMTP server applies in the context of the RCPT TO command, before
+/*     smtpd_recipient_restrictions.
 /* SENDER AND RECIPIENT ADDRESS VERIFICATION CONTROLS
 /* .ad
 /* .fi
@@ -1136,6 +1142,7 @@ char   *var_notify_classes;
 char   *var_client_checks;
 char   *var_helo_checks;
 char   *var_mail_checks;
+char   *var_relay_checks;
 char   *var_rcpt_checks;
 char   *var_etrn_checks;
 char   *var_data_checks;
@@ -5326,6 +5333,7 @@ int     main(int argc, char **argv)
        VAR_CLIENT_CHECKS, DEF_CLIENT_CHECKS, &var_client_checks, 0, 0,
        VAR_HELO_CHECKS, DEF_HELO_CHECKS, &var_helo_checks, 0, 0,
        VAR_MAIL_CHECKS, DEF_MAIL_CHECKS, &var_mail_checks, 0, 0,
+       VAR_RELAY_CHECKS, DEF_RELAY_CHECKS, &var_relay_checks, 0, 0,
        VAR_RCPT_CHECKS, DEF_RCPT_CHECKS, &var_rcpt_checks, 0, 0,
        VAR_ETRN_CHECKS, DEF_ETRN_CHECKS, &var_etrn_checks, 0, 0,
        VAR_DATA_CHECKS, DEF_DATA_CHECKS, &var_data_checks, 0, 0,
index 76229f9775c3ab43311c08e4668184ec86e39e68..09ea4bf96818fee9eaee29a2b5b2daf2de2cce8d 100644 (file)
@@ -320,6 +320,7 @@ static int access_parent_style;
 static ARGV *client_restrctions;
 static ARGV *helo_restrctions;
 static ARGV *mail_restrctions;
+static ARGV *relay_restrctions;
 static ARGV *rcpt_restrctions;
 static ARGV *etrn_restrctions;
 static ARGV *data_restrctions;
@@ -552,7 +553,7 @@ static void fail_required(const char *name, const char **required)
     for (reqd = required; *reqd; reqd++)
        vstring_sprintf_append(example, "%s%s", *reqd,
                          reqd[1] == 0 ? "" : reqd[2] == 0 ? " or " : ", ");
-    msg_fatal("parameter \"%s\": specify at least one working instance of: %s",
+    msg_fatal("in parameter %s, specify at least one working instance of: %s",
              name, STR(example));
 }
 
@@ -565,11 +566,12 @@ void    smtpd_check_init(void)
     const char *value;
     char   *cp;
     static const char *rcpt_required[] = {
-       CHECK_RELAY_DOMAINS,
        REJECT_UNAUTH_DEST,
+       DEFER_UNAUTH_DEST,
        REJECT_ALL,
        DEFER_ALL,
        DEFER_IF_PERMIT,
+       CHECK_RELAY_DOMAINS,
        0,
     };
     static NAME_CODE tempfail_actions[] = {
@@ -662,6 +664,8 @@ void    smtpd_check_init(void)
                                         var_helo_checks);
     mail_restrctions = smtpd_check_parse(SMTPD_CHECK_PARSE_ALL,
                                         var_mail_checks);
+    relay_restrctions = smtpd_check_parse(SMTPD_CHECK_PARSE_ALL,
+                                         var_relay_checks);
     rcpt_restrctions = smtpd_check_parse(SMTPD_CHECK_PARSE_ALL,
                                         var_rcpt_checks);
     etrn_restrctions = smtpd_check_parse(SMTPD_CHECK_PARSE_ALL,
@@ -703,11 +707,14 @@ void    smtpd_check_init(void)
 
     /*
      * People screw up the relay restrictions too often. Require that they
-     * list at least one restriction that rejects mail by default.
+     * list at least one restriction that rejects mail by default. We allow
+     * relay restrictions to be empty for sites that require backwards
+     * compatibility.
      */
 #ifndef TEST
-    if (!has_required(rcpt_restrctions, rcpt_required))
-       fail_required(VAR_RCPT_CHECKS, rcpt_required);
+    if (!has_required(rcpt_restrctions, rcpt_required)
+       && !has_required(relay_restrctions, rcpt_required))
+       fail_required(VAR_RELAY_CHECKS " or " VAR_RCPT_CHECKS, rcpt_required);
 #endif
 
     /*
@@ -1438,7 +1445,8 @@ static int permit_auth_destination(SMTPD_STATE *state, char *recipient)
 
 /* reject_unauth_destination - FAIL for message relaying */
 
-static int reject_unauth_destination(SMTPD_STATE *state, char *recipient)
+static int reject_unauth_destination(SMTPD_STATE *state, char *recipient,
+                                     int reply_code, const char *reply_dsn)
 {
     const char *myname = "reject_unauth_destination";
 
@@ -1455,7 +1463,7 @@ static int reject_unauth_destination(SMTPD_STATE *state, char *recipient)
      * Reject relaying to sites that are not listed in relay_domains.
      */
     return (smtpd_check_reject(state, MAIL_ERROR_POLICY,
-                              var_relay_code, "5.7.1",
+                              reply_code, reply_dsn,
                               "<%s>: Relay access denied",
                               recipient));
 }
@@ -4066,7 +4074,12 @@ static int generic_checks(SMTPD_STATE *state, ARGV *restrictions,
            }
        } else if (strcasecmp(name, REJECT_UNAUTH_DEST) == 0) {
            if (state->recipient)
-               status = reject_unauth_destination(state, state->recipient);
+               status = reject_unauth_destination(state, state->recipient,
+                                                  var_relay_code, "5.7.1");
+       } else if (strcasecmp(name, DEFER_UNAUTH_DEST) == 0) {
+           if (state->recipient)
+               status = reject_unauth_destination(state, state->recipient,
+                                            var_relay_code - 100, "4.7.1");
        } else if (strcasecmp(name, CHECK_RELAY_DOMAINS) == 0) {
            if (state->recipient)
                status = check_relay_domains(state, state->recipient,
@@ -4191,7 +4204,7 @@ static int generic_checks(SMTPD_STATE *state, ARGV *restrictions,
        if (state->defer_if_permit.active && state->defer_if_reject.active)
            break;
     }
-    if (msg_verbose && name == 0)
+    if (msg_verbose)
        msg_info(">>> END %s RESTRICTIONS <<<", reply_class);
 
     state->recursion = saved_recursion;
@@ -4450,6 +4463,8 @@ char   *smtpd_check_rcpt(SMTPD_STATE *state, char *recipient)
     int     status;
     char   *saved_recipient;
     char   *err;
+    ARGV   *restrctions[2];
+    int     n;
 
     /*
      * Initialize.
@@ -4498,13 +4513,21 @@ char   *smtpd_check_rcpt(SMTPD_STATE *state, char *recipient)
     state->defer_if_permit.active = state->defer_if_permit_sender;
 
     /*
-     * Apply restrictions in the order as specified.
+     * Apply restrictions in the order as specified. We allow relay
+     * restrictions to be empty, for sites that require backwards
+     * compatibility.
      */
     SMTPD_CHECK_RESET();
-    status = setjmp(smtpd_check_buf);
-    if (status == 0 && rcpt_restrctions->argc)
-       status = generic_checks(state, rcpt_restrctions,
+    restrctions[0] = relay_restrctions;
+    restrctions[1] = rcpt_restrctions;
+    for (n = 0; n < 2; n++) {
+       status = setjmp(smtpd_check_buf);
+       if (status == 0 && restrctions[n]->argc)
+           status = generic_checks(state, restrctions[n],
                          recipient, SMTPD_NAME_RECIPIENT, CHECK_RECIP_ACL);
+       if (status == SMTPD_CHECK_REJECT)
+           break;
+    }
 
     /*
      * Force permission into deferral when some earlier temporary error may
@@ -5435,6 +5458,7 @@ int     main(int argc, char **argv)
        }
        if (*bp == '#')
            continue;
+
        if (*bp == '!') {
            vstream_printf("exit %d\n", system(bp + 1));
            continue;
index c237b312f23d70ce40c7f12888768890a80cf46f..c0b6d9964cad33915f647247326b6dd87fa7a7d1 100644 (file)
@@ -453,7 +453,7 @@ static void resolve_addr(RES_CONTEXT *rp, char *sender, char *addr,
 #endif
            }
            vstring_strcpy(channel, MAIL_SERVICE_ERROR);
-           vstring_sprintf(nexthop, "User unknown%s",
+           vstring_sprintf(nexthop, "5.1.1 User unknown%s",
                            var_show_unk_rcpt_table ?
                            " in virtual alias table" : "");
            *flags |= RESOLVE_CLASS_ALIAS;
index 850e07c736cf7905666afd2f4bd3f5f7910dc8e3..db3be4a4c10891e4d268d72fd885c52b124c778d 100644 (file)
@@ -65,16 +65,19 @@ extern DICT *dict_debug(DICT *);
 
 #define DICT_DEBUG(d) ((d)->flags & DICT_FLAG_DEBUG ? dict_debug(d) : (d))
 
+ /*
+  * See dict_open.c embedded manpage for flag definitions.
+  */
 #define DICT_FLAG_NONE         (0)
-#define DICT_FLAG_DUP_WARN     (1<<0)  /* if file, warn about dups */
-#define DICT_FLAG_DUP_IGNORE   (1<<1)  /* if file, ignore dups */
+#define DICT_FLAG_DUP_WARN     (1<<0)  /* warn about dups if not supported */
+#define DICT_FLAG_DUP_IGNORE   (1<<1)  /* ignore dups if not supported */
 #define DICT_FLAG_TRY0NULL     (1<<2)  /* do not append 0 to key/value */
 #define DICT_FLAG_TRY1NULL     (1<<3)  /* append 0 to key/value */
 #define DICT_FLAG_FIXED                (1<<4)  /* fixed key map */
 #define DICT_FLAG_PATTERN      (1<<5)  /* keys are patterns */
-#define DICT_FLAG_LOCK         (1<<6)  /* temp lock before each access */
-#define DICT_FLAG_DUP_REPLACE  (1<<7)  /* if file, replace dups */
-#define DICT_FLAG_SYNC_UPDATE  (1<<8)  /* if file, sync updates */
+#define DICT_FLAG_LOCK         (1<<6)  /* use temp lock before access */
+#define DICT_FLAG_DUP_REPLACE  (1<<7)  /* replace dups if supported */
+#define DICT_FLAG_SYNC_UPDATE  (1<<8)  /* sync updates if supported */
 #define DICT_FLAG_DEBUG                (1<<9)  /* log access */
 /*#define DICT_FLAG_FOLD_KEY   (1<<10) /* lowercase the lookup key */
 #define DICT_FLAG_NO_REGSUB    (1<<11) /* disallow regexp substitution */
@@ -125,12 +128,16 @@ extern DICT *dict_debug(DICT *);
 #define DICT_ERR_CONFIG        (-2)            /* configuration error */
 
  /*
-  * FAIL/ERROR are suggested result values, not meant for use in comparisons.
+  * Result values for exposed functions except lookup. FAIL/ERROR are
+  * suggested values, not for use in comparisons for equality.
   */
 #define DICT_STAT_FAIL         1       /* any value > 0: notfound, conflict */
 #define DICT_STAT_SUCCESS      0       /* request satisfied */
 #define DICT_STAT_ERROR                (-1)    /* any value < 0: database error */
 
+ /*
+  * Set an error code and return a result value.
+  */
 #define DICT_ERR_VAL_RETURN(dict, err, val) do { \
        (dict)->error = (err); \
        return (val); \
index 58886830923fd9f34416efbebf81398ab164ceca..a5cbd204c449cdbddad5d687cc5463c2e56e4f25 100644 (file)
 /*     One exception is the default lock function.  When the
 /*     dictionary provides a file handle for locking, the default
 /*     lock function returns the result from myflock(), otherwise
-/*     it returns 0. The lock function is called to implement the
-/*     DICT_FLAG_OPEN_LOCK feature (lock database on open) when
-/*     a database is not multi-writer safe.
+/*     it returns 0. Presently, the lock function is used only to
+/*     implement the DICT_FLAG_OPEN_LOCK feature (lock the database
+/*     exclusively after it is opened) for databases that are not
+/*     multi-writer safe.
 /*
 /*     dict_free() releases memory and cleans up after dict_alloc().
 /*     It is up to the caller to dispose of any memory that was allocated
index 62dd60a02ea88fe681ff1af9b836f91a0eb0006c..0f177857463e69ac032332c26860ea4742706504 100644 (file)
 /*     before writing, and acquire a shared lock before reading.
 /* .IP DICT_FLAG_OPEN_LOCK
 /*     With databases that are not multi-writer safe, request that
-/*     dict_open() acquires an exclusive lock, or that it reports
-/*     a fatal run-time error otherwise.
+/*     dict_open() acquires an exclusive lock, or that it terminates
+/*     with a fatal run-time error.
 /* .IP DICT_FLAG_FOLD_FIX
 /*     With databases whose lookup fields are fixed-case strings,
-/*     fold the search key to lower case before accessing the
+/*     fold the search string to lower case before accessing the
 /*     database.  This includes hash:, cdb:, dbm:. nis:, ldap:,
 /*     *sql.
 /* .IP DICT_FLAG_FOLD_MUL
 /*     With file-based maps, flush I/O buffers to file after each update.
 /*     Thus feature is not supported with some file-based dictionaries.
 /* .IP DICT_FLAG_NO_REGSUB
-/*     Disallow regular expression substitution from left-hand side data
-/*     into the right-hand side.
+/*     Disallow regular expression substitution from the lookup string
+/*     into the lookup result, to block data injection attacks.
 /* .IP DICT_FLAG_NO_PROXY
-/*     Disallow access through the \fBproxymap\fR service.
+/*     Disallow access through the unprivileged \fBproxymap\fR
+/*     service, to block privilege escalation attacks.
 /* .IP DICT_FLAG_NO_UNAUTH
-/*     Disallow network lookup mechanisms that lack any form of
-/*     authentication (example: tcp_table; even NIS can be secured
-/*     to some extent by requiring that the server binds to a
-/*     privileged port).
+/*     Disallow lookup mechanisms that lack any form of authentication,
+/*     to block privilege escalation attacks (example: tcp_table;
+/*     even NIS can be secured to some extent by requiring that
+/*     the server binds to a privileged port).
 /* .IP DICT_FLAG_PARANOID
 /*     A combination of all the paranoia flags: DICT_FLAG_NO_REGSUB,
 /*     DICT_FLAG_NO_PROXY and DICT_FLAG_NO_UNAUTH.
+/* .IP DICT_FLAG_DEBUG
+/*     Enable additional logging.
 /* .PP
 /*     Specify DICT_FLAG_NONE for no special processing.
 /*