Closed X-Ryl669 closed 2 months ago
Example sieve script:
require ["variables", "envelope", "regex"]; if envelope :regex "to" "alias\.([^.]+)@(.+)$") { set "to" "${2}"; reject "Error ${to}"; }
Expected bob for an envelope.to set to alias.bob@domain. Got {$2} instead
bob
alias.bob@domain
{$2}
Side note: It works if going through a :replace like set :replace "." "" "to" "{$2}";
:replace
set :replace "." "" "to" "{$2}";
Linking the other issue here for reference https://github.com/stalwartlabs/mail-server/issues/611
This can't be reproduced, see this commit.
Example sieve script:
Expected
bob
for an envelope.to set toalias.bob@domain
. Got{$2}
insteadSide note: It works if going through a
:replace
likeset :replace "." "" "to" "{$2}";