Hi all,<br>I have nagios 3.0.5 installed and it seems that it is working ok but no notifications are sent. Instead, in /home/nagios/dead.letter the messages keep arriving. The problem seems to be due to mail headers :<br><br>
"From nagios Fri Jan 9 09:38:31 2009<br>Return-Path: <nagios><br>Received: (from nagios@localhost)<br> by localhost.localdomain (8.14.1/8.14.1/Submit) id n097cVWc011912<br> for $; Fri, 9 Jan 2009 09:38:31 +0200<br>
Date: Fri, 9 Jan 2009 09:38:31 +0200<br>From: nagios<br>Message-Id: <200901090738.n097cVWc011912@localhost.localdomain><br>To: $<br>Subject: ** Service Alert: ITM_M._Ciuc/is_alive is OK **"<br><br>Somehow it seems that no user address is found (or the address $ is used ). Also, the mail log says the same thing:<br>
<br>Jan 9 12:33:14 localhost sendmail[11185]: n09AXEi5011185: from=nagios, size=276, class=0, nrcpts=1, msgid=<200901091033.n09AXEi5011185@localhost.localdomain>, relay=nagios@localhost<br>Jan 9 12:33:14 localhost sendmail[11186]: n09AXE29011186: <$@localhost.localdomain>... User unknown<br>
Jan 9 12:33:14 localhost sendmail[11185]: n09AXEi5011185: to=$, ctladdr=nagios (514/514), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30276, relay=[127.0.0.1] [127.0.0.1], dsn=5.1.1, stat=User unknown<br>Jan 9 12:33:14 localhost sendmail[11186]: n09AXE29011186: from=<nagios@localhost.localdomain>, size=276, class=0, nrcpts=0, proto=ESMTP, daemon=Daemon0, relay=localhost.localdomain [127.0.0.1]<br>
<br>Do you encounter such behaviour?<br><br>Some relevant config files are as below:<br><br><br>define host {<br> host_name host1<br> alias host1<br> address 172.30.129.67<br>
use generic_business_hour<br>}<br><br>#generic_business_hour<br>define host {<br> name generic_business_hour<br> process_perf_data 1<br>
retain_status_information 1<br> flap_detection_enabled 1<br> retain_nonstatus_information 1<br> active_checks_enabled 1<br> passive_checks_enabled 1<br>
check_period 9la18<br> obsess_over_host 0<br> check_freshness 1<br> freshness_threshold 0<br> check_command i
s_icmp_alive<br>
max_check_attempts 3<br> event_handler_enabled 1<br> event_handler notify-host-by-email<br> notifications_enabled 1<br> notification_interval 15<br>
notification_period 9to18<br> notification_options d,u,r,f<br> stalking_options d,o,u<br> contact_groups admins<br> register &nb
sp; 0<br>
action_url /nagios/pnp/index.php?host=$HOSTNAME$<br>}<br><br># contactgroups admins<br>define contactgroup {<br> contactgroup_name admins<br> alias admins<br>
members nagios,user<br>}<br><br><br>define contact {<br> contact_name nagios<br> use generic-contact<br> alias  
; nagios<br>
email nagios@localhost<br>}<br><br>define contact {<br> name generic<br> host_notification_period 24din2_7din7<br> service_notification_period 24din2_7din7<br>
host_notification_options d,u,r,n,f<br> service_notification_options u,c,w,r,n,f<br> host_notification_commands notify-host-by-email<br> service_notification_commands notify-service-by-email<br>
register 0<br>}<br><br>define command {<br> command_name notify-host-by-email<br> command_line /usr/bin/printf "%b" "***** Nagios *****\n\nNotification: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" |
/bin/mail -s "** $NOTIFFICATIONTYPE$ Host Alert: $HOSTNAME$ is $HOSTSTATE$ **" $CONTACTEMAIL$<br>
}<br><br>Thank you,<br>Alex<br>