SMS Server Tools 3
This site is hosted by Kekekasvi.com
 Menu
Basic information:
Additional information:
Support:
Get SMS Server Tools 3:
Additional Options

 Sponsored links

 Search
Custom Search

 Visitor locations
 
 SMS Server Tools 3 Community
Welcome, Guest. Please login or register. Thu Mar 28, 2024 14:02
SMSTools3 Community » Help and support Bottom

[answered] Problem with email2sms script

  This topic is locked

Page:  1

Author Post
Member
Registered:
Feb 2011
Location: Switzerland
Operating system name and version: Ubuntu 10.04
Version of smsd: 3.1.11
Smsd installed from: sources
Name and model of a modem / phone: Teltonika G10
Interface: USB

Hi,
I have a problem with the email2sms script from this page.
SMSD is working, I receive sms when I put a sms file to /var/spool/sms/outgoing

Now I to send a mail to "+49176XXXXXXXXX" <sms@mydomain.com>

This is the result in procmail.log :

----------------------
From my@email.com Thu Feb 17 14:38:55 2011
Subject: Halali
Folder: /usr/local/bin/email2sms 5567
mktemp: failed to create file via template `/var/spool/sms/outgoing/smsgw.out.XXXXXX': Permission denied
/usr/local/bin/email2sms: 43: cannot create : Directory nonexistent
chmod: missing operand after `666'
Try `chmod --help' for more information.
-------------

This is the content of the email2sms script I have stored under /usr/local/bin/email2sms:

tmp=$(mktemp /tmp/smsgw.XXXXXX)
cat >$tmp
destinations=`formail -zx "To:" < $tmp`
IFS=,
for destination in $destinations; do
destination=${destination## }
OUTFILE=$(mktemp /var/spool/sms/outgoing/smsgw.out.XXXXXX)
formail -f -I "To: $destination" < $tmp > $OUTFILE
chmod 666 $OUTFILE
echo "SMS queued to $OUTFILE"
done
rm $tmp

----------------

So apparently something with folder permissions.
Could anyone with better Linux/Unix understanding than I have explain what I have to change to make it work?

Thanks and best regards,
Matthias

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
Try to make outgoing directory world-writable: chmod 666 /var/spool/sms/outgoing

  This topic is locked

Page:  1

SMSTools3 Community » Help and support Top

 
Time in this board is UTC.  

Privacy Policy   SMS Server Tools 3 Copyright © Keijo Kasvi.