Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require ["envelope", "imapflags", "fileinto", "reject", "notify", "vacation", "regex", "relational", "comparator-i;ascii-numeric", "body", "copy"];
- ### FastMail Defaults ###
- # Sent Emails
- if header :contains ["x-resolved-to"] "+personalitysentitem-21039957@" {
- setflag "\\Seen";
- fileinto "INBOX.Sent Items";
- stop;
- }
- # Spam Filters
- if not header :contains ["X-Spam-known-sender"] "yes" {
- if allof(
- header :contains ["X-Backscatter"] "yes",
- not header :matches ["X-LinkName"] "*"
- ) {
- fileinto "INBOX.Junk Mail";
- stop;
- }
- if header :value "ge" :comparator "i;ascii-numeric" ["X-Spam-score"] ["5"] {
- fileinto "INBOX.Junk Mail";
- stop;
- }
- }
- ### Forwarding ###
- # Forward shipment confirmation emails to Junecloud Deliveries for tracking
- if header :contains "subject" "shipped" {
- notify :method "mailto" :options ["track@junecloud.com"] :message "$from$ / $subject$ / $text[7000]$";
- }
- # Same as above, but forwarded back to me for testing
- if header :contains "subject" "shipped" {
- notify :method "mailto" :options ["track@matthewhochler.fastmail.fm"] :message "$from$ / $subject$ / $text[7000]$";
- }
- # Forward Above Avalon emails to Instapaper for reading
- if address :all :is "from" "neil.cybart@aboveavalon.com" {
- redirect "readlater.usvaag1nyb1@instapaper.com";
- }
- # Forward Foreign Policy emails to Instapaper for reading
- if address :all :is "from" "fp@foreignpolicy.com" {
- redirect "readlater.usvaag1nyb1@instapaper.com";
- }
- # Forward Quartz Daily Brief emails to Instapaper for reading
- if address :all :is "from" "hi@qz.com" {
- redirect "readlater.usvaag1nyb1@instapaper.com";
- }
- ### Trash ###
- # Trash anything from LinkedIn
- # (Because LinkedIn is trash)
- if address :all :is ["to", "cc", "resent-to", "x-delivered-to"] "linkedin@matthewhochler.fastmail.fm" {
- fileinto "INBOX.Trash";
- stop;
- }
- # Trash Sony PSN 'Funds added' emails
- if header :is "subject" "Funds have been added to your wallet" {
- fileinto "INBOX.Trash";
- stop;
- }
- ### Inbox ###
- # Ensure certain emails are always delivered to my inbox
- # Password Resets
- if header :contains "subject" "Reset" {
- fileinto "Inbox";
- stop;
- }
- if header :contains "subject" "Password" {
- fileinto "Inbox";
- stop;
- }
- # Seamless Receipts
- if address :all :is "from" "confirmation@seamless.com" {
- fileinto "Inbox";
- stop;
- }
- if address :all :is "from" "order@eat.seamless.com" {
- fileinto "Inbox";
- stop;
- }
- # Chase QuickPay Notifications
- if address :all :is "from" "no-reply@alertsp.chase.com" {
- fileinto "Inbox";
- stop;
- }
- ### Links ###
- # GitHub Repo Explore Digests
- if header :contains "subject" "GitHub explore today" {
- fileinto "INBOX.---Links";
- stop;
- }
- # Hacker News Digests
- if address :all :is "from" "help@hndigest.com" {
- fileinto "INBOX.---Links";
- stop;
- }
- # Nuzzel Digests
- if address :all :is "from" "nuzzel@mail.nuzzel.com" {
- fileinto "INBOX.---Links";
- stop;
- }
- # IFTTT Digests
- if address :all :is "from" "dailydigest@ifttt.com" {
- fileinto "INBOX.---Links";
- stop;
- }
- if address :all :is "from" "weeklydigest@ifttt.com" {
- fileinto "INBOX.---Links";
- stop;
- }
- ### News ###
- # Foreign Policy
- if address :all :is "from" "fp@foreignpolicy.com" {
- fileinto "INBOX.---News";
- stop;
- }
- # Above Avalon
- if address :all :is "from" "neil.cybart@aboveavalon.com" {
- fileinto "INBOX.---News";
- stop;
- }
- # Quartz Daily Brief
- if address :all :is "from" "hi@qz.com" {
- fileinto "INBOX.---News";
- stop;
- }
- # Ben Evans Newsletter
- if address :all :is "from" "list@ben-evans.com" {
- fileinto "INBOX.---News";
- stop;
- }
- ### Later ###
- # Kickstarter Reminders & Updates
- if address :all :is "from" "no-reply@kickstarter.com" {
- fileinto "INBOX.---Later";
- stop;
- }
- # FetLife Updates
- if address :all :is "from" "donotreply@fetlifemail.com" {
- fileinto "INBOX.---Later";
- stop;
- }
- # Any email containing "unsubscribe"
- # (usually a newsletter)
- if body :text :contains "unsubscribe" {
- fileinto "INBOX.---Later";
- stop;
- }
- # Any email containing "Privacy Policy"
- # (usually a transactional email)
- if body :text :contains "Privacy Policy" {
- fileinto "INBOX.---Later";
- stop;
- }
- ### Receipts ###
- # Sony PSN Receipts
- if address :all :is "from" "sony@email.sonyentertainmentnetwork.com" {
- fileinto "INBOX.Receipts";
- stop;
- }
- # Apple Receipts
- if address :all :is "from" "amr_orderprocessing@apple.com" {
- fileinto "INBOX.Receipts";
- stop;
- }
- # Amazon Receipts
- if address :all :is "from" "auto-confirm@amazon.com" {
- fileinto "INBOX.Receipts";
- stop;
- }
- # ===BEGIN-GENERATED=== Text between markers will be automatically replaced
- #
- # This is the sieve script that would be used if you weren't using
- # custom rules. Note that it has been commented out, so it has no actual
- # effect on your mail, we've just placed it here for your reference.
- # Also note that any changes you make between the BEGIN and END tags
- # may be overwritten at any time, so if you want to add your own
- # comments and code, don't do it in here!
- #
- # require ["envelope", "imapflags", "fileinto", "reject", "notify", "vacation", "regex", "relational", "comparator-i;ascii-numeric", "body", "copy"];
- #
- # if header :contains ["x-resolved-to"] "+personalitysentitem-21039957@" {
- # setflag "\\Seen";
- # fileinto "INBOX.Sent Items";
- # stop;
- # }
- # if not header :contains ["X-Spam-known-sender"] "yes" {
- # if allof(
- # header :contains ["X-Backscatter"] "yes",
- # not header :matches ["X-LinkName"] "*"
- # ) {
- # fileinto "INBOX.Junk Mail";
- # stop;
- # }
- # if header :value "ge" :comparator "i;ascii-numeric" ["X-Spam-score"] ["5"] {
- # fileinto "INBOX.Junk Mail";
- # stop;
- # }
- # }
- # ===END-GENERATED=== Text between markers will be automatically replaced
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement