Too lazy to bother checking your email?
Would you rather have somebody announce new mail but can't afford an assistant?
Using procmail and festival you can do just that.
I added the following to .procmailrc
SUBJECT=`formail -xSubject: \ | expand | sed -e 's/^[ ]*//g' -e 's/[ ]*$//g'` SENDER=`formail -xFrom: \ | expand | sed -e 's/^[ ]*//g' -e 's/[ ]*$//g'` :0 c: | echo "New mail from " $SENDER ". the subject is " $SUBJECT | text2wave | aplay -Djackplug
You may have to change the last part to met your configuration
Now when I get new mail, I hear
"New Mail from address, the subject is blah..blah"
What's that you say? Your mail is read on a shell server far away from the computer you're sitting at? A nice combination of netcat and inetd ( or xinetd) will handle this just fine.
Replace the procmail recipe with:
:0 c:
| echo "New mail from " $SENDER ". the subject is "
$SUBJECT | netcat ${WORKSTATION} ${PORT}Then, add a configuration for your (x)inetd config to take that input and push it through festival:
PORT stream tcp nowait someone_not_root "/bin/bash -c 'text2wave | aplay'"
Adjust the inetd as need for your configuration and for security purposes
