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.
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_clientin the restrictions, orpostscreen_dnsbl_siteswith weights. - Rspamd: the
rblmodule 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 pagesVerified 9 Nov