UnixServerAdmin

Server Administration & Management

How to add a new RBL to Exin in cPanel

More then a year ago, cPanel added a future to the Exim Configuration Editor for everyone to easily select from two RBLs (spamhaus.org and spamcop.net) that can be used to filter most of the SPAM that a server receives. While this has been great for most of us (enabling a RBL is a simple as selecting a check box in WHM and pressing the Save button), there are a few admins that would have liked to add additional RBLs to the list that Exim uses to filter SPAM emails. RBLs like dnsbl.njabl.org, list.dsbl.org, dul.dnsbl.sorbs.net, etc. are all considered useful by many, but not included by default.

The question is how can such a RBL be added to Exim ? Well it’s not that hard !

First you will have to login to your server using ssh. After a successful login:

Change directory to /usr/local/cpanel/etc/exim/acls/ACL_RBL_BLOCK

# cd /usr/local/cpanel/etc/exim/acls/ACL_RBL_BLOCK

Make a copy of of spamcop_rbl and name it with the new rbl name that will be used. For exemple

# cp spamcop_rbl njabl_rbl

Open the newly created file

# vi njabl_rbl

Change the two “dnslists” entries to the address of the new RBL. For example the new file should look something like this for dnsbl.njabl.org

# cd /usr/local/cpanel/etc/exim/acls/ACL_RBL_BLOCK

# cat njabl_rbl

——————————————————————–
deny message = JunkMail rejected – $sender_fullhost is in an RBL, see $dnslist_text
dnslists = dnsbl.njabl.org
hosts = +backupmx_hosts

warn
dnslists = dnsbl.njabl.org
set acl_m8 = 1
set acl_m9 = “JunkMail rejected – $sender_fullhost is in an RBL, see $dnslist_text”
[% ACL_RBL_WHITELIST %]

warn
condition = ${if eq {${acl_m8}}{1}{1}{0}}
ratelimit = 0 / 1h / strict / per_conn
log_message = “Increment Connection Ratelimit – $sender_fullhost because of RBL match”

drop
condition = ${if eq {${acl_m8}}{1}{1}{0}}
message = ${acl_m9}
——————————————————————–

Save the file, Run

# /scripts/buildeximconf

That’s it you should now have the RBL added to your Exim mail server. You can off curse add as many RBLs as you like but please keep in mind that too many of them will increase the chances of false positives and can increase the general load on the server.

Advertisements

August 2, 2011 - Posted by | cPanel, Exim | , ,

1 Comment »

  1. Gabsterq…

    Wonderful blog post, saw on…

    Trackback by Skyzzq | March 23, 2012 | Reply


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: