
			      SpamWall
	      Spam checks in, but it doesn't check out!
----------------------------------------------------------------------

SpamWall is a framework for building SPAM filters.  It is a filtering
proxy daemon that sits between your site's SMTP mail daemon and the
outside world.  It watches incoming mail, running the headers through
a filtering object.  If the mail `looks like SPAM' then the message
will be rejected and logged, without actually feeding the message to
your SMTP server.

Advantages to this approach:

1) Low overhead - SpamWall is designed around the same asynchronous
   I/O library as Medusa - it does not fork or use multiple threads.

2) Almost no changes to your existing mailer setup.  At most, you will
   need to move your SMTP daemon to a different port.  SpamWall should
   therefore work with almost any SMTP daemon, on any operating
   system.  Your real SMTP server can even be on a different machine.

3) It's persistent - SpamWall keeps running statistics, and 'adds' a
   couple of simple commands to the SMTP interface for looking at SPAM
   statistics and reloading filter objects.

----------------------------------------------------------------------
Everyone has a different approach to filtering Spam.  Some folks like
to filter by regexps on the headers.  Others like to keep databases of
offenders.  SpamWall can do both, and then some.  Since SpamWall is
written in Python, developing new types of filters is a snap.  If you
come up with an effective new filter, send it back to me and I'll
include it in the release!

SpamWall is free, do whatever you like with it.  It comes with NO
WARRANTY of any kind.  If you find it useful, drop me a note saying
so!

----------------------------------------------------------------------
Usage:

First you need to move your current SMTP daemon to a different port,
and if you can, restrict access to it to the local machine by binding
it to the loopback address on your machine (127.0.0.1).  This will
keep other machines from connecting directly to it.

On my machine, I move sendmail over to port 8025 instead of 25.  This
can be done with the sendmail option 'OO':

# SMTP daemon options
OOPort=8025

After you do this, shut your original daemon down, restart it on the
new port, and then run spamwall:

root:$ python spamwall.py

On Unix, you'll have to do this as `root', because port 25 is a
privileged port.  It's a good idea to have spamwall become a 'nobody'
user once it has started up:  The following line will usually do the
trick:

  os.setuid (UID_OF_NOBODY)

Look at the function 'run' in 'spamwall.py' for an example of how to
do this on unix.

----------------------------------------------------------------------


For more information about Python:

   http://www.python.org/

Medusa/async sockets library:

  http://www.nightmare.com/medusa/

-Sam
rushing@nightmare.com
http://www.nightmare.com/~rushing
