/* Example: "discards" This MFL script performs a few basic header tests to see if mail should be discarded. If the mail is not discarded by these tests, it will automatically be saved into the default mailbox. */ sieve { /* Open the sieve block */ /* Reject mail that looks like "make money fast" */ if header :matches "subject" "*mak*money*fast*" { discard ; } /* Reject mail if the From line says "big@boss.com" . Note the use of "elsif" to avoid extra tests/actions. */ elsif address :is "From" "big@boss.com" { discard; } /* Reject all mail from "example.com" unless it's from Fred */ elsif allof ( address :domain :is "From" "example.com", not address :all :is "From" "fred@example.com" ) { discard; } /* We can just end here; because of "implicit keep" mail not otherwise dealt with will be saved. */ }