require ["fileinto", "imap4flags"];

if header :contains "X-Spam-Status" "Yes" {
    setflag "\\seen";
    fileinto "Junk";
}

if header :contains "X-Spam" "Yes" {
    setflag "\\seen";
    fileinto "Junk";
}
