我想让吹筛过滤器工作
require ["fileinto", "imap4flags", "mailbox", "body", "envelope", "vnd.dovecot.pipe", "variables", "vnd.dovecot.execute"];
if envelope :matches "To" "*@*" {
set "recipient" "${0}";
set "user" "${1}";
set "recip_domain" "${2}";
}
if envelope :matches "From" "*" {
set "sender" "${0}";
}
#Check if recipient is valid user
if execute :output "valid_user" "user-verification" "${recipient}" {
if string :matches "${valid_user}" "True" {
if body :raw :contains ["message/notification"] {
setflag "\\Seen";
fileinto :create "Notifications";
stop;
}
}
}
在哪里?
user-verification
是一个extprogram,它调用API并根据电子邮件地址验证用户,然后返回布尔值(作为控制台的输出)。
我搬的时候一切都很好
if string :matches "${valid_user}" "True"
另一种说法是不认识
valid_user
变量。
当我管
验证用户
对于某些脚本,为了捕获该变量的值,它会引发一个错误:
错误:指定:args item`true?'无效。
在这种情况下,为什么要在变量中添加问号?
思想?