Révision 17f78427
Whitespace cleanup
- remove trailing whitespace
- remove empty lines at the end of files
| plugins/amavis/amavis_awk | ||
|---|---|---|
| 2 | 2 |
# |
| 3 | 3 |
# Plugin to monitor Amavis virus and spam statistics. |
| 4 | 4 |
# |
| 5 |
#
|
|
| 5 |
# |
|
| 6 | 6 |
# Based on a routine by William Towle |
| 7 | 7 |
# Uncomment the cdef lines to convert the graph to mails/minute |
| 8 | 8 |
# Comment out the line "total.graph no" to show the total on the graph. This may not be aesthetically pleasing. |
| ... | ... | |
| 38 | 38 |
echo 'graph_args --base 1000 -l 0' |
| 39 | 39 |
|
| 40 | 40 |
echo 'graph_order clean p_spam b_spam virus total' |
| 41 |
|
|
| 41 |
|
|
| 42 | 42 |
echo 'clean.min 0' |
| 43 | 43 |
echo 'clean.type ABSOLUTE' |
| 44 | 44 |
#echo 'clean.cdef clean,60,*' |
| ... | ... | |
| 70 | 70 |
|
| 71 | 71 |
|
| 72 | 72 |
$LOGTAIL ${MAIL_LOG} $STATEFILE | \
|
| 73 |
awk 'BEGIN { na= 0; nb= 0; nc= 0; nd= 0; total= 0 }
|
|
| 73 |
awk 'BEGIN { na= 0; nb= 0; nc= 0; nd= 0; total= 0 }
|
|
| 74 |
|
|
| 75 |
{
|
|
| 74 | 76 |
|
| 75 |
{
|
|
| 76 |
|
|
| 77 |
if (index($0, "Passed CLEAN")) { na++ ; total++ }
|
|
| 78 |
else if (index($0, "Passed SPAMMY")) { nb++ ; total++ }
|
|
| 77 |
if (index($0, "Passed CLEAN")) { na++ ; total++ }
|
|
| 78 |
else if (index($0, "Passed SPAMMY")) { nb++ ; total++ }
|
|
| 79 | 79 |
else if (index($0, "Blocked SPAMMY")) { nc++ ; total++ }
|
| 80 | 80 |
else if (index($0, "INFECTED")) { nd++ ; total++ }
|
| 81 | 81 |
} |
Formats disponibles : Unified diff