spamtrak-mssg - Email processor for the Spamtrak spam tracking system.
spamtrak-mssg [-iftu] [-a peer_address] [-T ndays] < email-message
The spamtrak-mssg program is email handler for the Spamtrak system. By default it reads a spam (email) message from standard input, identifies the IP address of the host that passed this spam to the local network, updates statistics for that source, and produces a summary.
Here is a sample summary, as produced by spamtrak-mssg:
host 64.86.155.141 count 3 score 2.90, net 64.86.155 count 30 score 18.29
The count is the total number of messages associated with that source. The score approximately represents the amount of spam received from that source over the past 90 days.
The following options modify this behavior:
If you have a collection of spam (in mailbox format) that you would like to use to initialize the database, you can run:
formail -s spamtrak-mssg -t </path/to/spam/folder
If you are running spamassassin(1) under procmail(1), you can process the identified spam messages with this .procmailrc recipe:
:0
* ^X-Spam-Flag: YES
{
# run through spamtrak
:0 fw
| /usr/local/bin/spamtrak-mssg -f
# save to the spam folder
:0:
spam-folder
}
spamtrak-mssg is typically invoked by the spamtrak-wrapper. It is important that its ``SPAMTRAK_LOCAL_ADDRS'' be set correctly, or else spamtrak-mssg may identify hosts on your network as spam sources.
If you hand spamtrak-mssg an email that was generated on your network, it will complain that it cannot find a peer address. That's because after removing the addresses on your network, there isn't anything left.
When spamtrak-mssg is used in filter mode -f it is important to check for a zero exit status. If the exit status is non-zero, then the calling program should ignore any output and recover the original message. In procmail(1), this is done by including the ``w'' flag in the recipe.
spamtrak(1), spamtrak-dbop(1), spamtrak-query(1) spamassassin(1), procmail(1)
Chip Rosenthal Unicom Systems Development <chip@unicom.com>
$Id: spamtrak-mssg.pl,v 1.2 2002/07/29 03:14:55 chip Exp $