From: Padraig Finnerty (padraigf at domain compapp.dcu.ie)
Date: Wed 01 Sep 1999 - 16:30:41 IST
On Wed, Sep 01, 1999 at 03:37:34PM +0100 Caolan McNamara wrote:
> On 01-Sep-99 John P . Looney wrote:
> > Anyone know a reliable way of checking if someone has added to a mailfile
> >? I don't want to trip a wire if someone deletes a mail, etc.
> Are you just looking for code suitable for a mail notification sort of thing ?
> Where you just want to raise a flag when there is unread mail ? Maybe theres
> a better way but the last time i went at it yonks ago
A simpler way is not to check the mail file at all.
In my .forward (along with a pipe to procmail) I have a line
where vbiff is a script that sends the From and Subject line from
each mail to /dev/console:
echo new mail received at `date` > /dev/console
formail -z -XFrom: -XSubject: > /dev/console
then I run an xconsole.
You could also I suppose play a short wav, or do a beep in vbiff
if you wanted an audio notification.
This archive was generated by hypermail 2.1.6 : Thu 06 Feb 2003 - 13:04:31 GMT