nagios-plugins-mailq unexpected dependency on ssmtp package?

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Oxilion
Posts: 2
Joined: Fri Nov 29, 2019 8:42 am

nagios-plugins-mailq unexpected dependency on ssmtp package?

Post by Oxilion »

Hello,

We've been using Nagios and NRPE plugins for many years to monitor many servers that we setup as a hosting provider.

Since very recently, we suddenly got an unexpected and undesired issue with a dependency on the 'ssmtp' package when installing nagios-plugins-mailq with yum, on a DirectAdmin server.

DirectAdmin uses it's own CustomBuild script to compile the Exim MTA from source, which also provides the 'sendmail' symlinks on the system. The sendmail program is used by default for the PHP mail() function, but due to Exim's symlinks, this is actually handled by the Exim MTA, and this all used to work very well by default.

On our latest DirectAdmin server that we provisioned, somehow yum decided that the 'ssmtp' package is a dependency for nagios-plugins-mailq, and the installation of this ssmtp package breaks the sendmail program, by replacing the symlinks to its own binaries, resulting in a broken setup by default for everything that uses sendmail to send mail, including PHP's mail() function.

Upon trying to reproduce this behavior on different machines, we have been unsuccessful, but we still cannot get the nagios-plugins-mailq to install without also installing ssmtp.

Is there anyone here who had a similar experience, or could shed some light onto this undesired behavior? We'd like to keep monitoring the mail queue on this machine, but as it stands we cannot do so without breaking the sendmail functionality...we also would like to keep using yum and install packages without resorting to hacks and workarounds to fix something that never needed fixing before ;)

With kind regards,
Oxilion B.V.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: nagios-plugins-mailq unexpected dependency on ssmtp pack

Post by scottwilkerson »

If you are not installing from source the dependencies required if you are installing a package are going to depend on the packages for the repository on the OS you are installing on.

We do not maintain the packages in the repositories, only the source.

On an RPM based system you may be able to do something like this (this is just a theory try on a test machine first):

Code: Select all

rpm -Uvh --nodeps $(repoquery --location nagios-plugins-mailq)
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Oxilion
Posts: 2
Joined: Fri Nov 29, 2019 8:42 am

Re: nagios-plugins-mailq unexpected dependency on ssmtp pack

Post by Oxilion »

Hey Scott,

Thanks for your reply!

We did indeed think about going that route, but we're also very curious as to why this occurs in the first place ;) Installing via rpm with --nodeps feels like not so much a hack per se, but it does feel like a workaround that should not be necessary in my opinion. And it also only occurred on this one single VM, so more research might be needed.

Would you happen to know who decides the dependencies for yum packages? Would that be the maintainer of, in this case, the EPEL repository? Perhaps that should be the next stop in this conundrum?

With kind regards,

Oxilion
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: nagios-plugins-mailq unexpected dependency on ssmtp pack

Post by scottwilkerson »

It would be the maintainer of the nagios-plugins package for epel, that is correct.
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Locked