From nobody@FreeBSD.org  Fri Aug  8 04:19:34 2008
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 2E1BB106564A
	for <freebsd-gnats-submit@FreeBSD.org>; Fri,  8 Aug 2008 04:19:34 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 1C56C8FC15
	for <freebsd-gnats-submit@FreeBSD.org>; Fri,  8 Aug 2008 04:19:34 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.2/8.14.2) with ESMTP id m784JX14093029
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 8 Aug 2008 04:19:33 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.2/8.14.1/Submit) id m784JX6S093028;
	Fri, 8 Aug 2008 04:19:33 GMT
	(envelope-from nobody)
Message-Id: <200808080419.m784JX6S093028@www.freebsd.org>
Date: Fri, 8 Aug 2008 04:19:33 GMT
From: "Rashid N. Achilov" <citycat4@ngs.ru>
To: freebsd-gnats-submit@FreeBSD.org
Subject: check_mailq (nagios_plugins) does not use -W and -C options
X-Send-Pr-Version: www-3.1
X-GNATS-Notify: jarrod@netleader.com.au

>Number:         126362
>Category:       ports
>Synopsis:       check_mailq (net-mgmt/nagios-plugins) does not use -W and -C options
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Aug 08 04:20:01 UTC 2008
>Closed-Date:    Sun Aug 24 08:30:10 UTC 2008
>Last-Modified:  Sun Aug 24 08:30:10 UTC 2008
>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@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:
State-Changed-From-To: open->feedback 
State-Changed-By: edwin 
State-Changed-When: Fri Aug 8 04:21:57 UTC 2008 
State-Changed-Why:  
Awaiting maintainers feedback (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=126362 

From: Edwin Groothuis <edwin@FreeBSD.org>
To: jarrod@netleader.com.au
Cc: bug-followup@FreeBSD.org
Subject: Re: ports/126362: check_mailq (net-mgmt/nagios-plugins) does not use -W and -C options
Date: Fri, 8 Aug 2008 04:21:53 UT

 Maintainer of net-mgmt/nagios-plugins,
 
 Please note that PR ports/126362 has just been submitted.
 
 If it contains a patch for an upgrade, an enhancement or a bug fix
 you agree on, reply to this email stating that you approve the patch
 and a committer will take care of it.
 
 The full text of the PR can be found at:
     http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/126362
 
 -- 
 Edwin Groothuis via the GNATS Auto Assign Tool
 edwin@FreeBSD.org

From: Jarrod Sayers <jarrod@netleader.com.au>
To: citycat4@ngs.ru
Cc: bug-followup@FreeBSD.org
Subject: Re: ports/126362: check_mailq (net-mgmt/nagios-plugins) does not use -W and -C options
Date: Sun, 10 Aug 2008 17:49:03 +0930

 This issue appears to still exist in the trunk branch, so your best  
 bet would be to bring this to the attention of the Nagios Plugins  
 development team.  If a patch is committed to resolve the issue, I am  
 happy to fast track this into the FreeBSD port instead of waiting for  
 the next release.
 
 Jarrod.
State-Changed-From-To: feedback->closed 
State-Changed-By: pgollucci 
State-Changed-When: Sun Aug 24 08:30:08 UTC 2008 
State-Changed-Why:  
Closed for now, feel free make a new PR when this is resolved up strea. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=126362 
>Unformatted:
