Hi, everyone!

I'm trying to get the detail part of the address (i.e. anything that comes 
between + and @ in the address of this type: alias+det...@mydomain.tld) in this 
sieve:

if address :regex :localpart "to" "\+(.*)" {
  fileinto :create "${1}";
  stop;
}

However, when I try to compile it with sievec, I get this error:

error: invalid regular expression '+(.*)' for regex match: invalid preceding 
regular expression.

Why is that? Shouldn't I escape the plus sign? Itried also not escaping it, but 
I get the same error.


(A note why I don't use "envelope :detail" for that purpose: because the detail 
part of the address is not preserved in the "Envelope-To" after the message is 
redirected from alias to user. After that redirection the "Envelope-To" contain 
only u...@mydomain.tld, not user+det...@mydomain.tld.)

-- 
Respectfully,
Denis Shadrin

Reply via email to