txtmsg: Command Line Text Messager over emailThis program is designed to be used as a utility to send a text message to a pre-determined cell phone, ideally for alerting an administrator when something on a server goes wrong for whatever reason. This could easily be used for many other purposes as well, so use your imagination and let me know what you come up with!
Example:Code:
root@localhost:~ # myip
12.34.34.12
root@localhost:~ #
Features:- Sends text messages using an every-day SMTP server
- Can keep a log of every text message sent if you choose to do so
- Great for alerting administrators when something goes wrong, for example:
- Power outage causing a server to run on batteries.
- Hack Attempt
- Hardware failure
- Running low on disk space
- Critical service failure
- and tons more...
- Can easily be run from command line or inside of another script
- No charges if you have text messaging included on your wireless plan
Requirements:- Perl
- Cell phone with texting enabled domain (most providers have this for free by default)
- Perl Module Net::SMTP
- Active internet connection
- SMTP server (currently this script only supports sending from a SMTP server that does not require authentication or encryption)
Directions1. Download to your computer using a program like wget
2. Extract the tarball using the tar program
3. Change to the extracted directory
4. Edit the options in the top of the 'txtmsg' file
5. Send a test message to make sure it works
6. Move or create a symbolic link to wherever you like
Code:
# wget http://www.stevecross.org/utilities/txtmsg-1.0.tar.gz
# tar zxvf txtmsg-1.0.tar.gz
# cd txtmsg-1.0
# vi txtmsg
# ./txtmsg Hello World
# cp txtmsg /usr/local/sbin
Downloadhttp://www.stevecross.org/utilities/txtmsg-1.0.tar.gz