Page 1 of 2
SMTP Error
Posted: Tue Dec 06, 2011 3:44 pm
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.
Re: SMTP Error
Posted: Fri Dec 09, 2011 12:03 pm
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:
You can run this command to see all available options for "check_smtp":
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.
Re: SMTP Error
Posted: Mon Dec 12, 2011 1:30 pm
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
Re: SMTP Error
Posted: Mon Dec 12, 2011 3:37 pm
by lmiltchev
Try to install the missing packages via "yum" - it should take care of the prerequisites as well.
Re: SMTP Error
Posted: Mon Dec 12, 2011 4:05 pm
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
Re: SMTP Error
Posted: Mon Dec 12, 2011 4:34 pm
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.
Re: SMTP Error
Posted: Tue Dec 13, 2011 12:47 pm
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?
Re: SMTP Error
Posted: Tue Dec 13, 2011 12:59 pm
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
Re: SMTP Error
Posted: Tue Dec 13, 2011 2:08 pm
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
Re: SMTP Error
Posted: Tue Dec 13, 2011 2:54 pm
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