NAME
sastatd - SpamAssassin statistics collecting server
SYNOPSIS
sastatd [ options ] spamd-log-file
DESCRIPTION
This script (running as a daemon) permanent watching for SpamAssassin spamd log file and increment internal counters for any spam and clean message. Log rotating events detected automatically, no special actions required. Accumulated statistics flushed to persistent file based storage periodically. Statistics dump is available via simple TCP based protocol.
PROTOCOL
Communication protocol is line oriented (like HTTP or SMTP). Any command followed by a new line character.
Available commands (case independent): brief - print out only counters and rate for clean/spam/total messages stats - print out statistics in easily parseable format reset - clear all accumulated statistics dump - print out statistics and clear it immediately quit - force close connection
CLIENT EXAMPLE
echo brief | nc 127.0.0.1 4321 | awk -F: '/^clean/ { print $2 }'
OPTIONS
-b, --heartbeat=SECONDS Heartbeat period for saving statistics in a permanent storage
Default values is 10 seconds.
-g, --debug Running in debug mode:
- no detach (run in foreground)
- no set user (run with permissions of current user)
- logging information as much as possible to stderr
-d, --database=FILE Path to database file keeping statistics (created automatically).
Default setting is 'sastatd.db' file in current directory.
-h, --help Show short help message about options format.
-l, --listen=[ADDR:]PORT Address with port or just port (* supposed for address)
for listen socket binding.
-p, --pid-file=FILE Path to file with process id (guarantee only one daemon running).
-u, --user=LOGIN Account name for changing process privileges to.
AUTHOR
Oleg A. Mamontov (oleg@mamontov.net)
COPYRIGHT
Copyright (C) 2010 Oleg A. Mamontov. All rights reserved.
This script is free software; you can redistribute it and/or modify it under the same terms as Perl itself.