procmail
[Top] [All Lists]

Re: procmail/sendmail general filter question

1998-04-29 14:29:45
On 29 April 1998, abeck(_at_)falcon(_dot_)org <abeck(_at_)falcon(_dot_)org> 
wrote:
On Wed, 29 Apr 1998, era eriksson wrote:

What it means is, The ^TO macro, followed by any number of whatever
^TO expands to, which happens to be a parenthesized expression (not
the ? quantifier as I thought it did, which would indeed have been
a syntax error -- sorry) followed by zero or more @, followed by
falcon, followed by any one character, followed by org. You mean
something like

    * ^TO(.*\<)@([^ .@<>()]+\.)*falcon\.org

why bother with that complex sysntax when *(_at_)*falcon(_dot_)org works just
fine?
[...]

    Because it doesn't do what you expect it to.  "^TO" is first
expanded to

        (^((Original-)?(Resent-)?(To|Cc|Bcc)|(X-Envelope|Apparently\
        (-Resent)?)-To):(.*[^a-zA-Z])?)

then the first "*" in "^TO*(_at_)*falcon(_dot_)org" is applied to the expression
above, which means matching _that_ 0 or more times, then the second "*"
is applied to "@", which means matching "@" 0 or more times.  I suppose
this is not what you want.

    Regards,

    Liviu

-- 
Dr. Liviu Daia                   e-mail:   daia(_at_)stoilow(_dot_)imar(_dot_)ro
Institute of Mathematics         web page: http://www.imar.ro/~daia
of the Romanian Academy          PGP key:  finger 
daia(_at_)stoilow(_dot_)imar(_dot_)ro