SMS is Dead
Bash & Pop - Making Me Sick
This is by far the stupidest thing I've ever had to write.
For decades, IT has used pagers, and later SMS, to alert on outages and send notifications to stakeholders. This has been broken for some time by CloudFilter. Most (All?) US providers rate-limit access to SMS via email by filtering inbound mail through CloudFilter. This has resulted in me missing countless outage events. I'm not sure that my sites aren't even permanently blacklisted at this point. As far as I know there is no way to "opt out" of this, except in the case of Enterprise customers. We are not an Enterprise Customer. In fact if I get one pager event every 3 or 4 months that would surprise me. I'm not exactly "high volume". I do have a Business mobile account, but that evidently does not qualify me to opt out.
So...
I now have SMS emails being sent to my personal, non-work, email address. A cron job checks that folder for mail and if any exists, I use KDEConnect to send a "Find My Phone" alert to my phone. This isn't really ideal on any level:
- KDEConnect uses an Alarm for the Find My Phone feature. I never realized this because I don't lose my phone. Makes total sense though since this means it doesn't respect Ringer or Alert volumes being muted or your phone being on vibrate.
- This solution will only work when I'm on my home network. Not a huge factor since I generally only leave the house for a 30 minute walk around the neighborhood every day. Otherwise I don't go outside unless it's unavoidable doctor/dentist visits
- The fact that I have to write goddamn janky-as-fuck scripts to receive rudimentary alerting of potentially mission-critical failures
This is the whole thing:
#! /bin/bash
ismail=$(ssh user@mailserver.com 'ls ~/Maildir/.Junk.worksms/cur')
if [ -z "$ismail" ]
then exit 0
else
qdbus org.kde.kdeconnect /modules/kdeconnect/devices/
ssh user@mailserver.com 'rm ~/Maildir/.Junk.worksms/cur/* '
fi
- xrayspx's blog
- Log in to post comments
- 10 reads