• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

No output for command "mailq" after upgrading to 12.0.18 update Nr. 39

RGOERG

New Pleskian
Hello!

We have a plesk server running on a Ubuntu 14.04.2 LTS machine. We check the state of the mailqueue with nagios, executing the "mailq" command. After the AutoInstaller upgraded our installation from 12.0.18 update 38 to 39, we noticed, that the nagios check failed.

After investigating a little bit, it seems that we found the problem:

When I enter "mailq" in the shell, the command is executed and gives me an proper output. But when I try to execute the command with its full path "/usr/bin/mailq" nothing happens, and I have to cancel with [ctrl]+[c]. The which-command deliveres exactly the same path as written above... Never experienced such a problem. Is there anyone else who has that problem or, perhaps, a solution?

Regards,

René
 
@René,

Summarized, you are fusing postfix and nagios, but is not quite clear what the exact problem is.

However, it seems to be the case that

- mailq is working properly (i.e. no issue with postfix, causing nagios to fail)
- nagios is working properly, but is not able to report (i.e. nagios cannot send mail alerts) OR nagios is not working properly (i.e. nagios config and packages are not up-to-date and/or compatible with Plesk or Ubuntu packages)

The text

When I enter "mailq" in the shell, the command is executed and gives me an proper output. But when I try to execute the command with its full path "/usr/bin/mailq" nothing happens, and I have to cancel with [ctrl]+[c]. The which-command deliveres exactly the same path as written above... Never experienced such a problem. Is there anyone else who has that problem or, perhaps, a solution?

just indicates "normal" behavior, it is not a problem.

The problem should be in your nagios commands.cfg file: change all /bin/mail references to /usr/bin/mail and restart nagios (/etc/init.d/nagios restart).

If that does not work, you should verify that all relevant and up-to-date packages for nagios are installed.

Hope the above helps to narrow down or even resolve your problem.

Kind regards......
 
Hello!

Thanks for your responds. You wrote that it is a normal behaviour that on the commandline "mailq" will work and entering "/usr/bin/mailq" doesn't work. But that isn't the case in our other plesk installations. And I never noticed such an behaviour on our other linux servers. Do you know a reason for that?

Regards,

René
 
@René,

Hello!

Thanks for your responds. You wrote that it is a normal behaviour that on the commandline "mailq" will work and entering "/usr/bin/mailq" doesn't work. But that isn't the case in our other plesk installations. And I never noticed such an behaviour on our other linux servers. Do you know a reason for that?

Regards,

René

The behaviour in question can be different from behaviour on other linux servers for various reasons, which depend on 1001 factors, like upgrade history (of both Plesk and OS), the packages installed, the question whether a clean installation (of Plesk and/or OS) has been used etc. etc.

Furthermore, it can be the case (and often is) that someone has solved an issue in the past and simply forgot to undo that (manual) solution, when official patches from Parallels are implemented on Plesk, for instance as microupdates.

Note that the "solution of creating /usr/bin/mailq" (mostly as a link) has often been adviced in online fora or posts, in order to resolve issues from the past.

In the current Plesk installations, such a solution would not be adviceable, at least not "adviceable anymore".

In short, I can make an educated guess and state that, somewhere down the line of history, something or someone changed the server setup, but that still is guessing.

And often, it is more simple: on each server you can specify command aliases, which can also explain the difference between linux servers.

To be honest, I would not really bother about these (minor) differences, as long as no problems are occurring.

Kind regards...
 
Hi,

we had the same problem with all Plesk 12 Hosts in our hosting enviroment - even fresh installed machines. I'm not sure this is only related to "solving issues by manual solution in the past" as mentioned above.


Anyway, I fixed it like this (Debian based Hosts, you may have different path to your nagios plugins dir...)

Use "postqueue -p" instead of "mailq"...

Code:
# nano /usr/lib/nagios/plugins/utils.pm
Line 23:
Code:
$PATH_TO_MAILQ  =  "/usr/sbin/postqueue";

Code:
# nano /usr/lib/nagios/plugins/check_mailq
Line 299:
Code:
if (! open (MAILQ, "$utils::PATH_TO_MAILQ -p| " ) ) {

Nagios command "check_mailq -w 5 -c 10 -M postfix" is now working on Plesk 12
 
Back
Top