Mailcleaner – adding RBLs

One of the first things I wanted to do with Mailcleaner was improve the selection of RBLs.  I had noticed that a lot of spam was still getting through, but would have been stopped if a few of the RBLs listed at The Anti-Abuse Project’s Multi-RBL Check were being used on my Mailcleaner instance.  I parsed the list, and turned it into script for creating the appropriate database entries and RBL config files.  I quickly noticed that three of the entries I had created were not showing up in the web interface.  A little googling and I found that I wasn’t the only one with this problem, and that other people with this problem had unanswered threads in the official forums.

If you are here because you had problems adding, or to your Mailcleaner system, you came to the right place.  I have the solution for you.  There is a constraint in the parsing for RBL entries that expects the name to be alpha only.  So, when you did what I did, and included the list number in the name (ie UCEPROTECT2), you created a name that the code skimmed right past.  The simple solution was to replace the numerics with alpha equivalents.  (ie 1=A, 2=B, etc)  Having done that, I’ve now got these particular RBLs helping to hold back the tide of unwanted email.

Here are a set of shell commands that will create the correct DB entries and RBL config files.  I’m sorry the text wraps so horribly in the blog.  If you copy and paste it you’ll find that it pasts out correctly.

Insert the DB entries:

cat <<END  | /usr/mailcleaner/bin/mc_mysql -m
use mc_config;
insert into dnslist values ("UCEPROTECTA", '', 'blacklist', 1, '<a target="_blank" href=""></a>' );
insert into dnslist values ("UCEPROTECTB", '', 'blacklist', 1, '<a target="_blank" href=""></a>' );
insert into dnslist values ("UCEPROTECTC", '', 'blacklist', 1, '<a target="_blank" href=""></a>' );

Create the RBL config files:

cat <<END > /usr/mailcleaner/etc/rbls/
sublist=127.0.0.d+,UCEPROTECTA, list

cat <<END > /usr/mailcleaner/etc/rbls/
sublist=127.0.0.d+,UCEPROTECTB, list

cat <<END > /usr/mailcleaner/etc/rbls/
sublist=127.0.0.d+,UCEPROTECTC, list

Restart Mailcleaner:

/usr/mailcleaner/etc/init.d/mailscanner restart

If you have any problems, please post your questions here.  I can’t seem to reach any of the official forum administrators to ask why my forum account is still pending approval.  🙁


One Reply to “Mailcleaner – adding RBLs”

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.