I want to write some scripting for my server to read and parse emails in email@example.com to, for example, adjust the iptables firewall whitelist or blacklist. As I expand home automation, I will have more uses for this capability.
Do I even need an email client? I wonder if merely having an MTA on my server can put incoming email somewhere in the file system where a script could then read and parse it. I do have postfix installed which is giving me email sending capability (and giving me the MTA, I believe).
The email account the system would use for this is one provided by the neighborhood ISP (Walnut Communications). Currently, I neither use that email account for anything nor use my servers to read email for anything else. A side question I have along that line is 'Why am I even able to to send email without it getting authenticated through the Walnutel.net email account to give it the credentials or credibility that I thought the Internet's emailing infrastructure would demand?'
If I could just understand these two things, I could make a lot more progress. Note that the server is headless, CLI, and unattended, so I have no use for browsing an email inbox at/through it.
Edit 12/25/15: I have learned that the email methodology I seek is called "bash sockets". Unclear to me yet in my research is whether I'll for sure need to authenticate with my local email account credentials in order to send email reliably to my non-local gmail account, and whether I'll be required to use SSL (TLS, etc). If required to use SSL/TLS to communicate with email servers, I fear I'll be VERY hard-pressed to find bash scripting examples of that.