Re: Playing a sound
LuKreme <[email protected]>
| Newsgroups | gmane.mail.procmail |
|---|---|
| Message-ID | <[email protected]> |
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. [email protected] 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