Hi all I'm trying to create a new sieve rule. What I would like to do is catch "From" addresses that are equal to the rightpart (hostname) of a message-id.
For example: Message-ID: <000d01c9d23a$941a7db0$6400a...@upwabm> From: "Leanne Crabtree" <upw...@blomberg-co.com> I would like to catch this mail, because it has "upwabm" on the right part of the message-id and "upwabm" on the left part of the sender address. I've done this, but with no success. The error reported is: "Invalid preceding regular expression" on line with the second regex with ${1} More over I would like to add an header with the result of regex, an header like this: "X-MyHeader" "${1}" but it does not work. This is an extract of our sieve: --- require ["regex"]; if header :regex "Message-ID" "^.*@(.*)>$" { if header :regex "From" ".*<$...@.*>$" { addheader "X-MyHeader" "${1}" } } ---