Page 1 of 1

email notification suddenly stopped working

Posted: Thu Aug 02, 2012 11:53 am
by chewy747
I setup nagios about 8 months ago or so. I never did anything special to get email notification to work but it always did right out of the gate, then all of a sudden it stopped working. Im having trouble finding any definitive guides to getting it working or troubleshooting. Im having trouble even sending a test mail out from the nagios box.
This is an opensuse linux box if it makes any difference. Thanks for any help!

Re: email notification suddenly stopped working

Posted: Thu Aug 02, 2012 2:08 pm
by slansing
Which MTA are you using to send the emails out as notifications occur, has your domain changed at all?

Re: email notification suddenly stopped working

Posted: Thu Aug 02, 2012 2:11 pm
by chewy747
im not sure since when I originally set up nagios the email notifications just worked automatically.

Re: email notification suddenly stopped working

Posted: Thu Aug 02, 2012 5:00 pm
by lmiltchev
You should probably first check if notifications are enabled globally in the nagios.cfg file. You should have:

Code: Select all

enable_notifications=1
You can also try sending a test e-mail from terminal:

Code: Select all

echo test | mail <your_email>

Re: email notification suddenly stopped working

Posted: Thu Aug 02, 2012 6:56 pm
by chewy747
notifications are enabled

here is the results that get sent back

This is the mail system at host nagios.domain.lan.

I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.

For further assistance, please send mail to postmaster.

If you do so, please include this problem report. You can
delete your own text from the attached returned message.

The mail system

<[email protected]>: unable to look up host domain.org: Name or service not
known

--0B0AB6C830.1343951551/nagios.domain.lan
Content-Description: Delivery report
Content-Type: message/delivery-status

Reporting-MTA: dns; nagios.domain.lan
X-Postfix-Queue-ID: 0B0AB6C830
X-Postfix-Sender: rfc822; [email protected]
Arrival-Date: Thu, 2 Aug 2012 19:52:31 -0400 (EDT)

Final-Recipient: rfc822; [email protected]
Action: failed
Status: 5.4.4
Diagnostic-Code: X-Postfix; unable to look up host domain.org: Name or
service not known

--0B0AB6C830.1343951551/nagios.domain.lan
Content-Description: Undelivered Message
Content-Type: message/rfc822

Return-Path: <[email protected]>
Received: by nagios.domain.lan (Postfix, from userid 0)
id 0B0AB6C830; Thu, 2 Aug 2012 19:52:31 -0400 (EDT)
Date: Thu, 02 Aug 2012 19:52:31 -0400
To: [email protected]
User-Agent: Heirloom mailx 12.2 01/07/07
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-Id: <[email protected]>
From: [email protected] (root)

test

--0B0AB6C830.1343951551/nagios.domain.lan--



lmiltchev wrote:You should probably first check if notifications are enabled globally in the nagios.cfg file. You should have:

Code: Select all

enable_notifications=1
You can also try sending a test e-mail from terminal:

Code: Select all

echo test | mail <your_email>

Re: email notification suddenly stopped working

Posted: Fri Aug 03, 2012 9:41 am
by nscott
It looks like Postfix isn't set up. Do you remember doing any setup for Postfix at all? Or is [email protected] actually a valid email address in your system?

Re: email notification suddenly stopped working

Posted: Fri Aug 03, 2012 10:13 am
by chewy747
nscott wrote:It looks like Postfix isn't set up. Do you remember doing any setup for Postfix at all? Or is [email protected] actually a valid email address in your system?
I never did anything to setup postfix. I just replaced our actual domain name with "domain" when posting. [email protected] is valid

Re: email notification suddenly stopped working

Posted: Wed Aug 15, 2012 9:36 am
by chewy747
Anyone have a guide to setup postfix?

Re: email notification suddenly stopped working

Posted: Fri Aug 17, 2012 9:40 am
by agriffin
Postfix is a rather complicated piece of software. If you're still having problems with it, I suggest you consult its documentation and community rather than relying on the Nagios community. Unfortunately, we can't be experts on every piece of software that Nagios comes into contact with.