Pieter Droogendijk has written patches for qmail and qmail-ldap to support SURBLs:
http://www.binky.org.uk/index.html?page=qmail
"One patch I've written works by extracting all HTTP URI from a mail message, and look up the minimum of the resulting domain, or IP address, on an internet blacklist, namely SURBL, which was designed specifically for this purpose."
His colleague Richard Zuidhof mentions:
On his website you can find the code. Regular patch http://www.binky.org.uk/sources/qmail/011_surbl Qmail-ldap patch http://www.binky.org.uk/sources/qmail/011_surbl_ldap Documentation http://www.binky.org.uk/sources/qmail/surbl.txt
Cheers,
Jeff C.