require ["fileinto", "mailbox"]; /* * Discard mail that has a spam score greater than or equal to 5 */ if header :contains "X-Spam-Level" "*****" { discard; stop; } /* * Discard messages marked as infected by virus scanner */ if header :contains "X-Virus-Scan" "infected" { discard; stop; } /* * If message is marked as spam (and falls below discard threshold) put into spam mailbox */ if header :contains "X-Spam-Flag" "YES" { fileinto "Spam"; }