mirror of
https://github.com/mailcow/mailcow-dockerized.git
synced 2024-12-16 10:59:39 +02:00
25 lines
477 B
Plaintext
25 lines
477 B
Plaintext
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",
|
|
mailboxexists "INBOX/${s}"
|
|
) {
|
|
fileinto "INBOX/${s}";
|
|
}
|
|
elsif allof (
|
|
envelope :detail :matches "to" "*",
|
|
header :contains "X-Moo-Tag" "YES"
|
|
) {
|
|
set :lower "s" "${1}";
|
|
fileinto :create "INBOX/${s}";
|
|
}
|