前文已经将SMS接收功能实现 https://www.cnblogs.com/d9394/p/17214652.html
稍为修改转发到邮件,邮件留存的作用比即时通信好多了
openwrt安装邮件发送工具:
opkg install ssmtp
修改/etc/ssmtp/ssmtp.conf
[email protected] mailhub=smtp.ym.163.com rewriteDomain=163.com hostname=163.com FromLineOverride=YES [email protected] AuthPass=11111111
修改/root/pushsms.sh
#!/bin/sh echo $1 $2>> /dev/shm/sms.log if [ "$1" == "RECEIVED" ]; then FROM=$(grep "From:" $2) TEXT=$(sed -e '1,/^$/ d' < "$2" | iconv -f UNICODEBIG -t UTF-8) ( echo "From:<[email protected]>"; echo "TO:[email protected]"; echo "Subject: sms from $FROM"; echo $TEXT ) | ssmtp -v [email protected] fi
标签:echo,ssmtp,openwrt,转发,com,邮件,163 From: https://www.cnblogs.com/d9394/p/17226059.html