nagios-nrpe: check_amavis: Update regex
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/pr Build is failing Details

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:
Benoît S. 2020-06-17 12:20:33 +09:00
parent 977c28c720
commit de908ae5bd
1 changed files with 1 additions and 1 deletions

View File

@ -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 {