Révision ba89ed20
Plugin amavis_awk: improve variable names
| plugins/amavis/amavis_awk | ||
|---|---|---|
| 69 | 69 |
|
| 70 | 70 |
|
| 71 | 71 |
$LOGTAIL ${MAIL_LOG} $STATEFILE | \
|
| 72 |
awk 'BEGIN { na= 0; nb= 0; nc= 0; nd= 0; total= 0 }
|
|
| 72 |
awk 'BEGIN { clean_count=0; passed_spam_count=0; blocked_spam_count=0; infected_count=0; total=0 }
|
|
| 73 | 73 |
|
| 74 | 74 |
{
|
| 75 | 75 |
|
| 76 |
if (index($0, "Passed CLEAN")) { na++ ; total++ }
|
|
| 77 |
else if (index($0, "Passed SPAMMY")) { nb++ ; total++ }
|
|
| 78 |
else if (index($0, "Blocked SPAMMY")) { nc++ ; total++ }
|
|
| 79 |
else if (index($0, "INFECTED")) { nd++ ; total++ }
|
|
| 76 |
if (index($0, "Passed CLEAN")) { clean_count++ ; total++ }
|
|
| 77 |
else if (index($0, "Passed SPAMMY")) { passed_spam_count++ ; total++ }
|
|
| 78 |
else if (index($0, "Blocked SPAMMY")) { blocked_spam_count++ ; total++ }
|
|
| 79 |
else if (index($0, "INFECTED")) { infected_count++ ; total++ }
|
|
| 80 | 80 |
} |
| 81 |
END { print "clean.value " na"\np_spam.value " nb"\nb_spam.value " nc"\nvirus.value " nd"\ntotal.value " total }'
|
|
| 82 |
|
|
| 83 |
|
|
| 81 |
END { print "clean.value " clean_count"\np_spam.value " passed_spam_count"\nb_spam.value " blocked_spam_count"\nvirus.value " infected_count"\ntotal.value " total }'
|
|
Formats disponibles : Unified diff