On Mon, 2008-01-14 at 11:03 +0800, Ronald Allan Tomimbang wrote:
> i have this line at /etc/aliases
> 
> rat: "|/usr/local/bin/sendsms +0639198522256, [EMAIL PROTECTED]

Have you run the newaliases command to update aliases.db? Also, it
should be +63..., not +063...

> when i fire up a command:
> 
> # echo this is a test | mail rat
> 
> i get an error.  i may need fresh ideas to help me figure out the
> sendsms wrapper script to redirect emails for [EMAIL PROTECTED] to the sms
> gateway.
> 
> any one from the list.

What error do you get? By the way, for Nagios I recommend having Nagios
run sendsms instead of sending an email to an alias. This allows you to
have the usual, comprehensive email report, and separate condensed text
versions.

This is how I implemented it:
        
        # 'notify-by-sms' command definition
        define command {
                command_name    notify-by-sms
                command_line    /usr/local/bin/sendsms $CONTACTEMAIL$ 
'$HOSTALIAS$ ($HOSTADDRESS$)\n$SERVICESTATE$ for 
$SERVICEDURATION$\n$SERVICEOUTPUT$\n$LONGDATETIME$'
                }
        
        # 'host-notify-by-sms' command definition
        define command{
                command_name    host-notify-by-sms
                command_line    /usr/local/bin/sendsms $CONTACTEMAIL$ 
'$HOSTALIAS$ ($HOSTADDRESS$)\n$HOSTSTATE$ for 
$HOSTDURATION$\n$HOSTOUTPUT$\n$LONGDATETIME$'
                }

Cheers!

-- 
Federico Sevilla III
F S 3 Consulting Inc.
http://www.fs3.ph

Attachment: signature.asc
Description: This is a digitally signed message part

_________________________________________________
Philippine Linux Users' Group (PLUG) Mailing List
[email protected] (#PLUG @ irc.free.net.ph)
Read the Guidelines: http://linux.org.ph/lists
Searchable Archives: http://archives.free.net.ph

Reply via email to