<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Oct 22, 2020, at 12:19, @lbutlr <<a href="mailto:kremels@kreme.com" class="">kremels@kreme.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">On 22 Oct 2020, at 10:05, @lbutlr <<a href="mailto:kremels@kreme.com" class="">kremels@kreme.com</a>> wrote:<br class=""><blockquote type="cite" class="">require ["variables", "copy"];<br class=""><br class="">if address :matches ["To", "Cc"] ["*@*."] {<br class="">  redirect :copy "backup+295.${1}.${2}@*<a href="http://example.com" class="">example.com</a>*";<br class="">}<br class=""></blockquote><br class="">I have tried this with similar results:<br class=""><br class="">require ["copy", "variables", "envelope", "fileinto", "subaddress"];<br class=""><br class="">   if envelope :matches :detail "to" "*" {<br class="">     set :lower "name" "${1}";<br class="">     redirect :copy "backup+295.${name}@@*<a href="http://example.com" class="">example.com</a>*";<br class="">   }<br class=""><br class="">      ## Started executing script 'bcc'<br class="">   5: envelope test<br class="">   5:   starting `:matches' match with `i;ascii-casemap' comparator:<br class="">   5:   getting `to' part from message envelope<br class="">   5:   extracting `detail' part from address <<a href="mailto:kremels@kreme.com" class="">kremels@kreme.com</a>><br class="">   5:   finishing match with result: not matched<br class="">   5: jump if result is false<br class="">   5:   jumping to line 7<br class="">      ## Finished executing script 'bcc'<br class=""><br class="">So why are these not matching? I can see the 'detail' right there, and this matches examples that I see online.<br class=""><br class="">(I've read, I think, every page google or DDG can find that contains "redirect :copy" to no avail).<br class=""><br class=""></div></div></blockquote><br class=""></div><div>If I read that bcc trace, it says “extracting ‘detail’ part from address <<a href="mailto:kremels@kreme.com" class="">kremels@kreme.com</a>>”.</div><div><br class=""></div><div>“<a href="mailto:kremels@kreme.com" class="">kremels@kreme.com</a>” does not have a :detail part (<a href="https://wiki2.dovecot.org/Pigeonhole/Sieve/Examples" class="">https://wiki2.dovecot.org/Pigeonhole/Sieve/Examples</a> talks about this).</div><div><br class=""></div><div>If it were “<a href="mailto:kremels+thing@kreme.com" class="">kremels+thing@kreme.com</a>” then the net line out to say “finished match with result: ‘thing’” or some such.</div><div><br class=""></div><div>My notes from my sieve file:</div><div><br class=""></div><div><div># :localpart = :user+:detail</div><div># address are :localpart @ :domain, or :user + :detail @ :domain</div><div># See RFC5233</div><div><br class=""></div><div>Sean</div></div></body></html>