Расширение функционала сортировщика почты Sieve
Хотелось бы иметь возможность в сортировщике почты Sieve иметь полный функционал [ "body", "copy", "editheader", "envelope", "fileinto", "foreverypart", "imap4flags", "mailbox", "mime", "regex", "subaddress", "variables" ], например:
require ["imap4flags"];
if address "From" "someone@example.org"
{
setflag "\\Seen";
}
require ["editheader", "variables"];
# store the original subject in a variable that later rules can use
if header :matches "Subject" "*"
{
set "subject" "${1}";
}
if header :contains "X-Spam-Level" "*******"
{
# delete the orginal subject...
deleteheader "Subject";
# ... and replace it with the stored subject plus "[SPAM]"
addheader :last "Subject" "${subject} [SPAM]";
}
require ["editheader"];
if header :contains "X-Spam-Level" "*******"
{
deleteheader "X-Spam-Flag";
addheader "X-Spam-Flag" "YES";
}
require ["fileinto", "mailbox"];
if header :contains "Subject" [
"confirm your subscription",
"confirmation of subscription",
"subscription confirmation",
"please confirm subscription",
"confirmation instructions",
"confirm mailing list subscription",
"Copy of: "
]
{
fileinto :create "INBOX.Signups";
}
if header :contains "X-Spam-Status" "TT_NEW_SENDING_DOMAIN="
{
fileinto :create "INBOX.Signups";
}
05.12.2024 09:08
Кстати, после ручного добавления в правило setFlag работает.
05.12.2024 09:29