Nagios Email-LAN Notification

This forum is intended for the discussion of Nagios Core development. Feature requests, patches, bug fixes, and all types of development-related discussions are welcome!

NOTE: The SourceForge.net nagios-devel mailing list has been deprecated in favor of this forum in order to expedite support and provide additional features not available on the old mailing list.

Nagios Email-LAN Notification

Postby faziz » Mon Aug 06, 2018 3:04 am

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
faziz
 
Posts: 14
Joined: Mon Mar 12, 2018 4:47 am

Re: Nagios Email-LAN Notification

Postby mcapra » Mon Aug 06, 2018 11:50 am

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.
Former Nagios employee
http://www.mcapra.com/
User avatar
mcapra
 
Posts: 3372
Joined: Thu May 05, 2016 3:54 pm

Re: Nagios Email-LAN Notification

Postby scottwilkerson » Mon Aug 06, 2018 2:14 pm

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
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
scottwilkerson
DevOps Engineer
 
Posts: 11179
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Re: Nagios Email-LAN Notification

Postby faziz » Wed Aug 08, 2018 8:19 am

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
faziz
 
Posts: 14
Joined: Mon Mar 12, 2018 4:47 am

Re: Nagios Email-LAN Notification

Postby scottwilkerson » Wed Aug 08, 2018 8:37 am

Does the exchange server recognize the To: and From: addresses? there is part of the error you clipped which shows what Host not found
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
scottwilkerson
DevOps Engineer
 
Posts: 11179
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Re: Nagios Email-LAN Notification

Postby faziz » Sun Aug 12, 2018 12:31 am

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,
faziz
 
Posts: 14
Joined: Mon Mar 12, 2018 4:47 am

Re: Nagios Email-LAN Notification

Postby scottwilkerson » Mon Aug 13, 2018 7:41 am

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
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
scottwilkerson
DevOps Engineer
 
Posts: 11179
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises


Return to Nagios Core Development

Who is online

Users browsing this forum: No registered users and 6 guests