On Fri, 26 Apr 1996 00:23:24 -0400 (EDT),
tom(_at_)Mail(_dot_)Coast(_dot_)NET (Engineer on Caffeine) wrote:
have no way of know that there is new mail in a box. Is there a script or
another method that can notify me of new mail, without print a large
If you have bash (I guess other modern shells too have this in one
form or another) you can say something like
export
MAILPATH=$MAIL:~/Mail/inbox/stbl:~/Mail/inbox/quark:~/Mail/inbox/procmail:\
~/Mail/inbox/faq-maint:~/Mail/inbox/bn-admin:~/Mail/inbox/black-night
(without the indentation). Check out the details on the man page of
your shell.
I also have a separate script I find myself running periodically
when I've been ignoring the constant reminders about new mail :-)
which checks which mailboxes have mail and how much.
Hope this helps,
/* era */
The first two mailboxes after $MAIL are just problem checks.
.newmail-reriksso is Emacs specific.
I've tried to not hard-code variables in ways which look
a bit silly in a couple of places -- USER=${USER:-reriksso}
-- considering you'll have to edit it to suit your needs
anyway :-)
#!/bin/sh
USER=${USER:-reriksso}
MAIL=${MAIL:-/usr/spool/mail/${USER}}
HOME=${HOME:-/home/kruuna3/ykiel/${USER}}
while read mailbox name; do
test -s $mailbox && msgs=`grep -c '^From ' $mailbox` &&
printf "%-18s %3i messages\n" $name: $msgs
done<<HEDE
$MAIL Mail
$HOME/dead.letter dead.letter
$HOME/Mail/.newmail-reriksso Mail/.newmail-reriksso
$HOME/Mail/inbox/bn-admin BN-admin
$HOME/Mail/inbox/black-night Black-Night
$HOME/Mail/inbox/quark Quark
$HOME/Mail/inbox/procmail Procmail
$HOME/Mail/inbox/faq-maint FAQ
$HOME/Mail/inbox/stbl Stbl
$HOME/Mail/inbox/aspekti Aspekti
$HOME/Mail/trash~ trash~
$HOME/Mail/spam~ spam~
$HOME/Mail/unsubscribe~ unsubscribe~
HEDE
--
See <http://www.ling.helsinki.fi/~reriksso/> for mantra, disclaimer, etc.