cannot send email

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
tonkaUser
Posts: 54
Joined: Tue Nov 28, 2017 10:27 am

cannot send email

Post by tonkaUser »

Hi,

We downloaded Nagios XI (.ova file) and have it up and running. We cannot send email however. I see the below "connection refused messages" in my /var/log/maillog. The mail server configured in Nagios Web UI is smtp.xyz.com, but somehow the log shows connection to xyz.com. See below:

Nov 28 10:35:20 localhost postfix/qmgr[1590]: CFC701347: from=<[email protected]>, size=1034, nrcpt=1 (queue active)
Nov 28 10:35:20 localhost postfix/smtp[6969]: connect to xyz.com[54.209.30.175]:25: Connection refused

Do I need to change /etc/mail/sendmail.mc? Sendmail and sendmail-cf are installed. For the prototype, we don't use auth for snmp server now. Any advice what needs to be changed?

[root@localhost nrdsconfigmanager]# rpm -qa | grep sendmail
sendmail-cf-8.14.4-9.el6_8.1.noarch
sendmail-8.14.4-9.el6_8.1.x86_64


Thanks!
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: cannot send email

Post by npolovenko »

Hello, @tonkaUser. Please navigate to:

Code: Select all

/usr/local/nagios/libexec/ 
and run:

Code: Select all

 ./check_smtp -H smtp.xyz.com -p port_number
Please replace the hostname and the portnumber and attempt to run this check.
Let us know if the connection goes through or not.

Did you also select SMTP as a mailing method instead of a Sendmail?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
tonkaUser
Posts: 54
Joined: Tue Nov 28, 2017 10:27 am

Re: cannot send email

Post by tonkaUser »

The SMTP check is fine. So must be an issue with sendmail. i updated to use SMTP instead of sendmail and it works now.

[root@localhost libexec]# ./check_smtp -H smtp.xyz.local -p 25
SMTP OK - 0.004 sec. response time|time=0.004209s;;;0.000000
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: cannot send email

Post by npolovenko »

@tonkaUser, Great! Do you have any other questions before I lock this thread as resolved?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
tonkaUser
Posts: 54
Joined: Tue Nov 28, 2017 10:27 am

Re: cannot send email

Post by tonkaUser »

We have setup alerting for a server. We have a contact which is a distribution list ([email protected]) (under alerting->Contacts). The contact has host/service notification turned On. We also have notify-service-by-email/notify-host-by-email.
A host has two contact under its manage contacts me and the DL. Only I get alerts and DL does not get notifications. We use SMTP configured as mail setting.

I do see errors in /var/log/maillog. Why are alerts not sent to contact TestMonitorAlerts? The contact does not have a corresponding user.

Nov 29 12:55:22 localhost postfix/error[15424]: C3042D91: to=<[email protected]>, relay=none, delay=2162, delays=2162/0.14/0/0.01, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to prcm.com[54.209.30.175]:25: Connection refused)

Thank you
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: cannot send email

Post by npolovenko »

@tonkaUser, Please go to that contact settings one more time and under Alert settings, modify Service Notification command and Host Notification command from notify-service-by-email/notify-host-by-email to xi_host_notification_handler and xi_service_notification_handler accordingly. So delete the old commands and assign the new ones. Let us know if that worked.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
tonkaUser
Posts: 54
Joined: Tue Nov 28, 2017 10:27 am

Re: cannot send email

Post by tonkaUser »

Did not work unfortunately. This is how we configured the contact:
contact_details.png
contact2.png
You do not have the required permissions to view the files attached to this post.
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: cannot send email

Post by dwhitfield »

When did you download the OVA? There was a packaging error in late Oct/early Nov that caused notifications to fail. The fix is easy. You just run the 5.4.11 upgrade script.
Last edited by dwhitfield on Thu Nov 30, 2017 11:21 am, edited 1 time in total.
Reason: just trying to avoid future confusion since I used the ticket profile clipping
tonkaUser
Posts: 54
Joined: Tue Nov 28, 2017 10:27 am

Re: cannot send email

Post by tonkaUser »

What is my ticket number? I can upload it to the link you gave. I am checking with our infosec guys, so they can allow zip file upload. Thanks
tonkaUser
Posts: 54
Joined: Tue Nov 28, 2017 10:27 am

Re: cannot send email

Post by tonkaUser »

Btw, we're on 5.4.11:

Nagios XI Version : 5.4.11
localhost.localdomain 2.6.32-696.13.2.el6.x86_64 x86_64
CentOS release 6.9 (Final)
Gnome is not installed
Locked