2017-03-02 11:23:23 +01:00
|
|
|
require "fileinto";
|
|
|
|
require "mailbox";
|
|
|
|
require "variables";
|
|
|
|
require "subaddress";
|
|
|
|
require "envelope";
|
|
|
|
|
|
|
|
if header :contains "X-Spam-Flag" "YES" {
|
|
|
|
fileinto "Junk";
|
|
|
|
}
|
|
|
|
|
|
|
|
if allof (
|
|
|
|
envelope :detail :matches "to" "*",
|
|
|
|
header :contains "X-Moo-Tag" "YES"
|
|
|
|
) {
|
2017-05-08 00:27:16 +02:00
|
|
|
set :lower :upperfirst "tag" "${1}";
|
|
|
|
if mailboxexists "INBOX/${1}" {
|
|
|
|
fileinto "INBOX/${1}";
|
|
|
|
} else {
|
|
|
|
fileinto :create "INBOX/${tag}";
|
|
|
|
}
|
2017-03-02 11:23:23 +01:00
|
|
|
}
|