Is there an available perl script or any script for checking the mail queues of each instance of sendmail? So that we can use that on nagios nrpe, since the mailq command is only designed for one instance.
A sendmail "instance" in a host is a sendmail that is started with a configuration file. A sendmail instance is not a sendmail process. So if you see that the output of
The normal case these days is that there exist two sendmail instances running in your host One that is started and running the configuration described in
In the highly unlikely case that you have other instances running, corresponding .cf file must exist. You can view them queues then by running
You can combine in a (Perl) script the output of such commands to do whatever you want afterwards.