forked from evolix/ansible-roles
nagios-nrpe: check_amavis: Update regex
I just installed a Debian Stretch with a pack mail and the check_amavis was not checking the right regex. Amavis is returning: 2.7.0 Ok, discarded, id=17556-09 - INFECTED: Eicar-Signature So the regex should be: -if ($result =~/2.7.0 Ok, discarded, id=[^,]+ - INFECTED: Eicar-Test-Signature/) { +if ($result =~/2.7.0 Ok, discarded, id=\S+ - INFECTED: Eicar-Signature/) {
This commit is contained in:
parent
977c28c720
commit
de908ae5bd
|
@ -65,7 +65,7 @@ $smtp->close();
|
||||||
|
|
||||||
print "$result\n";
|
print "$result\n";
|
||||||
|
|
||||||
if ($result =~/2.7.0 Ok, discarded, id=[^,]+ - INFECTED: Eicar-Test-Signature/) {
|
if ($result =~/2.7.0 Ok, discarded, id=\S+ - INFECTED: Eicar-Signature/) {
|
||||||
print "OK - All fine\n";
|
print "OK - All fine\n";
|
||||||
exit 0;
|
exit 0;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue