require"fileinto"; ## keep all mail that goes through cmu smtp servers if header :matches "Received" "smtp?.andrew.cmu.edu" { keep; } ## spamfilter ## whitelist of domains; elsif address :domain :is "From" ["pittsburghfoodbank"] { keep; } ## whitelist of addresses; elsif address :all :is "From" [""] { keep; } ## blacklist of domains; elsif address :domain :is "From" [""] { fileinto "user.tridelt.spam"; stop; } ## blacklist of addresses; elsif address :all :is "From" [""] { fileinto "user.tridelt.spam"; stop; } ## spam assassin check elsif header :contains "X-Spam-Warning" "" { fileinto "user.tridelt.spam"; stop; } ## we seem to get a lof of vicodin ads :) elsif header :contains "Subject" ["Vicodin"] { fileinto "user.tridelt.spam"; stop; } ## http://www.cmu.edu/computing/documentation/sieve/sieve.html ## %sieveshell -u tridelt cyrus.andrew.cmu.edu ## connecting to cyrus.andrew.cmu.edu ## >put XXX ## >activate XXX ## >quit ## where XXX = the script file name