The dnsblenv module

This module looks up the client address in any number of DNS Black Lists. If a list matches, the module sets the BLACKLISTED environment variable and the run its arguments.

It is meant that greylite is run after dnsblenv, and that a suspicion rule of type 'e' is added to greylite, that requires N attempts when the BLACKLISTED variable is found.

Technicalities

The list of DNS BLs is specified in turn in another environment variable DNSBL. The module looks up this variable when started. If not found, it run its arguments. Otherwise, it is expected to contain a list of space-separated lists (for example DNSBL="zen.spamhaus.org dnsbl.sorbs.net").

Each list is polled with a sequencial/parallel way: a delay is put between each list poll. If one list does not respond during that delay, the next request is attempted while still accepting responses for the previous one etc.

This looks the best compromise between a pure parallel (lots of useless traffic, but responsive) and a pure sequential (no useless traffic, but latent responses) system.