procmail
[Top] [All Lists]

Re: Playing a sound

2012-04-17 23:34:48
Danny squawked out on Tuesday 17-Apr-2012@13:27:32
Hi guys,

Is it possible to play a soundfile when procmail encounters mail from a 
certain
e-mail address?

Yep, it's quite easy. On the tried period of time that I was running 
postfix/procmail on my OIS System I had a recipe that looked something like 
this on my personal account. I set UNAME by indexing the CLEANFROM against a 
whitelist local file.

user(_at_)domain(_dot_)tld Fred Smith

# This is a non-delivery recipe
:0
* CLEANFROM ?? $UNAME
{ DUMMY=`/usr/bin/say "New mail has arrived from $UNAME" -v Alex -r 255` }

Of course, the command that you use will vary by OS, but it really is that 
simple. The hard part was building UNAME, which I did with a local file that I 
edited manually when I wanted notifications from a person.

But the experiment of running postfix and procmail on OS X was short-lived, and 
my servers are miles away, so sound playing would be rather silly at this point.

You can do pretty much anything you want in a recipe, and executing it from a 
fake variable assignment avoids a lot of issues.

-- 
I DO NOT HAVE DIPLOMATIC IMMUNITY Bart chalkboard Ep. 9F20


____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)de
http://mailman.rwth-aachen.de/mailman/listinfo/procmail

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