rami.info



spaminferno

Posted in AtWherever by Rami on the February 20th, 2005

OVERVIEW:
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.

DEPENDINCIES:
Before installing SpamInferno you would need to have the following
packages installed:
*Perl
*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
*apache
*mod_php with mysql, gd, and png support
*sudo
*mysql
*sendmail or a sendmail wrapper
*procmailo
*cron

FILES:
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
user’s login.

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
location.
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
spaminferno-rm.
SPAMINFERNOCAT the location of sudo along with the location of
spaminferno-cat.
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
configuration file.
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
MAILDIR=/var/mail
# SpamInferno main program location
:0 fW: spaminferno.lock
| /home/www/spaminferno.org/bin/spaminferno
# Accepted messages mailbox name
:0:
username
—————————————————————
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
directory path.
5. Use the modified adduser.sql file and create the user’s account using
mysql.
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
reply messages.
*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
by SpamInferno.

TODO:
*Create a web interface for managing SpamInferno’s user accounts.

If you have any suggestions, comments, bugs or fixes just send them to me!

Rami AlZaid

Check out the ChangeLog Here
Download the latest version, v0.1 Here

One Response to 'spaminferno'

Subscribe to comments with RSS or TrackBack to 'spaminferno'.


  1. on November 8th, 2005 at 1:41 pm

    [...] I have been running on SpamInferno for the past two years for blocking the 200-300 spam messages I receive a day. I made SpamInferno when I liked the idea of not having a single spam in my mailbox. Lately though I don’t mind a couple as long as people don’t need to authenticate themselves to send me emails nor I need to accept emails manually from companies. Today I finally stopped using SpamInferno and switched to Symantec Brightmail which does exactly what I want. I only have about 5 active users on my machine so it won’t be that expensive for me to get the $28/mailbox/year license but the only bad thing is that it has a minimum of 10 licenses to get. On the other hand, a really good thing about it now is that my MX points to one of my machines at home that does the filtering and inturn saves me bandwidth on my server in the US. Once the 30 day trial is over I’m probably getting the 10 licenses to free myself from SPAM! [...]

Leave a Reply