A DNSBL (DNS-based blocklist) is a list of IP addresses or domain names with a poor sending reputation, published through the Domain Name System so that mail servers can query it in milliseconds. In email infrastructure, a receiving mail transfer agent looks up the connecting client in one or more DNSBLs and then rejects, scores or flags the message based on the answer.
The older name RBL, from the Realtime Blackhole List of the late 1990s, is still widely used as a synonym. DNSBLs remain one of the cheapest and most effective first-line spam defenses on the Internet, because a single DNS query can stop a message before any content is transferred.
How a DNSBL lookup works
A DNSBL lookup is an ordinary DNS A-record query built from the client address and the list zone. The receiving server reverses the octets of the IPv4 address, appends the zone name and asks its resolver for the result. For a client at 192.0.2.99 and a list at bl.example.org, the query name is 99.2.0.192.bl.example.org.
The answer carries the verdict. An NXDOMAIN response means not listed, while an answer in the 127.0.0.0/8 loopback range means the address is listed. Many operators encode the reason in the last octet, and an optional TXT record usually returns a short explanation or a removal page reference that can be quoted in the rejection message. The conventions are documented in RFC 5782, an informational specification.
The following table shows typical return codes and what a receiving server does with them.
| Response | Meaning | Usual action |
|---|---|---|
| NXDOMAIN | Address is not listed | Continue normal processing |
| 127.0.0.2 | Listed as a direct spam source | Reject or add a high score |
| 127.0.0.4 | Listed as exploited or infected host | Reject at connection time |
| 127.0.0.10 or 127.0.0.11 | Dynamic or end-user address range | Reject direct-to-MX delivery |
| 127.255.255.x | Query refused or rate limited | Ignore the result and alert the administrator |
Because the verdict travels over DNS, it benefits from resolver caching controlled by the record TTL. Listings therefore propagate within minutes, and delistings take effect once cached answers expire, typically after 5 to 60 minutes.
Types of DNS-based blocklists
DNSBLs differ in what they list and how entries get there. Some track IP addresses that sent spam to trap addresses, others list address ranges that should never send mail directly, and domain lists catch spam by the links it contains. IPv6 support is limited because the address space is too large for per-address listing, so many IPv6 lists work on /64 or larger prefixes.
| List type | What is listed | Typical evidence | Risk of false positives |
|---|---|---|---|
| IP spam source list | Single IPv4 or IPv6 addresses | Spam trap hits, user complaints | Low to moderate |
| Policy block list | Dynamic and residential ranges | Provider declarations, rDNS patterns | Low for direct MX traffic |
| Exploit list | Infected hosts and open proxies | Botnet telemetry, honeypots | Low |
| Domain list (RHSBL or URIBL) | Domains in senders or message bodies | Links seen in spam | Moderate |
| Aggressive composite list | Entire provider netblocks | Escalation against hosting providers | High |
A right-hand side blocklist (RHSBL) checks the domain part of the envelope sender or the HELO name, while a URI blocklist checks domains extracted from links in the body. These lists complement IP lists, because spammers rotate sending addresses far more often than the domains they promote.
DNSBL compared with related email defenses
A DNSBL answers a reputation question, not an authentication question. SPF, DKIM and DMARC establish whether a message is authorized by a domain, while a blocklist judges whether the sending infrastructure behaves badly. The strongest setups combine both views with content analysis in a spam filter.
| Mechanism | Question answered | Stage applied | Main weakness |
|---|---|---|---|
| DNSBL | Is this sender known for abuse | SMTP connection or scoring | Lags behind new sources |
| SPF | Is this IP allowed for the domain | SMTP envelope | Breaks with forwarding |
| DKIM | Was the message signed by the domain | After data transfer | Says nothing about intent |
| Greylisting | Will the client retry delivery | SMTP connection | Delays legitimate first mail |
| Content spam filter | Does the message look like spam | After data transfer | Costly for large volumes |
In practice, a DNSBL hit at connection time saves bandwidth and processing, which makes it the natural first check before greylisting or content scanning.
Configuring DNSBL checks on a mail server
Administrators choose between outright rejection and weighted scoring. Rejection with a 554 SMTP reply is efficient and transparent to the sender, but one inaccurate list can block valid mail. Scoring, as used by Postfix postscreen weights or content filters, adds points per list and rejects only when several independent lists agree.
- Use a local caching resolver rather than a large public resolver, because many list operators refuse queries from public resolvers and return error codes instead.
- Respect the usage terms of each list: free tiers often limit query volume, and commercial senders usually need a data feed subscription.
- Check the last external hop in the Received headers, not the address of an internal relay or the mail submission agent.
- Never apply DNSBL rejection to authenticated submission on port 587, because roaming users legitimately connect from listed dynamic ranges.
- Log every listing with its return code so false positives can be traced and allowlisted quickly.
The decision table below summarizes common policy choices.
| Situation | Recommended policy | Reason |
|---|---|---|
| Small server, low volume | Reject on one well-run list | Simple and highly effective |
| Business mail gateway | Score across three to five lists | Limits impact of a single error |
| Mail provider with many users | Licensed data feed with scoring | Volume exceeds free query limits |
| Outbound reputation monitoring | Query own IPs on major lists daily | Detects compromise early |
Limitations, risks and listing problems
The main risk is collateral damage. Lists that escalate to whole netblocks can block innocent customers of a hosting provider, and a shared outbound IP can be listed because of one compromised account. List quality varies widely, and abandoned lists have occasionally returned positive answers for every query, which blocked all incoming mail on servers that still used them.
Senders face the opposite problem. A listing usually signals a real underlying issue, such as a compromised password, an infected web application or poor list hygiene. Delisting without fixing the cause leads to quick relisting, and some lists apply longer listing periods to repeat offenders.
- Stale data: new spam sources are unlisted for minutes or hours after their first campaign.
- Privacy exposure: every query reveals to the list operator which hosts are sending mail to the querying server.
- Dependency on DNS: a slow or failing list zone adds latency to every SMTP session unless timeouts are short.
In simple terms
A DNSBL works like a shared list of known troublemakers that mail servers check at the door. When a computer tries to deliver an email, the receiving server asks the list whether that computer has a record of sending junk mail.
If the answer is yes, the server can refuse the message or treat it with suspicion. If the answer is no, the email continues to the next checks. The key idea is that one quick lookup stops a large share of spam before anyone has to read it.
A practical example
A regional accounting firm runs its own Postfix gateway and receives about 40,000 connection attempts per day, most of them from botnets. The administrator enables postscreen with weighted checks against three DNSBLs, a local caching resolver and a rejection threshold that requires two lists to agree.
Within the first week, about 80 percent of spam connections are refused before any message data is transferred, and the content filter processes far less mail. One legitimate supplier is flagged because its shared hosting IP appears on a single aggressive list; the score stays below the threshold, the mail is delivered, and the log entry lets the administrator confirm that the scoring design prevented a false rejection.