When configuring spam protection for your mail server, selecting appropriate DNS-based Blackhole Lists (DNSBLs) is crucial. The effectiveness of your spam filtering largely depends on the quality and reliability of the blacklists you use.
Based on my experience running production mail servers, these are the most effective DNSBLs:
# Recommended DNSBL configuration for Postfix
smtpd_recipient_restrictions =
reject_rbl_client ix.dnsbl.manitu.net,
reject_rbl_client cbl.abuseat.org,
reject_rbl_client bl.spamcop.net,
reject_rbl_client safe.dnsbl.sorbs.net,
reject_rbl_client dnsbl.njabl.org
These additional lists have proven valuable in production environments:
- dnsbl.sorbs.net (comprehensive list including recent spammers)
- psbl.surriel.com (Passive Spam Block List)
- all.s5h.net (aggressive but effective)
Some popular lists come with significant drawbacks:
# Problematic DNSBLs that may cause false positives
# spamhaus.org - Often too aggressive for production use
# barracudacentral.org - Requires paid subscription for reliable results
# dnsbl-1.uceprotect.net - Known for excessive false positives
When implementing DNSBLs, consider these technical aspects:
# Example Exim configuration for DNSBL checking
acl_check_rcpt:
deny message = Rejected - $sender_host_address is listed in $dnslist_domain
dnslists = ix.dnsbl.manitu.net:cbl.abuseat.org:bl.spamcop.net
delay = 1s
Regularly monitor your DNSBL effectiveness:
#!/bin/bash
# Simple script to check DNSBL hits
for bl in ix.dnsbl.manitu.net cbl.abuseat.org bl.spamcop.net; do
echo "Checking $bl:"
grep "$bl" /var/log/mail.log | wc -l
done
Too many DNSBL checks can impact server performance. I recommend:
- Limit to 4-6 high-quality DNSBLs
- Implement local caching of DNSBL results
- Consider using a local DNS resolver
html
When hardening a mail server against spam, DNS-based Blackhole Lists (DNSBLs) are a critical layer of defense. The challenge lies in selecting lists that balance effectiveness with minimal false positives. Here's a technical breakdown of optimal configurations:
# Recommended minimal set for Postfix:
smtpd_recipient_restrictions =
reject_rbl_client cbl.abuseat.org,
reject_rbl_client bl.spamcop.net,
reject_rbl_client zen.spamhaus.org,
reject_rbl_client b.barracudacentral.org
- Spamhaus ZEN (zen.spamhaus.org) - Aggregates multiple Spamhaus lists
- Barracuda (b.barracudacentral.org) - Excellent for catching botnet spam
- UCEPROTECT (dnsbl-1.uceprotect.net) - Focuses on network ranges
For Exim4 configuration:
acl_check_rcpt:
deny message = Rejected by $dnslist_domain DNSBL
dnslists = cbl.abuseat.org:bl.spamcop.net:zen.spamhaus.org
Some DNSBLs generate excessive false positives or have questionable practices:
# Potentially problematic lists:
# - dnsbl.sorbs.net (overly aggressive)
# - dnsbl.njabl.org (no longer maintained)
# - list.dnswl.org (whitelist, use carefully)
Implement logging to track DNSBL hits:
# Postfix logging example:
smtpd_client_restrictions =
check_client_access hash:/etc/postfix/dnsbl_override,
reject_rbl_client zen.spamhaus.org,
reject_rbl_client bl.spamcop.net
Limit to 3-5 DNSBLs maximum. Each query adds latency:
# Recommended for high-volume servers:
smtpd_recipient_restrictions =
reject_rbl_client zen.spamhaus.org,
reject_rbl_client bl.spamcop.net,
reject_rbl_client b.barracudacentral.org