Page 1 of 1

unknown user: $

Posted: Tue May 29, 2012 7:10 am
by patrick2011
Hi,

Can someone please help with this problem.
When a server is up (while it has not been down !) I get a email:
Undelivered Mail Returned to Sender
<[email protected]> (expanded from <$>): unknown user: "$"


This is contacts.cfg

define contact {
contact_name nagiosadmin
alias Nagios Admin
host_notification_period workhours
host_notification_options d,u,r,f,s
host_notification_commands notify-host-by-email
service_notification_commands notify-service-by-email
email nagios@localhost
use generic-contact
register 1
}

and the command:

define command {
command_name notify-host-by-email
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/bin/mail -s "** $NOTIFICATIONTYPE$ Host Alert: $HOSTNAME$ is $HOSTSTATE$ **" $CONTACTEMAIL$
register 1
}

Re: unknown user: $

Posted: Tue May 29, 2012 10:43 am
by lmiltchev
Is the "nagios@localhost" a valid e-mail?

Re: unknown user: $

Posted: Wed May 30, 2012 4:12 am
by patrick2011
Yes, nagios@localhost is a valid address.

Re: unknown user: $

Posted: Wed May 30, 2012 9:28 am
by agriffin
Do you have any other users besides nagiosadmin that this might be trying to send to?