Page 1 of 4
Email Delivery Wizard - SMTP Uknown
Posted: Fri Apr 19, 2019 11:09 am
by rferebee
Good morning... me again...
Our Exchange admins would like us to test SMTP traffic using Nagios. It was recommended that I utilize the 'Email Delivery' wizard to set this up.
However, the check keeps coming back as an Unknown status and I'm not sure why...
Here's how I have the check configured:
check_email_delivery!--mailto [email protected] --mailfrom [email protected] -H server.state.nv.us --smtp-server server.state.nv.us --smtp-username '[email protected]' --smtp-password 'xxxxxxxxxxx' --smtp-port 25 --imap-server server.state.nv.us --username '[email protected]' --password 'xxxxxxxxxxx' --imap-port 143
See screen shot for check current check state. I've tried with different mail servers and it comes back the same every time. Is there perhaps a permit that I need to have in place or something I need to configure on my XI box?
Re: Email Delivery Wizard - SMTP Uknown
Posted: Fri Apr 19, 2019 11:39 am
by npolovenko
Welcome back,
@rferebee! Please replace all xxx in my command with the real data and run this command from the command line:
/usr/local/nagios/libexec/check_email_delivery --mailto xxxxxxx --mailfrom xxxxxxx -H xx.xxx.xxx.xxx --smtp-server xx.xxx.xxx.xxx --smtp-username 'xxxxxxx' --smtp-password 'xxxxxxx ' --smtp-port 25 --imap-server xx.xxx.xxx.xxx --imap-username 'xxxxxxx' ---map-password 'xxxxxxx ' --imap-port 143
And show me the output.
Re: Email Delivery Wizard - SMTP Uknown
Posted: Fri Apr 19, 2019 11:51 am
by rferebee
Here's the output.
Re: Email Delivery Wizard - SMTP Uknown
Posted: Fri Apr 19, 2019 11:56 am
by rferebee
Sorry, it looks like there was a typo in that line of text where "--imap password" should have been. I fixed it and here's the updated output.
Re: Email Delivery Wizard - SMTP Uknown
Posted: Fri Apr 19, 2019 11:58 am
by npolovenko
@rferebee, Sorry, It should be
---imap-password instead of ---map-password. Can you change it in your command and try one more time?
Re: Email Delivery Wizard - SMTP Uknown
Posted: Fri Apr 19, 2019 12:25 pm
by rferebee
Yes, I fixed it. The second screen shot above is the output of the corrected command. Still no joy.
Re: Email Delivery Wizard - SMTP Uknown
Posted: Fri Apr 19, 2019 1:28 pm
by rferebee
Ok, I think I got this working. I had to adjust the argument according to what was returned in the command line.
It looks like this:
-H xx.xxx.xxx.xxx --mailto [email protected] --mailfrom [email protected] --body 'On-Prem SMTP Test' --username [email protected] --password xxxxxx -w 180 -c 300 --imap-check-interval 3600
The email was sent, but what's odd is that the check is still coming back as 'Unknown' even though the message went out and was received.
Re: Email Delivery Wizard - SMTP Uknown
Posted: Fri Apr 19, 2019 1:33 pm
by rferebee
Ok, so the status just changed to Critical for some reason.
I don't know what the heck, "(Return code of 127 is out of bounds. Check if plugin exists)" means...
Re: Email Delivery Wizard - SMTP Uknown
Posted: Fri Apr 19, 2019 2:55 pm
by npolovenko
@rferebee, Weird. Can you sign in as nagios user and run the new command?
Does it work ok or fail?
Also, is this you command in XI?
If so, it needs to be:
And you should replace all xxxx.
Untitled.png
Re: Email Delivery Wizard - SMTP Uknown
Posted: Fri Apr 19, 2019 3:15 pm
by rferebee
So, when I sign into XI as the Nagios account and run the updated command it returns "Command Not Found".
When I remove the -H xx.xxx.xxx.xxx from my original command in the GUI it doesn't fail, but it began spamming the account with the same e-mail over and over, not following the 1 hour interval I set.
So, it's working, technically. Just not the way we want.