Page 1 of 2

Configure Email NagiosXI

Posted: Tue Jan 31, 2017 3:02 am
Hi team,

I am trying to configure my NAgios XI to send emails but i keep getting the error
Mailer said: [01-31-2017 09:51:03] SMTP Error: Could not connect to SMTP host. (method=smtp;host=webmail.mycompany.co.ke;port=25;smtpauth=true;security=ssl), Referer: admin/testemail.php
An error occurred sending a test email! (i mycompany is a fictitious name to represent the company i work for)...attached is the screenshot of my settings. I can telnet to port 25 of the mail server from the Nagiosxi server. I dont get why i cant send..any ideas fam?

Re: Configure Email NagiosXI

Posted: Tue Jan 31, 2017 10:48 am
by dwhitfield
As a starting point, did you go through https://assets.nagios.com/downloads/nag ... ios-XI.pdf ?

You'll also want to take a look at https://support.nagios.com/kb/article.php?id=36

What version of XI are you using? There are some *old* notification bugs, so I doubt that's what's going on judging by your screenshot, but it will be useful info for recreating your issue.

Re: Configure Email NagiosXI

Posted: Tue Jan 31, 2017 2:14 pm
by rkennedy
Is the nagios machine able to resolve webmail.mycompany.co.ke? If so, then my next bet would be to look at SSL part. Are you sure that you're using the right port for SSL connections?

Lastly, authenticating to send from [email protected] most likely won't work - you'll need to provide a valid address that the account has send as permissions for, and adjust the 'Send Mail From' variable accordingly.

Re: Configure Email NagiosXI

Posted: Fri Feb 03, 2017 3:41 am
The server is able to resolve... I am just trying to send a sample email.
using the admin>manage mail settings......

PING webmail.mycompany.co.ke (172.29.229.99) 56(84) bytes of data.
64 bytes from webmail.mycompany.co.ke (172.29.229.99): icmp_seq=1 ttl=254 time=0.472 ms
64 bytes from webmail.mycompany.co.ke (172.29.229.99): icmp_seq=2 ttl=254 time=0.472 ms
64 bytes from webmail.mycompany.co.ke (172.29.229.99): icmp_seq=3 ttl=254 time=0.342 ms
64 bytes from webmail.mycompany.co.ke (172.29.229.99): icmp_seq=4 ttl=254 time=0.546 ms
64 bytes from webmail.mycompany.co.ke (172.29.229.99): icmp_seq=5 ttl=254 time=0.462 ms
^C
--- webmail.mycompany.co.ke ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 3999ms
rtt min/avg/max/mdev = 0.342/0.458/0.546/0.071 ms


It could actually be SSL..any doc on how to add company certs for NAgiosxi you might know about?

Re: Configure Email NagiosXI

Posted: Fri Feb 03, 2017 10:53 am
by rkennedy
You could verify this with openssl s_client against port 25 of webmail.mycompany.co.ke - it may just take importing a CA cert. It isn't anything specific to Nagios, but actually the linux system. This link should help - http://kb.kerio.com/product/kerio-conne ... -1605.html

Re: Configure Email NagiosXI

Posted: Sat Feb 04, 2017 1:05 am
Thanks for the response.Currently doing that for red-hat linux. If i may ask, are there company specific certificates that one should use instead of these?

regards

Re: Configure Email NagiosXI

Posted: Mon Feb 06, 2017 11:31 am
by tmcdonald
I guess I'm a bit unclear what you are asking. If your company has generated its own certificate then by all means you are free to use that.

Re: Configure Email NagiosXI

Posted: Mon Feb 06, 2017 11:32 am
by tgriep
If you can telnet to port 25 on your SMTP server and it responds with text, then you shouldn't have to select SSL for the security setting on the Admin > Manage Email Settings page in the XI GUI.
Try setting it to None and see if that fixes the issue for you.

Re: Configure Email NagiosXI

Posted: Wed Feb 08, 2017 6:56 am
i get an authentication error when i dont use SSL

A test email was sent to [email protected]
----
Mailer said: [02-08-2017 16:53:11] SMTP Error: Could not authenticate. (method=smtp;host=webmail.mycompany.co.ke;port=25;smtpauth=true;security=none), Referer: admin/testemail.php
An error occurred sending a test email!


the email i am using is mine....tough one this one it seems!

Re: Configure Email NagiosXI

Posted: Wed Feb 08, 2017 10:43 am
by rkennedy
rkennedy wrote: Lastly, authenticating to send from [email protected] most likely won't work - you'll need to provide a valid address that the account has send as permissions for, and adjust the 'Send Mail From' variable accordingly.
See my statement above. You'll more than likely need to change the send from to match who you're authenticating as.