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.
Jun 23 17:10:18 raspberrypi sendEmail[23709]: ERROR => Can't use improperly formatted email address: $
Jun 23 17:15:35 raspberrypi sendEmail[23956]: ERROR => Can't use improperly formatted email address: $
Jun 23 17:20:19 raspberrypi sendEmail[24150]: ERROR => Can't use improperly formatted email address: $
Jun 23 17:25:36 raspberrypi sendEmail[24429]: ERROR => Can't use improperly formatted email address: $
Furthermore if I try:
runuser -l nagios -c "sendEmail -f mymail -t anothermail -u test -m text -s smtp -xu mymail -xp 123456789 -v -o tls=no"
I get no result, the mail doesn't arrive, and in the log there is nothing new..
Based on that log file, there is probably a syntax error in what you're passing to sendEmail. Take a look at your command definitions and verify them. It might be worth having it echo all of the data, so that you can see what exactly is getting passed and how it's handling it.
Furthermore if I try:
runuser -l nagios -c "sendEmail -f mymail -t anothermail -u test -m text -s smtp -xu mymail -xp 123456789 -v -o tls=no"
I get no result, the mail doesn't arrive, and in the log there is nothing new..
This is odd, but it works when running as the root user? You may need the -l parameter to specify the log file similar to above to see what's going on. -l /var/log/sendEmail
I'm so sorry for the late of the answer but I have had some problems!
I solved the problem removing the parameter $USER$ and putting direct the mail and smtp in command.cfg.
This is not wonderful but works!
Many thanks for your help, this topic con be closed!