Révision 2aea630c
minor update to orignal plugin: added some info fields for undocumented data
| plugins/other/dspam_activity | ||
|---|---|---|
| 13 | 13 |
|
| 14 | 14 |
=head1 CONFIGURATION |
| 15 | 15 |
|
| 16 |
The plugin uses the contents of the SystemLog produced by DSPAM. |
|
| 16 |
The plugin uses the contents of the SystemLog or UserLog produced by DSPAM.
|
|
| 17 | 17 |
|
| 18 | 18 |
The following environment variables are used by this plugin: |
| 19 | 19 |
|
| ... | ... | |
| 57 | 57 |
|
| 58 | 58 |
=head1 AUTHOR |
| 59 | 59 |
|
| 60 |
Copyright 2010 Tom Hendrikx <tom@whyscream.net> |
|
| 60 |
Copyright 2010-2011 Tom Hendrikx <tom@whyscream.net>
|
|
| 61 | 61 |
|
| 62 | 62 |
=head1 LICENSE |
| 63 | 63 |
|
| ... | ... | |
| 85 | 85 |
|
| 86 | 86 |
=head1 VERSION |
| 87 | 87 |
|
| 88 |
$Id: dspam_activity 84 2010-10-08 21:23:23Z tomhendr $
|
|
| 88 |
$Id: dspam_activity 139 2011-08-04 20:03:22Z tomhendr $
|
|
| 89 | 89 |
|
| 90 | 90 |
=head1 MAGIC MARKERS |
| 91 | 91 |
|
| ... | ... | |
| 101 | 101 |
# include munin plugin helper |
| 102 | 102 |
. $MUNIN_LIBDIR/plugins/plugin.sh |
| 103 | 103 |
|
| 104 |
#######################################
|
|
| 105 |
# Some generic file locking functions #
|
|
| 106 |
#######################################
|
|
| 104 |
########################## |
|
| 105 |
# Some generic functions # |
|
| 106 |
########################## |
|
| 107 | 107 |
|
| 108 | 108 |
# |
| 109 | 109 |
# debug $message |
| ... | ... | |
| 133 | 133 |
S) short=Spam long="Messages received and classified as spam" ;; |
| 134 | 134 |
W) short=Auto-whitelisted long="Messages received and auto-whitelisted" ;; |
| 135 | 135 |
V) short=Virus long="Messages received and classified as virus by Clamav" ;; |
| 136 |
O) short=Blocklisted ;; |
|
| 137 |
A) short="Blacklisted (RBL)" ;; |
|
| 136 |
O) short=Blocklisted long="Messages received but not classified because the sender domain is on to the user blocklist" ;;
|
|
| 137 |
A) short="Blacklisted (RBL)" long="Message received and classified as spam because the sender ip is listed on the RBL" ;;
|
|
| 138 | 138 |
M) short="Retrained as spam" long="Messages classified as innocent, but retrained by user as spam" ;; |
| 139 | 139 |
F) short="Retrained as innocent" long="Messages classified as spam, but retrained by the user as innocent" ;; |
| 140 | 140 |
N) short=Inoculation long="Messages trained as spam trough inoculation" ;; |
| ... | ... | |
| 212 | 212 |
local old_IFS=$IFS |
| 213 | 213 |
IFS=" " # tab-separator in $logfile |
| 214 | 214 |
while read ts activity from signature subject x recipient info msgid; do |
| 215 |
if [ $ts -gt $old_ts ]; then |
|
| 215 |
if ! [ $ts -gt 0 2> /dev/null ]; then |
|
| 216 |
debug skipped entry with non-numeric timestamp: $ts |
|
| 217 |
elif [ $ts -gt $old_ts ]; then |
|
| 216 | 218 |
debug processing entry with timestamp $ts, activity=$activity, subject=$subject, msgid=$msgid |
| 217 | 219 |
case $activity in |
| 218 | 220 |
I) aI=$((aI + 1)) ;; |
| ... | ... | |
| 254 | 256 |
fi |
| 255 | 257 |
else |
| 256 | 258 |
debug could not read timestamp from statefile |
| 257 |
exit 75 # EX_TEMPFAIL
|
|
| 259 |
# no exit here, we need the next operation to write a timestamp in the statefile
|
|
| 258 | 260 |
fi |
| 259 | 261 |
|
| 260 | 262 |
# update statefile with current timestamp |
| ... | ... | |
| 271 | 273 |
##################### |
| 272 | 274 |
|
| 273 | 275 |
# show env settings |
| 274 |
debug dspam_throughput plugin started, pid=$$
|
|
| 276 |
debug dspam_activity plugin started, pid=$$
|
|
| 275 | 277 |
debug settings: |
| 276 | 278 |
debug - logfile is set to: $logfile |
| 277 | 279 |
debug - statefile is set to: $statefile |
Formats disponibles : Unified diff