Hi,
From the bash man page:
Code:
MAIL If this parameter is set to a file name and the MAILPATH variable is not set, bash informs the user of the arrival of mail in
the specified file.
MAILCHECK
Specifies how often (in seconds) bash checks for mail. The default is 60 seconds. When it is time to check for mail, the
shell does so before displaying the primary prompt. If this variable is unset, or set to a value that is not a number greater
than or equal to zero, the shell disables mail checking.
MAILPATH
A colon-separated list of file names to be checked for mail. The message to be printed when mail arrives in a particular file
may be specified by separating the file name from the message with a `?'. When used in the text of the message, $_ expands to
the name of the current mailfile. Example:
MAILPATH='/var/mail/bfox?"You have mail":~/shell-mail?"$_ has mail!"'
Bash supplies a default value for this variable, but the location of the user mail files that it uses is system dependent
(e.g., /var/mail/$USER).
Hope this helps. I think you will have to somehow change timestamps on a particular file whenever new mail comes.
cheers,
--cyberjun