SMS Server Tools 3
Basic information:
Additional information:
Get SMS Server Tools 3:
Additional Options

 Sponsored links

Custom Search

 Visitor locations
 SMS Server Tools 3 Community
Welcome, Guest. The forum is currently read-only, but will open soon. Mon Jul 15, 2024 01:37
SMSTools3 Community » Help and support Bottom

[answered] Problem with email2sms script

  This topic is locked

Page:  1

Author Post
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

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" <>

This is the result in procmail.log :

From 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`
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"
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,

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.