我希望将转发到我的主邮箱(从另一个域)的电子邮件放入特定子文件夹中。例如:foo@bar转到INBOX/bar/foo。
require ["fileinto", "envelope", "regex", "mailbox"];
if header :regex "delivered-to" "(.*)@(.*)" {
if not envelope :is "to" "${1}@${2}" {
fileinto :create "INBOX/${2}/${1}";
}
}INBOX/${2}/${1}中没有替换捕获组,为什么?
发布于 2017-08-22 23:39:31
匹配组变量不是regex功能的一部分,而是variables capability的一部分。也可以使用require ["variables"];来使用它们。
https://stackoverflow.com/questions/45821462
复制相似问题