Make this test: try to send a mail with the syntax you are using: # printf "blablablabla" | sendEmail "etc...etc...etc..." <a href="mailto:you@yourdomain.com">you@yourdomain.com</a>.<br><br><div class="gmail_quote">
2012/8/22 Aravinth Anto Intern <span dir="ltr"><<a href="mailto:t-aravinth@juspay.in" target="_blank">t-aravinth@juspay.in</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi all, <div><br></div><div>I'm very new to nagios. I followed this blog to set up the smtp server for sending emails : <a href="http://danxlog.blogspot.in/2010/07/nagios-use-external-smtp-server-to-send.html" target="_blank">http://danxlog.blogspot.in/2010/07/nagios-use-external-smtp-server-to-send.html</a>.</div>

<div><br></div><div>But that doesn't seem to be working for me. I have my /usr/local/nagios/etc/resource.cfg file as :</div><div><br></div><div><br></div><div><div>$USER1$=/usr/local/nagios/libexec</div><div><br></div>

<div>$USER5$=<a href="http://smtp.gmail.com:587" target="_blank">smtp.gmail.com:587</a></div><div><br></div><div>$USER9$=<a href="mailto:myaccount@gmail.com" target="_blank">myaccount@gmail.com</a></div><div>$USER10$=mypassword</div>
</div><div><br></div>
<div>And in my commands file I added these two as said in the blog post :</div><div><br></div><div><div>define command{</div><div>                command_name notify-host-by-email</div><div>                command_line /usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" | /usr/local/bin/sendEmail -s $USER7$ -t $CONTACTEMAIL$ -f $USER5$ -l /var/log/sendEmail -u "** $NOTIFICATIONTYPE$ Host Alert: $HOSTNAME$ is $HOSTSTATE$ **" -m "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n"</div>

<div>         }</div></div><div><br></div><div><br></div><div><div>define command{</div><div>        command_name notify-service-by-email</div><div>        command_line /usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional Info:\n\n$SERVICEOUTPUT$" | /usr/local/bin/sendEmail -s $USER7$ -t $CONTACTEMAIL$ -f $USER5$ -l /var/log/sendEmail -u "** $NOTIFICATIONTYPE$ Service Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" -m "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional Info:\n\n$SERVICEOUTPUT$"</div>

<div> }</div></div><div><br></div><div>I restarted it. But it seems to be working! Can anyone help in this regard?</div>
<br>------------------------------------------------------------------------------<br>
Live Security Virtual Conference<br>
Exclusive live event will cover all the ways today's security and<br>
threat landscape has changed and how IT managers can respond. Discussions<br>
will include endpoint security, mobile security and the latest in malware<br>
threats. <a href="http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/" target="_blank">http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/</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><br clear="all"><div><br></div>-- <br>Att.<b><br></b><b></b><br>