require ["fileinto", "imap4flags", "mailbox"];
if header :contains "X-Spam" "Yes" {
addflag "\\Seen";
fileinto "Junk";
}