/* Example Sieve Filter Declare any optional features or extensions used by the script */ require "fileinto"; /* Handle messages from known mailing lists Move messages from IETF filter discussion list to filter mailbox */ if header :is "Sender" "owner-ietf-mta-filters@imc.org" { fileinto "filter"; /*move to "filter" mailbox */ } /* Keep all messages to or from people in my company */ elsif address :domain :is [ "From", "To" ] "example.com" { keep; } /* Try and catch unsolicited email. If a message is not to me, or it contains a subject known to be spam, file it away. */ elsif anyof ( not ( address :all :contains [ "To", "Cc", "Bcc" ] "me@example.com" ), header :matches "subject" [ "*make*money*fast*", "*university*dipl*mas*" ] ) { fileinto "spam"; } else /* Move all other (non-company) mail to "personal" mailbox. */ { fileinto "personal"; }