Hari Sekhon wrote:
Thomas Sluyter wrote:
  
After following your suggestion regarding prinf and checking the 
previously unchanged misccommand.cfg I'm not entirely sure what is 
going on here. The definition for email is below:
...
This doesn't look bad to me, it seems to simply be using lots of 
Macro$ so I assume that the macro must be sending it something funny....
Will have to scratch my head and try to track that down.
      
You -did- notice that to printf "\b" is a backspace, right? Which 
would totally explain what you're seeing...

    
err, I think that is the notation for a backslash escaped sequence, not 
a backspace character, which is \b.

It turns out that the points at which I am getting those strange squares 
is actually replacing "\\" and "\" in \\hostname\sharename.

So I know where the problem is and what part needs fixing, but I have 
tried to recreate it on the command line but the message never comes 
through to me to fully diagnose.

eg..

echo '\\hostname\sharename' | mail -s "test" [EMAIL PROTECTED]

but I haven't gotten this. Strange, that now I'm not getting messages 
from /bin/mail. Will have to look into this and get back to you.


Hari

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Nagios-users mailing list
Nagios-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null

  

ok, after looking at my mail server the problem was the oh so brilliant thunderbird client. sorted. now back to the original problem...


I've fixed the character issue in the notifications with \\hostname\sharename. The problem lies with the %b in the printf statement. I changed this to %q. Remember that the system's printf is superseded by the shell  built-in. Any way, the %q defines that the argument list is appropriately formatted for shell reuse which is exactly the was that it is being used in the mail pipe for this notification functionality.

Thanks for the help, you've given me the jolt I needed.

Hari


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Nagios-users mailing list
Nagios-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting 
any issue. 
::: Messages without supporting info will risk being sent to /dev/null

Reply via email to