procmail
[Top] [All Lists]

Re: Grepping body of message

2003-04-24 13:21:20
On Thu, 24 Apr 2003 11:30:39 -0700, PSE-L(_at_)mail(_dot_)professional(_dot_)org
(Professional Software Engineering) wrote:

At 10:41 2003-04-24 -0700, multimedia-fan(_at_)myrealbox(_dot_)com wrote:

:0B:
* (phrase1|phrase2phrase1|phrase3|....)

A way to grep the body against a list of phrases, domains, words,
...etc, form the responses that I have seen is impossible with procmail
alone, unless you write a PERL script and feed the message to it.

Huh? The above syntax will allow you to grep against a list of words and 
prhases.  Perhaps you want an _external_ list of words and phrases  - yes, 
to do that, you'd need an external script.  Either one which is run at 
runtime, or which is run against the wordlist whenever you change it, and 
that _creates_ a procmail recipe which you could INCLUDERC.


That's what I meant, which was obvious, and external list.

Also, instead of using the B flag, you can use the B _variable_, which 
contains the body text:

:0
* ^Some_header: expression
* B ?? expression_checked_against_the_body



Thank you for the tip.
That was what I was looking for.

I would assume that the 
expression_checked_against_the_body can use egrep and fgep on any
external program?
If so then you answered my question.


I still disagree that the manpages are impossible to understand.  If you 
feel so, then perhaps investing in a book such as _The_Procmail_Companion_ 
would be worthwhile.

The manpages may be a dry read, but that's manpages for you - function, not 
fluff.

Ehm, Sorry Sean, that wasn't me who commented on the Man pages, I never
even referred to them, I responded to a message from Ruben who said
that.

Man pages are dry but not that bad.




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