HylaFAX The world's
most advanced open source fax server
|
|
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
[hylafax-users] Mail to SMS gateway
In the hylafax FAQ there was a way how to send to german SMS pagers.
If someone is interested, I show a little shell script which is working with
postfix email.
1. Follow the instructions in the hylafax faq (look for "sms")
2. Test under unix if
sendpage -p 017... "some small message"
is working
3.
***** Cut and put to /usr/local/bin/smsmail und chmod +rx
:
SENDPAGE=/usr/local/bin/sendpage
PAGERPIN=$1
awk '
BEGIN { inhdr=1; MAXCHRS=127 ; SMS = "" }
inhdr==0 { strctr+=length($0)
if (strctr>MAXCHRS) {
print substr(SMS,1,MAXCHRS)
exit
}
SMS=SMS " " $0
linectr++; next }
NF>1 && inhdr==1 { if ($1 == "Subject:") {
SUBJ=$0
sub("Subject: ","",SUBJ)
SMS= SUBJ
next } }
NF>1 && inhdr==1 { if ($1 ~ /[A-Z]..*: ..*$/) inhdr=1; next }
NF>1 && inhdr==1 { if ($1 == "" ) inhdr=1; next }
NF==0 && inhdr==1 { inhdr=0; linectr=0 }
' | tr -d '\177-\377' | $SENDPAGE -p $PAGERPIN
************** END OF smsmail
4. Add the transport mechanism to /etc/postfix/transport
sms.yourdomain sms:localhost
5. Do a postfix reload
6. Now you can send from any windows client a mail to e..g "01721234567@sms"
7. Note only 128 characters are allowed and all special characters "Umlaute" are
deleted for simplicity.
8. Similar mechanism should apply to sendmail or qmail. Maybe someone does the
job!
--
Regards,
Dr. Walter Willmertinger
CONSYS Gesellschaft für Softwaretechnologie und Systementwicklung mbH
Dr. Walter Willmertinger
Landsberger Strasse 402 EMail: willmertinger@consys.de
81241 Muenchen Phone: +49 89 589 789 0
Germany Fax: +49 89 588 77 6
WWW-Homepage: http://www.consys.de
____________________ HylaFAX(tm) Users Mailing List _______________________
To unsub: mail -s unsubscribe hylafax-users-request@hylafax.org < /dev/null