3 ms·
The wsemail tool seems useful, but definitely not as ubiquitous as "shell". There are a few other ways you could poll for email using the shell plus some very c
by zbentley 9y ago
The wsemail tool seems useful, but definitely not as ubiquitous as "shell". There are a few other ways you could poll for email using the shell plus some very common tools, many of which are likely packaged for or already distributed on a lot of common "micro" linux deployments for microcontrollers and the like. In the author's defense, they'd probably require a few more than 20 lines of shell in order to be in any way robust:
- Connecting to IMAP via openssl: https://stackoverflow.com/questions/27134018 https://stackoverflow.com/questions/27134018
- Or via curl: https://debian-administration.org/article/726/Performing_IMAP_queries_via_curl https://debian-administration.org/article/726/Performing_IMA...
- Or talking POP3 via telnet: https://www.shellhacks.com/retrieve-email-pop3-server-command-line/ https://www.shellhacks.com/retrieve-email-pop3-server-comman...
- Or get POP3 messages via pure Bash and a little Perl: https://gist.github.com/xionluhnis/4712075 https://gist.github.com/xionluhnis/4712075
That last one really is quite interesting, since it looks like you could abandon Perl for parsing entirely if your goal was "just check for the 'open sesame' string anywhere in the email blob", after which (if my reading of the gist is correct) you'd be using pure Bash and shell builtins, and it wouldn't be much longer than 20ln.