qmail-rblchk filters incoming emails and verifies if they are from IPs listed in RBL.
If you are using FreeBSD, qmail-rblchk can be easily installed using his port. Simply use the command: cd /usr/ports/mail/qmail-rblchk make install clean. Upon installation, use the command |qmail-rblchk [options] [/dir/].
Qmail-rblchk is primarily used in .qmail to check the IP address from the Received: from lines. It functions similarly to rblsmtpd, but the messages are checked at local delivery time. With this feature, you can check the content of the message and redirect it to another mailbox or address. Additionally, if a directory is given with dir all spam messages are delivered to that directory if it exists and is in Maildir format. Directory name must start with a / or . (dot) and end with a /.
The software offers a variety of general options, including -h (show a short program description), -s (add "X-Spam" header into the incoming mail), -i NUM (ignore first NUM IPs found in the header), -x IP (do not check IP, try to find other address in header), -m (check all IPs that find in mail header), -v (debug mode, make output more verbose), -p (don't check private IP classes), -q (quiet mode), -l LOG (redirect to file LOG program messages), -L DATA (write blocked IP address to file DATA), and -c (turn on the condredirect compatibility mode for exit code).
The software also offers a variety of control options, including -r addr (request if a TXT record exists into addr), -R addr (request if a TXT record does not exist into addr), -a addr (request if an A record does not exist into addr), -A addr (request if an A record exists into addr), -C addr (request if an A or TXT record exist into addr, if true the mail is not SPAM and the program exit), and -X cdb (check if the sender IP is listed in cdb file).
It's possible to use up to 32 control options to specify more RBL servers; those are checked until the first of them answers true and the mail will be tagged as a "spam" (unless you use -C option). If a mail comes from a.b.c.d IP, the request that the program sends to the DNS server is: d.c.b.a.addr where addr is the parameter that come after -r, -R, -a or -A options.
Finally, the latest release of qmail-rblchk adds several new features, including CDB RBL checking, a better IP search method, better logging, and more. Overall, qmail-rblchk is a highly useful software that provides advanced filtering capabilities to help you efficiently manage incoming mail.
Version 2.4.1: N/A