|
@@ -489,13 +489,13 @@ elsif ( $mailq eq "qmail" ) {
|
|
|
elsif ( $mailq eq "exim" ) {
|
|
elsif ( $mailq eq "exim" ) {
|
|
|
## open mailq
|
|
## open mailq
|
|
|
if ( defined $utils::PATH_TO_MAILQ && -x $utils::PATH_TO_MAILQ ) {
|
|
if ( defined $utils::PATH_TO_MAILQ && -x $utils::PATH_TO_MAILQ ) {
|
|
|
- if (! open (MAILQ, "$sudo $utils::PATH_TO_MAILQ | " ) ) {
|
|
|
|
|
- print "ERROR: could not open $utils::PATH_TO_MAILQ \n";
|
|
|
|
|
|
|
+ if (! open (MAILQ, "$sudo $utils::PATH_TO_MAILQ$mailq_args 2>&1 | " ) ) {
|
|
|
|
|
+ print "ERROR: could not open $utils::PATH_TO_MAILQ$mailq_args\n";
|
|
|
exit $ERRORS{'UNKNOWN'};
|
|
exit $ERRORS{'UNKNOWN'};
|
|
|
}
|
|
}
|
|
|
}elsif( defined $utils::PATH_TO_MAILQ){
|
|
}elsif( defined $utils::PATH_TO_MAILQ){
|
|
|
unless (-x $utils::PATH_TO_MAILQ) {
|
|
unless (-x $utils::PATH_TO_MAILQ) {
|
|
|
- print "ERROR: $utils::PATH_TO_MAILQ is not executable by (uid $>:gid($)))\n";
|
|
|
|
|
|
|
+ print "ERROR: $utils::PATH_TO_MAILQ$mailq_args is not executable by (uid $>:gid($)))\n";
|
|
|
exit $ERRORS{'UNKNOWN'};
|
|
exit $ERRORS{'UNKNOWN'};
|
|
|
}
|
|
}
|
|
|
} else {
|
|
} else {
|
|
@@ -507,14 +507,14 @@ elsif ( $mailq eq "exim" ) {
|
|
|
#22m 1.7K 19aEEr-0007hx-Dy <> *** frozen ***
|
|
#22m 1.7K 19aEEr-0007hx-Dy <> *** frozen ***
|
|
|
#root@exlixams.glups.fr
|
|
#root@exlixams.glups.fr
|
|
|
|
|
|
|
|
- if (/\s[\w\d]{6}-[\w\d]{6}-[\w\d]{2}\s/) { # message id 19aEEr-0007hx-Dy
|
|
|
|
|
|
|
+ if ( (/\s[\w\d]{6}-[\w\d]{6}-[\w\d]{2}\s/) || (/\s[\w\d]{6}-[\w\d]{11}-[\w\d]{4}\s/) ) { # message id 19aEEr-0007hx-Dy or 16VDhn-000000001bo-D342
|
|
|
$msg_q++ ;
|
|
$msg_q++ ;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
close(MAILQ) ;
|
|
close(MAILQ) ;
|
|
|
|
|
|
|
|
if ( $? ) {
|
|
if ( $? ) {
|
|
|
- print "CRITICAL: Error code ".($?>>8)." returned from $utils::PATH_TO_MAILQ",$/;
|
|
|
|
|
|
|
+ print "CRITICAL: Error code ".($?>>8)." returned from $utils::PATH_TO_MAILQ$mailq_args",$/;
|
|
|
exit $ERRORS{CRITICAL};
|
|
exit $ERRORS{CRITICAL};
|
|
|
}
|
|
}
|
|
|
if ($msg_q < $opt_w) {
|
|
if ($msg_q < $opt_w) {
|