Path: utzoo!mnetor!uunet!mcvax!enea!kuling!irf
From: irf@kuling.UUCP (Stellan Bergman)
Newsgroups: comp.unix.questions
Subject: Re: q: being notified of new mail
Message-ID: <563@kuling.UUCP>
Date: 27 Nov 87 15:27:23 GMT
References: <4350001@wdl1.UUCP> <3600001@hpiacla.HP.COM>
Reply-To: irf@kuling.UUCP (Stellan Bergman)
Organization: Dept. of Computer Systems, Uppsala University, Sweden
Lines: 55

In article <3600001@hpiacla.HP.COM> marki@hpiacla.HP.COM (Mark Ikemoto) writes:
>>In HP-UX I write
>>
>>        set mail = (60 /usr/mail/$LOGNAME /etc/motd)
>>
>>and get notified if, within the last 60 seconds, there is new mail
>>for me or if there is a new "message-of-the-day" (motd).
>
>How did you get this to work?  I've tried it on my 9000/350 and it
>doesn't notify me.  I had to create a shell script that I run in the


Oh yes, I'm positive.  Whenever mail arrives I get a friendly little message
saying "You have mail" as soon as I leave whatever I'm doing and get back
to the (C) shell.

This is how my .login file on our HP9000/500 HP-UX 5.21 looks like (also
worked OK for HP-UX 5.11):

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

# Fix the tty line
stty -ienqak ixon -ixoff

# Set up termcap, terminal, and EXINIT
set noglob; eval `tset -sm 'chal:?chal' -sm 'vt100:?vt100' -sm 'go250:?go250' -sm 'go250-sm:?go250-sm' -sm 'go250-48:?go250-48' -sm '2382:?2382'`

switch ( $TERM )

  (Uninteresting terminal setups here ...)

endsw
source .EXINIT                                # Terminal independent EXINIT.
source .EXINIT_$term                          # Terminal specific EXINIT.
echo "EXINIT set for $term"                   # To see we got it right...
source $home/.envrc                           # Load environment parameters.
source $home/.aliasrc                         # Load useful aliases.
setenv PROMPT '>'                             # Use this instead of PS1.
set userprompt="$SMSO(`whoami`)\!$PROMPT$SGR0"# Make a nice prompt.
set CWD="$TSL$REV$cwd$SGR0$FSL"               # Put cwd in the status line
set prompt="$userprompt$CWD "                 # Set the prompt and write cwd.
set autologout=0                              # Logout? Never.
mv $HOME/.history $TEMPDIR                    # Move original .history file.
sort $TEMPDIR/.history|uniq >! $HOME/.history # Remove duplicates and move back.
/bin/rm -f $TEMPDIR/.history                  # Remove temporary .history file.
set history=100                               # Save last 100 cmds in a stack.
set savehist=100                              # Save last 100 cmds in a file.
set mail = (60 /usr/mail/$LOGNAME /etc/motd)  # Any mail/motd last minute?
clear                                         # Start with a nice, clean screen.
calendar                                      # Any appointments?
umsk 022                                     # S my friends cannot write.

:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Bo Thide', Swedish Institute of Space Physics.  UUCP: ..enea!kuling!irfu!bt
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::