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.