diff options
-rwxr-xr-x | plugins-scripts/check_mailq.pl | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/plugins-scripts/check_mailq.pl b/plugins-scripts/check_mailq.pl index 2a805b62..cc040ebb 100755 --- a/plugins-scripts/check_mailq.pl +++ b/plugins-scripts/check_mailq.pl | |||
@@ -605,7 +605,30 @@ sub process_arguments(){ | |||
605 | exit $ERRORS{'UNKNOWN'}; | 605 | exit $ERRORS{'UNKNOWN'}; |
606 | } | 606 | } |
607 | }else{ | 607 | }else{ |
608 | $mailq = 'sendmail' ; | 608 | if (defined $utils::PATH_TO_QMAIL_QSTAT |
609 | && -x $utils::PATH_TO_QMAIL_QSTAT) | ||
610 | { | ||
611 | $mailq = 'qmail'; | ||
612 | } | ||
613 | elsif (-d '/var/lib/postfix' || -d '/var/local/lib/postfix' | ||
614 | || -e '/usr/sbin/postfix' || -e '/usr/local/sbin/postfix') | ||
615 | { | ||
616 | $mailq = 'postfix'; | ||
617 | } | ||
618 | elsif (-d '/usr/lib/exim4' || -d '/usr/local/lib/exim4' | ||
619 | || -e '/usr/sbin/exim' || -e '/usr/local/sbin/exim') | ||
620 | { | ||
621 | $mailq = 'exim'; | ||
622 | } | ||
623 | elsif (-d '/usr/lib/nullmailer' || -d '/usr/local/lib/nullmailer' | ||
624 | || -e '/usr/sbin/nullmailer-send' | ||
625 | || -e '/usr/local/sbin/nullmailer-send') | ||
626 | { | ||
627 | $mailq = 'nullmailer'; | ||
628 | } | ||
629 | else { | ||
630 | $mailq = 'sendmail'; | ||
631 | } | ||
609 | } | 632 | } |
610 | 633 | ||
611 | return $ERRORS{'OK'}; | 634 | return $ERRORS{'OK'}; |