ports/126362: check_mailq (nagios_plugins) does not use -W and -C options

Rashid N. Achilov citycat4 at ngs.ru
Fri Aug 8 04:20:02 UTC 2008


>Number:         126362
>Category:       ports
>Synopsis:       check_mailq (nagios_plugins) does not use -W and -C options
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Aug 08 04:20:01 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     Rashid N. Achilov
>Release:        6.3-STABLE
>Organization:
LLC "AS-System Complex"
>Environment:
FreeBSD to-495.askd.gmbh 6.3-STABLE FreeBSD 6.3-STABLE #11: Mon Apr 28 12:18:13 NOVST 2008     root at to-495.askd.gmbh:/usr/obj/usr/src/sys/Sentry  i386
>Description:
nagios_plugins 1.4.11 contains a check_mailq program. This is a Perl script, which checks mail queue on junk filling or some occassions, when mail stops to send. This program has an options set to check "mail with same domain" to send or receive (-W and -C). But when try to specify these options, script says "unknown option". I have looked a code. Really, -W and -C do not use, even variables to keep were reserved. I have done some patch to use these variables.
>How-To-Repeat:
Install nagios_plugins. Try to run check_mailq with options -w, -c, -W and -C
>Fix:
Patch attached

Patch attached with submission follows:

--- check_mailq.old	2008-06-27 10:14:48.000000000 +0700
+++ check_mailq	2008-08-08 11:03:25.000000000 +0700
@@ -511,14 +511,18 @@
 
 
 sub process_arguments(){
+	Getopt::Long::Configure("bundling");
+
 	GetOptions
-		("V"   => \$opt_V, "version"	=> \$opt_V,
-		 "v"   => \$opt_v, "verbose"	=> \$opt_v,
-		 "h"   => \$opt_h, "help"		=> \$opt_h,
-		 "M:s" => \$opt_M, "mailserver:s" => \$opt_M, # mailserver (default	sendmail)
-		 "w=i" => \$opt_w, "warning=i"  => \$opt_w,   # warning if above this number
-		 "c=i" => \$opt_c, "critical=i" => \$opt_c,	  # critical if above this number
-		 "t=i" => \$opt_t, "timeout=i"  => \$opt_t 
+		("version|V"   	    => \$opt_V,
+		 "verbose|v"   	    => \$opt_v,
+		 "help|h"   	    => \$opt_h,
+		 "mailserver|M:s"   => \$opt_M,		# mailserver (default sendmail)
+		 "warning|w=i"      => \$opt_w,		# warning if above this number
+		 "critical|c=i"     => \$opt_c,		# critical if above this number
+		 "W=i" 	    	    => \$opt_W,		# warning if above this number from same domain
+		 "C=i" 	    	    => \$opt_C,		# critical if above this number from same domain
+		 "timeout|t=i"      => \$opt_t
 		 );
 
 	if ($opt_V) {


>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list