{"id":2372,"date":"2015-05-27T16:59:52","date_gmt":"2015-05-27T08:59:52","guid":{"rendered":"http:\/\/www.banbanli.net\/blog\/?p=2372"},"modified":"2015-05-27T16:59:52","modified_gmt":"2015-05-27T08:59:52","slug":"postifx-setting-for-reference","status":"publish","type":"post","link":"http:\/\/www.banbanli.net\/blog\/?p=2372","title":{"rendered":"postifx setting for reference"},"content":{"rendered":"<p>http:\/\/www.postfix.org\/SMTPD_ACCESS_README.html<\/p>\n<h2><a name=\"lists\"><\/a>Getting selective with SMTP access restriction lists<\/h2>\n<p>Postfix allows you to specify lists of access restrictions for each stage of the SMTP conversation. Individual restrictions are described in the <a href=\"http:\/\/www.postfix.org\/postconf.5.html\">postconf(5)<\/a> manual page.<\/p>\n<p>Examples of simple restriction lists are:<\/p>\n<pre>\/etc\/postfix\/<a href=\"http:\/\/www.postfix.org\/postconf.5.html\">main.cf<\/a>:\r\n    # Allow connections from trusted networks only.\r\n    <a href=\"http:\/\/www.postfix.org\/postconf.5.html#smtpd_client_restrictions\">smtpd_client_restrictions<\/a> = <a href=\"http:\/\/www.postfix.org\/postconf.5.html#permit_mynetworks\">permit_mynetworks<\/a>, reject\r\n\r\n    # Don't talk to mail systems that don't know their own hostname.\r\n    # With Postfix &lt; 2.3, specify <a href=\"http:\/\/www.postfix.org\/postconf.5.html#reject_unknown_helo_hostname\">reject_unknown_hostname<\/a>.\r\n    <a href=\"http:\/\/www.postfix.org\/postconf.5.html#smtpd_helo_restrictions\">smtpd_helo_restrictions<\/a> = <a href=\"http:\/\/www.postfix.org\/postconf.5.html#reject_unknown_helo_hostname\">reject_unknown_helo_hostname<\/a>\r\n\r\n    # Don't accept mail from domains that don't exist.\r\n    <a href=\"http:\/\/www.postfix.org\/postconf.5.html#smtpd_sender_restrictions\">smtpd_sender_restrictions<\/a> = <a href=\"http:\/\/www.postfix.org\/postconf.5.html#reject_unknown_sender_domain\">reject_unknown_sender_domain<\/a>\r\n\r\n    # Relay control (Postfix 2.10 and later): local clients and\r\n    # authenticated clients may specify any destination domain.\r\n    <a href=\"http:\/\/www.postfix.org\/postconf.5.html#smtpd_relay_restrictions\">smtpd_relay_restrictions<\/a> = <a href=\"http:\/\/www.postfix.org\/postconf.5.html#permit_mynetworks\">permit_mynetworks<\/a>, \r\n        <a href=\"http:\/\/www.postfix.org\/postconf.5.html#permit_sasl_authenticated\">permit_sasl_authenticated<\/a>,\r\n        <a href=\"http:\/\/www.postfix.org\/postconf.5.html#reject_unauth_destination\">reject_unauth_destination<\/a>\r\n\r\n    # Spam control: exclude local clients and authenticated clients\r\n    # from DNSBL lookups.\r\n    <a href=\"http:\/\/www.postfix.org\/postconf.5.html#smtpd_recipient_restrictions\">smtpd_recipient_restrictions<\/a> = <a href=\"http:\/\/www.postfix.org\/postconf.5.html#permit_mynetworks\">permit_mynetworks<\/a>, \r\n        <a href=\"http:\/\/www.postfix.org\/postconf.5.html#permit_sasl_authenticated\">permit_sasl_authenticated<\/a>,\r\n        # <a href=\"http:\/\/www.postfix.org\/postconf.5.html#reject_unauth_destination\">reject_unauth_destination<\/a> is not needed here if the mail\r\n        # relay policy is specified under <a href=\"http:\/\/www.postfix.org\/postconf.5.html#smtpd_relay_restrictions\">smtpd_relay_restrictions<\/a>\r\n        # (available with Postfix 2.10 and later).\r\n        <a href=\"http:\/\/www.postfix.org\/postconf.5.html#reject_unauth_destination\">reject_unauth_destination<\/a>\r\n        <a href=\"http:\/\/www.postfix.org\/postconf.5.html#reject_rbl_client\">reject_rbl_client<\/a> zen.spamhaus.org,\r\n        <a href=\"http:\/\/www.postfix.org\/postconf.5.html#reject_rhsbl_reverse_client\">reject_rhsbl_reverse_client<\/a> dbl.spamhaus.org,\r\n        <a href=\"http:\/\/www.postfix.org\/postconf.5.html#reject_rhsbl_helo\">reject_rhsbl_helo<\/a> dbl.spamhaus.org,\r\n        <a href=\"http:\/\/www.postfix.org\/postconf.5.html#reject_rhsbl_sender\">reject_rhsbl_sender<\/a> dbl.spamhaus.org\r\n\r\n    # Block clients that speak too early.\r\n    <a href=\"http:\/\/www.postfix.org\/postconf.5.html#smtpd_data_restrictions\">smtpd_data_restrictions<\/a> = <a href=\"http:\/\/www.postfix.org\/postconf.5.html#reject_unauth_pipelining\">reject_unauth_pipelining<\/a>\r\n\r\n    # Enforce mail volume quota via policy service callouts.\r\n    <a href=\"http:\/\/www.postfix.org\/postconf.5.html#smtpd_end_of_data_restrictions\">smtpd_end_of_data_restrictions<\/a> = <a href=\"http:\/\/www.postfix.org\/postconf.5.html#check_policy_service\">check_policy_service<\/a> unix:private\/policy<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>http:\/\/www.postfix.org\/SMTPD_ACCESS_README.html Getting selective with SMTP access restriction lists Postfix allows you to specify lists of access restrictions for each stage of the SMTP conversation. Individual restrictions are described in the postconf(5) manual page. Examples of simple restriction lists are: \/etc\/postfix\/main.cf: # Allow connections from trusted networks only. smtpd_client_restrictions = permit_mynetworks, reject # Don&#8217;t talk to &hellip; <a href=\"http:\/\/www.banbanli.net\/blog\/?p=2372\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">postifx setting for reference<\/span><\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[],"class_list":["post-2372","post","type-post","status-publish","format-standard","hentry","category-daily"],"_links":{"self":[{"href":"http:\/\/www.banbanli.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2372","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.banbanli.net\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.banbanli.net\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.banbanli.net\/blog\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"http:\/\/www.banbanli.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2372"}],"version-history":[{"count":1,"href":"http:\/\/www.banbanli.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2372\/revisions"}],"predecessor-version":[{"id":2373,"href":"http:\/\/www.banbanli.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2372\/revisions\/2373"}],"wp:attachment":[{"href":"http:\/\/www.banbanli.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2372"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.banbanli.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2372"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.banbanli.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2372"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}