Sendmail Not Working

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
ecolgroveMOT
Posts: 64
Joined: Thu Aug 22, 2019 1:58 pm

Sendmail Not Working

Post by ecolgroveMOT »

I receive this:

A test email was sent to eric@ezaccessmot.com
----
Mailer said: [10-07-2019 10:15:46] Message sent! (method=sendmail), Referer: admin/testemail.php
Use this to send a test email to your current logged in user address to verify you can recieve alerts from Nagios XI.

An email will be sent to: eric@ezaccessmot.com

Change your email address

But no email has been received, please help!
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Sendmail Not Working

Post by mcapra »

Are you using Nagios Core or Nagios XI? You posted in the Nagios Core section, but mention Nagios XI.

Check your mail server logs if you have access to them. Many mail servers straight up reject any messages sent via sendmail, in which case you may need to configure an SMTP server instead to "play nice" with your mail server.

Here's the XI documentation for setting up email notifications:
https://assets.nagios.com/downloads/nag ... ios-XI.pdf

And the general purpose troubleshooting documentation for XI:
https://support.nagios.com/kb/article.php?id=36
Former Nagios employee
https://www.mcapra.com/
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: Sendmail Not Working

Post by benjaminsmith »

Thanks @mcapra!

As Matt suggested, check the mail log (/var/log/maillog) for error messages, If the message was sent, then check the spam folders as it maybe there.

Let us know what you find.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
ecolgroveMOT
Posts: 64
Joined: Thu Aug 22, 2019 1:58 pm

Re: Sendmail Not Working

Post by ecolgroveMOT »

Thanks for the support guys and the suggestions the sendmailer now works, however the SMTP option produces this error:

Mailer said: [10-09-2019 10:06:13] SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/ ... leshooting (method=smtp;host=smtp.office365.com;port=587;smtpauth=true;security=tls), Referer: admin/testemail.php
An error occurred sending a test email!

Any suggestions?
User avatar
mbellerue
Posts: 1403
Joined: Fri Jul 12, 2019 11:10 am

Re: Sendmail Not Working

Post by mbellerue »

Could you attempt to send a test email message, let it fail, and then PM me a fresh copy of your system profile? You can get that from Admin -> System Profile -> Download Profile.

Just for the sake of future troubleshooting, this is a continuation from a previous troubleshooting session. We have already verified with nmap that the Nagios server can see the SMTP port on the destination server as Open and not Filtered. Also tried a known good account.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
mbellerue
Posts: 1403
Joined: Fri Jul 12, 2019 11:10 am

Re: Sendmail Not Working

Post by mbellerue »

Okay, I have your profile, but I forgot one piece in my initial request. In your Outbound Mail Settings, just under SMTP, there is a checkbox that enables logging to phpmailer.log. Could you make sure that is checks, hit Update, send another test email, and then download the profile once more?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked