Advertisement
Guest User

Untitled

a guest
Jul 30th, 2015
474
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.55 KB | None | 0 0
  1. require ["envelope", "imapflags", "fileinto", "reject", "notify", "vacation", "regex", "relational", "comparator-i;ascii-numeric", "body", "copy"];
  2.  
  3.  
  4. ### FastMail Defaults ###
  5.  
  6. # Sent Emails
  7. if header :contains ["x-resolved-to"] "+personalitysentitem-21039957@" {
  8. setflag "\\Seen";
  9. fileinto "INBOX.Sent Items";
  10. stop;
  11. }
  12.  
  13. # Spam Filters
  14. if not header :contains ["X-Spam-known-sender"] "yes" {
  15. if allof(
  16. header :contains ["X-Backscatter"] "yes",
  17. not header :matches ["X-LinkName"] "*"
  18. ) {
  19. fileinto "INBOX.Junk Mail";
  20. stop;
  21. }
  22.  
  23. if header :value "ge" :comparator "i;ascii-numeric" ["X-Spam-score"] ["5"] {
  24. fileinto "INBOX.Junk Mail";
  25. stop;
  26. }
  27. }
  28.  
  29.  
  30. ### Forwarding ###
  31.  
  32. # Forward shipment confirmation emails to Junecloud Deliveries for tracking
  33. if header :contains "subject" "shipped" {
  34. notify :method "mailto" :options ["track@junecloud.com"] :message "$from$ / $subject$ / $text[7000]$";
  35. }
  36.  
  37. # Same as above, but forwarded back to me for testing
  38. if header :contains "subject" "shipped" {
  39. notify :method "mailto" :options ["track@matthewhochler.fastmail.fm"] :message "$from$ / $subject$ / $text[7000]$";
  40. }
  41.  
  42. # Forward Above Avalon emails to Instapaper for reading
  43. if address :all :is "from" "neil.cybart@aboveavalon.com" {
  44. redirect "readlater.usvaag1nyb1@instapaper.com";
  45. }
  46.  
  47. # Forward Foreign Policy emails to Instapaper for reading
  48. if address :all :is "from" "fp@foreignpolicy.com" {
  49. redirect "readlater.usvaag1nyb1@instapaper.com";
  50. }
  51.  
  52. # Forward Quartz Daily Brief emails to Instapaper for reading
  53. if address :all :is "from" "hi@qz.com" {
  54. redirect "readlater.usvaag1nyb1@instapaper.com";
  55. }
  56.  
  57.  
  58. ### Trash ###
  59.  
  60. # Trash anything from LinkedIn
  61. # (Because LinkedIn is trash)
  62. if address :all :is ["to", "cc", "resent-to", "x-delivered-to"] "linkedin@matthewhochler.fastmail.fm" {
  63. fileinto "INBOX.Trash";
  64. stop;
  65. }
  66.  
  67. # Trash Sony PSN 'Funds added' emails
  68. if header :is "subject" "Funds have been added to your wallet" {
  69. fileinto "INBOX.Trash";
  70. stop;
  71. }
  72.  
  73.  
  74. ### Inbox ###
  75. # Ensure certain emails are always delivered to my inbox
  76.  
  77. # Password Resets
  78. if header :contains "subject" "Reset" {
  79. fileinto "Inbox";
  80. stop;
  81. }
  82. if header :contains "subject" "Password" {
  83. fileinto "Inbox";
  84. stop;
  85. }
  86.  
  87. # Seamless Receipts
  88. if address :all :is "from" "confirmation@seamless.com" {
  89. fileinto "Inbox";
  90. stop;
  91. }
  92. if address :all :is "from" "order@eat.seamless.com" {
  93. fileinto "Inbox";
  94. stop;
  95. }
  96.  
  97. # Chase QuickPay Notifications
  98. if address :all :is "from" "no-reply@alertsp.chase.com" {
  99. fileinto "Inbox";
  100. stop;
  101. }
  102.  
  103.  
  104. ### Links ###
  105.  
  106. # GitHub Repo Explore Digests
  107. if header :contains "subject" "GitHub explore today" {
  108. fileinto "INBOX.---Links";
  109. stop;
  110. }
  111.  
  112. # Hacker News Digests
  113. if address :all :is "from" "help@hndigest.com" {
  114. fileinto "INBOX.---Links";
  115. stop;
  116. }
  117.  
  118. # Nuzzel Digests
  119. if address :all :is "from" "nuzzel@mail.nuzzel.com" {
  120. fileinto "INBOX.---Links";
  121. stop;
  122. }
  123.  
  124. # IFTTT Digests
  125. if address :all :is "from" "dailydigest@ifttt.com" {
  126. fileinto "INBOX.---Links";
  127. stop;
  128. }
  129. if address :all :is "from" "weeklydigest@ifttt.com" {
  130. fileinto "INBOX.---Links";
  131. stop;
  132. }
  133.  
  134.  
  135. ### News ###
  136.  
  137. # Foreign Policy
  138. if address :all :is "from" "fp@foreignpolicy.com" {
  139. fileinto "INBOX.---News";
  140. stop;
  141. }
  142.  
  143. # Above Avalon
  144. if address :all :is "from" "neil.cybart@aboveavalon.com" {
  145. fileinto "INBOX.---News";
  146. stop;
  147. }
  148.  
  149. # Quartz Daily Brief
  150. if address :all :is "from" "hi@qz.com" {
  151. fileinto "INBOX.---News";
  152. stop;
  153. }
  154.  
  155. # Ben Evans Newsletter
  156. if address :all :is "from" "list@ben-evans.com" {
  157. fileinto "INBOX.---News";
  158. stop;
  159. }
  160.  
  161.  
  162. ### Later ###
  163.  
  164. # Kickstarter Reminders & Updates
  165. if address :all :is "from" "no-reply@kickstarter.com" {
  166. fileinto "INBOX.---Later";
  167. stop;
  168. }
  169.  
  170. # FetLife Updates
  171. if address :all :is "from" "donotreply@fetlifemail.com" {
  172. fileinto "INBOX.---Later";
  173. stop;
  174. }
  175.  
  176. # Any email containing "unsubscribe"
  177. # (usually a newsletter)
  178. if body :text :contains "unsubscribe" {
  179. fileinto "INBOX.---Later";
  180. stop;
  181. }
  182.  
  183. # Any email containing "Privacy Policy"
  184. # (usually a transactional email)
  185. if body :text :contains "Privacy Policy" {
  186. fileinto "INBOX.---Later";
  187. stop;
  188. }
  189.  
  190.  
  191. ### Receipts ###
  192.  
  193. # Sony PSN Receipts
  194. if address :all :is "from" "sony@email.sonyentertainmentnetwork.com" {
  195. fileinto "INBOX.Receipts";
  196. stop;
  197. }
  198.  
  199. # Apple Receipts
  200. if address :all :is "from" "amr_orderprocessing@apple.com" {
  201. fileinto "INBOX.Receipts";
  202. stop;
  203. }
  204.  
  205. # Amazon Receipts
  206. if address :all :is "from" "auto-confirm@amazon.com" {
  207. fileinto "INBOX.Receipts";
  208. stop;
  209. }
  210.  
  211.  
  212. # ===BEGIN-GENERATED=== Text between markers will be automatically replaced
  213. #
  214. # This is the sieve script that would be used if you weren't using
  215. # custom rules. Note that it has been commented out, so it has no actual
  216. # effect on your mail, we've just placed it here for your reference.
  217. # Also note that any changes you make between the BEGIN and END tags
  218. # may be overwritten at any time, so if you want to add your own
  219. # comments and code, don't do it in here!
  220. #
  221. # require ["envelope", "imapflags", "fileinto", "reject", "notify", "vacation", "regex", "relational", "comparator-i;ascii-numeric", "body", "copy"];
  222. #
  223. # if header :contains ["x-resolved-to"] "+personalitysentitem-21039957@" {
  224. # setflag "\\Seen";
  225. # fileinto "INBOX.Sent Items";
  226. # stop;
  227. # }
  228. # if not header :contains ["X-Spam-known-sender"] "yes" {
  229. # if allof(
  230. # header :contains ["X-Backscatter"] "yes",
  231. # not header :matches ["X-LinkName"] "*"
  232. # ) {
  233. # fileinto "INBOX.Junk Mail";
  234. # stop;
  235. # }
  236. # if header :value "ge" :comparator "i;ascii-numeric" ["X-Spam-score"] ["5"] {
  237. # fileinto "INBOX.Junk Mail";
  238. # stop;
  239. # }
  240. # }
  241. # ===END-GENERATED=== Text between markers will be automatically replaced
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement