Search Exchange

Search All Sites

Nagios Live Webinars

Let our experts show you how Nagios can help your organization.

Contact Us

Phone: 1-888-NAGIOS-1


Remember Me

Directory Tree


8 votes
check_eximailqueue.txtcheck_eximailqueue script
check_eximailqueue_1.1v1.1 - sudo support
Network Monitoring Software - Download Nagios XI
Log Management Software - Nagios Log Server - Download
Netflow Analysis Software - Nagios Network Analyzer - Download
Nagios plugin (script) to check the status of an exim mail queue.
Nagios plugin (script) to check the status of an exim mail queue. This script has been designed and written for the lowest common denominator of shells (sh), requiring only the exim executable as an external program; please note the path to the exim executable is easily changed by editing the variable at the top of the script.

Note that this script has been written on and tested with Solaris 9/10 but should work fine on any other *nix.

Note also, depending on your config, the nagios user will probably be needed to be added to the exim group on the machine you are checking for this script to function correctly. If the script is not run with rights to access the mail queue it will return the following "Mailqueue WARNING - query returned no output!"

New version updated to work with sudo, note that if you are running a system without sudo, version 1.1 will not work! You will also need to add the following to the /etc/sudoers file: "nagios ALL=NOPASSWD:/usr/local/exim/bin/exim" (also see comment at the top of the script).

1.0 - Initial release
1.1 - Some tweaks and sudo support
1.2 - Fixed bug in critical/warning level checking which could result in erroneous results.
1.3 - GPLv3 licence
Reviews (7)

/usr/local/nagios/libexec/check_nrpe -H IPaddress -c check_eximmailqueue
Mailqueue WARNING - query returned no output!
how can i solve this warning ?

please help me.
first time execute check_eximailqueue_1.3, will appear this error :
./check_eximailqueue_1.3: line 36: /usr/local/nagios/libexec/ No such file or directory
Mailqueue WARNING - query returned no output!

=> it means you need to :
1. modify your path on
. /usr/local/nagios/libexec/ to your own directory. for me, it is on /usr/lib64/nagios/plugins/

2. modify path on
for me, it is on EXIM=/usr/sbin/exim

its done!
I added this on a server and it working fine on that server. when I tried to check this plugin from the nagios server(remote) i got the following error.
# /usr/local/nagios/libexec/check_nrpe -H IPaddress -c check_eximmailqueue
Mailqueue WARNING - query returned no output!
added in /etc/sudoers file and all. Could anyone please help me.
The script fails for me, like others, with no response. This is due to the hard-coding of exim's location, which is incorrect on cPanel servers and probably other servers too:

I commented out the EXIM= line:

# default hard-coded # EXIM=/usr/local/exim/bin/exim

and replaced it with one that checks the location of exim:

EXIM=$(which exim)

and now the script works
bykreitje, August 30, 2012
When using with NRPE you need to comment out the Defaults requiretty line in the sudoers file.
byrafaelvolpeti, July 12, 2012
I Got the same error: Mailqueue WARNING - query returned no output! when run remotely.

Anyone can help to solve this?

byahmedali, November 30, 2011
0 of 1 people found this review helpful
I get this error when I run the check using nrpe Mailqueue WARNING - query returned no output!

This is what I run
check_nrpe -H $HOSTADDRESS$ -c check_eximailqueue -a '-w 7000 -c 10000'