SA Bugzilla – Bug 2821
SA score graph tool
Last modified: 2019-07-30 16:32:29 UTC
This is a little perl script which will scan a specified log file for "identified spam" or "clean message" lines. It rounds off the score, tallies the results, and prints a graph of scores and occurances. The graph is scaled to a defalut width of 72. I wrote this because I hoped to find a local minimum at a score between the peak spam value and the peak nonspam value. I use this as my required_hits. A portion of a graph follows, portions trimmed for brevety: ~/bin/sa_score_graph.pl /var/log/syslog | more SpamAssassin score summary: Minimum score: -112 Maximum score: 52 Minimum count: 0 Maximum count: 736 Scaling to: 0.0978260869565217 -112 :* -111 :* -110 : -109 : -108 :* -107 : -106 :* -105 : -104 :********************************* -103 :* -102 :* -101 :* -100 :* -99 :* -98 :* -97 :* -96 :* -95 :* -94 :* -93 :* -92 :* -91 : -90 :* -89 :* -88 :* -87 : -86 :* -85 : -84 : (Snipped) -13 :* -12 :* -11 : -10 : -9 :* -8 :* -7 :* -6 :* -5 :* -4 :************************************************************************ -3 :*************** -2 :*********** -1 :******** 0 :************ 1 :********** 2 :************ 3 :********** 4 :********* 5 :*********** 6 :******* 7 :******** 8 :***** 9 :******* 10 :***** 11 :****** 12 :******** 13 :************ 14 :*************** 15 :*********** 16 :********** 17 :************* 18 :*********** 19 :******** 20 :********* 21 :******** 22 :***** 23 :********** 24 :********* 25 :**** 26 :****** 27 :*** 28 :**** 29 :***** 30 :*** 31 :* 32 :** 33 :* 34 :* 35 :* 36 :* 37 :* 38 :* 39 :* 40 :* 41 :* 42 :
Created attachment 1615 [details] Print a graph of SA scores The script itself.
could be put into contrib, although I'm feeling more like the contrib/* stuff ought to be dropped from ASF releases. but either way: Rich, have you sent in a CLA? I don't have you on my (now out of date) list. We'd need one before we could accept the code.
Yea, I sent in a CLA in mid-January (my copy was signed on the 16th, so right on or after then). Must still be working its way through.
GraphDefang does this too, but it has lot's of req's to install ;) http://www.bl.org/~jpk/graphdefang/current/event/spamd/general http://www.bl.org/~jpk/graphdefang/
move bug to Future milestone (previously set to Future -- I hope)
wow, this got lost. shall we put it into "contrib"?
(In reply to comment #6) > wow, this got lost. shall we put it into "contrib"? I'd put it in contrib for sure. Looks like a handy dandy tool. +1 on it too, if we're voting. -Doc
Closing old stale bug. Respectfully vote -1, I don't believe contrib should contains random scripts with very generic functionality. Things like this can be put into personal githubs.