Error when trying to send test mail

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
vijilants
Posts: 215
Joined: Wed Jun 12, 2013 2:50 pm

Error when trying to send test mail

Post by vijilants »

System:

Nagios XI Version : 5.2.3
CentOS release 6.5 (Final)


Hi,

Can someone please advise on the following:

Users have started complaining that no emails from the system seem to be getting genetrated.

When I tried to send a test email via the admin page, this is the message I am getting...
----
Mailer said: [03-06-2017 13:54:26] SMTP Error: Could not authenticate.

SMTP server error:
(method=smtp;host=XXXXX.XXXXXXX.net;port=3535;smtpauth=true;security=none), Referer: admin/testemail.php
An error occurred sending a test email!
Can someone please advise ?

Thanks
gormank
Posts: 1114
Joined: Tue Dec 02, 2014 12:00 pm

Re: Error when trying to send test mail

Post by gormank »

Has it worked in the past? What changed?
Try sending mail to yourself from bash. The . on an empty line sends:

# sendmail -v [email protected]
test
.

What does the output say?
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Error when trying to send test mail

Post by dwhitfield »

Thanks @gormank!

Are you sending mail from the Nagios server, or do you have an SMTP relay? I suspect the auth settings are just not correct. If you aren't the mail admin, check with the mail admin to make sure you have the right port, address, and security settings.

Also, does your XI server have a valid DNS name?
vijilants
Posts: 215
Joined: Wed Jun 12, 2013 2:50 pm

Re: Error when trying to send test mail

Post by vijilants »

dwhitfield wrote:Thanks @gormank!

Are you sending mail from the Nagios server, or do you have an SMTP relay? I suspect the auth settings are just not correct. If you aren't the mail admin, check with the mail admin to make sure you have the right port, address, and security settings.

Also, does your XI server have a valid DNS name?

Hi this has all been working for years and suddenly it stopped

Here is the Mail Settings:

Send mail from: "email address"

Mail method : SMTP

Host: SMTPOUT. XXXXX. XXXXX

Port:3535 ------I've also tried port 25

Username: XXXXX

Password: XXXXX

Is there any way of seeing if any email is backed up in the system as I would like to flush them out.

Thanks
Last edited by vijilants on Mon Mar 06, 2017 2:02 pm, edited 1 time in total.
vijilants
Posts: 215
Joined: Wed Jun 12, 2013 2:50 pm

Re: Error when trying to send test mail

Post by vijilants »

gormank wrote:Has it worked in the past? What changed?
Try sending mail to yourself from bash. The . on an empty line sends:

# sendmail -v [email protected]
test
.

What does the output say?

Tried this....here is the output but I diodn't receive the test email.....

Mail Delivery Status Report will be mailed to <root>.
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Error when trying to send test mail

Post by dwhitfield »

mailq will tell you if there is a queue.

What's the output of the following:

Code: Select all

traceroute smtpserver
telnet smtpserver 3535
nmap 192.168.3.140  -p 3535
Have you spoken with the mail and network admins to make sure nothing has changed?
vijilants
Posts: 215
Joined: Wed Jun 12, 2013 2:50 pm

Re: Error when trying to send test mail

Post by vijilants »

dwhitfield wrote:mailq will tell you if there is a queue.

What's the output of the following:

Code: Select all

traceroute smtpserver
telnet smtpserver 3535
nmap 192.168.3.140  -p 3535
Have you spoken with the mail and network admins to make sure nothing has changed?
Id' rather not post this info on a public forum thanks as it contains confidential IP information.

I am able to ping and telnet to the SMTP server.

Regarding your nmap command, where did you get 192.168.3.140 from ? Should it not be the smptserver address ? However...here is the result for nmap -p for the smtp server....
PORT STATE SERVICE
3535/tcp open unknown
I checked the debug log when I try to send an email and this is what I am getting....(I have put XXX in the address field to hide the server name)
[03-07-2017 04:45:54] SMTP Error: Could not authenticate.<p>SMTP server error: </p>
(method=smtp;host=smtpout.XXXX.XXXX;port=3535;smtpauth=true;security=none), Referer: admin/testemail.php
I've spoken with the mail admin (this is an external email service) and they claim nothing has changed.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Error when trying to send test mail

Post by tgriep »

The only other thing to look at is to see if the password has expired for the account used to authenticate to the SMTP server, can you check that?
Can the Email Admin of the SMTP server check in to that ans also look at the error log on the SMTP server?
Be sure to check out our Knowledgebase for helpful articles and solutions!
vijilants
Posts: 215
Joined: Wed Jun 12, 2013 2:50 pm

Re: Error when trying to send test mail

Post by vijilants »

tgriep wrote:The only other thing to look at is to see if the password has expired for the account used to authenticate to the SMTP server, can you check that?
Can the Email Admin of the SMTP server check in to that ans also look at the error log on the SMTP server?
I can log in to the mail account using a web front end client and using the credentials that I have in Nagios and also send email via the web front end client so the username / password is operational.

Unfortunately the service is with an external email provider so I can't get any response regarding logs.

Is there a process I could try restarting on the Nagios system ?

I really need to be 100% sure that it is not our system causing the issue.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Error when trying to send test mail

Post by tgriep »

You can try and restart the Nagios and the Apache daemons but I don't think that will fix it.
Run this as root to restart them.

Code: Select all

service nagios stop
killall -9 nagios
service httpd restart
service nagios start
Then try and send a test email.

Another question to your email provider, did the port or the security settings get changed from None to TLS or SSL?
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked