procmail
[Top] [All Lists]

Re: procmail question about ^TO

1996-06-04 16:45:18
At 16:37 96-06-04, Sebastian Bernheim wrote:

   * ^TO(dummy|sebby|sbern|dummy)
or
   * ^TO_(dummy|sebby|sbern|dummy)

And you really don't need the duplicated 'dummy' entries....

That doesn't work.  When I replace the brackets with parenthesis the
condition does not match for any of the strings.

I'm stumped.  It certainly should be the parens, and no 'dummy' values.
Maybe a guru will drop in....

The "dummy" entries are
there because through trial and error I have discovered that procmail is
ignoring the first and last strings, so that the condition doesn't trip if
the string that should trip it is either first or last in the brackets.

You needed the 'dummy' arguements when you had the braces because they
were treated as literal characters in the regular expression.  That is:
    * ^TO{fred|barney|joe}
would match mail to:
    barney
    {fred
    joe}

As I think about it, you don't even need the parenthesis as you have
the regexp written.  However, the following would be more robust, and
does require the parentheseis:
    * ^TO_(fred|barney|joe)@
This ensures the the entire user name is matching, and won't match on fredrick.

--Hal
Hal Wine <hal(_at_)dtor(_dot_)com>     voice: 510/482-0597


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