Spamtrak - Operations for the Spamtrak system.
use Spamtrak;
constructor $spt = new Spamtrak [$hostaddr];
methods $spt->lookup($hostaddr); $spt->update($ndays);
properties $spt->host_addr; $spt->host_addr_count; $spt->host_addr_score; $spt->net_addr; $spt->net_addr_count; $spt->net_addr_score; $spt->summary;
This manual page documents the functional interface to the Spamtrak system. This interface may be used to lookup information in the Spamtrak database and update the database with information on newly received spam.
$spt = new Spamtrak [$hostaddr];
Creates an object in the Spamtrak class. If a $hostaddr is specified, it will be looked up in the database and used to initialize the object properties. Otherwise, the properties will remain undefined until a lookup is performed.
$spt->lookup($hostaddr);
The database is queried with the indicated $hostaddr, and the resulting information is retrieved. The properties listed below are then used to examine this information.
$spt->update($ndays);
This indicates that a spam message was received $ndays ago from the $hostaddr associated with this object. The database values for this $hostaddr (and object properties) are updated.
Set $ndays to ``0'' to record a spam being received now. A negative value ``unreceives'' a message--it reduces the statistics for the target. Use negative zero (``-0'') to back out a message received now.
$spt->host_addr; # The host address (a.b.c.d)
$spt->host_addr_count; # Spam mssgs from this host.
$spt->host_addr_score; # Spam score for this host.
$spt->net_addr; # The network address (a.b.c)
$spt->net_addr_count; # Spam mssgs from this net.
$spt->net_addr_score; # Spam score for this net.
$spt->summary; # Printable summary.
These properties return information on the Spamtrak entry found in the database. The count and score values will be zero if there are no data on the corresonding host or net.
The summary property is a text string such as:
host 64.86.155.141 count 3 score 2.90, net 64.86.155 count 30 score 18.29
When the Spamtrak module is loaded, the following global variables are created :
The Spamtrak system uses the spamtrak-wrapper script to initialize the required environment settings. See the spamtrak(1) manual page for more information.
None yet.
spamtrak-dbop(1), spamtrak-mssg(1), spamtrak-query(1) spamtrak(1), Spamtrak_DB(3)
Chip Rosenthal Unicom Systems Development <chip@unicom.com>
$Id: Spamtrak.pm,v 1.2 2002/07/29 03:14:21 chip Exp $