{"id":252,"date":"2016-10-06T10:08:20","date_gmt":"2016-10-06T10:08:20","guid":{"rendered":"http:\/\/alain.fi\/?p=252"},"modified":"2019-07-30T03:59:37","modified_gmt":"2019-07-30T03:59:37","slug":"postfix-smtpd-disable-relay-to-specific-domains","status":"publish","type":"post","link":"https:\/\/alain.fi\/?p=252","title":{"rendered":"postfix \/ smtpd &#8211; disable relay to specific domains"},"content":{"rendered":"<p><strong>\/etc\/postfix\/main.cf<\/strong><\/p>\n<p>make sure you have included this:<\/p>\n<pre> hash:\/etc\/postfix\/access,<\/pre>\n<p>in<\/p>\n<pre class=\"bbcodeblock\" dir=\"ltr\">smtpd_sender_restrictions = ................<\/pre>\n<p class=\"bbcodeblock\" dir=\"ltr\">Note you can also avoid receving to a specific domain if you add this also in reject_unauth_destination ruleset.<\/p>\n<p class=\"bbcodeblock\" dir=\"ltr\"><strong>\/etc\/postfix\/access<\/strong><\/p>\n<p class=\"bbcodeblock\" dir=\"ltr\">Have your domain listed like:<\/p>\n<pre class=\"bbcodeblock\" dir=\"ltr\">evildomain.tld \u00a0 REJECT\r\noutta.here       REJECT<\/pre>\n<p class=\"bbcodeblock\" dir=\"ltr\">Then you need to generate the actual file that postfix will use = access.db like this:<\/p>\n<pre class=\"bbcodeblock\" dir=\"ltr\"># postmap hash:\/etc\/postfix\/access<\/pre>\n<p class=\"bbcodeblock\" dir=\"ltr\">restart postfix and that&#8217;s it.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\/etc\/postfix\/main.cf make sure you have included this: hash:\/etc\/postfix\/access, in smtpd_sender_restrictions = &#8230;&#8230;&#8230;&#8230;&#8230;. Note you can also avoid receving to a specific domain if you add this also in reject_unauth_destination ruleset. \/etc\/postfix\/access Have your domain listed like: evildomain.tld \u00a0 REJECT outta.here &hellip; <a href=\"https:\/\/alain.fi\/?p=252\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-252","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/alain.fi\/index.php?rest_route=\/wp\/v2\/posts\/252","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/alain.fi\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/alain.fi\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/alain.fi\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/alain.fi\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=252"}],"version-history":[{"count":1,"href":"https:\/\/alain.fi\/index.php?rest_route=\/wp\/v2\/posts\/252\/revisions"}],"predecessor-version":[{"id":253,"href":"https:\/\/alain.fi\/index.php?rest_route=\/wp\/v2\/posts\/252\/revisions\/253"}],"wp:attachment":[{"href":"https:\/\/alain.fi\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=252"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/alain.fi\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=252"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/alain.fi\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=252"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}