How to add the Barracuda RBL with the SMX plugin

The DNS-ONLY version of cPanel lacks many of the features that come with the full version of cPanel. One of them you may want is the ability to enable RBL's to help combat the SMX system from receiving SPAM. Even though the exim editor is not available you can still add and use RBL's. This example will show you how to add the barracuda RBL

Create /var/cpanel/rbl_info/barracuda.yaml and add the following

<code console>

dnslists:

  1. b.barracudacentral.org

name: BARRACUDA url: http://barracudacentral.org/lookups </code>

Create /usr/local/cpanel/etc/exim/acls/ACLRBLBLOCK/barracuda_rbl

 deny message = JunkMail rejected - $sender_fullhost is in an RBL, see $dnslist_text
     hosts = +backupmx_hosts
     dnslists = b.barracudacentral.org
 
 warn
     [% ACL_RBL_WHITELIST %]
     dnslists = b.barracudacentral.org
     set acl_m8 = 1
     set acl_m9 = "JunkMail rejected - $sender_fullhost is in an RBL, see $dnslist_text"
 
 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}

Edit /etc/exim.conf.localopts and add the following

acl_barracuda_rbl=1

Now you need to rebuild your exim.conf, to do this you need to run /scripts/buildeximconf

Finally, restart exim by running /scripts/restartsrv_exim