sieve - find in header
Stephan Bosch
stephan at rename-it.nl
Tue Sep 6 13:45:19 UTC 2016
Op 6-9-2016 om 15:25 schreef Hajo Locke:
> 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?
I don't think the Sieve language supports a test like that at this time.
Regards,
Stephan.
More information about the dovecot
mailing list