1.4 KiB
1.4 KiB
Enable DNSBL service in Postfix to reduce spam
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.
You can enable additional DNSBL services in Postfix to reduce spam. We use
zen.spamhaus.org
for example below.
- Open Postfix config file
/etc/postfix/main.cf
or/usr/local/etc/postfix/main.cf
(on FreeBSD), appendreject_rbl_client zen.spamhaus.org
to parametersmtpd_recipient_restrictions
. Final setting looks like below:
smtpd_recipient_restrictions = ..., reject_unauth_destination, reject_rbl_client zen.spamhaus.org
It must be placed after reject_unauth_destination
. You can add more DNSBL
services after reject_unauth_destination
, and they will be queried in the
specified order.
- Restart or reload Postfix service is required.