procmail
[Top] [All Lists]

Re: search for 2 headers and a body

1997-09-25 14:34:26
Timothy Luoma asked,

| I want to search for a From line, a Subject line, and the first line of the
| body.
| 
| From:(_dot_)*someone(_at_)somewhere\(_dot_)com
| Subject: Subject
| 
| begin 644 file.tar.gz
| 
| How can I search for them, in the above order (Check From line, then Subject  
| line, then body scan) and if they all match I want to send the body of the  
| message to a special program via pipe.

  :0b
  * ^From(_dot_)*someone(_at_)somewhere\(_dot_)com
  * ^Subject: Subject
  * B ?? ^^($)*begin 644 file\.tar\.gz
  | /path/to/program

Add the `f' flag if the program is supposed to be a filter.  [I couldn't
tell positively from Timothy's post.]

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