diff options
Diffstat (limited to 'pigeonhole/examples')
-rw-r--r-- | pigeonhole/examples/elvey.sieve | 153 | ||||
-rw-r--r-- | pigeonhole/examples/jerry.sieve | 224 | ||||
-rw-r--r-- | pigeonhole/examples/mjohnson.sieve | 421 | ||||
-rw-r--r-- | pigeonhole/examples/mklose.sieve | 303 | ||||
-rw-r--r-- | pigeonhole/examples/relational.rfc5231.sieve | 33 | ||||
-rw-r--r-- | pigeonhole/examples/rfc3028.sieve | 58 | ||||
-rw-r--r-- | pigeonhole/examples/sanjay.sieve | 171 | ||||
-rw-r--r-- | pigeonhole/examples/sieve_examples.sieve | 73 | ||||
-rw-r--r-- | pigeonhole/examples/subaddress.rfc5233.sieve | 23 | ||||
-rw-r--r-- | pigeonhole/examples/vacation.sieve | 23 | ||||
-rw-r--r-- | pigeonhole/examples/vivil.sieve | 94 |
11 files changed, 1576 insertions, 0 deletions
diff --git a/pigeonhole/examples/elvey.sieve b/pigeonhole/examples/elvey.sieve new file mode 100644 index 0000000..869f1c9 --- /dev/null +++ b/pigeonhole/examples/elvey.sieve @@ -0,0 +1,153 @@ +# Example Sieve Script +# Author: Matthew Elvey (Slightly modified to remove syntax and context errors) +# URL: http://www.elvey.com/it/sieve/SieveScript.txt + +# Initial version completed and put in place 4/1/02 by Matthew Elvey (firstname@lastname.com ; I've checked and it's not a valid address.); Copyright (C).and.current as of 5/19/2002 +#Change log: +#+ spam[:high]; major reordering; +DFC,BugTraq, PB up +Economist, FolderPath corrections +#+ redid .0 matches. +Korean + whitelist +@f(useful once I start bouncing mail!) +#+open mag, simplifications, to fm=spamNOTwhite, Bulk changes, IETF rules, +lst +#Reword spam bounce.+scalable@ re-correction+++Work+activate Spam Optimization, etc... +#oops high = 2x threshold, so 2x1 is 2! Too low. To @fm:bounce. Added tons of comments. +require ["fileinto", "reject", "vacation", "envelope", "regex"]; + +if header :contains "subject" ["un eject", "lastname.com/spamoff.htm agreed to"] { #I give out "uneject" to people to let them bypass the spam or size filters. + keep; +} elsif header :contains "subject" ["ADV:", "bounceme", "2002 Gov Grants", #bounceme is useful for testing. + "ADV:ADLT", "ADV-ADULT", "ADULT ADVERTISEMENT"] { #Subject text required by various US State laws + reject text: + Hello. The server content filter/spam detector I use has bounced your message. It appears to be spam. + + I do not accept spam/UCE (Unsolicited Commercial Email). + +Please ask me how to bypass this filter if your email is not UCE. In that case, I am sorry about this +highly unusual error. The filter is >99% accurate. + + (This is an automated message; I will not be aware that your message did not get through if I do not hear from you again.) + + -Firstname + + (P.S. You may also override the filter if you accept the terms at http://www.lastname.com/spamoff.htm, + by including "lastname.com/spamoff.htm agreed to." in the subject.) +. + ; +} +# LINE 30. + elsif size :over 10M { # (note that the four leading dots get "stuffed" to three) + + reject text: + Message NOT delivered! + This system normally accepts email that is less than 10MB in size, because that is how I configured it. + You may want to put your file on a server and send me the URL. + Or, you may request override permission and/or unreject instructions via another (smaller) email. + Sorry for the inconvenience. + + Thanks, + +.... Firstname + (This is an automated message; I will not be aware that your message did not get through if I do not hear from you again.) + + Unsolicited advertising sent to this E-Mail address is expressly prohibited + under USC Title 47, Section 227. Violators are subject to charge of up to + $1,500 per incident or treble actual costs, whichever is greater. +. + ; +#LINE 47. +} elsif header :contains "From" "Firstname@lastname.com" { #if I send myself email, leave it in the Inbox. + keep; #next, is the processing for the various mailing lists I'm on. +} elsif header :contains ["Sender", "X-Sender", "Mailing-List", "Delivered-To", "List-Post", "Subject", "To", "Cc", "From", "Reply-to", "Received"] "burningman" { + fileinto "INBOX.DaBurn"; +} elsif header :contains ["Subject", "From", "Received"] ["E*TRADE", "Datek", "TD Waterhouse", "NetBank"] { + fileinto "INBOX.finances.status"; +} elsif header :contains "subject" "\[pacbell" { + fileinto "INBOX.pacbell.dslreports"; +} elsif header :contains "From" ["owner-te-wg ", "te-wg ", "iana.org"] { + fileinto "INBOX.lst.IETF"; +} elsif header :contains ["Mailing-List", "Subject", "From", "Received"] ["Red Hat", "Double Funk Crunch", "@economist.com", "Open Magazine", "@nytimes.com", "mottimorell", "Harrow Technology Report"] { + fileinto "INBOX.lst.interesting"; +} elsif header :contains ["Mailing-List", "Subject", "From", "Received", "X-LinkName"] ["DJDragonfly", "Ebates", "Webmonkey", "DHJ8091@aol.com", "Expedia Fare Tracker", "SoulShine", "Martel and Nabiel", "\[ecc\]"] { + fileinto "INBOX.lst.lame"; +} elsif header :contains ["Subject", "From", "To"] ["guru.com", "monster.com", "hotjobs", "dice.com", "linkify.com"] { #job boards and current clients. + fileinto "INBOX.lst.jobs"; +} elsif header :contains "subject" "\[yaba" { + fileinto "INBOX.rec.yaba"; +} elsif header :contains ["to", "cc"] "scalable@" { + fileinto "INBOX.lst.scalable"; +} elsif header :contains ["Sender", "To", "Return-Path", "Received"] "NTBUGTRAQ@listserv.ntbugtraq.com" { + fileinto "INBOX.lst.bugtraq"; +} elsif header :contains "subject" "Wired" { + fileinto "INBOX.lst.wired"; +#LINE 72. +} elsif anyof (header :contains "From" ["postmaster", "daemon", "abuse"], header :contains "Subject" ["warning:", "returned mail", "failure notice", "undelivered mail"] ) { +keep; #this one is important - don't want to miss any bounce messages! +#LINE 77. +} elsif anyof (header :contains "From" ["and here I put a whitelist of pretty much all the email addresses in my address book - it's several pages..."]) { + fileinto "INBOX.white"; +# better than keep; +# LINE 106. + + +} elsif anyof (address :all :is ["To", "CC", "BCC"] "Firstname.lastname@fastmail.fm", #a couple people send to this, but I have have all their addrs in whitelist so OK. + header :matches "X-Spam-score" ["9.?" , "10.?", "9", "10", "11.?", "12.?" ,"13.?", "14.?", "11", "12","13", "14", "15.?", "16.?", "17.?" ,"18.?", "19.?", "15", "16", "17" ,"18", "19", "2?.?", "2?", "3?.?" , "3?", "40"]) { #"5.?", "6.?", "5", "6" "7.?" , "8.?" , "7", "8" + reject text: + Hello. The server content filter/spam detector I use has bounced your message. It appears to be spam. + + I do not accept spam/UCE (Unsolicited Commercial Email). + +Please ask me how to bypass this filter if your email is not UCE. In that case, I am sorry about this +highly unusual error. The filter is >99% accurate. + + (This is an automated message; I will not be aware that your message did not get through if I do not hear from you again.) + + -Firstname + + (P.S. You may also override the filter if you accept the terms at http://www.lastname.com/spamoff.htm, + by including "lastname.com/spamoff.htm agreed to." in the subject.) +. + ; +#LINE 127. + +} elsif +header :matches "X-Spam" ["spam", "high"] { if #optimization idea line 1/2 + header :matches "X-Spam-score" ["5.?", "6.?", "5", "6"] { + fileinto "INBOX.Spam.5-7"; +} elsif header :matches "X-Spam-score" ["7.?" , "8.?" , "7", "8"] { + fileinto "INBOX.Spam.7-9"; +#} elsif header :matches "X-Spam-score" ["9.?" , "10.?" , "9", "10"] { #These lines obsoleted by reject text rule above, but others will find 'em useful! +# fileinto "INBOX.Spam.9-11"; +#} elsif header :matches "X-Spam-score" ["11.?" , "12.?" ,"13.?" , "14.?", "11" , "12" ,"13" , "14"] { +# fileinto "INBOX.Spam.11-15"; +#} elsif header :matches "X-Spam-score" ["15.?" , "16.?" ,"17.?" ,"18.?" , "19.?", "15" , "16" ,"17" ,"18" , "19"] { +# fileinto "INBOX.Spam.15-20"; +#} elsif header :matches "X-Spam-score" ["2?.?", "2?" ] { +# fileinto "Inbox.Spam.20-30"; +#} elsif header :matches "X-Spam-score" ["3?.?" , "3?", "40"] { +#fileinto "Inbox.Spam.30-40"; + } #optimization idea line 2/2 + +#LINE 149. + +} elsif header:contains ["Content-Type","Subject"] ["ks_c_5601-1987","euc_kr","euc-kr"]{ + fileinto "Inbox.Spam.kr"; #block Korean; it's prolly spam and I certainly can't read it. +} elsif header :contains "Received" "yale.edu" { + fileinto "INBOX.Yale"; #if it made it past all the filters above, it's probably of interest. + } elsif anyof (header :contains "Subject" ["HR 1910", "viagra", "MLM", " "," " ], # common in spam. (prolly redundant to SpamAssassin.) + not exists ["From", "Date"], #RFC822 violations common in spam. + header :contains ["Sender", "X-Sender", "Mailing-List", "X-Apparently-From", "X-Version", "X-Sender-IP", "Received", "Return-Path", "Delivered-To", "List-Post", "Date", "Subject", "To", "Cc", "From", "Reply-to", "X-AntiAbuse", "Content-Type", "Received", "X-LinkName"] ["btamail.net.cn", "@arabia.com" ] ) { #spam havens. + fileinto "INBOX.GreyMail"; +} elsif header :contains ["Precedence", "Priority", "X-Priority", "Mailing-List", "Subject", "From", "Received", "X-LinkName"] ["Bulk", "Newsletter"] { + fileinto "INBOX.Bulk Precedence"; +} elsif header :contains ["to", "cc", "Received"] ["IT@lastname.com", "mail.freeservers.com"] { + fileinto "INBOX.lastname.IT"; +} elsif header :contains ["To", "CC"] "Firstname@lastname.com" { + fileinto "INBOX.lastname.non-BCC"; +} +#LINE 167. +#END OF SCRIPT. Implied 'keep' is part of the Sieve spec. + + + + + + + diff --git a/pigeonhole/examples/jerry.sieve b/pigeonhole/examples/jerry.sieve new file mode 100644 index 0000000..ff8a922 --- /dev/null +++ b/pigeonhole/examples/jerry.sieve @@ -0,0 +1,224 @@ +# Example Sieve Script +# Author: Jerry +# URL: http://www.emaildiscussions.com/showthread.php?postid=145322#post145322 + +require ["fileinto", "reject", "vacation", "regex", "relational", +"comparator-i;ascii-numeric"]; + + +#### BLACKLIST - BOUNCE ANYTHING THAT MATCHES +# From individual addresses + if header :contains "from" + [ + "username@example.com", + "username@example.net" + ] + { reject "Message bounced by server content filter"; stop; } + +# From domains + elsif header :contains "from" + [ + "example.com", + "example.net" + ] + { reject "Message bounced by server content filter"; stop; } + + + +#### BLACKLIST - DELETE ANYTHING THAT MATCHES +# From individual addresses + elsif header :contains "from" + [ + "username@example.com", + "username@example.net" + ] + { discard; stop; } + +# From domains + elsif header :contains "from" + [ + "example.com", + "example.net" + ] + { discard; stop; } + +# I just added the following section after the joe-job +# that we all suffered at the hands of "inbox.com". +# The "myusername" is MY username at FastMail. +# DISCARDing this mail instead of directing it to a +# SPAM folder kept me from going over quota repeatedly. + +# To individual addresses + elsif header :contains "to" + [ + "myusername@inbox.com", + "myusername@example.net" + ] + { discard; stop; } + + elsif allof + ( + not anyof + ( +#### WHITELIST - KEEP ANYTHING THAT MATCHES +# From individual addresses + header :contains "from" + [ + "username@example.com", + "username@example.net" + ], + +# From trusted domains + header :contains "from" + [ + "example.com", + "example.net" + ], + +# Specific "to" address (mailing lists etc) + header :contains ["to", "cc"] + [ + "username@example.com", + "username@example.net" + ], + +# Specific "subject" keywords + header :contains "subject" + [ + "code_word_for_friend_#1", + "code_word_for_friend_#2" + ] + + ), + anyof + ( + +# Filter by keywords in subject or from headers + header :contains ["subject", "from"] + [ + "adilt", "adult", "advertise", "affordable", + "as seen on tv", "antenna", "alarm", + "background check", "bankrupt", "bargain", + "best price", "bikini", "boost reliability", + "brand new", "breast", "business directory", + "business opportunity", "based business", "best + deal", "bachelor's", "benefits", "cable", + "career", "casino", "celeb", "cheapest", "child + support", "cd-r", "catalog", "classified ad", + "click here", "coed", "classmate", "commerce", + "congratulations", "credit", "cruise", "cds", + "complimentary", "columbia house", "crushlink", + "debt", "detective", "diploma", "directv", + "directtv", "dish", "dream vacation", "deluxe", + "drug", "dvds", "dvd movie", "doubleclick", + "digital tv", "erotic", "exciting new", + "equalamail", "fantastic business", "fat + burning", "financial independence", "finalist", + "for life", "financing", "fitness", "fixed + rate", "four reports", "free!", "free + business", "from home", "funds", "fbi know", + "fortune", "gambl", "getaway", "girls", "great + price", "guaranteed", "get big", "get large", + "giveaway", "hard core", "hardcore", "home + document imaging", "home employment directory", + "homeowner", "home owner", "homeworker", "home + security", "home video", "immediate release", + "information you requested", "income", + "inkjet", "insurance", "interest rate", + "invest", "internet connection", "join price", + "judicial judgment", "just released", "know + your rights", "legal", "license", "loan", "long + distance", "look great", "low interest", + "low-interest", "low rate", "lust", "lbs", + "make money", "market", "master card", + "mastercard", "meg web", "merchant account", + "millionaire", "mini-vacation", "mortgage", + "master's", "magazine", "nasty", "new car", + "nigeria", "nude", "nympho", "naked", + "obligation", "online business", "opportunity", + "pager", "paying too much", "pda", "penis", + "pennies", "pills", "porn", "pounds", + "pre-approved", "prescri", "prscri", "prize", + "prostate", "printer ink", "quote", "refinanc", + "remove fat", "removing fat", "reward", + "sales", "satellite", "saw your site", + "scrambler", "sex", "smoking", "snoring", "some + people succeed", "special invitation", "special + offer", "stock", "saving", "singles", "teen", + "ticket", "tired of", "truth about anyone", + "the best", "ucking", "unbelievable", + "uncensored", "uncollected", "unlimited", "USA + domains", "urgent", "valium", "viagra", + "venture capital", "virgin", "visa", "vitamin", + "waist", "wealth", "webcam", "weight", "win a", + "winner", "win one", "work smarter", "work at + home", "xxx", "younger", "your web site", "your + money", "your date is wait", + "!!!", "$", "%", "10K" + ], + +# Filter when the subject is all uppercase (no lowercase) + header :regex :comparator + "i;octet" "subject" "^[^[:lower:]]+$", + +# Filter using regular expressions on the subject + header :regex "subject" + [ + "start.+business", "live.+auction", + "discover.+card", "pay.+college", "apr$", + "apr[^[:alnum:]]", "adv[^[:alnum:]]", + "free.+(coupon|info|install|money)", + "free.+(phone|sample|test|trial)", + "(buy|sell).+(house|home)" + ], + +# Filter with tracker codes in the subject + header :regex "subject" + "[[:space:].\-_]{4}#?\[?[[:alnum:]-]+\]?$", + +# Filter spam with no to/from address set + not exists ["To", "From"], + +# Filter spam not addressed to me +# Put here all of your own addresses (and alias) that you expect +# mail addressed to. I found a lot of my spam didn't have my +# name in the TO or CC fields at all -- it must have been in the +# BCC (which doesn't show in the headers). I can still get BCC +# mail from legitimate sources because everyone in my address +# book is on the WHITELIST above. + + not header :contains ["to", "cc"] + [ + "myusername@example.com", + "myusername@example.net" + ] + + ) + ) + { fileinto "INBOX.1_spam"; } + + + +#### Virus Filter + elsif header :contains ["subject", "from"] + [ + "infected file rejected", + "infected file rejected" + ] + { fileinto "INBOX.1_virus"; } + + +#### Telephone Alerts +# Any message that gets this far should not be spam, +# and a copy gets sent to my cell-phone as a TEXT message. + + elsif header :contains ["to", "cc"] + [ + "myusername@example.com", + "myaliasname@example.com" + ] + { redirect "2135551234@mobile.example.net"; keep; } + + + +# END OF SCRIPT diff --git a/pigeonhole/examples/mjohnson.sieve b/pigeonhole/examples/mjohnson.sieve new file mode 100644 index 0000000..802ecd8 --- /dev/null +++ b/pigeonhole/examples/mjohnson.sieve @@ -0,0 +1,421 @@ +# Example Sieve Script +# Author: Matthew Johnson +# URL: http://wiki.fastmail.fm/index.php?title=MatthewJohnson + +########################################################################## +####### SIEVE SCRIPT by Matthew Johnson - MRJ Solutions, Inc. ########### +####### Email me at mailto:mattjohnson2005@gmail.com ## +####### Code Version: 12JUN2004 ########### +########################################################################## +require ["envelope", "fileinto", "reject", "vacation", "regex", "relational", + "comparator-i;ascii-numeric"]; +# +# todo: +# change to a nested format with +# allof()s and nots. +# add "in address book" check. ex:"header :is :comparator "i;octet" "X-Spam-Known-Sender" "yes"" +# finish reformating lines to <= 75 col (for web edit box) +# and delete rulers. +# Mine Michael Klose script for ideas. +# Check out the update to the Sieve pages on the Fastmail Wiki. +# + +#---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+ +require ["envelope", "fileinto", "reject", "vacation", "regex", + "relational", "comparator-i;ascii-numeric"]; + + + +# BLACKLIST - Mails to discard, drop on the floor. +# -high spam values except those delivered to me +# -Chinese content except for low spam values +# -virus rejected notifications +# -known spam addresses +# -newsletters that refuse my removal requests +# -twit-list +# -double twit-list +# -other + + +#---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+ +if anyof + ( + allof # combo test one - high spam values except for mail to/from me + ( + # spam score is greater or equal to 14 + header :value "ge" :comparator "i;ascii-numeric" + ["X-Spam-score"] ["14"], + not header :contains "X-Spam-Score" "-", + not header :contains "X-Spam-Score" "0.0", + not header :contains ["to","from","cc","bcc","received"] + [ + # do not discard email to me, will file or discard + # as spam later if needed + "matt@zeta.net", + "matthew@bigsc.com", + "matthew_johnson@bigsmallcompany.com", + "mmm@spend.com", + "finger@spend.com", + "myyaacct@yahoo.com" + ] + ), # end allof + allof #combo test two - chinese content except for low spam values + ( + anyof + ( + header :regex "Subject" "^=\\?(gb|GB)2312\\?", # Chinese ecoding at subject + header :regex "Subject" "^=\\?big5\\?", # Other kind of Chinese mail + + # Chinese content type + header :contains "Content-Type" + [ + "GB2312", + "big5" + ] + ), #end anyof + not anyof + ( + #We have to check the sign and the value separately: ascii-numeric, defined at + #header :contains "X-Spam-Score" "-", + header :value "lt" :comparator "i;ascii-numeric" "X-Spam-Score" "3" + ) #end not anyof + ), # end allof - test two + + # single tests + + # discard fastmail virus notifications + header :is ["subject"] ["Infected file rejected"], + + # black list, invalid addresses receiving a large amount of spam + # or spam bounces,rejected zeta.net accounts. + header :contains ["X-Delivered-to"] + + ["eagleeye@zeta.net","ealgeeye@zeta.net", + "alica.thiele@zeta.net", "2005@theta.com", + "jimlovingu2@zeta.net", + "alpha@zeta.net", + "JoshuaS@zeta.net", + "donnaf@zeta.net", + "pspinks@zeta.net", + "jsherman@zeta.net", + "holly@zeta.net", + "clabarca@zeta.net", + "meghanr@zeta.net", + "rtaylor@zeta.net", + "lboone@zeta.net", + "brower@zeta.net", + "jenj@zeta.net", + "cbackus@zeta.net", + "spengles@zeta.net", + "adams@zeta.net", + "dsmith@zeta.net", + "jwilderman@zeta.net", + "TimF@zeta.net", + "zd@zeta.net", + "louise@zeta.net"] + + # single 'not' tests + # ---out for testing--- not header :is :comparator "i;octet" "X-Spam-Known-Sender" "yes" + ) # end anyof() +{ + discard; + stop; +} + + +# +# WHITELIST - Keep these mails and put them in the inbox +# (some kept getting put in Junk Mail) +# Family, Friends, Current Vendors, Customers +# Contents of fastmail address book. +# +#---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+ +if anyof ( header :contains ["from","to","cc","bcc"] + [ "notification@eBay.com", + "MAILER-DAEMON@zeta.net", + "USPS_Track_Confirm@usps.com", + "credit.services@target.com", + "Comcast_Paydirect@comcast.net", + "mary@zeta.net", + "betty@zeta.net", + "andmanymore@zeta.net" + ], + header :is :comparator "i;octet" "X-Spam-Known-Sender" "yes" + ) +{ + fileinto "INBOX"; + stop; +} + +# redirects +if header :contains ["to", "cc"] "mary1@zeta.net" + { + redirect "mary@zeta.net"; + stop; + } + + +# +# +Spam filtering by score on 3, 5 and 14(above). +# +# +if header :value "ge" :comparator "i;ascii-numeric" ["X-Spam-score"] ["5"] { + fileinto "INBOX.Junk Mail.ge5"; + stop; +#---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+ +} elsif header :value "ge" :comparator "i;ascii-numeric" ["X-Spam-score"] ["3"] { + fileinto "INBOX.Junk Mail.ge3"; + stop; +} + + +# Potential Blacklist, start with soft discard, then migrate to full discard above +# +# Blacklist (2nd) During testing, throw into "Junk Mail.discard" until +# ready to discard. +# +if anyof + ( + # rejects for accounts across all domains + header :contains ["X-Delivered-to"] + [ + "drjoe@","VX@", + "alfa@zeta.net", + "media@zeta.net", + "zeta@zeta.net", + "xyz@zeta.net" + ], + + # other criteria - weird message from this account + header :contains ["from"] ["Charlie Root"], + # mailers that are always sending spam returns to me + header :contains ["from"] ["MAILER-DAEMON@aol.com"] , + header :contains ["from"] ["MAILER-DAEMON@otenet.gr"] , + + # common account names that I don't use in any of my domains and that spammers like + header :contains ["X-Delivered-to"] + [ "biz@","sales@","support@", "service@", "reg@", + "registration@", "regisration@", "root@", "webmaster@", "noreply@" + ], + # zeta.net common account names to reject + header :contains ["X-Delivered-to"] ["info@zeta.net"], + # bigsc.com rejects + header :contains ["X-Delivered-to"] ["info@bigsc.com"], + # theta.com rejects + header :contains ["X-Delivered-to"] ["info@theta.com"], + header :contains ["X-Delivered-to"] ["reg@theta.com"] +#---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+ + # saves for use maybe later + # header :contains ["X-Delivered-to"] ["webmaster@zeta.net"], + # header :contains ["X-Delivered-to"] ["webmaster@theta.com"], + # header :contains ["X-Delivered-to"] ["sales@bs.com"], + # header :contains ["X-Delivered-to"] ["sales@theta.com"], + # header :contains ["X-Delivered-to"] ["sales@bigsc.com"], + # header :contains ["X-Delivered-to"] "root@zeta.net", + + ) #end anyof() 2nd blacklist +{ + + fileinto "INBOX.Junk Mail.discard"; + stop; +} + + +# +Greylist, move to "INBOX.Junk Mail.greylist" +# +# 'Soft' Blacklist ?Greylist? +# + +#annoying person(s) that send questionable attachments +# look at occationally +if header :contains "from" "alex@yahoo.com" +{ + fileinto "INBOX.Junk Mail.greylist"; +} elsif header :contains "subject" "MAILER-DAEMON@fastmail.fm" + # non-person, but might + # want to look at it while + # figuring issues +{ + fileinto "INBOX.Junk Mail.greylist"; + stop; +} + +# +Spammy domains to filter +# +# domains that are known to be present in spam +# +if header :contains ["from", "received"] [".ru",".jp", ".kr", ".pt", + ".pl",".at",".cz",".cn",".lu" ] +{ + fileinto "INBOX.Junk Mail.discard"; + stop; +} + + +# +# Annoying newsletters that won't unsubscribe me, reject +# + +if anyof ( + #annoying newsletters + header :contains ["from"] "VistaPrintNews", # 2003 + header :contains ["from"] "newsletter@briantracyintl.com", # 2003 + header :contains ["from"] "info@yogalist.com", # 2003 + header :contains ["from"] "The Angela Larson Real Estate Team", + header :contains ["from"] "Brian Tracy" + ) +#---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+ +{ + reject "I HAVE TRIED TO UNSUBSCRIBE; I DO NOT WANT YOUR NEWSLETTER; PLEASE UNSUBSCRIBE ME"; + stop; +} + + + + +# +# Suspected zeta.net user from/to Zeta Institute, NY - reject +# +# +# +if header :contains ["X-Delivered-to","from"] + [ + # aaaaNEW_ENTRIES_ABOVE ################################### + "neville@zeta.net", + "animika@zeta.net", + "linda@zeta.net", + "jerry@zeta.net", + "adamS@zeta.net", + "lkdamon@zeta.net", + "AdamS@zeta.net", + "DConnor@zeta.net", + "LOUISR@zeta.net", + + # Start of Alpha ############################################# + "Allanv@zeta.net", + "AmberJ@zeta.net", + "DANDERSON@zeta.net", + "Jonas@zeta.net", + "KarenE@zeta.net", + "J.R.C.@zeta.net", # check to see if this is working + "PMackey@zeta.net", + + "adrienne@zeta.net","alpha@zeta.net","amina@zeta.net", + "anamika@zeta.net", + "claborca@zeta.net","communications@zeta.net", + "cz241@zeta.net", + "dee@zeta.net", + "ellenb@zeta.net","evis@zeta.net", + "frivera@zeta.net", + "gblack@zeta.net","gbrown@zeta.net","george@zeta.net","grace@zeta.net", + "happygolucky@zeta.net","hsp@zeta.net", + "ila@zeta.net", + "jacqueline_fenatifa@zeta.net","jlengler@zeta.net", + "joel@zeta.net","jolsen@zeta.net", "jsherman@zeta.net", + "kronjeklandish@zeta.net","kwilcox@zeta.net","bettyb@zeta.net", + "laurie@zeta.net","llmansell@zeta.net", + "louise@zeta.net","lzollo@zeta.net", + "mcraft@zeta.net","meganB@zeta.net","mwezi@zeta.net", + "nanwile@zeta.net", + "zetasound@zeta.net", + "peter@zeta.net", + "randi@zeta.net", "rcbackus@zeta.net", "registration@zeta.net", + "registration@omgea.org", + "rtaylor@zeta.net", + "sdonnarumma@zeta.net","stephanR@zeta.net","suzanne@zeta.net","suzzane@zeta.net", + "taryngaughan_dn@zeta.net" + # zzzzEND_OF_LIST#### + ] #end of Xdelivered-to list for possible zeta institute users + +{ + reject text: + ERROR: Your email has not been delivered. + + You have reached the mailer at zeta.net + + Perhaps you want to send to Zeta Institute in DillyDally, NY, USA? + + Use USER@zeta.net for them + + or try registration@zeta.net + Check the website at http://www.zeta.net/zeta/contact/ + Call Registration at 1 800 944 1001. + + or use this information: + + Zeta Institute + 150 River Drive + DillyDally, NY 12666 + Registration: 800-900-0000 + Ph: 845-200-0000 + Fax: 845-200-0001 + registration@zeta.net + + sincerely, POSTMASTER +. +; + fileinto "Inbox.Junk Mail.ezeta"; + stop; + } +#---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+ +# +Move messages into folders +# +# Process other messages into separate folders +# + # newsletters and mail lists +if header :contains ["subject"] + [ "newsletter", "[tc-ieee-", "[icntc", + "JUG News", "Xdesksoftware", + "announcement" ] +{ + fileinto "INBOX.Newsletters"; +} elsif header :contains ["from","subject"] ["Anthony Robbins"] { + fileinto "INBOX.Newsletters"; +} elsif header :contains ["from","subject"] ["MN Entrepreneurs","ME!"] { + fileinto "INBOX.Newsletters"; +} elsif header :contains ["from","received"] "adc.apple.com" { + fileinto "INBOX.Newsletters"; +} elsif header :contains "from" "wnewadmn@ieee.org" { + fileinto "INBOX.Newsletters"; +} elsif header :contains "from" "@lb.bcentral.com" { # techworthy@lb.bcentral.com + fileinto "INBOX.Newsletters"; +} elsif header :contains "from" "announcement@netbriefings.com" { #st paul company + fileinto "INBOX.Newsletters"; +} elsif header :contains "from" "newsletter@eletters.extremetech.com" { #semi-annoying rag + fileinto "INBOX.Newsletters"; +#---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+ +# my newsletter throw-away addresses +} elsif header :contains "to" ["microcenter@zeta.net","nmha@zeta.net"] { + fileinto "INBOX.Newsletters"; + +#---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+ +# +# Alerts mailbox +} elsif header :contains ["subject", "from"] + [ + "Alert", # F-Prot virus alert service, matches: + # "FRISK Virus Alert" + # or use s:FRISK Virus Alert: + # or use f:support@f-prot.com + "Payment", # Alerts from other payments + "credit.services@target.com", # Target Card Payments + "notify@quickbase.com" # Tic Talkers Database changes + ] +{ + fileinto "INBOX.Alerts"; + stop; +} + +# +Announcements from Dave Rolm, forward +# +# Perl Announcements from Dave Rolm +if header :contains "from" "dave@other.org" +{ + fileinto "Inbox"; + keep; +} +#---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+ +####################################################################### +#### END OF SIEVE SCRIPT by Matthew Johnson - MRJ Solutions, Inc. ##### +################ email me at mailto:mattjohnson2005@gmail.com # + diff --git a/pigeonhole/examples/mklose.sieve b/pigeonhole/examples/mklose.sieve new file mode 100644 index 0000000..598cffb --- /dev/null +++ b/pigeonhole/examples/mklose.sieve @@ -0,0 +1,303 @@ +# Example Sieve Script +# Author: Michael Klose +# URL: http://wiki.fastmail.fm/index.php?title=MichaelKloseSieveScript + +require ["fileinto", "reject", "vacation", "regex", "relational", "comparator-i;ascii-numeric"]; + +# Experimental + +# End experimental + + + +# ---------------------------------------------- +# Discard messages (high Spam values) +# ---------------------------------------------- + +if anyof + ( + allof + ( + #Spam score > 17? + #We have to check the sign and the value separately: ascii-numeric, defined at http://www.ietf.org/rfc/rfc2244.txt, doesn't see minus signs or decimal points ("-" or "."). + header :value "ge" :comparator "i;ascii-numeric" "X-Spam-Score" "17", + not header :contains "X-Spam-Score" "-", + + not header :contains ["to","cc"] + [ + "@my-domain.de", + "myemail@myotherdomain.us", + "myotheremail@myotherdomain.us", + "myotheremail2@myotherdomain.us" + # Do not discard stuff going to me - gets filed into Junk later + ], + not header :contains "from" + [ + "lockergnome.com", + "Excite@info.excite.com" # gets filed into Junk later + ] + + + ), + allof + ( + header :contains "X-LinkName" "hotmail", # OR anything from Hotmail with low spam + allof + ( + header :value "ge" :comparator "i;ascii-numeric" "X-Spam-Score" "7", + not header :contains "X-Spam-Score" "-" + ) + ), + + # Black List + + header :contains "from" + [ + "ahbbcom@cncorn.com", + "Darg. B." + ], + + # Chinese Encoding at BEGINNING of Subject + + allof + ( + anyof + ( + header :regex "Subject" "^=\\?(gb|GB)2312\\?", # Chinese ecoding at subject + header :regex "Subject" "^=\\?big5\\?", # Other kind of Chinese mail + + # Chinese content type + + header :contains "Content-Type" + [ + "GB2312", + "big5" + ] + ), + not anyof + ( + #Spam score > -4? <sic> - ascii-numeric ignores the ".9"!. -Or is this correct? + #We have to check the sign and the value separately: ascii-numeric, defined at http://www.ietf.org/rfc/rfc2244.txt, doesn't see minus signs or decimal points ("-" or "."). + + header :contains "X-Spam-Score" "-", + header :value "lt" :comparator "i;ascii-numeric" "X-Spam-Score" "4" + ) + ) + ) + +{ + + + # discard; + + if header :contains "X-LinkName" "hotmail" + { discard; } + else + { fileinto "INBOX.Junk.Reject"; } + # I used to reject this stuff, but I wanted to know what I was rejecting, and this stuck. + stop; +} + + + +# Addresses that need to be forwarded to a different domain here before spam checking +# ******************************Michael - I don't understand what you're doing here! -elvey +# REPLY: this here is actually used to forward stuff addressed to my sister (using my domain) +# to her - without using one of the own-domain aliases. + +if header :contains ["to", "cc"] + [ + "bla@blabla.de", + "bla2@blabla.us", + "bla3@blabla.us" + ] + { + redirect "otheremailaddress@something.com"; + redirect "anotheremailadress@something.com"; + stop; + } + + +# File into a folder before Spam filtering + +if header :contains ["to","cc"] + [ + "important@mydomain.us", + "important2@mydomain.us" + ] + { + fileinto "Inbox.Important"; + stop; + } + + + +# ------------------------------------------- +# Filing rules +# ------------------------------------------- + + +# Pre-SPAM + + +if size :over 750K + { + fileinto "INBOX.largemail"; + stop; + } + + +if header :contains "from" + [ + +# White list 1 (with SMS notification) + + "Fred Bloggs", + "f.bloggs@hotmail.com", + "myboss@somecompany.com", + "Trisha", + "endofauction@ebay.de" # I want to know about end of auctions + ] + { + fileinto "Inbox"; + + # Send an SMS + redirect "smsgateway@somegateway.de"; + keep; + + stop; + } + + # Advertising I want to receive, which normally ends up in the SPAM filter + + if anyof + ( + header :contains "from" + + [ + +# Advertising whitelist + + "Mark Libbert", + "newsletter@snapfish.dom" + ], + header :contains "Return-Path" "mailings@gmx.dom" + ) + { fileinto "INBOX.Ads"; } + elsif header :contains "from" + [ + "newsletter@neuseelandhaus.dom", + "Lockergnome", + "CNET News.com" + ] + { fileinto "INBOX.Newsletter"; + + + +# Spam protection + + +} elsif anyof + ( + + #Spam assasin + allof + ( + header :value "ge" :comparator "i;ascii-numeric" "X-Spam-Score" "6", + not header :contains "X-Spam-Score" "-", + not anyof # White list + ( + header :contains "From" # Whitelist From addresses + [ + "CNN Quick News", + "FastMail.FM Support", + "lockergnome.com" + ] + ) + ), + + # User defined + + # Filter out Femalename1234z12@ spam (base64 encoded) + allof + ( + header :regex "From" "alpha:{2,}digit:{2,}alpha:+digit:{2,}@", + header :contains "Content-Type" "multipart/mixed" + ), + # Filter our Spam with invalid headers. You can see this because FM adds + # @fastmail.fm to them. For safty, check that mklose@ @michael-klose mkmail@gmx do + # not appear + + # Mklose: addition: The only negative side effect I have seen of the condition below + # is that it catches the FM newsletters. So far I find them in the spam occasionly + # but since they are so few, I have never bothered changing this to not catch them. + + allof + ( + header :contains "To" "@fastmail.fm", # I do not have a fastmail address # This doesn't catch BCC's; you should be checking the envelop instead. -elvey + not header :contains ["To", "CC", "Reply-To"] ["klose","mkmail@gmx.dom", "chaospower"] + ) + ) + { + fileinto "INBOX.Junk"; + stop; + } + + +# Post Spam-protection + + elsif header :contains ["to", "cc"] "gpc@gnu.dom" { + fileinto "INBOX.GPC"; +} elsif header :contains ["to", "cc"] "alfs\-discuss@linuxfromscratch.dom" { + fileinto "INBOX.LFS-Support.ALFS"; +} elsif header :contains "subject" "(usagi\-users" { + fileinto "INBOX.Usagi"; +} elsif anyof (header :contains "Subject" "\[eplus-de\]", header :contains "Reply-To" "eplus-de") { + fileinto "INBOX.E-Plus"; +} elsif header :contains ["to", "cc"] "lfs\-support@linuxfromscratch.dom" { + fileinto "INBOX.LFS-Support"; +} elsif header :contains ["to", "cc"] "netdev@oss.sgi.dom" { + fileinto "INBOX.NetDev"; +} elsif header :contains ["to", "cc"] "lfs\-dev@linuxfromscratch.dom" { + fileinto "INBOX.LFS-DEV"; +} elsif header :contains "from" "GMX Best Price" { + fileinto "INBOX.Werbung"; +} elsif header :contains "subject" "RHN Errata Alert" { + fileinto "INBOX.Notifications"; +} elsif header :contains "from" + [ + "EmailDiscussions.com Mailer", + "help1@dungorm.dom" + ] { + fileinto "INBOX.Notifications"; +} elsif header :contains "subject" "\[Gaim\-commits\]" { + fileinto "INBOX.Notifications"; +} elsif header :contains "subject" "\[Bug" { + fileinto "INBOX.Notifications.Bugzilla"; +} elsif header :contains "X-LinkName" "hotmail" { + fileinto "INBOX.Old Hotmail.new"; +} + + +# ----------------------------------------------------------------------- +# SMS notifications and forwarding +# ----------------------------------------------------------------------- + +if allof + ( + header :contains "to" ["@mydomain1.de","email@mydomain2.us","email2@somedomain"], + not header :contains "from" + [ + +# This avoids sending SMS notifications if I am the sender + + "@mydomain1.de", + "myotheremail@somedomain.de", + "myotheremail@someotherdomain.de" + ] + ) + { + redirect "smsgateway@somegateway.com"; + keep; + } + diff --git a/pigeonhole/examples/relational.rfc5231.sieve b/pigeonhole/examples/relational.rfc5231.sieve new file mode 100644 index 0000000..81c66d3 --- /dev/null +++ b/pigeonhole/examples/relational.rfc5231.sieve @@ -0,0 +1,33 @@ +require ["relational", "comparator-i;ascii-numeric", "fileinto"]; + +if header :value "lt" :comparator "i;ascii-numeric" + ["x-priority"] ["3"] +{ + fileinto "Priority"; +} + +elsif address :count "gt" :comparator "i;ascii-numeric" + ["to"] ["5"] +{ + # everything with more than 5 recipients in the "to" field + # is considered SPAM + fileinto "SPAM"; +} + +elsif address :value "gt" :all :comparator "i;ascii-casemap" + ["from"] ["M"] +{ + fileinto "From N-Z"; +} else { + fileinto "From A-M"; +} + +if allof ( + address :count "eq" :comparator "i;ascii-numeric" + ["to", "cc"] ["1"] , + address :all :comparator "i;ascii-casemap" + ["to", "cc"] ["me@foo.example.com"] ) +{ + fileinto "Only me"; +} + diff --git a/pigeonhole/examples/rfc3028.sieve b/pigeonhole/examples/rfc3028.sieve new file mode 100644 index 0000000..e8f6972 --- /dev/null +++ b/pigeonhole/examples/rfc3028.sieve @@ -0,0 +1,58 @@ +# +# Example Sieve Filter +# Declare any optional features or extension used by the script +# +require ["fileinto", "reject"]; + +# +# Reject any large messages (note that the four leading dots get +# "stuffed" to three) +# +if size :over 1M + { + reject text: +Please do not send me large attachments. +Put your file on a server and send me the URL. +Thank you. +.... Fred +. +; + stop; + } +# + +# Handle messages from known mailing lists +# Move messages from IETF filter discussion list to filter folder +# +if header :is "Sender" "owner-ietf-mta-filters@imc.org" + { + fileinto "filter"; # move to "filter" folder + } +# +# Keep all messages to or from people in my company +# +elsif address :domain :is ["From", "To"] "example.com" + { + keep; # keep in "In" folder + } + +# +# 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*"]) + { + # If message header does not contain my address, + # it's from a list. + fileinto "spam"; # move to "spam" folder + } + else + { + # Move all other (non-company) mail to "personal" + # folder. + fileinto "personal"; + } + diff --git a/pigeonhole/examples/sanjay.sieve b/pigeonhole/examples/sanjay.sieve new file mode 100644 index 0000000..1a4d622 --- /dev/null +++ b/pigeonhole/examples/sanjay.sieve @@ -0,0 +1,171 @@ +# Example Sieve Script +# Author: SanjaySheth +# URL: http://wiki.fastmail.fm/index.php?title=SanjaySieveSpamFilter + +require "fileinto"; + +if anyof ( + + # Blacklisted sender domains + header :contains ["from", "Received", "X-Sender", "Sender", + "To","CC","Subject","X-Mail-from"] + [ "123greetings", "allfreewebsite.com", + "new-fields.com","atlasrewards","azogle.com", + "bannerport.net","bettingextreme.com","bigemailoffers.com", + "BlingMail.com", + "beyondoffers.net", ".biz ", ".biz]", + "cavalrymail.com","ciol.com","citywire.co.uk", + "cosmicclick.com", + "consumergamblingreport","creativemailoffers.com","creativeoffers.com", + "daily-promotions.com", + "dailypromo.","dailypromotions.", + "dandyoffers","dlbdirect", + "e54.org", "email-specials.net","email-ware.com","emailoffersondemand", + "emailbargain.com","emailofferz","emailrewardz","etoll.net","emailvalues.com", + "evaluemarketing.com","exitrequest.com", + "fantastic-bargain.com","fpsamplesmail.com","freelotto", + "findtv.com", "freddysfabulousfinds.com", + "genuinerewards.com", + "hotdailydeal.com","hulamediamail","hy-e.net", + "inboxbargains.com","idealemail.com", + "jackpot.com","jpmailer.com", + "lolita","lund.com.br", + "mafgroup.com","mailasia.com","mailtonic.net","migada.com","ms83.com", + "nationaloffers.com","nexdeals.com ", + "offercatch.com","offermagnet.com","offerservice.net","offertime.com", + "offersdaily.net","optnetwork.net", + "ombramarketing.com","on-line-offers.com","outblaze.com", + "permissionpass","primetimedirect.net","productsontheweb.net", + "rapid-e.net","recessionspecials", "redmoss","remit2india", + "sampleoffers.com","savingsmansion.com","sendoutmail.com","simpleoffers.com", + "specialdailydeals4u.com","Select-Point.net", + "speedyvalues.com","sportsoffers","sporttime.info","suntekglobal.com", + "superstorespecials.com", "synapseconnect","sunsetterawnings.com", + "thefreesamplenews","truemail.net", + "ub-kool","ultimatesports.info","uniquemailoffers","utopiad.com", + "unixlovers.net", + "valuesdirect","virtualoffers.net", + "wagerzine", "webdpoffrz", + "yestshirt.com", + "z-offer.com", "zipido.com" + ], + + # Blacklisted ip subnets due to excessive spam from them + header :contains "Received" + [ "[4.63.221.224", + "[24.244.141.112", + "[61.171.253.177", + "[63.123.149.", "[63.209.206.", "(63.233.30.73", "[63.251.200.", + "[64.41.183.","[64.49.250.", "[64.57.188.", "[64.57.221.", + "[64.62.204.", + "[64.70.17.", "[64.70.44.", "[64.70.53.", + "[64.39.27.6", "[64.39.27.7","[64.191.25.","[64.191.36.", + "[64.191.9.", + "[64.125.181.", "[64.191.123.", "[64.191.23.", "[64.239.182.", + "[65.211.3.", + "[66.46.150.", "[66.62.162.", "[66.118.170.", "[66.129.124.", + "[66.205.217.", "[66.216.111.", "[66.239.204.", + "[67.86.69.", + "[80.34.206.", "[80.80.98.", + "[81.72.233.13", + "[128.242.120.", + "[157.238.18", + "[168.234.195.18]", + "[193.253.198.57", + "[194.25.83.1", + "[200.24.129.", "[200.161.203.", + "[202.164.182.76]","[202.57.69.116", + "[203.19.220.","[203.22.104.","[203.22.105.", + "[204.188.52.", + "[205.153.154.203", + "[206.26.195.", "[206.154.33.","[206.169.178", + "[207.142.3.", + "[208.46.5.","[208.187.", + "[209.164.27.","[209.236.", + "[210.90.75.129]", + "[211.101.138.199","[211.185.7.125]","[211.239.231.", + "[212.240.95.", + "[213.47.250.139", "[213.225.61.", + "[216.22.79.","[216.39.115.","[216.99.240.", + "[216.126.32.", "[216.187.123.","[217.36.124.53", + "[218.145.25","[218.52.71.103","[218.158.136.115", + "[218.160.42.74", "[218.242.112.4]" + ], + + # Blacklisted SpamAssassin flags + header :contains ["SPAM", "X-Spam-hits"] + ["ADDRESSES_ON_CD","ACT_NOW","ADULT_SITE", "ALL_CAP_PORN", + "AMATEUR_PORN", "AS_SEEN_ON", + "BAD_CREDIT", "BALANCE_FOR_LONG_20K", "BARELY_LEGAL", "BEEN_TURNED_DOWN", + "BANG_GUARANTEE", "BANG_MONEY","BASE64_ENC_TEXT", + "BAYES_99","BAYES_90", + "BE_BOSS", "BEST_PORN", "BULK_EMAIL", + "CASINO", "CONSOLIDATE_DEBT", "COPY_ACCURATELY", "COPY_DVD", + "DIET", "DO_IT_TODAY","DOMAIN_4U2", + "EMAIL_MARKETING","EMAIL_ROT13", "EXPECT_TO_EARN","EARN_MONEY", + "FIND_ANYTHING", "FORGED_AOL_RCVD", + "FORGED_HOTMAIL_RCVD", "FORGED_YAHOO_RCVD", + "FORGED_RCVD_TRAIL", "FORGED_JUNO_RCVD", + "FORGED_MUA_", + "FREE_MONEY","FREE_PORN", + "GENTLE_FEROCITY", "GET_PAID", "GUARANTEED_STUFF", "GUARANTEED_100_PERCENT", + "HAIR_LOSS", "HIDDEN_ASSETS", "HGH,", "HOME_EMPLOYMENT","HOT_NASTY","HTTP_ESCAPED_HOST", + "HTTP_USERNAME_USED","HTML_FONT_INVISIBLE", + "IMPOTENCE","INVALID_MSGID","INVESTMENT", + "LESBIAN","LIVE_PORN","LOSE_POUNDS", + "MARKETING_PARTNERS", "MORTGAGE_OBFU", "MORTGAGE_RATES", + "NIGERIAN_SCAM", "NIGERIAN_TRANSACTION_1", "NIGERIAN_BODY", "NUMERIC_HTTP_ADDR", + "NO_MX_FOR_FROM","NO_DNS_FOR_FROM", + "OBFUSCATING_COMMENT", "ONLINE_PHARMACY", + "PENIS_ENLARGE", + "PREST_NON_ACCREDITED", "PURE_PROFIT","PORN_4", + "RCVD_IN_DSBL", "RCVD_IN_OSIRUSOFT_COM","RCVD_IN_BL_SPAMCOP_NET", "RCVD_IN_SBL", + "RCVD_IN_MULTIHOP_DSBL", "RCVD_IN_RELAYS_ORDB_ORG", "RCVD_IN_UNCONFIRMED_DSBL", + "RCVD_FAKE_HELO_DOTCOM", "RCVD_IN_RFCI", "RCVD_IN_NJABL","RCVD_IN_SORBS", + "REFINANCE", "REVERSE_AGING", + "SAVE_ON_INSURANCE","SPAM_REDIRECTOR", "STOCK_ALERT", "STOCK_PICK", "STRONG_BUY", + "SEE_FOR_YOURSELF", "SUPPLIES_LIMITED", + "THE_BEST_RATE","TONER", + "UNSECURED_CREDIT", + "VACATION_SCAM", "VIAGRA", "VJESTIKA", + "WHILE_SUPPLIES", "WORK_AT_HOME", + "X_OSIRU_DUL", "X_OSIRU_SPAMWARE_SITE", "X_OSIRU_SPAM_SRC" + ], + + + # Blacklisted subjects + + header :contains ["From","Subject"] + [" penis ", + "ADV:", "adult dvd", "adult movie", "adultdirect", "adultemail", + "background check", "bankrupt", "boobs", "business opportunity","big@boss.com", + "casino", "cash guarantee", + "debt free", "diet bread", "ebay secrets", "erection", + "financial freedom", "free credit", + "gambl", "gov grants", "jackpot", + "life insurance", "lottery", "lotto", + "mortgage", "nude", "OTCBB", + "penis", "porn", "promotion", "proven System", + " rape ", + " sex ", "skin resurfacing", "special offer", + "ultimate software", "viagra", "V1AGRA", "vivatrim", + "win money","work from home", "xxx" + ], + + # often spam emails to multiple addresses with same name & different domain + header :matches ["To","CC"] + ["*fastmail*fastmail*fastmail*fastmail*fastmail*"], + + # Almost all emails from these domains is spam (at least for me) + header :contains ["from", "received"] + [".ru ",".jp ", ".kr ", ".pt ",".pl ",".at ",".cz ", + ".ru>",".jp>", ".kr>", ".pt>", ".pl>",".at>",".cz>"], + + # Really high SpamAssassin scores (15.0+) + header :matches ["X-Spam-score","X-Remote-Spam-score"] [ + "1?.?", "2?.?", "3?.?", "4?.?", "5?.?", "6?.?" # 10.0 to 69.9 + ] +) { + fileinto "INBOX.Spam.discard"; + stop; +} diff --git a/pigeonhole/examples/sieve_examples.sieve b/pigeonhole/examples/sieve_examples.sieve new file mode 100644 index 0000000..6e7ca17 --- /dev/null +++ b/pigeonhole/examples/sieve_examples.sieve @@ -0,0 +1,73 @@ +# Example Sieve Script +# Author: unknown +# URL: http://wiki.fastmail.fm/index.php?title=MoreSieveExamples + +require ["fileinto", "reject"]; + +###BYPASSES### + +if anyof ( + header :contains ["From"] "friend1", + header :contains ["From"] "friend12", + header :contains ["From"] "friend3", + header :contains ["From"] "friendsdomanin", + header :contains ["Subject"] "elephant" ##a safeword + ) + { + fileinto "INBOX"; + stop; + } + +###BIG MESSAGE PROTECTION +if size :over 5000K { + reject "Message over 5MB size limit. Please contact me before sending this."; +} + +##SPAM FILTERING## +if header :contains ["X-Spam"] "high" { + discard; + stop; +} +if header :contains ["X-Spam-Flag"] "HIGH" { + discard; + stop; +} +if header :contains ["X-Spam"] "spam" { + fileinto "INBOX.spam"; #emails forwarded from my unviersity account get SA tagged like this + stop; +} +if header :contains ["X-Spam-Flag"] "YES" { + fileinto "INBOX.spam"; + stop; +} + +####LOCAL SPAM RULES####### +if header :contains ["From"] "bannerport" { discard; stop; } ##keyword filters for when SA doesn't quite catch them +if header :contains ["To"] "MATT NOONE" { discard; stop; } +###AUTO management rules### + +####Student Digest stuff#### ### Examples of boolean OR rules +if anyof ( + header :contains ["X-BeenThere"] "student-digest@list.xxx.edu", + header :contains ["X-BeenThere"] "firstyear-digest@list.xxx.edu", + header :contains ["X-BeenThere"] "secondyear-digest@list.xxx.edu", + header :contains ["X-BeenThere"] "thirdyear-digest@list.xxx.edu", + header :contains ["X-BeenThere"] "fourthyear-digest@list.xxx.edu" + ) + { + fileinto "INBOX.lists.digests"; + stop; + } +if allof ( ###A Boolean AND rule + header :contains ["From"] "buddy1", + header :contains ["To"] "myotheraddress" + ) + { + fileinto "INBOX.scc.annoy"; + stop; + } + +#other local rules +if header :contains ["Subject"] "helmreich" { fileinto "INBOX.lists.helmreich"; stop; } +if header :contains ["Subject"] "helmcomm" { fileinto "INBOX.lists.helmreich"; stop; } +if header :contains ["Subject"] "packeteer" { fileinto "INBOX.lists"; stop; } diff --git a/pigeonhole/examples/subaddress.rfc5233.sieve b/pigeonhole/examples/subaddress.rfc5233.sieve new file mode 100644 index 0000000..9e0177c --- /dev/null +++ b/pigeonhole/examples/subaddress.rfc5233.sieve @@ -0,0 +1,23 @@ +require ["envelope", "subaddress", "fileinto"]; + +# In this example the same user account receives mail for both +# "ken@example.com" and "postmaster@example.com" + +# File all messages to postmaster into a single mailbox, +# ignoring the :detail part. +if envelope :user "to" "postmaster" { + fileinto "inbox.postmaster"; + stop; +} + +# File mailing list messages (subscribed as "ken+mta-filters"). +if envelope :detail "to" "mta-filters" { + fileinto "inbox.ietf-mta-filters"; +} + +# Redirect all mail sent to "ken+foo". +if envelope :detail "to" "foo" { + redirect "ken@example.net"; +} + + diff --git a/pigeonhole/examples/vacation.sieve b/pigeonhole/examples/vacation.sieve new file mode 100644 index 0000000..660b9c5 --- /dev/null +++ b/pigeonhole/examples/vacation.sieve @@ -0,0 +1,23 @@ +require ["fileinto","reject", "vacation"]; +if allof (header :contains "X-Spam-Flag" "YES") +{ + discard ; +} + +elsif allof (header :contains "subject" "<quation>") +{ +vacation +:addresses "<name@domain.ru>" +:subject "<Answear>" +:mime "MIME-Version: 1.0 +Content-Type: text/html; charset=KOI8-R +Content-Transfer-Encoding: 7bit +<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"> +<HTML><HEAD><META http-equiv=Content-Type content=\"text/html; charset=windows-KOI8-R\"> +</HEAD><BODY>123</BODY></HTML>"; + discard ; +} +else +{ + keep; +} diff --git a/pigeonhole/examples/vivil.sieve b/pigeonhole/examples/vivil.sieve new file mode 100644 index 0000000..bce7507 --- /dev/null +++ b/pigeonhole/examples/vivil.sieve @@ -0,0 +1,94 @@ +# Example Sieve Script +# Author: Vivil +# URL: http://wiki.fastmail.fm/index.php?title=Vivil +# Removed unused notify require + +# ************************************************************************* +require ["envelope", "fileinto", "reject", "vacation", "regex", "relational", +"comparator-i;ascii-numeric"]; + + +if size :over 2048K { + reject "Message not delivered; size over limit accepted by recipient"; + stop; +} + +#because of the use of elsif below, none of the "stop;"'s below are needed, but they're good 'defensive programming'. Only the one above is actually needed. + +redirect "login@gmail.dom"; + +if header :contains ["from","cc"] +[ + "from-begin@beginbeginbeginbeginbeginbeginbeginbeginbegin.fr", + "sex.com newsletter", + "ad@gator.com", + "newsletter@takecareof.com", + "from-end@endendendendendendendendendendendendendendendend.fr" +] +{ + discard; + stop; +} + +elsif header :contains ["from"] +[ + "mygirlfriend-who-use-incredimail@foo.dom" +] +{ + fileinto "INBOX.PRIORITY"; + stop; +} + +#use of "to" field detection next lines is ONLY USEFUL FOR DOMAIN NAME OWNERS if you forward your mail to your fastmail account, some virus/spam send mail to well known addresses as info@willemijns.dom i never use... + +elsif header :contains ["to","cc"] +[ + "to-begin@beginbeginbeginbeginbeginbeginbeginbeginbegin.fr", + "FTPsebastien@willemijns.dom", + "info@willemijns.dom", + "webmaster@willemijns.dom", + "to-end@endendendendendendendendendendendendendendendend.fr" +] +{ + discard; + stop; +} + +elsif header :contains ["subject"] +[ + "subject-begin@beginbeginbeginbeginbeginbeginbeginbeginbegin.fr", + "Undeliverable mail: Registration is accepted", + "subject-end@endendendendendendendendendendendendendendendend.fr" +] +{ + discard; + stop; +} +elsif header :value "ge" :comparator "i;ascii-numeric" ["X-Spam-score"] ["6"] { + fileinto "INBOX.Junk Mail"; + stop; +} +elsif header :contains "from" "reflector@launay.dom" { + fileinto "INBOX.TEST"; + stop; +} +elsif header :contains "from" "do-not-reply@franconews.dom" { + fileinto "INBOX.TEST"; + stop; +} +elsif header :contains "from" "devnull@news.telefonica.dom" { + fileinto "INBOX.TEST"; + stop; +} +elsif header :contains ["to"] ["sebastien@willemijns.dom"] { + fileinto "INBOX.PRIORITY"; + stop; +} +elsif header :contains ["to"] ["seb@willemijns.dom"] { + fileinto "INBOX.PRIORITY"; + stop; +} +else { + fileinto "INBOX"; +} +# ******************************************************************** |