Page 1 of 1

Nagios Email-LAN Notification

Posted: Mon Aug 06, 2018 3:04 am
by faziz
Hello

I have nagios core send notification to public emails, but when i change to send mails to local IP of exchange server through LAN not WAN, it did not work and I got below errors

dsn=4.4.3, status=deferred (delivery temporarily suspended: Host or domain name not found. Name service error for name=... type=MX: Host not found, try again)

Thanks

Re: Nagios Email-LAN Notification

Posted: Mon Aug 06, 2018 11:50 am
by mcapra
This sounds like a problem (but not really a problem; more like a security feature) on the Exchange side of things.

Have you tried resolving the DNS in /etc/hosts to use the LAN address instead of hard-coding it? Then, in your notification handler, using the DNS.

If that doesn't fix things, it would be helpful to see the exact notification handler you've configured.

Re: Nagios Email-LAN Notification

Posted: Mon Aug 06, 2018 2:14 pm
by scottwilkerson
faziz wrote:dsn=4.4.3, status=deferred (delivery temporarily suspended: Host or domain name not found. Name service error for name=... type=MX: Host not found, try again)
The server is getting this from the server you are sending to.

I would also verify that the "From" address your system is sending from is valid, this may be why your exchange server is rejecting the message

Re: Nagios Email-LAN Notification

Posted: Wed Aug 08, 2018 8:19 am
by faziz
I write in /etc/hosts to resolve locally, but did not work
I don't think issue from From, because when i use WAN link it is working fine, but when I use LAN to resolve locally I got this error;
Is there method I can send emails from nagios to Firewall? and from firewall I already relay emails to mail server

Re: Nagios Email-LAN Notification

Posted: Wed Aug 08, 2018 8:37 am
by scottwilkerson
Does the exchange server recognize the To: and From: addresses? there is part of the error you clipped which shows what Host not found

Re: Nagios Email-LAN Notification

Posted: Sun Aug 12, 2018 12:31 am
by faziz
If that doesn't fix things, it would be helpful to see the exact notification handler you've configured.
From where I can get this?
Does the exchange server recognize the To: and From: addresses? there is part of the error you clipped which shows what Host not found
Yes,

Re: Nagios Email-LAN Notification

Posted: Mon Aug 13, 2018 7:41 am
by scottwilkerson
faziz wrote:
If that doesn't fix things, it would be helpful to see the exact notification handler you've configured.
From where I can get this?
You would look at the contact you have configured in nagios, and see what the name of the command is you specified for host_notification_handler and service_notification_handler

then look in your commands configuration to see the command.
faziz wrote:
Does the exchange server recognize the To: and From: addresses? there is part of the error you clipped which shows what Host not found

Yes,
If the exchange server recognizes this host, are you sure the host has a MX record in DNS? because the server you are sending to is reporting "Host or domain name not found" when doing a MX lookup