librenms/includes/services/smtp/check.inc
2010-02-11 04:35:16 +00:00

14 lines
226 B
PHP

<?php
$check = shell_exec($config['nagios_plugins'] . "/check_smtp -H ".$service['hostname']);
list($check, $time) = split("\|", $check);
if(strstr($check, "SMTP OK")) {
$status = '1';
} else {
$status = '0';
}
?>