[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: debug smsplus.sh




Tsiss, me again :-)

Solution found !

It seems to be a bug in "mail" ...

If i use sendmail from postfix

rpm -qif /usr/sbin/sendmail.postfix
Name        : postfix                      Relocations: (not relocatable)
Version     : 2.2.10                            Vendor: Scientific Linux
Release : 1.2.1.el4_7 Build Date: Fri Aug 15 05:21:29 2008
Install Date: Sat Sep 27 14:25:24 2008      Build Host: yort1.fnal.gov
Group : System Environment/Daemons Source RPM: postfix-2.2.10-1.2.1.el4_7.src.rpm
Size        : 7029946                          License: IBM Public License
Signature   : DSA/SHA1, Fri Aug 15 16:44:41 2008, Key ID da6ad00882fd17b2
URL         : http://www.postfix.org
Summary     : Postfix Mail Transport Agent
Description :
Postfix is a Mail Transport Agent (MTA), supporting LDAP, SMTP AUTH (SASL),TLS


it works with a little workaround ...


#!/bin/bash -x

msg=`echo "${BBALPHAMSG}" | egrep "&yellow|&red"`
msg="\n${msg}"

# CODE:
#=======
subject="!HB ${ACKCODE}"
alert="${BBHOSTSVC} ${BBCOLORLEVEL}"
message="\n${alert}${msg}"

#echo -e "${message}" | mail -s "${subject}" "$RCPT"
/usr/sbin/sendmail -f xymon-patrol (at) .desy.de  "$RCPT"<<EOT
From: < xymon-patrol (at) desy.de>
To: ${RCPT}
Subject: ${message}

${message}
EOT


cheers,
	martin



On Thu, 22 Jul 2010, Martin Flemming wrote:


Hi, again !

Maybe i've found the failure,
but not the solution ....

The sms would be send if my adress would be

49176555666667 (at) sms.desy.de

... if i remove the "sms/" from the adress
the message in  the maillog confirmed it ...

But unfortunatley i must have this "sms/" for our sms-gateway ..

Could someone give me an hint for the regular-expression problem :)

thanks & cheers

	martin

On Thu, 22 Jul 2010, martin.flemming (at) desy.de wrote:


Hi !

I want to use smsplus.sh from xymonton for SMS-Alerting

http://xymonton.trantor.org/doku.php/alerts:smsplus

but didn't get it to work :-(

So in the notification.log everyhthing seem to be ok

Thu Jul 22 11:13:35 2010 web01.http (191.179.248.33) "sms/49176555666667 (at) sms.desy.de" 1279790015 600

(sms/Telenumber (at) sms.desy.de is the right way to our sms-gateway)

but unfortunatley didn't get a sms  :-(

It seems that the mail/sms didn't send from my xymon-server, because there are no message in the maillog ...

So how can i debug alerting with sms ?

e.g

.. could i send a sms-alert  smsplus.sh "per hand" ..

thanks & cheers

	martin


Gruss

      Martin Flemming


______________________________________________________
Martin Flemming
DESY / IT          office : Building 2b / 008a
Notkestr. 85       phone  : 040 - 8998 - 4667
22603 Hamburg      mail   : martin.flemming (at) desy.de
______________________________________________________


Gruss

       Martin Flemming


______________________________________________________
Martin Flemming
DESY / IT          office : Building 2b / 008a
Notkestr. 85       phone  : 040 - 8998 - 4667
22603 Hamburg      mail   : martin.flemming (at) desy.de
______________________________________________________