Révision 59073bff
Plugin postfix_filtered_awk: improve variable name
Avoid misdetections by codespell.
| plugins/postfix/postfix_filtered_awk | ||
|---|---|---|
| 94 | 94 |
fi |
| 95 | 95 |
|
| 96 | 96 |
|
| 97 |
|
|
| 98 |
|
|
| 99 | 97 |
$LOGTAIL ${MAIL_LOG} $STATEFILE | \
|
| 100 |
awk 'BEGIN { na= 0; nb= 0; nc= 0; nd= 0; ne= 0; nf= 0; ng= 0; nh= 0 ; st= ENVIRON["POLICY"] }
|
|
| 101 |
|
|
| 102 |
{
|
|
| 103 |
if (index($0, "queued as")) { na++ }
|
|
| 104 |
else if (index($0, "Relay access denied")) { nb++ }
|
|
| 105 |
else if (index($0, "blocked using")) { nc++ }
|
|
| 106 |
else if (index($0, "Helo command rejected")) { nd++ }
|
|
| 107 |
else if (index($0, "Client host rejected")) { ne++ }
|
|
| 108 |
else if (index($0, "Sender address rejected")) { nf++ }
|
|
| 109 |
else if (index($0, "Recipient address rejected")) { ng++ }
|
|
| 110 |
else if (st && index($0, st)) { nh++ }
|
|
| 111 |
} |
|
| 112 |
END { print "allowed.value " na"\nrelay.value " nb"\nrbl.value " nc"\nhelo.value " nd"\nclient.value " ne"\nsender.value " nf"\nrecipient.value " ng ; if (st) print "policy.value " nh }'
|
|
| 113 |
|
|
| 114 |
|
|
| 98 |
awk 'BEGIN { allowed_count=0; relay_denied_count=0; rbl_count=0; helo_rejected_count=0; client_rejected_count=0; sender_rejected_count=0; reciepient_rejected_count=0; policy_count=0 ; st=ENVIRON["POLICY"] }
|
|
| 99 |
{
|
|
| 100 |
if (index($0, "queued as")) { allowed_count++ }
|
|
| 101 |
else if (index($0, "Relay access denied")) { relay_denied_count++ }
|
|
| 102 |
else if (index($0, "blocked using")) { rbl_count++ }
|
|
| 103 |
else if (index($0, "Helo command rejected")) { helo_rejected_count++ }
|
|
| 104 |
else if (index($0, "Client host rejected")) { client_rejected_count++ }
|
|
| 105 |
else if (index($0, "Sender address rejected")) { sender_rejected_count++ }
|
|
| 106 |
else if (index($0, "Recipient address rejected")) { reciepient_rejected_count++ }
|
|
| 107 |
else if (st && index($0, st)) { policy_count++ }
|
|
| 108 |
} |
|
| 109 |
END { print "allowed.value " allowed_count"\nrelay.value " relay_denied_count"\nrbl.value " rbl_count"\nhelo.value " helo_rejected_count"\nclient.value " client_rejected_count"\nsender.value " sender_rejected_count"\nrecipient.value " reciepient_rejected_count ; if (st) print "policy.value " policy_count }'
|
|
Formats disponibles : Unified diff