procmail
[Top] [All Lists]

Re: Playing sound files for specific senders

2001-08-14 23:34:41
From: Subba Rao <subba9(_at_)home(_dot_)com>

I have some reciepes defined in the begining of the .procmailrc to
weed out some typical spam look alike email (Blank Subject, no Sender,
no To: etc).  After the spam filters do the job, I do play a sound to
indicate mail addressed to me.

:0
* ^TO_subba9(_at_)home(_dot_)com
{
        LOGABSTRACT=no
        :0 hwic
        | play /usr/share/sounds/mail.wav
}

:0
* ^TO_subba9(_at_)home(_dot_)com
$DEFAULT


There are a couple of colleuges of mine who send me email, where
they usually do not have "Subject" or "To" or "From". Their mail is
typically trapped by one of my mail filters. How do I nest a receipe
for each of these users and save their mail to $DEFAULT and play an
alert message?

From your description, I surmise that your spam-trapping recipes are
currently found above the recipe you show above that plays the sound.
You can simply exclude those specific users from your spam tests.  Then
their mail will still be there to be acted on by the sound-playing
recipe.

        :0  # exclude certain users from these recipes
        * ! ^From.*\<(user1|user2|user3)\>
        {
                # spam recipes go here
        }

        :0
        * ^TO_subba9(_at_)home(_dot_)com
        {
                LOGABSTRACT=no
                :0 hwic
                | play /usr/share/sounds/mail.wav
        }


Note, also, that your recipe to shunt what's left to $DEFAULT is
unnecessary, since that is the, um, default action at the end of
the .procmailrc.

-- 
(use dman+noacks(_at_)nomotek(_dot_)com to avoid weekly auto-ack)
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

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