unknown user: $

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
patrick2011
Posts: 6
Joined: Tue Jan 10, 2012 4:43 am

unknown user: $

Post 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
}
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: unknown user: $

Post by lmiltchev »

Is the "nagios@localhost" a valid e-mail?
Be sure to check out our Knowledgebase for helpful articles and solutions!
patrick2011
Posts: 6
Joined: Tue Jan 10, 2012 4:43 am

Re: unknown user: $

Post by patrick2011 »

Yes, nagios@localhost is a valid address.
agriffin
Posts: 876
Joined: Mon May 09, 2011 9:36 am

Re: unknown user: $

Post by agriffin »

Do you have any other users besides nagiosadmin that this might be trying to send to?
Locked