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 class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<u></u>






<div>


<p><font face="Arial" size="2">Hi there --</font>
</p>

<p><font face="Arial" size="2">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 face="Arial" size="2">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 face="Arial" size="2">is on the Nagios server is the Postfix message transfer agent. </font>
</p>

<p><font face="Arial" size="2">The troubleshooting steps that I have taken so far are the following:</font>
</p>

<p><font face="Arial" size="2">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 face="Arial" size="2">    e-mail was done from the command line using the mail and mailx commands using the command syntax:</font>
</p>

<p><font face="Arial" size="2">mail <e-mail address> < /etc/fstab </font>

<br><font face="Arial" size="2">mailx -s "test" <e-mail address> < /etc/fstab</font>
</p>

<p><font face="Arial" size="2">2. I checked the contacts.cfg file, and confirmed the intended recipient is listed with the correct address.</font>
</p>

<p><font face="Arial" size="2">3. I checked the nagios.log, and there were entries that were similar to the following:</font>
</p>

<p><font face="Arial" size="2">[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 face="Arial" size="2">/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 face="Arial" size="2">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 face="Arial" size="2">location of the mail binary which was located at the /usr/bin/ folder.</font>
</p>

<p><font face="Arial" size="2">4. As far as I can tell, all hosts have e-mail notifications enabled on them.</font>
</p>

<p><font face="Arial" size="2">What other steps do I need to take in order to get e-mail notifications to work here?</font>
</p>

<p><font face="Arial" size="2">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>