procmail
[Top] [All Lists]

Re: New Mail

1996-07-11 10:14:09
Ie: if you want the output to go /dev/console, then do this:

    :0c
    | echo "You have new mail from $FROM bout $SUBJ" >/dev/console 

This is what I figured, but as I am on a tty which changes 
every time I log on, I need a way for it to find the right one.
This is what I have come up with so far.  There must be an easier way:

FROM=`formail -rtzxTo:`
SUBJ=`formail -rtzxSubject:`
TTY=/dev/`who | grep lolson | awk '{print $2}'`
:0c
| echo "You have new mail from $FROM about $SUBJ" > $TTY

What do you think will happen if you are logged more than once, say with
multiple xterm's?

<Prev in Thread] Current Thread [Next in Thread>