iredmail-doc/html/enable.dnsbl.html

60 lines
3.0 KiB
HTML

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Enable DNSBL service in Postfix to reduce spam</title>
<link rel="stylesheet" type="text/css" href="./css/markdown.css" />
</head>
<body>
<div id="navigation">
<a href="http://www.iredmail.org" target="_blank"><img alt="iRedMail web site" src="images/logo-iredmail.png" style="vertical-align: middle; height: 30px;"/> <span>iRedMail</span></a>
// <a href="./index.html">Document Index</a>
</div><h1 id="enable-dnsbl-service-in-postfix-to-reduce-spam">Enable DNSBL service in Postfix to reduce spam</h1>
<blockquote>
<p>Important note: if you're running a high-traffic mail server, you'd better
setup a local DNS server to cache DNS queries, because free RBL services
like zen.spamhaus.org may improperly reply if your server exceed the
DNS query limit. Also, mail service higly relies on DNS queries, so a local
DNS server speeds up the mail flow.</p>
</blockquote>
<p>You can enable additional DNSBL services in Postfix to reduce spam. We use
<code>zen.spamhaus.org</code> for example below.</p>
<ul>
<li>Open Postfix config file <code>/etc/postfix/main.cf</code> or
<code>/usr/local/etc/postfix/main.cf</code> (on FreeBSD), append
<code>reject_rbl_client zen.spamhaus.org</code> to parameter <code>smtpd_recipient_restrictions</code>.
Final setting looks like below:</li>
</ul>
<pre><code>smtpd_recipient_restrictions = ..., reject_unauth_destination, reject_rbl_client zen.spamhaus.org
</code></pre>
<p>It must be placed after <code>reject_unauth_destination</code>. You can add more DNSBL
services after <code>reject_unauth_destination</code>, and they will be queried in the
specified order.</p>
<ul>
<li>Restart or reload Postfix service is required.</li>
</ul>
<h2 id="see-also">See also</h2>
<ul>
<li><a href="./enable.postscreen.html">Enable postscreen service</a></li>
</ul>
<h2 id="references">References</h2>
<ul>
<li><a href="http://www.postfix.org/postconf.5.html#reject_rbl_client">Postfix Configuration Parameters: reject_rbl_client</a></li>
<li>
<p><a href="http://www.spamhaus.org">Spamhaus website</a></p>
<ul>
<li><a href="https://www.spamhaus.org/organization/dnsblusage/">Spamhaus DNSBL Usage Terms</a></li>
</ul>
</li>
</ul><p style="text-align: center; color: grey;">All documents are available in <a href="https://bitbucket.org/zhb/iredmail-docs/src">BitBucket repository</a>, and published under <a href="http://creativecommons.org/licenses/by-nd/3.0/us/" target="_blank">Creative Commons</a> license. If you found something wrong, please do <a href="http://www.iredmail.org/contact.html">contact us</a> to fix it.<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-3293801-21', 'auto');
ga('send', 'pageview');
</script>
</body></html>