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/) {
Cette révision appartient à :
Parent
952b0d4521
révision
10385ecf4d
|
@ -65,7 +65,7 @@ $smtp->close();
|
|||
|
||||
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";
|
||||
exit 0;
|
||||
} else {
|
||||
|
|
Chargement…
Référencer dans un nouveau ticket