Page 1 of 1

check_mailq is not executable

Posted: Wed Apr 12, 2023 2:04 pm
by bv406
check_mailq is not executable by (uid 1000:gid(1000 1000 100

OS Agent: Oracle Linux Server release 8.5
CLI test on mailserver

Code: Select all

# sudo -u nagios /usr/local/nagios/libexec/check_mailq -w 2000 -c 3000
ERROR:  is not executable by (uid 1000:gid(1000 1000 1001)) and sudo is not set in utils.pm

# ls -l /usr/local/nagios/libexec/check_mailq
-rwxr-xr-x 1 root nagios 25575 Aug  5  2021 /usr/local/nagios/libexec/check_mailq

# ls -lrt /usr/bin/mailq*
lrwxrwxrwx 1 root root 31 Oct 10  2021 /usr/bin/mailq.postfix -> ../../usr/sbin/sendmail.postfix
lrwxrwxrwx 1 root root 27 Jan 29  2022 /usr/bin/mailq -> /etc/alternatives/mta-mailq

# /usr/local/nagios/libexec/check_mailq -w 2000 -c 3000
ERROR:  is not executable by (uid 0:gid(0 0)) and sudo is not set in utils.pm
I also had put "nagios ALL=NOPASSWD: /usr/local/nagios/libexec/check_mailq" in /etc/sudoers

Where I should check next?

UPDATE: I use this plugin instead https://exchange.nagios.org/directory/P ... ue/details and now able to check mailq from nagios

Re: check_mailq is not executable

Posted: Wed Apr 12, 2023 5:53 pm
by kg2857
I'm having the same issue on RHEL 8.x...
That plugin is a perl script and it works ok as root, but not nagios. My guess is that the script is running something like mailq and that needs sudo defined as well.

Re: check_mailq is not executable

Posted: Thu Dec 14, 2023 9:30 am
by shoreypu
For "UPDATE: I use this plugin instead https://exchange.nagios.org/directory/P ... ue/details and now able to check mailq from nagios", the link does not work. Can you, or someone, provide the URL or name of the plugin being referenced?

Thanks in Advance.

Re: check_mailq is not executable

Posted: Thu Dec 14, 2023 10:07 am
by gwesterman
Hi @shoreypu,

Based on what is left of the url, my guess is that it linked here. There are some other mailq plugins on the exchange so if that one doesn't work or fit what you need, there may be another that's more applicable.

Hope this helps!

Thank you!