Email notifications in your terminal
I lost my domain zsh.li mainly because I didn't check my email pretty often, getting email notifications in the terminal is pretty easy, but it took me a while to figure out how to do it.
This is an old-fashioned method, but I like because nowadays developers are too obsessive with deficient and bloated apps, it can use IMAP but I like POP3 as it deletes the original message from the server which is great for privacy.
I'm using Slackware current which is the testing branch for Slackware 15. Slackware current is using Postfix as the system mail service, surprisingly Postfix is also used for an internet email server but here postfix is restricted to our local installation.
Sadly I haven't been receiving the cron mails in a lot of time and the command mailq showed me lots of mails in queue, so I had to fix the postfix service, I did so generating an alias database. Mailq show me lots of mail alias errors.
Most of time the mail system works out of the box, so you will only need the following:
1. Install fetchmail
2. Paste the following code and replace daya with your local unix user, mail.gmail.com with the mail domain, flor@gmail.com to your email address and parangaricutirimicuaro to your password:
set daemon 600
set syslog
poll mail.gmail.com
with nodns,
with protocol POP3
user "flor@gmail.com" there is daya here,
with password parangaricutirimicuaro ,
with ssl, sslcertck;
Add to .bashrc (or .profile):
mail -e && mail -H
And for having an ascii cow displaying the email headers:
mail -e && cowsay "$(mail -H)"
You may need to install the bsdgames for it
Notice: Your emails would be deleted from the email server. You may add the keep parameter after here (daya here)