filters.sieve (4360B)
1 2 require ["regex", "variables","envelope","mailbox","body","fileinto","imap4flags","reject"]; 3 4 if allof (header :contains "from" "Microsoft Canada") { 5 addflag "\\Seen"; 6 } 7 8 if header :contains "X-RSS-Feed" "reddit.com" { 9 fileinto "Reddit"; 10 } 11 elsif header :contains "X-RSS-Feed" "arxiv.org" { 12 fileinto "Arxiv"; 13 } 14 elsif header :contains "X-RSS-Feed" "youtube.com" { 15 fileinto "YouTube"; 16 } 17 elsif header :contains "X-RSS-Feed" "ycombinator.com" { 18 fileinto "HackerNews"; 19 } 20 elsif header :contains "from" "user@rss2email.invalid" { 21 fileinto "RSS"; 22 } 23 24 if header :contains "list-id" "lobsters-izs7WbyfQp@lobste.rs" { 25 fileinto "Lists.lobsters"; 26 } 27 28 if header :contains "from" "nixos1@discoursemail.com" { 29 fileinto "Lists.nix"; 30 } 31 32 if header :contains "list-id" "vger.kernel.org" { 33 fileinto "Lists.lkml"; 34 } 35 36 if header :contains "list-id" "emacs-devel.gnu.org" { 37 fileinto "Lists.emacs"; 38 } 39 40 if header :contains "list-id" "guix-devel.gnu.org" { 41 fileinto "Lists.guix"; 42 } 43 44 if header :contains "to" "cryptography@metzdowd.com" { 45 fileinto "Lists"; 46 } 47 48 if header :contains "user-agent" "rss2email" { 49 fileinto "RSS"; 50 } 51 52 if allof (header :contains "from" "post@tinyportal.net") { 53 discard; 54 } 55 56 if allof (header :contains "from" "yahoo.com.hk") { 57 discard; 58 } 59 60 # rule:[servers] 61 if allof (header :contains "from" "noreply@outbound.getsentry.com") { 62 fileinto "Alerts"; 63 } 64 65 # rule:[Haskell Streaming] 66 if header :contains "list-id" 67 [ "streaming-haskell.googlegroups.com" 68 , "cabal-devel.haskell.org" 69 , "commercialhaskell.googlegroups.com" 70 , "ghc-devs.haskell.org" 71 , "haskell-cafe.haskell.org" 72 , "haskell.haskell.org" 73 , "libraries.haskell.org" 74 , "haskell-pipes.googlegroups.com" 75 , "shake-build-system.googlegroups.com" 76 ] 77 { 78 fileinto "Lists.haskell"; 79 } 80 81 82 83 # rule:[Alerts] 84 if allof (header :contains "from" "builds@circleci.com") { 85 fileinto "Alerts"; 86 } 87 88 # rule:[bitcoin-dev] 89 if allof (header :contains "list-id" "bitcoin-dev.lists.linuxfoundation.org") { 90 fileinto "Lists.bitcoin"; 91 } 92 93 # rule:[Monstercat] 94 if allof (header :contains "to" "bill@monstercat.com") { 95 fileinto "Monstercat"; 96 } 97 98 # rule:[Updates] 99 if header :contains "from" [ "no-reply@twitch.tv" 100 , "notify@twitter.com" 101 , "info@meetup.com" 102 , "no-reply@mail.goodreads.com" 103 ] 104 { 105 fileinto "Updates"; 106 } 107 108 # rule:[WebVR] 109 if allof (header :contains "list-id" "web-vr-discuss.mozilla.org") { 110 fileinto "Lists.webvr"; 111 } 112 113 # rule:[ICN] 114 if allof (header :contains "list-id" "ccnx.www.ccnx.org") { 115 fileinto "Lists.icn"; 116 } 117 118 # rule:[ICN] 119 if allof (header :contains "list-id" "icnrg.irtf.org") { 120 fileinto "Lists.icn"; 121 } 122 123 if allof (header :contains "list-id" "lists.freedesktop.org") { 124 fileinto "Lists.lkml"; 125 } 126 127 # rule:[ICN] 128 if allof (header :contains "list-id" "ccnx.ccnx.org") { 129 fileinto "Lists.icn"; 130 } 131 132 # Elm 133 if header :contains "list-id" [ "elm-discuss", "elm-dev" ] { 134 fileinto "Lists.elm"; 135 } 136 137 # GitHub 138 if header :contains "list-id" 139 [ "nix.NixOS.github.com" 140 , "hydra.NixOS.github.com" 141 , "nix-dev.lists.science.uu.nl" 142 , "nix-devel.googlegroups.com" 143 ] 144 { 145 fileinto "Lists.nix"; 146 } 147 elsif header :contains "list-id" "spacemacs.syl20bnr.github.com" { 148 fileinto "Lists.spacemacs"; 149 } 150 elsif header :contains "list-id" "streaming.michaelt.github.com" { 151 fileinto "Lists.haskell"; 152 } 153 elsif header :contains "list-id" "nixpkgs.NixOS.github.com" { 154 fileinto "Lists.nixpkgs"; 155 } 156 elsif header :contains "from" "notifications@github.com" { 157 # file into github if it doesn't match any other github lists 158 fileinto "GitHub"; 159 } 160 161 # rule:[Updates] 162 if header :contains "from" "gab.ai" { 163 fileinto "Updates"; 164 } 165 166 if header :contains "to" "mention@noreply.github.com" { 167 addflag "\\Flagged"; 168 } 169 170 if header :contains "list-id" "ndn-interest.lists.cs.ucla.edu" { 171 fileinto "Lists.icn"; 172 } 173 174 # rule:[ats] 175 if allof (header :contains "list-id" "ats-lang-users.googlegroups.com") { 176 fileinto "Lists.ats"; 177 } 178 179 # rule:[shen] 180 if allof (header :contains "list-id" "qilang.googlegroups.com") { 181 fileinto "Lists.shen"; 182 } 183 184 185 # rule:[Craigslist] 186 if allof (header :contains "from" "reply.craigslist.org") { 187 fileinto "Lists.craigslist"; 188 } 189 190 191 # rule:[Alerts] 192 if allof (header :contains "from" "noreply@md.getsentry.com") { 193 fileinto "Alerts"; 194 } 195 196 197 if allof ( header "Precedence" "bulk" ) { 198 fileinto "Bulk"; 199 }