Quoting problem with misc command line for mail

Support requests, bug reports, questions etc.
Locked
Marco
Quoting problem with misc command line for mail

Post by Marco » Sun Jun 07, 2009 17:49

Hey nconf Team,

during the setup of nconf 1.2.4 (final) i recognized that no email was send. I found that the escaping of special
characters was the reason. After a change of the command lines for notify-host-by-email (and notify-service-by-email
accordingly) the mail was send successfully.

comes with nconf:

Code: Select all

/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$
comes with nagios default:

Code: Select all

/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$
Might be of interest for the next version?

Bye,
Marco

User avatar
agargiulo
NConf developer
NConf developer
Posts:725
Joined:Fri Mar 06, 2009 17:50
Location:Zurich, Switzerland
Contact:

Re: Quoting problem with misc command line for mail

Post by agargiulo » Mon Jun 08, 2009 10:18

Please have a look at the following post, and read the "requirements" section...

viewtopic.php?f=3&t=7

Locked