EMail to SMS Gateway with aspsms

From Bitbull Wiki
Jump to navigation Jump to search
# install needed software
yum -y install postfix procmail ruby
curl http://www.bitbull.ch/dl/scripts/sms.conf > /etc/sms.conf
curl http://www.bitbull.ch/dl/scripts/sms.rb > /usr/local/bin/sms.rb
chown root:sms /usr/local/bin/sms.rb /etc/sms.conf
chmod 750 /usr/local/bin/sms.rb
chmod 640 /etc/sms.conf
# configure sms user
useradd -c "SMS Gateway User" sms
curl http://www.bitbull.ch/dl/scripts/email2sms-procmail.sh > ~sms/.procmailrc
chown sms:sms ~sms/.procmailrc
chmod 644 ~sms/.procmailrc
# configure aspsms account information
vi /etc/sms.conf
# configure postfix to use virtual tables if not done allready
postconf -e "virtual_alias_maps = hash:/etc/postfix/virtual"
# write config for sms domain
echo 'sms.mydom.ch  sms.mydom.ch
@sms.mydom.ch         sms' >> /etc/postfix/virtual
postmap /etc/postfix/virtual
postfix reload
# make sure you have correct dns pointer like this:
sms.mydom.ch.         3600    IN      MX      20 mx.mydom.ch.
#now send test mail
TO: 0041791112233@sms.mydom.ch
SUBJ: SMS-KEY
put body
here
bla bla bla