Description

This is a basic plugin for Web Host Manager, for checking an IPv4 address in RBL's, written whilst I was experimenting with WHM's API's and perl in general.

I am releasing it as open source under the GPL in the hope that it might be useful to someone, perl is not my first language so please feel free to point out anything which you think needs improving (which I am almost certain bits of it will!)

I intend to spend some solid time on improving this, but for now, the basic script!

The plugin uses WHM's perl modules & the YUI library provided in all cPanel installations, its display is similar to that of most WHM functions.

Screenshots

Screenshot 1 | Screenshot 2

License

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/

Installation Instructions

For those of you who'd like to look at the code first: Direct Download of the Package

As root on your cPanel server, run the following commands to install the plugin.

 cd /usr/local/src

Download the package

wget http://www.nickpack.com/media/downloads/RBLChecker.tar

Extract the package

tar -xvf RBLChecker.tar

Change into the source directory

cd RBLChecker

Run the installer script

sh install.sh

Change out of the source directory

cd ..

Remove the source directory and downloaded package

rm -rfv /usr/local/src/RBL*

The plugin should now be installed, all the install stuff removed and the plugin now accessible through the plugins panel in WHM (If you cant see it, refresh the page in your browser)

Security

The plugin presently will only run as root from WHM, I dont have resellers and therefore had no need to make this available to them.

The script uses the cPanel::SafeFile perl module for file opening.

The code is freely readable, so feel free to check it over before you run it.

Dependencies

The script has 3 dependencies (the last two are installed by the install.sh script)

1. cPanel/WHM (Obviously)

2. Mail::RBL

3. RegExp::Common

Configuration

Adding and removing RBL's from the check

In /etc/nrbl you will see a file called rblists.conf, this is where the script gets its lists to check from, feel free to add your own to this file, they are checked in the order they appear in this file.

The script expects RBLs in the following format - 1 per line:

 Blacklist Name:uri.oflist.com 

Presently this file has no support for comments, this is something I plan to add.

Support

Please feel free to contact me if you need help, although most shouldnt need it due to the simplicity of the script.

Known Bugs

Trivial Display Bug - Due to a change in WHM::UI, header logo isnt presently rendering - awaiting fix from cPanel (Other third party scripts such as csf experiencing same bug)

Change Log

1b

Following an update to the cPanel internal YUI library, switch to use this instead of calling the API's directly from Yahoo - this prevents security warnings under SSL

Added YUI Container to indicate check is running (upcp style dialog)

1a

Added basic WHM branding via WHM::UI