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
Email: sales@nagios.com

Login

Remember Me
Don't miss your chance to attend the 2014 Nagios World conference!

Don't miss your chance to attend the 2014 Nagios World Conference, Oct 13-16th. Informative Sessions, Networking, Food and Cocktails! Visit go.nagios.com/conference/ for more information or to register.


check_postfix_mailqueue

Bookmark and Share

Rating
4 votes
Favoured:
0
Current Version
1.0
Last Release Date
2012-01-21
Compatible With
  • Nagios 3.x
Owner
License
GPL
Hits
63708
Files:
FileDescription
check_postfix_mailqueueCheck
check_postfix_mailqueue.phpPNP-Template
Checks postfix mailqueue statistic
check_postfix_mailqueue is a Nagios plugin which generates statistics for the postfix mailqueue (perfdata) and checks for corrupt messages.
The following values will be checked:
maildrop: Localy posted mail
incoming: Processed local mail and received from network
active: Mails being delivered (should be small)
deferred: Stuck mails (that will be retried later)
corrupt: Messages found to not be in correct format (shold be 0)
hold: Recent addition, messages put on hold indefinitly - delete of free

You can set warn and crit levels for deferred mails.
When critical and warning levels are not set, the plugin returns OK, as long as there are no corrupt messages.
PNP-Template is also available.
Reviews (4)
bymlwood98, September 16, 2014
I have made an update to alexlehm's version of this script to include a -q parameter with which to select which queue on which to alert.

This change arises from an issue we have seen at my company where the postfix server gets flooded with several thousand messages at once. Postfix continues to process them, so they do not get moved to the deferred queue, but the active and incoming queues grow to almost 2GB apiece.

The new version can be downloaded here: https://gist.github.com/mlwood98/c5cb1e80be595b625c60
byManubz, May 21, 2014
Hi,

I think plugin is so good !
But i have problems with permissions (I think).
ls -l /var/spool/postfix returns postfix:root for all folders.
But if I give read permission to root group, script always returns OK and 0 for all. I run script as root user.

Thanks for your return.
bycaramia, March 27, 2014
To run the plugin from nrpe it is necessary execute it with the sudo permission or the plugin respond always OK with all zero value
byalexlehm, December 22, 2013
1 of 1 people found this review helpful
Works well, this script checks the mailqueue by directly counting the files in the queue directories, which has the advantage that is will probably be much faster for queues contains 1000s of mails.

Two minor things (not sure if this is right place to report bugs), the command parsing calls the script itself which doesn't make any sense if a parameter is ignored and the check reports 0 for all queues if the directories are not readable due to incorrect permissions or user, in this case /var/spool/postfix is usually readable, but the queue subdirs are not.

A revised script is available here: https://gist.github.com/alexlehm/8084195