[prev in list] [next in list] [prev in thread] [next in thread] 

List:       procmail
Subject:    Re: Need Help with Message Body Filtering using AND/OR, Nested If conditions *SOS*
From:       Alan Stebbens <stebbens () anywhere ! engr ! sgi ! com>
Date:       1996-04-26 21:09:08
[Download RAW message or body]

> Hi,
> I am new to procmail and would appreciate if anyone can
> help me with real code of .procmailrc for the following example:
> 
> In message body search for :
> search for the word Item
> if found
>       search for the word TV or VCR
>          if found
>             search for the word price or pricing
>                if found
>                   put the message in the folder tv-vcr-rice
>                endif
>        elseif search for the word radio
>           if found 
>              write the message to folder radio

It's pretty simple:

    :0 B
    * Item
    {
	:0 B
	* (TV|VCR)
	{
	    :0 B
	    * pric(e|ing)
	    tv-vcr-price
	}
	:0 EB
	* radio
	radio
    }

However, this may not be stringent enough.  What if I sent the following
message?

    From: me
    To: you
    Subject: Re: your procmail recipe which is broken

    I noticed that your procmail recipe includes all messages with the
    words "Item", "VCR", "TV", "price", "pricing", or "radio", even if
    they are in quotes.

    This makes it difficult to figure out where to file mail like this
    which is a discussion.

Alan

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic