Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I want to use procmail to trigger a script to run when a certain email message is encountered but I do not want to change, alter, or prevent delivery of the original message.

Will this procmail recipe work?

    :0 fw
    * ^From: .*numbchild@gmail\.com
    {
        :0 c
        * ^Subject:\/.*
        | /bin/sh $HOME/bin/notify.sh "Thread ('$MATCH') updated" "Body"
    }
share|improve this question
    
Indidentally, the fw flags on the outer recipe are superfluous, if not outright erroneous. –  tripleee Aug 15 '12 at 11:21

1 Answer 1

up vote 1 down vote accepted

From the manpage:

   c    Generate a carbon copy of this mail.  This  only  makes  sense  on
        delivering  recipes.

So yes, the c flag will cause the message to also be delivered with the next matching recipe.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.