File check_amavis_add_timeout.patch of Package monitoring-plugins-amavis

Index: monitoring-plugin-check_amavis-1.1/check_amavis.pl
===================================================================
--- monitoring-plugin-check_amavis-1.1.orig/check_amavis.pl
+++ monitoring-plugin-check_amavis-1.1/check_amavis.pl
@@ -15,6 +15,7 @@ my $port = 10024;
 my $from = '';
 my $to = '';
 my $debug = 0;
+my $timeout = 15;
 
 my %STATES = (
 	"OK" => 0,
@@ -28,6 +29,7 @@ $result = GetOptions (
 	"server|s=s"    => \$server,
 	"port|p=s"      => \$port,
 	"from|f=s"      => \$from,
+	"timeout=s"     => \$timeout,
 	"debug|d"       => \$debug,
 	"to|t=s"        => \$to,
 );
@@ -63,6 +65,7 @@ my $smtp = new Net::SMTP(
 	$server,
 	Port => $port,
 	Debug => $debug,
+	Timeout => $timeout,
 );
 
 if (!$smtp) {
openSUSE Build Service is sponsored by