[prev in list] [next in list] [prev in thread] [next in thread]
List: procmail
Subject: Re: non-delivering actions
From: Philip Guenther <guenther () gac ! edu>
Date: 1996-04-26 16:19:04
[Download RAW message or body]
fox@gso.SAIC.COM (Warren "Caddy to the Dalai Lama" Fox) writes:
>I'm sure there's a simple answer to this, but I don't see it
>in the man pages. I want to play an audio sound when mail arrives.
>I'm currently using this recipe, which works, but I'm wondering if
>there is a more efficient way to do this (I'm trying to pipe the
>mail into rsh?).
>
># add sound to these senders,
># but still read from standard mailbox
>:0
>* ^From:.(tjs|bache)
>{
> :0 c
> $ORGMAIL
>
> :0
> | rsh jarl "/bin/audioplay -v 60 ~/audio/splat.au"
>}
As Guy Geens mentioned, you'll want the 'i' and 'h' flags on the rsh.
Other points to consider:
You probably meant to include a '*' in the condition, and the \< and \>
regexp token may be a good idea as well to delineate the names as words:
* ^From:.*\<(ths|basche)\>
You may as well pass rsh the -n flag. This saves a process (rsh has
to fork otherwise to handle both directions). Beware: some rsh's
require you to place the -n *after* the hostname.
You may want to add "2>/dev/null" to the command line to avoid filling
your procmail log with "audioplay: unable to open /dev/audio:
permission denied" when you aren't logged in.
Why not just make the rsh action be non-delivering, and fall through
for the delivery to your mailbox?
To sum up:
:0 ich
* ^From:.*\<(tjs|basche)\>
|rsh -n jarl "/bin/audioplay -v 60 ~/audio/splat.au" 2>/dev/null
Philip Guenther
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic