procmail
[Top] [All Lists]

Re: help with recipe

2001-12-07 12:39:37
I have a recipe that:
      checks subject for condition A (Subject contains X)
      checks body for condition B (MATCH first email address contained within
brackets)

      pipe $MATCH to home-grown script
      log action

:0 c
* ^Subject:.*string
* B ?? .*<\/[(_dot_)a-z0-9(_at_)_-]*[^>]
?????

One way would be something like:

  :0 c
  * ^Subject:.*string
  * B ?? .*<\/[(_dot_)a-z0-9(_at_)_-]*[^>]
  {
      DUMMY=`echo "$MATCH" | my.script`
      LOG="echo \"$MATCH\" | my.script
  "
  }

The 'DUMMY' var doesn't do anything other than provide somewhere to put
the script execution.

Are you sure you want that '[^>]' on the end of your condition?

Regards,
Martin
-- 
Martin McCarthy                 /</                  PGP key available
    `Procmail Companion'        \>\  http://www.ancient-scotland.co.uk
     Addison Wesley             /</    http://www.ehabitat.demon.co.uk
_______________________________________________
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>