SMTP Error

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
ordwaycenter
Posts: 37
Joined: Tue Dec 06, 2011 2:42 pm

SMTP Error

Post by ordwaycenter »

I'm trying to set up Nagios XI for the first time and it won't connect to my Exchange server for SMTP. It says:

Mailer said: SMTP Error: Could not connect to SMTP host. (method=smtp;host=myserver.mydomain.local;port=25;smtpauth=true;security=ssl)

(My actual server name has been anonymized here).

I've tried all sorts of variations with port 465, .com instead of .local, the IP address of the server, etc. I can ping my exchange server from the console so I know it can get a connection. The email address I created and am using here definitely works on its own (like in Outlook).

Any ideas? Thanks.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: SMTP Error

Post by lmiltchev »

Try to test your check command from the command line first. Here is the document on how to do this:
http://support.nagios.com/wiki/index.ph ... mmand-line
Go to your plugins folder:

Code: Select all

# cd /usr/local/nagios/libexec
You can run this command to see all available options for "check_smtp":

Code: Select all

# ./check_smtp -h
Test your check command:

Code: Select all

./check_smtp -H <host_address> -p <port> -U <user> -P <password> -t <timeout>
Try different options and see how it works. Once you make it work from the command line, you can modify your check command through the Core Config Manager.
Hope this helps.
Be sure to check out our Knowledgebase for helpful articles and solutions!
ordwaycenter
Posts: 37
Joined: Tue Dec 06, 2011 2:42 pm

Re: SMTP Error

Post by ordwaycenter »

Thanks for your suggestions.

I ran that and I got "Connection Refused". I was going to try Telnet when I realized it's not on the system. I tried downloading and installing it and it had a bunch of prerequisites missing. Do you know if there's a big package of commands that I can download somewhere? My linux friend who was helping me said this system is missing a whole lot of common commands.

Thanks,
Dumont
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: SMTP Error

Post by lmiltchev »

Try to install the missing packages via "yum" - it should take care of the prerequisites as well.
Be sure to check out our Knowledgebase for helpful articles and solutions!
ordwaycenter
Posts: 37
Joined: Tue Dec 06, 2011 2:42 pm

Re: SMTP Error

Post by ordwaycenter »

When I do yum grouplist, it has a bunch of options. Are you saying one of those groups will include telnet?

Thanks,
Dumont
ordwaycenter
Posts: 37
Joined: Tue Dec 06, 2011 2:42 pm

Re: SMTP Error

Post by ordwaycenter »

Ok nevermind. I found the command: yum install telnet-server telnet
And then I was getting Error 404 messages so I had to do this: yum clean all
(what a mess!)

So now I get "...Microsoft ESMTP MAIL Service ready ..."
So I guess that part's good?

My test email is still failing though.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: SMTP Error

Post by lmiltchev »

Are you sure port 25 is not being blocked? Just for testing purposes, can you run the check against port 110 (pop3) and see if it is going to fail, too?
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: SMTP Error

Post by lmiltchev »

Try to run a check against a known open port 25, for example you can try:

# cd /usr/local/nagios/libexec
# ./check_smtp -H mail.tcinternet.net -p 25

You should see something like this:
smtp.png
You do not have the required permissions to view the files attached to this post.
Be sure to check out our Knowledgebase for helpful articles and solutions!
ordwaycenter
Posts: 37
Joined: Tue Dec 06, 2011 2:42 pm

Re: SMTP Error

Post by ordwaycenter »

Thanks. I ran that for port 25 and it said "SMTP OK". We do have POP3 disabled here, so port 110 is closed. Nagios only needs SMTP though, right?

Dumont
ordwaycenter
Posts: 37
Joined: Tue Dec 06, 2011 2:42 pm

Re: SMTP Error

Post by ordwaycenter »

Ok, I finally figured it out!

So apparently it's unnecessary to authenticate for SMTP. And then when I would remove the credentials, i realized that Chrome was sticking some nagiosadmin login in there. Once I turned that off and left it all empty, my test email sent!

Thanks for your help,
Dumont
Locked