procmail
[Top] [All Lists]

Re: New Mail

1996-07-10 20:52:51

On Wed, 10 Jul 1996, Eric D. Berg wrote:

The Raven writes:

FROM=`formail -rtzxTo:`
DISPLAY="bluedog:0.0"
SUBJ=`formail -rtzxSubject:`
:0 c
* FROM ?? mywife(_at_)herjob(_dot_)com
|  xmessage  "$FROM: $SUBJ"  &

-Eric.

I inserted this recipe into my .procmailrc fil, but nothing happens.

FROM=`formail -rtzxTo:`
SUBJ=`formail -rtzxSubject:`
:0 c
| echo "You have new mail from $FROM about $SUBJ" &
 
I used mail lolson < file to test it, the mail got there, but th mssage 
wasn't displayed.

Any ideas what is wrong?

Yes, echo and xmessage do not work the same way.  Echo produces
output to STDOUT (which is probably the log file or /dev/null, when
mail is being deliverd), while xmessage places a message on the
$DISPLAY.

If you wish to have "output" produced at the time mail is delivered,
you must have a good definition of where the output should go, and
then tell "echo" to put it there.

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 

Also, you don't need to background an "echo" as was done for xmessage,
since the former doesn't wait for confirmation while the latter does.
The backgrounding on xmessage is to avoid having the procmail
process wait for the user to confirm the displayed message.

___________________________________________________________
Alan Stebbens       <stebbens(_at_)sgi(_dot_)com>       (415) 933-6437
Silicon Interactive Group,   Silicon Graphics, Inc.   (SGI)
M/S:9L991, 2011 N. Shoreline Blvd., Mountain View, CA 94043

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