Page 1 of 1

Error when trying to send test mail

Posted: Mon Mar 06, 2017 9:04 am
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

Re: Error when trying to send test mail

Posted: Mon Mar 06, 2017 11:08 am
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?

Re: Error when trying to send test mail

Posted: Mon Mar 06, 2017 11:19 am
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?

Re: Error when trying to send test mail

Posted: Mon Mar 06, 2017 12:02 pm
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

Re: Error when trying to send test mail

Posted: Mon Mar 06, 2017 12:09 pm
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>.

Re: Error when trying to send test mail

Posted: Mon Mar 06, 2017 4:46 pm
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?

Re: Error when trying to send test mail

Posted: Tue Mar 07, 2017 5:00 am
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.

Re: Error when trying to send test mail

Posted: Tue Mar 07, 2017 10:03 am
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?

Re: Error when trying to send test mail

Posted: Tue Mar 07, 2017 12:31 pm
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.

Re: Error when trying to send test mail

Posted: Tue Mar 07, 2017 3:45 pm
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?