procmail
[Top] [All Lists]

Re: capturing the OR that succeeds ???

2004-05-13 20:27:30
* "David W. Tamkin" <dattier(_at_)panix(_dot_)com> [2004:05:13:21:42:11-0500] 
scribed:
Dallman Ross suggested to Michael Schleif,

    MATCH  # unset this first to avoid contamination from earlier recipes
    :0 BD

Presumably that should be  :0 BD fw  like the next.

    * 9876543210^0 ()\/aaa
    * 9876543210^0 ()\/bbb
    * 9876543210^0 ()\/ccc
    * 9876543210^0 ()\/ddd
    * 9876543210^0 ()\/eee

Likewise, I'm assuming that

       | formail -I "X-Procmail: alphabet soup: $MATCH"

would appear here.

I am not following the above.  Dallman appears to have taken
misunderstood my need to [1] add a descriptive header, and [2] put the
resulting message in a specific folder.  Now, you are confusing me
further.  Have you seen my response to dman?

However, you're still running body greps up to five times on "hit" messages
and all of five times on non-triggering messages.  You can have the same
effect with one pass like so:

 MATCH
 :0 D fw
 * B ?? ()\/(aaa|bbb|ccc|ddd|eee)
 | formail -I "X-Procmail: alphabet soup: $MATCH"

No, the effect is not the same.

The first will match on the first string that it tests for and finds. 
The second will match on the earliest of the five strings to appear in 
the text.

For example, if bbb and eee are in the body while the other three are 
not, but an appearance of eee precedes the first appearance of bbb, the 
first recipe will assign MATCH=bbb, while the second will assign MATCH=eee.

The question is how Michael wants to handle a case where more than one 
of the strings are in the body.

OK, I thought that that was understood.

Self-documenting headers are the only reason I am doing this.  So, the
header text *MUST* match the condition met.  Actually, I am not
particular about sequence; but, given the choice, I would prefer to flag
the _first_ condition met, going top-down through the message body.

What do you think?

-- 
Best Regards,

mds
-
Dare to fix things before they break . . .
-
Our capacity for understanding is inversely proportional to how much
we think we know.  The more I know, the more I know I don't know . . .
--

Attachment: signature.asc
Description: Digital signature

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