Bookmarks

DNSBL — DNS-based blocklist

DNS-based Blackhole List

A list of addresses with a bad reputation, served over DNS: a mail server checks the sender’s IP with an ordinary DNS query.

Also: DNSBL, DNS blacklist, DNS blocklist, RBL, real-time blackhole list

checked 9 Nov

All terms

A mail server does not keep its own list of spammers: it asks an external service about the connecting client. Both the question and the answer travel over DNS, so a check takes one fast query and works in any mail server.

How the query is made

The query is built from the IP address with its octets reversed, followed by the list’s zone name. For client 192.0.2.99 and zone bad.example.com, the server asks for the A record of 99.2.0.192.bad.example.com. If the address is listed, a record exists, usually with the value 127.0.0.2; if not, the answer is NXDOMAIN. A TXT record, if present, explains the reason.

bashAddress 192.0.2.99 is listed
dig +short 99.2.0.192.bad.example.com A127.0.0.2dig +short 99.2.0.192.bad.example.com TXT"Dynamic address"

Some lists return different values in the A record, letting the server react differently to different reasons. For IPv6, the name is built from the 32 hexadecimal digits in reverse order.

How it is used

  • Postfix: reject_rbl_client in the restrictions, or postscreen_dnsbl_sites with weights.
  • Rspamd: the rbl module adds a weight to the message score for each list.
  • To be removed from a list, owners apply to the service itself, after fixing the cause.

To make a list testable, RFC 5782 requires every IPv4 list to have a record for 127.0.0.2 and none for 127.0.0.1.

Sources

the term is written from these pages

Verified 9 Nov

Not to be confused with

what it is mixed up with and how it differs

  • greylisting

    Greylisting temporarily rejects any unfamiliar sender, whereas a DNSBL rejects on the known reputation of an address.

  • SPFSender Policy Framework

    SPF checks whether an IP is allowed to send mail for a domain; a DNSBL assesses the reputation of the IP itself.

In depth in the references

where the topic is covered in detail