File: email2sms

package info (click to toggle)
smstools 3.1.11-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 1,596 kB
  • ctags: 820
  • sloc: ansic: 14,175; sh: 1,173; php: 115; makefile: 44; awk: 17
file content (36 lines) | stat: -rwxr-xr-x 917 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/sh

# Smsd can send eMails via SMS. You simply need to store the eMail as text
# file in the outgoing queue directory with a unique filename.

# The eMail must include the phone number in the To: field, for example:
# To: "Herbert +491721234567" <sms@localhost>

# This simple script creates a unique filename and copies the eMail from
# stdin to that file.

# If you use procmail to deliver local eMail. Create the user sms and create
# the file /home/sms/.procmailrc with this content:

# VERBOSE=off
# MAILDIR=/var/spool/mail
# DEFAULT=/var/spool/mail/sms
# LOGFILE=/var/log/procmail
# 
# :0
# * ^TOsms
# | /usr/local/bin/email2sms



# If you use QMail and vpopmail you need the file
# /home/vpopmail/domains/your-domain/.qmail-sms with this content:

# | /usr/local/bin/email2sms



OUTFILE=$(mktemp /var/spool/sms/outgoing/smsgw.out.XXXXXX)
cat >$OUTFILE
chmod 666 $OUTFILE
echo "SMS queued to $OUTFILE"