Hello,
I am trying to use the xymon alert system to send emails.
When I use "MAIL", I am able to receive the mails as they were intended. HOST=* SERVICE=* COLOR=yellow MAIL alert at xymon.com
But, the problem occurs when I start using the "SCRIPT". The mails aren't being forwarded
HOST=* SERVICE=* COLOR=yellow SCRIPT test.sh alert at xymon.com
I understand that the "SCRIPT" uses two arguments, the script name and the recipient name.
Here's how my script looks like,
#!bin/bash
mail -s "$BBALPHAMSG $BBHOSTNAME $MACHIP $BBSVCNAME $RECOVERED" $RCPT
Can anyone please explain to me a bit more on how the alert system works when the "SCRIPT" is used?
Thanks you Raghuv Adhepalli.
ps: I encountered the same problem when I tried using "mutt" instead of "mail" in my script. When I use "mutt" as a command on my terminal the command works, but it doesn't work when I use it with "SCRIPT"