Simon Josefsson wrote:
> 
> Ken Murchison <[EMAIL PROTECTED]> writes:
> 
> >> I suspect you're right, William. AFAICT this goes against the RFC however,
> >> since you should only get regex when you use the :regex comparator.
> >>
> >> Ken--is this a bug... a feature... a misdiagnosis...?
> >
> > It appears to be a bug caused by using fnmatch(3) to perform the match.
> > fnmatch(3) performs glob-style matching, which treats '?', '*' AND '['
> > as special -- see glob(7).  The workaround is to escape the []:
> >
> > header :matches "subject" "*\\[spam score 10.0/10.0 -pobox\\]*"
> >
> > Feel free to bugzilla this, but I doubt it'll be at the top of anyone's
> > list, since using fnmatch(3) is just too convenient.
> 
> Maybe a quick workaround could be to, in the Cyrus Sieve code, replace
> [ with \[ in the string that is passed to fnmatch()?  Then you don't
> need to rewrite fnmatch.

I was thinking the exact same thing last night  :^)

Ken
-- 
Kenneth Murchison     Oceana Matrix Ltd.
Software Engineer     21 Princeton Place
716-662-8973 x26      Orchard Park, NY 14127
--PGP Public Key--    http://www.oceana.com/~ken/ksm.pgp

Reply via email to