My email notifications from nagios have stopped

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
billperrotta
Posts: 115
Joined: Fri Feb 21, 2014 11:44 am

Re: My email notifications from nagios have stopped

Post by billperrotta »

The other netadmin insists that we shouldn't create another mx record. Is there a way to just relay to a webmail address instead?

At least then I could confirm postfix is working 100% before trying to mess with mx records or anything else.

Changing the your email address goes here to yahoo I still couldn't receive the alert email.

are there other config files besides contacts.cfg that I was missing changing?
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: My email notifications from nagios have stopped

Post by sreinhardt »

Relay is not quite the right word, as a relay would really take a message from a sender and forward it to the proper domain or another relay, but thats just symantecs, regardless I know what you mean. I would suggest sending to a gmail address if you wish to send it elsewhere, as yahoo and other providers are notorious for deleting spam instead of sending it to your spam folder as gmail almost always does. Additionally, you really wouldn't want to modify the contact, but the user settings within the admin menu, as the xi notification handlers will use that instead of the contact address.(I know its kind of misleading). So try sending to gmail instead, or send to the old address, or another email addy at the old domain, as that likely is already white-listed, or has a proper internal mx record to point to your exchange server internally opposed to external.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
billperrotta
Posts: 115
Joined: Fri Feb 21, 2014 11:44 am

Re: My email notifications from nagios have stopped

Post by billperrotta »

The only place I have the email contact addresses configured is contacts.cfg

is there anywhere else contact email addresses are configured?

Also if I new where "directory where stuck emails are(outbox for sendmail" Maybe I could forward one to xlogic to help my main server get unblocked.

I am not well versed in Nagios or sendmail but I am trying to get this resolved.

so far switching to yahoo and gmail addresses I'm still not receiving alerts to either. i've tried after changing addresses restarting both postfix and nagios.


What else can I do to make sure all my postfix services are running?

MERGED:

--------------

testing postfix worked

Code: Select all

telnet 10.1.0.11 25
Trying 10.1.0.11...
Connected to 10.1.0.11.
Escape character is '^]'.
220 mail.cronow.com Microsoft ESMTP MAIL Service ready at Thu, 6 Mar 2014 16:21:11 -0500
EHLO
250-mail.cronow.com Hello [10.1.0.16]
250-SIZE 10485760
250-PIPELINING
250-DSN
250-ENHANCEDSTATUSCODES
250-STARTTLS
250-AUTH NTLM LOGIN
250-8BITMIME
250-BINARYMIME
250 CHUNKING
Mail From:[email protected]
250 2.1.0 Sender OK
RCPT TO:[email protected]
250 2.1.5 Recipient OK
DATA
354 Start mail input; end with <CRLF>.<CRLF>
testing the email system.
.
250 2.6.0 <f2a0daa0-005f-4f7f-a6a9-39e7192e8e54@mail-ahgserver.ahghotels.local> Queued mail for delivery
It sent email to my company account on exchange.

Please put on your thinking cap. There must be some way other than creating an internal mx record to get nagios to send through postfix.

MERGED:
--------------------

this has also been useless setting nagios.cfg to notification_timeout=120


Do not double or triple post, also... please wrap your code in the code wraps that are provided by this board. 2nd warning.
Last edited by slansing on Thu Mar 06, 2014 5:07 pm, edited 2 times in total.
Reason: Do not double or triple post, also... please wrap your code in the code wraps that are provided by this board. 2nd warning.
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: My email notifications from nagios have stopped

Post by sreinhardt »

This is not a valid test, and here is why.

Your test is using telnet, to a specific IP 10.1.0.11. This server is an internal mail server, not mxlogic, which likely has an internal mx record, note that you are not using dns or an application that would look up such records for this test, so I cannot validate if you have a proper record or not. Also this is not the IP that postfix is getting to send your email to, as it is presently receiving external IPs for mxlogic.

Secondly, the email address you are sending to in the test is at a separate domain, which if I recall, was the original domain that you were sending to that was working, and again likely has an internal mx record that nagios\postfix can route to. You can try sending to the amsterdamhospitality.com email from this same server, if you can than it really only strengthens my suggestion of a proper internal only mx record for this domain that points to your mail server.

So we again are back to the two options of creating an internal only mx record on your internal dns server(s), or white-listing on mxlogic.

The proper route, in my honest opinion, is to create an internal mail record, that points postfix to the internal mail server for this domain. Please note that this is not something that anyone outside of your company would ever have access to, as it should only be done on an internal dns server, not on something like godaddy, network solutions, or any other global dns management provider. This likely has been done long ago for finance36.com, and would just need to be replicated for amsterdamhospitality.com. I honestly would like to know what the other admins opposition to this is, it provides no security risks that are not already on your network, it does not provide external systems or entities information on your internal network, it only provides a proper path for any systems that route mail internally to directly talk with your mail server via the internal network instead of being forced to send data via clear text over the internet, which is a very bad idea especially for nagios alerts.

Here is an excellent example of what I feel should be done in your network, provided it is largely an M$ managed environment.

Some commands that you might run to test my theories of internal records(please put the results of these commands in your post):

Code: Select all

nslookup --querytype=MX mail-ahgserver.ahghotels.local
nslookup --querytype=MX ahghotels.local
nslookup --querytype=MX finance36.com
nslookup --querytype=MX mail.cronow.com
nslookup --querytype=MX cronow.com
nslookup --querytype=MX amsterdamhospitality.com

nslookup mail-ahgserver.ahghotels.local
nslookup ahghotels.local
nslookup finance36.com
nslookup mail.cronow.com
nslookup cronow.com
nslookup amsterdamhospitality.com
The second option is dealing with mxlogic, which I can only provide slight help to, however this page seems to point out what you likely need to do.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
billperrotta
Posts: 115
Joined: Fri Feb 21, 2014 11:44 am

Re: My email notifications from nagios have stopped

Post by billperrotta »

I hope I am allowed to post my reply here. I promise I will edit it if I think of anything else to add.
I believe I am not supposed to hit reply again until someone else posts. please correct me if I am wrong.

Code: Select all

nslookup --querytype=MX mail-ahgserver.ahghotels.local *** Invalid option: -querytype=MX
Server:  ahgserver2003.ahghotels.local
Address:  10.1.0.10

Name:    mail-ahgserver.ahghotels.local
Address:  10.1.0.11[code]
[/code]

Code: Select all

nslookup --querytype=MX ahghotels.local
*** Invalid option: -querytype=MX
Server:  ahgserver2003.ahghotels.local
Address:  10.1.0.10

Name:    ahghotels.local
Addresses:  10.1.0.10, 68.164.207.50[code]
[/code]

Code: Select all

nslookup --querytype=MX finance36.com
*** Invalid option: -querytype=MX
Server:  ahgserver2003.ahghotels.local
Address:  10.1.0.10

Name:    ahghotels.local
Addresses:  10.1.0.10, 68.164.207.50[code]
[/code]

Code: Select all

nslookup --querytype=MX mail.cronow.com
*** Invalid option: -querytype=MX
Server:  ahgserver2003.ahghotels.local
Address:  10.1.0.10

Name:    ahghotels.local
Addresses:  10.1.0.10, 68.164.207.50

Code: Select all

nslookup --querytype=MX cronow.com
*** Invalid option: -querytype=MX
Server:  ahgserver2003.ahghotels.local
Address:  10.1.0.10

Name:    ahghotels.local
Addresses:  10.1.0.10, 68.164.207.50

Code: Select all

nslookup --querytype=MX amsterdamhospitality.com
*** Invalid option: -querytype=MX
Server:  ahgserver2003.ahghotels.local
Address:  10.1.0.10

Non-authoritative answer:
Name:    amsterdamhospitality.com
Address:  184.168.221.34

Code: Select all

nslookup mail-ahgserver.ahghotels.local
Server:  ahgserver2003.ahghotels.local
Address:  10.1.0.10

Name:    mail-ahgserver.ahghotels.local
Address:  10.1.0.11

Code: Select all

C:\Documents and Settings\bperrotta>nslookup ahghotels.local
Server:  ahgserver2003.ahghotels.local
Address:  10.1.0.10

Name:    ahghotels.local
Addresses:  10.1.0.10, 68.164.207.50

Code: Select all

C:\Documents and Settings\bperrotta>nslookup finance36.com
Server:  ahgserver2003.ahghotels.local
Address:  10.1.0.10

Non-authoritative answer:
Name:    finance36.com
Address:  50.63.202.87

Code: Select all

C:\Documents and Settings\bperrotta>nslookup mail.cronow.com
Server:  ahgserver2003.ahghotels.local
Address:  10.1.0.10

Non-authoritative answer:
Name:    mail.cronow.com
Address:  38.126.135.3

Code: Select all

nslookup cronow.com

C:\Documents and Settings\bperrotta>nslookup cronow.com
Server:  ahgserver2003.ahghotels.local
Address:  10.1.0.10

Non-authoritative answer:
Name:    cronow.com
Address:  184.168.37.1

Code: Select all

nslookup amsterdamhospitality.com

C:\Documents and Settings\bperrotta>nslookup amsterdamhospitality.com
Server:  ahgserver2003.ahghotels.local
Address:  10.1.0.10

Non-authoritative answer:
Name:    amsterdamhospitality.com
Address:  184.168.221.34
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: My email notifications from nagios have stopped

Post by sreinhardt »

Apparently windows nsclient does not like --querytype, as linux nsclient supports, but no big deal. I think this pretty well displays my point that even your A or cname records point all of your other domains to either 10.1.0.10, or 10.1.0.10(which based on name appears to be your mail server. If this is housing the amsterdamnhospitality.com mail as well, it should be as simple as replicating any of these other records for amsterdamhostpitality. Specifically I would note how both of your requests for that domain return external only addresses:

Code: Select all

nslookup --querytype=MX amsterdamhospitality.com
*** Invalid option: -querytype=MX
Server:  ahgserver2003.ahghotels.local
Address:  10.1.0.10

Non-authoritative answer:
Name:    amsterdamhospitality.com
Address:  184.168.221.34

nslookup amsterdamhospitality.com

nslookup amsterdamhospitality.com
Server:  ahgserver2003.ahghotels.local
Address:  10.1.0.10

Non-authoritative answer:
Name:    amsterdamhospitality.com
Address:  184.168.221.34
Just to clarify on slansing's edit, you are correct we do not want to have multiple posts, however you are welcome to edit and modify previous posts to add or modify information.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
billperrotta
Posts: 115
Joined: Fri Feb 21, 2014 11:44 am

Re: My email notifications from nagios have stopped

Post by billperrotta »

Thanks for your help I went back to mxlogic and discovered my Sonicwall was blocking nagios alerts.
SMTP was authorized for nagios old ip. I went back and corrected it. Thanks for putting up with me.
Locked