2

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"
    }
  • Indidentally, the fw flags on the outer recipe are superfluous, if not outright erroneous. – tripleee Aug 15 '12 at 11:21
2

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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