6 Sep
                
                    2016
                
            
            
                6 Sep
                
                '16
                
            
            
            
        
    
                3:25 p.m.
            
        Hello list,
have a problem with sieve script. I want to perform an action if an arbitrary headerline contains a defined string. I tried with regex:
if header :regex [".*"] ["searchstri.*"] { fileinto "junk"; }
This is not working because regex is only used in 2nd argument ["searchstri.*"] In 1st argument [".*"] no regex is used, sieve expects just plain string. Something like this would work, if "x-myheader" contains "searchstring": if header :regex ["x-myheader"] ["searchstri.*"]....
How to solve this case and find a string in arbitrary/unknown headerline?
Thanks, Hajo