What's mod_spamhaus
===================

mod_spamhaus is an Apache module that use DNSBL in order to block spam relay via web forms, preventing URL injection, block http DDoS attacks from bots and generally protecting your web service denying access to a known bad IP address. It take advantage of the Spamhaus Block List (SBL) and the Exploits Block List (XBL) querying xbl-sbl.spamhaus.org Spamhaus's DNSBLs are offered as a free public service for low-volume non-commercial use. To check if you qualify for free use, please see: Spamhaus DNSBL usage criteria (http://www.spamhaus.org/organization/dnsblusage.html)


INSTALLATION
============

Prerequisites

* Apache 2.X - http://www.apache.org/
Other versions may work but have not been tested


Building

If you have got the apxs2 (APache eXtenSion tool) tool installed, write the following commands
to build module:

$ tar zxvf mod_spamhaus.tar.gz
$ cd mod-spamhaus
$ make
# make install



CONFIGURATION
=============

First, you must add following command to the main config file of you're web server to load 
mod_spamhaus module:

LoadModule spamhaus_module   /usr/lib/apache2/modules/mod_spamhaus.so

(The path to mod_spamhaus.so depends on your apache installation)



Module's directive
================== 

MS_Methods - The values admitted are the httpd's methods (GET,POST,etc)
             Module verify remote ip address if the method used by the user is present
	     in the value passed to this variable. Methods must be comma-separated
	     Default Value: POST,PUT,OPTIONS

MS_WhiteList - Path of whitelist file (default: no value).
	       After you've edit it, you mustn't reload apache. This file will be read only
	       when 'data modification time' change.

MS_DNS - Name server to use for verify is an ip is blacklisted. Default value is sbl-xbl.spamhaus.org.
	 Using a local rbldnsd instance of sbl-xbl, you can increase query performance


MS_CacheSize - This directive can manage the number of cache entries. (Default: 512 Max value: 8192)

Example:
-------

<IfModule mod_spamhaus.c>

MS_METHODS POST,PUT,OPTIONS,CONNECT 

MS_WhiteList /etc/spamhaus.wl

#MS_Dns local.rbldnsd.instance.of.sbl-xbl

MS_CacheSize 256

</IfModule>
