How to enable RBL(real-time blacklists) in Exim

Real-time blacklists (or real-time blocklists or real-time blackhole lists) are lists of malicious/spammer IPs. These lists are maintained by organizations like The Spamhaus Project . The EXIM server will check the sender of emails against the selected lists. If the IP is on a list, the message will be discarded.

To enable BRL feature in DirectAdmin:

1. Log into your admin account

2. Navigate to Server Manager >> Administrator Settings

3. On the E-mail Settings tab, enable the Use RBL Blocking option. The feature is now enabled and future emails will be filtered.

rbl exim directadmin
Enable RBL Blocking

The RBL list is set in /etc/exim.conf The default list is:

RBL_DNS_LIST=\
       cbl.abuseat.org : \
       b.barracudacentral.org : \
       zen.spamhaus.org

Here you can consult a list of RBLs https://en.wikipedia.org/wiki/Comparison_of_DNS_blacklists

If you want to modify the DA default list – add or remove RBL servers – do not edit the exim.conf file, as it can be overwritten by DirectAdmin. Instead, list the desired RBLs in /etc/exim.strings.conf.custom . Create the file if not already present. For example, we want to add the bl.spamcop.net server to the list:

RBL_DNS_LIST==cbl.abuseat.org : b.barracudacentral.org : zen.spamhaus.org : bl.spamcop.net

Do not forget to restart exim service after each modification.

service exim restart

The rejected messages will be logged in /var/log/exim/mainlog

grep "Email blocked" /var/log/exim/mainlog

Example:

2022-02-02 01:38:03 H=tg02-167.m.ldsfdsf.com [xx.xx.xx.xx] F=<aaaa@m.aaaaaa.com> rejected RCPT <email@domain.com>: Email blocked by b.barracudacentral.org

Links:
Exim Internet Mailer
DA RBL

Leave a Reply