Revision 1.1, Tue Jun 18 00:57:56 2002 UTC (24 years, 5 months ago) by host8
Script for sending notification about new mail to user's terminal.
#!/bin/bash
# $Id: mailcheck.sh,v 1.1 2002/06/18 00:57:56 host8 Exp $
# This script will be started via procmail after arriving mail
# It send information about new mail to user's terminal.
ttys="`finger $LOGNAME | awk '/^On since/ {print $(NF-2)}' 2> /dev/null`"
notify()
{
echo
echo "NEW MAIL in $*"
echo
}
for i in $ttys;
do
notify "$*" > /dev/$i;
done