This is quickly made proof of concept of dead-simple smtp-powered goip to telegram sms forwarder.
The simplest way to process incoming sms messages from GoIP is to use built-in sms to email feature. Other ways like SMPP, SIP MESSAGE and admin page parsing are inconvenient and overcomplicated. So this script runs a simple unauthenticated smtp server that receives and parses goip email messages then forwards it to telegram.
Due to poor engineering GoIP gateways can reach smtp server only by port 25. Port number following colon in smtp server address doesn't work at all.
Please note that I have GoIP4 with firmware version GST1610-1.01-70
. Other hardware/firmware versions wasn't tested.
- Install
aiosmtpd
andpython-telegram-bot
dependencies like this:
pip3 install aiosmtpd python-telegram-bot
- Replace
your_tg_bot_token_here
andyour_chat_id_here
with your bot token and chat_id - Run
./goip_to_tg.py
from root (because you need to bind TCP/25) - Set up every goip channel like this (replace 10.0.0.18 with your address, forwarding email can be anything):
Feel free to open an issue if you need any help. Star and follow are appreciated 😉