How To Use - SpamCannibal
Today's email systems are called upon to examine and classify incoming mail in ways it was never designed to do. DNSBL servers and sophisticated filter help immensely in this task by quickly identifying viruses, spam and spam sources, but there is no good way to stop this traffic from consuming bandwidth. The tactic from yesteryear of bouncing messages back to the envelope sender only makes the matter worse as ALL spam and virus mail comes with bogus headers. This practice triples or quadruples the bandwidth consumed by the spam. First the inbound transit, second the bounce to the innocent envelope domain owner, third the return bounce from the mailer daemon for the unknown envelope user and a potential fourth refusal from those site equipped with a double bounce filter. Every time a piece of spam is received, even from a known source, this process is repeated and there is no burden placed on the sender or incentive for them to stop.
Before discussing how SpamCannibal addresses this problem, let us consider the path that a message takes as it enters a well designed mail system.
The message is filtered for spam content and either marked for special delivery disposition or bounced to the envelope sender as in step 2.
While these steps do a reasonable job of reducing the unwanted mail delivered to the end user, it does nothing to reduce or eliminate the bandwidth consumed by the ever increasing load of spam and virus mail, nor does it impose any penalty on the feckles sender.
SpamCannibal provides the missing element in email system design. It provides the piece needed to reduce and eliminate unwanted spam traffic. SpamCannibal does this in a surprisingly simple way in a multi step process -- since we will reference the three steps that the MTA takes to receive mail, the SpamCannibal steps will be labeled a), b), c), etc.....
With a SpamCannibal enhanced mail system, an incoming connection to TCP/IP port 25 goes through these steps.
Let's assume for the sake of discussion that the UNKNOWN host delivered a spam load for which the MTA will complete steps 2) and 3) and provide some subsequent disposition.
The spam source has now been identified. Let us repeat the steps for SpamCannibal.
item a. (again) access control / tarpit action
The incoming host IP address is checked against a local database of banned host. The IP address is found to match an entry in the database.
All of the steps that the SpamCannibal tarpit takes are stateless. There is no forked child, suspended job, or memory storage. Each incoming connection it treated anew based only on the information in the inbound packet. What SpamCannibal accomplished is a threefold reduction in the traffic cause by spam and virus payloads because they NEVER LEAVE THE TRANSMITTING HOST. This multiplies itself in reduction in resources consumed on the local mail host since it does not have to process the payload through the MTA, interrogate DNSBL's, run filters or waste human time emptying overfilled email boxes.
The flip side of this is not so pleasant. The sending mail host has a loaded task waiting for a response from its TCP/IP stack. The TCP/IP stack has full buffers that have not been transmitted and the timeout mechanism is reset each time it attempts to send data. Every additional thread caught by SpamCannibal requires another task and additional resources on the TCP/IP stack. This could easily stall the sending process on a host that distributes UBE, UCE or virus mail to a large number of sites where SpamCannibal has been deployed.
SpamCannibal has four runtime elements.
In addition to these tools, there's also a nifty statistics display that is borrowed from the LaBrea::Tarpit perl module. It provides a realtime snapshot of the current and recent spam host activity on the mail host.
It is recommended that SpamCannibal installations utilize multi_dnsbl for there MTA's DNSBL lookups as this minimizes network traffic to the DNSBL's and optimizes the order in which they are interrogated.
The SpamCannibal site.
A standalone system incorporating an MTA, DNS daemon, web server, and SpamCannibal installation. This system runs three of SpamCannibal daemons.
In addition, the sc_lbdaemon (LaBrea) data collection daemon runs on the localhost and provides statistics for the local web server pages.
A standalone system incorporating an MTA and SpamCannibal installation. This system runs two SpamCannibal daemons.
System 2 uses System 1's DNSBL for to check its IP archive database. System 2 is the secondary mail host for System 1, but bears roughly twice as much spam traffic based on traffic analysis.
In addition, System 2 runs the sc_lbdaemon and provides remote statistics access for a web process running on another host.