<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=us-ascii" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.19154"></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=010511421-21112011><FONT color=#0000ff
size=2 face=Arial>Hi there --</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=010511421-21112011><FONT color=#0000ff
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=010511421-21112011><FONT color=#0000ff
size=2 face=Arial>I checked the nagios.log file, and the problem was due to the
mail binary not being at the /bin folder. I created a symbolic
link</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=010511421-21112011><FONT color=#0000ff
size=2 face=Arial>at that location to point to the /usr/bin/mail binary. Once
that was done, notifications were sent to the recipient. </FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=010511421-21112011><FONT color=#0000ff
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=010511421-21112011><FONT color=#0000ff
size=2 face=Arial>As a follow-up, the address of the Nagios server is shown to
be <A href="mailto:nagios@localdomain">nagios@localdomain</A>. I would like to
change that to reflect the</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=010511421-21112011><FONT color=#0000ff
size=2 face=Arial>name of the server. What file(s) do I need to modify in order
to make that happen?</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=010511421-21112011><FONT color=#0000ff
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=010511421-21112011><FONT color=#0000ff
size=2 face=Arial>Thanks. </FONT></SPAN></DIV><BR>
<DIV dir=ltr lang=en-us class=OutlookMessageHeader align=left>
<HR tabIndex=-1>
<FONT size=2 face=Tahoma><B>From:</B> Claudio Kuenzler
[mailto:ck@claudiokuenzler.com] <BR><B>Sent:</B> Monday, November 21, 2011 3:25
PM<BR><B>To:</B> Nagios Users List<BR><B>Subject:</B> Re: [Nagios-users] e-mail
notifications not being sent<BR></FONT><BR></DIV>
<DIV></DIV>Maybe you have to replace the mail program by something on your
system, e.g. /usr/bin/mailx.<BR>That's always one of the first things I change
in a new Nagios installation.<BR>What OS are you using? Try to install the
required programs (mail/mailx...) if they can't be found in your system.<BR><BR>
<DIV class=gmail_quote>On Mon, Nov 21, 2011 at 8:25 PM, Kaplan, Andrew H. <SPAN
dir=ltr><<A
href="mailto:AHKAPLAN@partners.org">AHKAPLAN@partners.org</A>></SPAN>
wrote:<BR>
<BLOCKQUOTE
style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex"
class=gmail_quote><U></U>
<DIV>
<P><FONT size=2 face=Arial>Hi there --</FONT> </P>
<P><FONT size=2 face=Arial>I completed the installation of Nagios 3.3.1, and I
am going through the testing process. The server is able to successfully
monitor</FONT></P>
<P><FONT size=2 face=Arial>our various clients, but e-mail notifications for
critical conditions are not being sent to the intended recipient. The e-mail
server that</FONT></P>
<P><FONT size=2 face=Arial>is on the Nagios server is the Postfix message
transfer agent. </FONT></P>
<P><FONT size=2 face=Arial>The troubleshooting steps that I have taken so far
are the following:</FONT> </P>
<P><FONT size=2 face=Arial>1. I have been able to send a test e-mail from the
Nagios server to the intended recipient using two different mail commands. The
test </FONT></P>
<P><FONT size=2 face=Arial> e-mail was done from the command
line using the mail and mailx commands using the command syntax:</FONT> </P>
<P><FONT size=2 face=Arial>mail <e-mail address> < /etc/fstab
</FONT><BR><FONT size=2 face=Arial>mailx -s "test" <e-mail address> <
/etc/fstab</FONT> </P>
<P><FONT size=2 face=Arial>2. I checked the contacts.cfg file, and confirmed
the intended recipient is listed with the correct address.</FONT> </P>
<P><FONT size=2 face=Arial>3. I checked the nagios.log, and there were entries
that were similar to the following:</FONT> </P>
<P><FONT size=2 face=Arial>[1321385615] Warning: Attempting to execute the
command "/usr/bin/printf "%b" "***** Nagios 2.6 *****\n\nNotification Type:
PROBLEM\nHost: ... Date/Time: Tue Nov 15 14:33:35 EST 2011\n" | </FONT></P>
<P><FONT size=2 face=Arial>/bin/mail -…<e-mail address>" resulted in a
return code of 127. Make sure the script or binary you are trying to
execute actually exists…</FONT></P>
<P><FONT size=2 face=Arial>I did a search for the mail binary, and there was
none at that location. To correct the problem, I created a symbolic that
pointed to the actual </FONT></P>
<P><FONT size=2 face=Arial>location of the mail binary which was located at
the /usr/bin/ folder.</FONT> </P>
<P><FONT size=2 face=Arial>4. As far as I can tell, all hosts have e-mail
notifications enabled on them.</FONT> </P>
<P><FONT size=2 face=Arial>What other steps do I need to take in order to get
e-mail notifications to work here?</FONT> </P>
<P><FONT size=2 face=Arial>Thanks. </FONT></P><BR><FONT
face=monospace><BR><BR>The information in this e-mail is intended only for the
person to whom it is<BR>addressed. If you believe this e-mail was sent to you
in error and the e-mail<BR>contains patient information, please contact the
Partners Compliance HelpLine at<BR><A
href="http://www.partners.org/complianceline"
target=_blank>http://www.partners.org/complianceline</A> . If the e-mail was
sent to you in error<BR>but does not contain patient information, please
contact the sender and properly<BR>dispose of the
e-mail.</FONT></DIV><BR>------------------------------------------------------------------------------<BR>All
the data continuously generated in your IT infrastructure<BR>contains a
definitive record of customers, application performance,<BR>security threats,
fraudulent activity, and more. Splunk takes this<BR>data and makes sense of
it. IT sense. And common sense.<BR><A href="http://p.sf.net/sfu/splunk-novd2d"
target=_blank>http://p.sf.net/sfu/splunk-novd2d</A><BR>_______________________________________________<BR>Nagios-users
mailing list<BR><A
href="mailto:Nagios-users@lists.sourceforge.net">Nagios-users@lists.sourceforge.net</A><BR><A
href="https://lists.sourceforge.net/lists/listinfo/nagios-users"
target=_blank>https://lists.sourceforge.net/lists/listinfo/nagios-users</A><BR>:::
Please include Nagios version, plugin version (-v) and OS when reporting any
issue.<BR>::: Messages without supporting info will risk being sent to
/dev/null<BR></BLOCKQUOTE></DIV><BR></BODY></HTML>