Nagios Core - mail notification not working

An open discussion forum for obtaining help with Nagios Core. Nagios Core users of all experience levels are welcome here. Subforum have been created for the discussion of Nagios Core and Nagios Plugin development.

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

Nagios Core - mail notification not working

Postby Maheswari K » Wed Sep 13, 2017 1:49 am

Hi,

We are trying to use Nagios core for monitoring and it is new to us.

Currently we tried to send notification mails from Nagios by using the default postfix mail daemon. For this modified some configuration in the main.cf file as suggested in forum. After restarting the postfix service trying to send mail notification manually by executing the below command and getting error message in maillog file. Also mail is not received.

Can you help me to understand the error and fix it. Thanks.

Command:
mail -s "Hello World" maheswari.k@intellectdesign.com

Error in maillog file:
Sep 13 11:58:24 NXTDEVNAGIOS postfix/smtp[27404]: E5E2D241B3: to=<maheswari.k@intellectdesign.com>, relay=none, delay=409, delays=409/0.07/0/0, dsn=4.4.3, status=deferred (Host or domain name not found. Name service error for name=intellectdesign.com type=MX: Host not found, try again)

Maheswari.K
Maheswari K
 
Posts: 4
Joined: Tue Dec 20, 2016 12:31 pm

Re: Nagios Core - mail notification not working

Postby scottwilkerson » Wed Sep 13, 2017 11:55 am

I'm not sure what changes you made in your postfix config, but the error you received looks like it cannot resolve the MX record for

Can you verify you post the output of the following from your nagios server
Code: Select all
cat /etc/resolv.conf

and
Code: Select all
dig intellectdesign.com MX
User avatar
scottwilkerson
CTO
 
Posts: 7620
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Re: Nagios Core - mail notification not working

Postby Maheswari K » Thu Sep 14, 2017 12:54 am

Hi,

Please find the output.

[root@NXTDEVNAGIOS ~]# cat /etc/resolv.conf
nameserver 172.18.20.20
nameserver 172.18.20.21

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

[root@NXTDEVNAGIOS ~]# dig intellectdesign.com MX

; <<>> DiG 9.9.4-RedHat-9.9.4-29.el7 <<>> intellectdesign.com MX
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 50149
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1280
;; QUESTION SECTION:
;intellectdesign.com. IN MX

;; AUTHORITY SECTION:
intellectdesign.com. 3600 IN SOA nxtidadds01.intellectdesign.com. hostmaster.intellectdesign.com. 1527149 900 600 86400 3600

;; Query time: 0 msec
;; SERVER: 172.18.20.20#53(172.18.20.20)
;; WHEN: Thu Sep 14 11:01:23 IST 2017
;; MSG SIZE rcvd: 107
Maheswari K
 
Posts: 4
Joined: Tue Dec 20, 2016 12:31 pm

Re: Nagios Core - mail notification not working

Postby Maheswari K » Thu Sep 14, 2017 3:02 am

Hi,

Now we are able to send mail using the below command to out test mail server after doing some changes in main.cf and resolv.conf files.

command:
mail -s "Hello World" test1@development.com

Mail is going to our test mailbox. Checked the mail log also.
Sep 14 13:04:23 NXTDEVNAGIOS postfix/smtp[11496]: BB94D23A8D: to=<test1@development.com>, relay=172.16.103.179[172.16.103.179]:25, delay=4.9, delays=0.03/0.01/4.9/0, dsn=2.0.0, status=sent (250 Message accepted for delivery)

But the monitoring related alert mails are not getting delivered. When checked in mail log have seen the below error message.
Error:
Sep 14 13:08:02 NXTDEVNAGIOS postfix/postdrop[11513]: warning: mail_queue_enter: create file maildrop/58696.11513: Permission denied

Where to fx this permission problem.
Maheswari K
 
Posts: 4
Joined: Tue Dec 20, 2016 12:31 pm

Re: Nagios Core - mail notification not working

Postby tmcdonald » Thu Sep 14, 2017 1:22 pm

A few posts online with similar issues have recommended rebooting, or at least restarting the postfix/postdrop process again as it might still be holding on to the old permissions.
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
tmcdonald
Support Lead / Operations Engineer
 
Posts: 8683
Joined: Mon Sep 23, 2013 8:40 am


Return to Nagios Core

Who is online

Users browsing this forum: No registered users and 12 guests