sieve match with contain asterisk
    Robert L Mathews 
    lists at tigertech.com
       
    Sat Jul  3 21:17:42 EEST 2021
    
    
  
On 7/3/21 12:36 AM, Hardy Flor wrote:
> Thanks for the hint. But that means the keyword can be within the
> subject. I actually only wanted to look for it at the beginning.
Ah. In that case, you want:
if header :matches "Subject" "\\*xyz\\**"
I tested this and it works; see
<https://datatracker.ietf.org/doc/html/rfc5228#section-2.7.1>:
  "?" and "*" may be escaped as "\\?" and "\\*" in strings to
  match against themselves.  The first backslash escapes the second
  backslash; together, they escape the "*".  This is awkward, but it is
  commonplace in several programming languages that use globs and
  regular expressions.
-- 
Robert L Mathews, Tiger Technologies, http://www.tigertech.net/
    
    
More information about the dovecot
mailing list