nagios-nrpe: add date to check_amavis test mail

This commit is contained in:
Victor LABORIE 2017-11-06 18:32:56 +01:00
parent c0c7183605
commit 33f85b565c

View file

@ -3,12 +3,14 @@
use Getopt::Long; use Getopt::Long;
use MIME::Entity; use MIME::Entity;
use Net::SMTP; use Net::SMTP;
use POSIX qw(strftime);
my $server = ''; my $server = '';
my $port = 10024; my $port = 10024;
my $from = ''; my $from = '';
my $to = ''; my $to = '';
my $debug = 0; my $debug = 0;
my $date = strftime "%a, %d %b %g %X %z", localtime;
$result = GetOptions ( $result = GetOptions (
"server|s=s" => \$server, "server|s=s" => \$server,
@ -32,6 +34,7 @@ my $top = MIME::Entity->build(
Type =>"multipart/mixed", Type =>"multipart/mixed",
From => $from, From => $from,
To => $to, To => $to,
Date => $date,
Subject => "EICAR test", Subject => "EICAR test",
Data => "This is a test", Data => "This is a test",
); );