procmail
[Top] [All Lists]

Re: clarification on hb tags

2002-11-21 13:48:16
On 21 Nov, Tom Allison wrote:
| If I want to
| Match on the Header
| and
| Match on the Body
| then
| pipe only the Body
| 
| Do I:
| 
| :0 HBb
| * ? grep_something  <--header
| * foo_somthing      <--body
|| pipe_here         <--body
| 
| ?????

As written, that will match both conditions against both headers and
body.  If you want to limit each condition according to your notations:


  :0b
  * ? grep_something
  * B ?? foo_somthing
  | pipe_here

The first condition will match against the headers only (because that's
the default without adding flags). The second will match against the
body only (thanks to "B ??").  If both conditions match, it will pipe
the body to the program pipe_here.

Note: you can run a program and test it's exit status, as in your first
condition, using the "B ??" syntax, too.  It would then look like:

  * B ?? ? foo_somthing

Even though your example would seem to be doing that, I followed your
example conditions literally.


-- 
Reply to list please, or append "8" to "procmail" in address if you must.
Spammers' unrelenting address harvesting forces me to this...reluctantly.



_______________________________________________
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>