[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Issue with MAILC env variable?
- To: "hobbit (at) hswn.dk" <hobbit (at) hswn.dk>
- Subject: RE: Issue with MAILC env variable?
- From: Tom Moore <Tom.Moore (at) sas.com>
- Date: Wed, 9 Dec 2009 17:27:03 -0500
- Accept-language: en-US
- Acceptlanguage: en-US
- References: <F5C2E518F1D017468B9C72B9C3AAA7D33A9642B150 (at) MERCMBX12.na.sas.com> <BBA15439DC467648BBAB71E6BA4D990038FE6642BE (at) MERCMBX12.na.sas.com>
- Thread-index: Acp5C+rV9abb/5IDRI2xpS4tAa8CzAADoYNgAAD81GA=
- Thread-topic: Issue with MAILC env variable?
Resolved. It turns out I have a bash script running from hobbitlaunch.cfg, and in bash parenthesis have a special meaning and thus it blows up when running the cmd:
. /usr/local/xymon/server/etc/hobbitserver.cfg
I changed the MAILC line to use single quotes such as:
MAILC="/usr/bin/nail -r 'user (at) blah.com (Xymon)'"
And all is well. Sorry for the email traffic, but hey, this will hit the archive and maybe help someone in the future ;)
-Tom
-----Original Message-----
From: Tom Moore
Sent: Wednesday, December 09, 2009 4:58 PM
To: Tom Moore; hobbit (at) hswn.dk
Subject: RE: Issue with MAILC env variable?
Actually.. I think I've narrowed it down to this in the hobbitlaunch.cfg file
ENVFILE /usr/local/hobbit/server/etc/hobbitserver.cfg
When it's parsing that it gives the error for the MAILC option. The server itself seems to send out emails fine with the syntax on alerts.
-----Original Message-----
From: Tom Moore
Sent: Wednesday, December 09, 2009 3:12 PM
To: 'hobbit (at) hswn.dk'
Subject: Issue with MAILC env variable?
I'm trying to use the -r option in "nail" to change the from address headers. It works fine if I just have an email address, however if I use the (Name) nomenclature the hobbitd bombs with this error:
/usr/local/xymon/server/etc/hobbitserver.cfg: line 97: syntax error near unexpected token `('
/usr/local/xymon/server/etc/hobbitserver.cfg: line 97: `MAILC="/usr/bin/nail -r "user (at) blah.com (Xymon)""
Env is this:
MAILC="/usr/bin/nail -r "user (at) blah.com (Xymon)""
MAIL="$MAILC -s"
From the command line this works fine as well:
/usr/bin/nail -r "user (at) blah.com (Xymon)" myemail (at) something.com
Is there something in Xymon that is interpreting the parenthesis? I've even tried to escape them with \ to no avail.
Thx,
Tom