procmail
[Top] [All Lists]

Re: How to handle "psudo-headers"?

1996-09-24 17:44:21
"Michael C. Tiernan" <mtiernan(_at_)bbn(_dot_)com> writes:
Philip Guenther said:
Is there anything wrong with just matching it in the body using the
"B ??" leader on the condition?
      Well, sorta kinda, I have the feeling that this is going to get
      ugly so I think I MAY use a perl script to off load the
      responsibilities.  I can also run perl off of a different
      machine to decrease the load on the mail host.

"run perl off of a different machine", what via rsh?  Huuuuurl!
Are you _trying_ to make your life more painful?  No, don't answer
that...


      However, I have gone and looked up this line you sent:
* B ?? ^Applies-to: *some_keyword
      and I'll be damned if I can find it "explained" properly.

      I'm using 3.11 and I'd like to read more about this.


Well, my reference was sorta misleading.  The procmail manpage actually
says:

     There are some special conditions you can use that  are  not
     straight regular expressions.  To select them, the condition
     must start with:

     ...

     variablename ??
          Match the remainder of this condition against the value
          of  this environment variable (which cannot be a pseudo
          variable).  A special case is if variablename is  equal
          to  `B',  `H',  `HB' or `BH'; this merely overrides the
          default header/body search area defined by the  initial
          flags on this recipe.


Thus if a condition starts with "B ??" then the rest of the condition
is treated as if the 'B' recipe flag were in effect, and procmail will
match against the body of the message instead of the header.


      This is the kind of processing I suspect that I'll have to do. 
      I think that this is going to require more processing than I
      want to put on my primary system.


If you think so, though you may be surprised at how much you can do just
from procmail.

Philip Guenther

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