RBL checks work by performing a DNS query to a certain RBL hostname for a particular domain. If a record is returned for that domain from the RBL hostname queried, then the domain is listed on that particular 'real-time blacklist'.
Thus, in order to add our own RBLs to the DirectAdmin Exim configuration, we just need to ensure RBL blocking is enabled and add our RBL's hostname to the list of RBLs used for blocking.
First, check to see if RBL blocking is already enabled. If the following symlink exists, then it is enabled:
/etc/virtual/use_rbl_domains -> domains
To check, use the following command as root via SSH:
ls -lah /etc/virtual/use_rbl_domains
If it is not enabled already, run the following as the root user via SSH to enable:
cd /etc/virtual rm -f use_rbl_domains ln -s domains use_rbl_domains
The default RBL list is defined within a macro in the /etc/exim.conf like so:
RBL_DNS_LIST=\ cbl.abuseat.org : \ bl.spamcop.net : \ b.barracudacentral.org : \ zen.spamhaus.org
This variable can be redefined by setting the variable again using '==' instead of '='.
To add a custom RBL to the list, you need to create the file /etc/exim.strings.conf.custom file and add/edit the variable there.
So, let's say you wanted to add dnsbl.sorbs.net and combined.rbl.msrbl.net to this list. You would create the
/etc/exim.strings.conf.custom
file and add the edited list like so:
RBL_DNS_LIST==\ cbl.abuseat.org : \ bl.spamcop.net : \ b.barracudacentral.org : \ zen.spamhaus.org : \ dnsbl.sorbs.net : \ combined.rbl.msrbl.net
Next, restart exim:
service exim restart
That's all that is needed to enable a custom RBL list with DirectAdmin! :)
If you decide to later disable RBL blocking, it can be done like so:
cd /etc/virtual rm -f use_rbl_domains touch use_rbl_domains
If you later decide that you'd like to revert back to the default RBL list, simply remove the /etc/exim.strings.conf.custom file and restart Exim.
rm /etc/exim.strings.conf.custom service exim restart