procmail
[Top] [All Lists]

Re: multiple addresses ?

1999-11-21 10:51:33
Era suggested recipes that included these conditions:

|     * ^To:(.*($))*To:

That should be

      * ^To:(.+$)+To:.()

because we don't want to count empty To: lines, the word "To:" farther along
in a To: header, nor appearances of To: in the body if the search area is HB.
(The empty parentheses at the end are there only to indicate that the second
period is part of the regexp and not end punctuation for reading this post.)

Likewise,

|     * ! ^TO(.*($))*^TO

but that is a bigger problem, because it requires either

 1. A match to the expansion of ^TO with nothing else on its line, or
 2. Two consecutive newlines

because the expansion of ^TO starts with a newline.  So let's try this:

     * ^TO.+(^[^ ].*)*^TO.()

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