SpamInferno is Web-based spam filtering software that protects users by using rules based on the email address of the sender or the recipient. It keeps all messages from unknown senders in a special queue and sends the sender a message requesting registration. When the sender registers, the message is delivered to the user. If the sender doesn’t register by a specified time, the message is deleted.
Before installing SpamInferno you would need to have the following
*The Perl DBI Module
*The Perl Net-DNS Module
*The Perl MailTools Modules
*The Perl Mail-Sendmail Module with removing localhost from the list of
SMTP servers from the Sendmail.pm file.
*The Perl AppConfig Modules
*mod_php with mysql, gd, and png support
*sendmail or a sendmail wrapper
bin/spaminferno This is the main spaminferno program that
filters the messages piped from procmail.
bin/spaminferno-cat This allows apache using sudo to view the
messages that are in the queue.
bin/spaminferno-clean This runs from the cron for cleaning up old
queue messages, web login sessions, and
SpamInferno’s reply messages track.
bin/spaminferno-dequeue This dequeues accepted or registered messages
from the queue for delivery.
bin/spaminferno-rm This allows apache using sudo to delete messages
that are in the queue.
doc/AUTHORS List of the authors of SpamInferno.
doc/COPYING SpamInferno’s license.
doc/ChangeLog SpamInferno’s log of changes.
doc/README This file.
etc/spaminferno.conf SpamInferno’s configuration file.
htdocs/account.php User’s web account page.
htdocs/common.php Common php functions.
htdocs/image.php Web PNG image generation page.
htdocs/index.php Main web page including the registration and
htdocs/variables.php Common php variables.
sql/adduser.sql SQL file for adding new users.
sql/spaminferno.sql SpamInferno’s main database creation SQL file.
INSTALLATION AND SYSTEM CONFIGURATIONS:
To install SpamInferno do the following:
1. Extract the tar.gz file and move what’s in it to your permanent
2. Edit all the programs in bin and change the conffile variable to
point to the location of your SpamInferno’s configuration file.
3. Edit spaminferno.conf and change the configurations as follows:
DBHOST to point to your mysql database hostname.
DBNAME your mysql database name.
DBUSER your mysql username.
DBPASSWORD your mysql user’s password.
FROMADDRESS default from address for the reply messages if
the user didn’t set one.
CUSTOMMSG default custom reply message if the user didn’t
set one with keeping in mind that the link will
be appended to the message at the end.
BASEURL the base URL of the web files of SpamInferno.
SENDMAIL the sendmail binary or wrapper.
SPAMINFERNORM the location of sudo along with the location of
SPAMINFERNOCAT the location of sudo along with the location of
LOGO the web based location of your logo for the main
index and registration page.
BANNER the web based location of your banner for the
account and registration page.
4. Edit variables.php and change the location of your SpamInferno’s
5. Create the mysql database using spaminferno.sql.
6. Configure sudo by placing the following in the sudoers file and
changing apache to the user running apache and the paths of
spaminferno-cat and spaminferno-rm:
apache ALL=(ALL) NOPASSWD:/home/www/spaminferno.com/bin/spaminferno-cat
apache ALL=(ALL) NOPASSWD:/home/www/spaminferno.com/bin/spaminferno-rm
USAGE AND USER CONFIGURATION:
Adding a user in the system has to be done manually for now and to do so
do the following:
1. Create a directory in the user’s home directory for queue messages.
2. Create a .procmailrc file in the user’s home directory containing:
# Directory of the place you want to stop the accepted messages
# SpamInferno main program location
:0 fW: spaminferno.lock
# Accepted messages mailbox name
3. If you are using qmail create a .qmail file in the user’s home
directory containing “|preline procmail”. If you are using sendmail
create a .forward file containing “|procmail”. Not sure about others.
4. Edit adduser.sql and change the username, password, and queue
5. Use the modified adduser.sql file and create the user’s account using
6. Point your web browser to your BASEURL of SpamInferno and login to
the user’s account to change the preferences as follows:
*Check “Send to MX backups” to send reply messages to the MX
backups of the sender incase the main server is down.
*Check “Accept Mailer-Daemon and Postmaster Mails” to accept
all messages coming from mailer-daemon or postmaster.
*Change “Send from” to the FROM header wanted in SpamInfero’s
*Change “Idle session timeout” to the web login session timeout
wanted for the user.
*Change “Time frame to not notify the same sender” to the time
period to not send the sender another reply message incase he
sent another email within that period.
*Change “Message cleanup” to the number of days to keep the
queued messages before deleting them.
*Change “Entries displayed per page” to the number of entries
displayed per page in the web interface.
*Change “Custom message” to the custom message of the reply sent
*Create a web interface for managing SpamInferno’s user accounts.
If you have any suggestions, comments, bugs or fixes just send them to me!