summaryrefslogtreecommitdiffstats
path: root/web/attachments/241185-check_mailq.pl.patch
diff options
context:
space:
mode:
Diffstat (limited to 'web/attachments/241185-check_mailq.pl.patch')
-rw-r--r--web/attachments/241185-check_mailq.pl.patch46
1 files changed, 46 insertions, 0 deletions
diff --git a/web/attachments/241185-check_mailq.pl.patch b/web/attachments/241185-check_mailq.pl.patch
new file mode 100644
index 0000000..906234b
--- /dev/null
+++ b/web/attachments/241185-check_mailq.pl.patch
@@ -0,0 +1,46 @@
1--- check_mailq.pl.orig 2006-07-05 15:45:57.000000000 +0200
2+++ check_mailq.pl 2007-08-14 13:32:15.463385010 +0200
3@@ -29,7 +29,7 @@
4 use POSIX;
5 use strict;
6 use Getopt::Long;
7-use vars qw($opt_V $opt_h $opt_v $verbose $PROGNAME $opt_w $opt_c $opt_t
8+use vars qw($opt_d $opt_V $opt_h $opt_v $verbose $PROGNAME $opt_w $opt_c $opt_t
9 $opt_M $mailq $status $state $msg $msg_q $msg_p $opt_W $opt_C $mailq @lines
10 %srcdomains %dstdomains);
11 use lib utils.pm;
12@@ -515,12 +515,17 @@
13 ("V" => \$opt_V, "version" => \$opt_V,
14 "v" => \$opt_v, "verbose" => \$opt_v,
15 "h" => \$opt_h, "help" => \$opt_h,
16+ "d:s" => \$opt_d, "configdir:s" => \$opt_d,
17 "M:s" => \$opt_M, "mailserver:s" => \$opt_M, # mailserver (default sendmail)
18 "w=i" => \$opt_w, "warning=i" => \$opt_w, # warning if above this number
19 "c=i" => \$opt_c, "critical=i" => \$opt_c, # critical if above this number
20 "t=i" => \$opt_t, "timeout=i" => \$opt_t
21 );
22
23+ if ($opt_d) {
24+ $ENV{'MAIL_CONFIG'}=$opt_d;
25+ }
26+
27 if ($opt_V) {
28 print_revision($PROGNAME,'$Revision: 1.7 $ ');
29 exit $ERRORS{'OK'};
30@@ -576,7 +581,7 @@
31 }
32
33 sub print_usage () {
34- print "Usage: $PROGNAME -w <warn> -c <crit> [-W <warn>] [-C <crit>] [-M <MTA>] [-t <timeout>] [-v verbose]\n";
35+ print "Usage: $PROGNAME -d <configdir> -w <warn> -c <crit> [-W <warn>] [-C <crit>] [-M <MTA>] [-t <timeout>] [-v verbose]\n";
36 }
37
38 sub print_help () {
39@@ -587,6 +592,7 @@
40 print "\n";
41 print " Checks the number of messages in the mail queue (supports multiple sendmail queues, qmail)\n";
42 print " Feedback/patches to support non-sendmail mailqueue welcome\n\n";
43+ print "-d (--configdir) = Use configdir for postfix command (MAIL_CONFIG)\n";
44 print "-w (--warning) = Min. number of messages in queue to generate warning\n";
45 print "-c (--critical) = Min. number of messages in queu to generate critical alert ( w < c )\n";
46 print "-W (--Warning) = Min. number of messages for same domain in queue to generate warning\n";