procmail
[Top] [All Lists]

Re: search for keyword/delete paragraphs

1999-06-18 06:29:19
Tom Adler followed up,

| Is this how I would add/nest the additional condition of checking the body
| of the message for my county name?
| 
| :0c
| *^From:(_dot_)*weather(_at_)service(_dot_)com
| :0B
| *county
| !mypager(_at_)pagercompany(_dot_)net

No, your first recipe has no action line.  To AND conditions, just put them
one after another.  One complication here is that you have to specifiy
different search areas for the two, but that's possible also:

 :0c
 * ^From:(_dot_)*weather(_at_)service\(_dot_)com
 * B ?? county
 ! pager(_at_)pagercompany(_dot_)net

| The format appears to be that the asterisk is used as the "bullet"
| character of the paragraph, with all subsequent paragraph text indented. 
| Perhaps your second method below would be better because of this?  All of
| the text I want to delete is consistently ahead of the first occurence of
| an asterisk.

Could you send a sample?  There are still several ways to interpret your
description.  Is the bulleting asterisk flush left or is it a space or two
away from the left margin?  What separator is there between paragraphs?
Those are two questions I asked before that remain unanswered, so I think
the best way is to show us a sample.

Another question: I see you are sending a copy to the pager and apparently
keeping the original in your email storage.  Do you want the copy that you
store also to be filtered down to only the asterisked paragraphs, or do you
want that copy to remain whole while you filter only the copy to be forwarded
to your pager?  If the former, we'll filter it and send a copy to the pager
while the original goes into your email storage; if the latter, we'll save a
copy, filter the original, and send the original to the pager, or we'll clone
procmail and have the clone filter and forward the message while the parent
process stores the original.